22
22
23
23
| Input parameter | Input type | Description | Example input |
24
24
| ----------------- | ---------- | ----------------------------- | -------------------------------------------- |
25
- | account | string | Address of the Based Application | '0x64714cf5db177398729e37627be0fc08f43b17a6' |
25
+ | account | string | Address of the account | '0x64714cf5db177398729e37627be0fc08f43b17a6' |
26
26
27
27
Example:
28
28
@@ -42,35 +42,6 @@ Example output:
42
42
}
43
43
```
44
44
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
-
74
45
### ` getStrategyTokenWeights(string bappAddress) `
75
46
76
47
Used to calculate the weights of the strategies in a given Bapp.
@@ -93,12 +64,30 @@ Example output:
93
64
94
65
``` bash
95
66
[
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
+ }
98
87
]
99
88
```
100
89
101
- # ## `getDelegatedBalances(string bappAddress)`
90
+ ### ` getDelegatedBalances(string bappAddress) `
102
91
103
92
Given the address of a Based Application, returns the delegated balances of the Bapp.
104
93
0 commit comments