Skip to content

Commit 63bbb10

Browse files
authored
Merge pull request #20 from ssvlabs/ba-sdk-ffixes
BA SDK fixes
2 parents 5f49093 + 5aabd2a commit 63bbb10

File tree

4 files changed

+227
-226
lines changed

4 files changed

+227
-226
lines changed

docs/based-applications/developers/BA-SDK/examples/based-application-development.md

Lines changed: 0 additions & 186 deletions
This file was deleted.

docs/based-applications/developers/BA-SDK/module-reference/api-module.md

Lines changed: 22 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Input:
2222

2323
| Input parameter | Input type | Description | Example input |
2424
| ----------------- | ---------- | ----------------------------- | -------------------------------------------- |
25-
| account | string | Address of the Based Application | '0x64714cf5db177398729e37627be0fc08f43b17a6' |
25+
| account | string | Address of the account | '0x64714cf5db177398729e37627be0fc08f43b17a6' |
2626

2727
Example:
2828

@@ -42,35 +42,6 @@ Example output:
4242
}
4343
```
4444

45-
### `getBappSlashableBalance(string bappAddress)`
46-
47-
Given the address of a Based Application, returns the slashable balance of the Bapp.
48-
49-
Input:
50-
51-
| Input parameter | Input type | Description | Example input |
52-
| ----------------- | ---------- | ----------------------------- | -------------------------------------------- |
53-
| bappId | string | Address of the Based Application | '0x64714cf5db177398729e37627be0fc08f43b17a6' |
54-
55-
Example:
56-
57-
```typescript
58-
const getBappSlashableBalance = await sdk.api.getBappSlashableBalance({
59-
bAppId: "0x64714cf5db177398729e37627be0fc08f43b17a6",
60-
});
61-
```
62-
63-
Example output:
64-
65-
```bash
66-
[
67-
{
68-
token: '0x68a8ddd7a59a900e0657e9f8bbe02b70c947f25f',
69-
balance: 97110000000000000000n
70-
}
71-
]
72-
```
73-
7445
### `getStrategyTokenWeights(string bappAddress)`
7546

7647
Used to calculate the weights of the strategies in a given Bapp.
@@ -93,12 +64,30 @@ Example output:
9364

9465
```bash
9566
[
96-
{ id: '10', tokenWeights: [ [Object] ] },
97-
{ id: '2', tokenWeights: [ [Object] ], validatorBalanceWeight: 1 }
67+
{
68+
"id": "10",
69+
"tokenWeights": [
70+
{
71+
"token": "0x68a8ddd7a59a900e0657e9f8bbe02b70c947f25f",
72+
"weight": 0.9267840593141798
73+
}
74+
],
75+
"validatorBalanceWeight": 0.0322679969182334
76+
},
77+
{
78+
"id": "2",
79+
"tokenWeights": [
80+
{
81+
"token": "0x68a8ddd7a59a900e0657e9f8bbe02b70c947f25f",
82+
"weight": 0.07321594068582021
83+
}
84+
],
85+
"validatorBalanceWeight": 0.9677320030817667
86+
}
9887
]
9988
```
10089

101-
### `getDelegatedBalances(string bappAddress)`
90+
### `getDelegatedBalances(string bappAddress)`
10291

10392
Given the address of a Based Application, returns the delegated balances of the Bapp.
10493

0 commit comments

Comments
 (0)