@human-protocol/sdk 1.1.13 → 1.1.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/encryption.d.ts +245 -29
- package/dist/encryption.d.ts.map +1 -1
- package/dist/encryption.js +245 -29
- package/dist/escrow.d.ts +731 -117
- package/dist/escrow.d.ts.map +1 -1
- package/dist/escrow.js +734 -120
- package/dist/kvstore.d.ts +138 -15
- package/dist/kvstore.d.ts.map +1 -1
- package/dist/kvstore.js +138 -15
- package/dist/staking.d.ts +324 -54
- package/dist/staking.d.ts.map +1 -1
- package/dist/staking.js +324 -54
- package/dist/statistics.d.ts +266 -16
- package/dist/statistics.d.ts.map +1 -1
- package/dist/statistics.js +266 -16
- package/dist/storage.d.ts +155 -16
- package/dist/storage.d.ts.map +1 -1
- package/dist/storage.js +155 -16
- package/package.json +17 -1
- package/src/encryption.ts +246 -29
- package/src/escrow.ts +734 -120
- package/src/kvstore.ts +138 -15
- package/src/staking.ts +324 -54
- package/src/statistics.ts +266 -16
- package/src/storage.ts +156 -17
package/dist/staking.d.ts
CHANGED
|
@@ -3,6 +3,75 @@ import { EscrowFactory, HMToken, Staking } from '@human-protocol/core/typechain-
|
|
|
3
3
|
import { BigNumber, Signer } from 'ethers';
|
|
4
4
|
import { IAllocation, ILeader, ILeadersFilter, IReward } from './interfaces';
|
|
5
5
|
import { NetworkData } from './types';
|
|
6
|
+
/**
|
|
7
|
+
* ## Introduction
|
|
8
|
+
*
|
|
9
|
+
* This client enables to perform actions on staking contracts and obtain staking information from both the contracts and subgraph.
|
|
10
|
+
*
|
|
11
|
+
* Internally, the SDK will use one network or another according to the network ID of the `signerOrProvider`.
|
|
12
|
+
* To use this client, it is recommended to initialize it using the static `build` method.
|
|
13
|
+
*
|
|
14
|
+
* ```ts
|
|
15
|
+
* static async build(signerOrProvider: Signer | Provider);
|
|
16
|
+
* ```
|
|
17
|
+
*
|
|
18
|
+
* A `Signer` or a `Provider` should be passed depending on the use case of this module:
|
|
19
|
+
*
|
|
20
|
+
* - **Signer**: when the user wants to use this model in order to send transactions caling the contract functions.
|
|
21
|
+
* - **Provider**: when the user wants to use this model in order to get information from the contracts or subgraph.
|
|
22
|
+
*
|
|
23
|
+
* ## Installation
|
|
24
|
+
*
|
|
25
|
+
* ### npm
|
|
26
|
+
* ```bash
|
|
27
|
+
* npm install @human-protocol/sdk
|
|
28
|
+
* ```
|
|
29
|
+
*
|
|
30
|
+
* ### yarn
|
|
31
|
+
* ```bash
|
|
32
|
+
* yarn install @human-protocol/sdk
|
|
33
|
+
* ```
|
|
34
|
+
*
|
|
35
|
+
* ## Code example
|
|
36
|
+
*
|
|
37
|
+
* ### Signer
|
|
38
|
+
*
|
|
39
|
+
* **Using private key(backend)**
|
|
40
|
+
*
|
|
41
|
+
* ```ts
|
|
42
|
+
* import { StakingClient } from '@human-protocol/sdk';
|
|
43
|
+
* import { Wallet, providers } from 'ethers';
|
|
44
|
+
*
|
|
45
|
+
* const rpcUrl = 'YOUR_RPC_URL';
|
|
46
|
+
* const privateKey = 'YOUR_PRIVATE_KEY'
|
|
47
|
+
*
|
|
48
|
+
* const provider = new providers.JsonRpcProvider(rpcUrl);
|
|
49
|
+
* const signer = new Wallet(privateKey, provider);
|
|
50
|
+
* const stakingClient = await StakingClient.build(signer);
|
|
51
|
+
* ```
|
|
52
|
+
*
|
|
53
|
+
* **Using Wagmi(frontend)**
|
|
54
|
+
*
|
|
55
|
+
* ```ts
|
|
56
|
+
* import { useSigner, useChainId } from 'wagmi';
|
|
57
|
+
* import { StakingClient } from '@human-protocol/sdk';
|
|
58
|
+
*
|
|
59
|
+
* const { data: signer } = useSigner();
|
|
60
|
+
* const stakingClient = await StakingClient.build(signer);
|
|
61
|
+
* ```
|
|
62
|
+
*
|
|
63
|
+
* ### Provider
|
|
64
|
+
*
|
|
65
|
+
* ```ts
|
|
66
|
+
* import { StakingClient } from '@human-protocol/sdk';
|
|
67
|
+
* import { providers } from 'ethers';
|
|
68
|
+
*
|
|
69
|
+
* const rpcUrl = 'YOUR_RPC_URL';
|
|
70
|
+
*
|
|
71
|
+
* const provider = new providers.JsonRpcProvider(rpcUrl);
|
|
72
|
+
* const stakingClient = await StakingClient.build(provider);
|
|
73
|
+
* ```
|
|
74
|
+
*/
|
|
6
75
|
export declare class StakingClient {
|
|
7
76
|
signerOrProvider: Signer | Provider;
|
|
8
77
|
network: NetworkData;
|
|
@@ -26,104 +95,305 @@ export declare class StakingClient {
|
|
|
26
95
|
*/
|
|
27
96
|
static build(signerOrProvider: Signer | Provider): Promise<StakingClient>;
|
|
28
97
|
/**
|
|
29
|
-
*
|
|
30
|
-
* **It increases the allowance for the staking contract.*
|
|
98
|
+
* This function approves the staking contract to transfer a specified amount of tokens when the user stakes. It increases the allowance for the staking contract.
|
|
31
99
|
*
|
|
32
|
-
* @param {BigNumber} amount
|
|
33
|
-
* @returns
|
|
34
|
-
*
|
|
100
|
+
* @param {BigNumber} amount Amount in WEI of tokens to approve for stake.
|
|
101
|
+
* @returns Returns void if successful. Throws error if any.
|
|
102
|
+
*
|
|
103
|
+
*
|
|
104
|
+
* **Code example**
|
|
105
|
+
*
|
|
106
|
+
* ```ts
|
|
107
|
+
* import { ethers, Wallet, providers } from 'ethers';
|
|
108
|
+
* import { StakingClient } from '@human-protocol/sdk';
|
|
109
|
+
*
|
|
110
|
+
* const rpcUrl = 'YOUR_RPC_URL';
|
|
111
|
+
* const privateKey = 'YOUR_PRIVATE_KEY'
|
|
112
|
+
*
|
|
113
|
+
* const provider = new providers.JsonRpcProvider(rpcUrl);
|
|
114
|
+
* const signer = new Wallet(privateKey, provider);
|
|
115
|
+
* const stakingClient = await StakingClient.build(signer);
|
|
116
|
+
*
|
|
117
|
+
* const amount = ethers.utils.parseUnits(5, 'ether'); //convert from ETH to WEI
|
|
118
|
+
* await stakingClient.approveStake(amount);
|
|
119
|
+
* ```
|
|
35
120
|
*/
|
|
36
121
|
approveStake(amount: BigNumber): Promise<void>;
|
|
37
122
|
/**
|
|
38
|
-
*
|
|
123
|
+
* This function stakes a specified amount of tokens on a specific network.
|
|
124
|
+
*
|
|
125
|
+
* > `approveStake` must be called before
|
|
126
|
+
*
|
|
127
|
+
* @param {BigNumber} amount Amount in WEI of tokens to stake.
|
|
128
|
+
* @returns Returns void if successful. Throws error if any.
|
|
129
|
+
*
|
|
130
|
+
*
|
|
131
|
+
* **Code example**
|
|
39
132
|
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
133
|
+
* ```ts
|
|
134
|
+
* import { ethers, Wallet, providers } from 'ethers';
|
|
135
|
+
* import { StakingClient } from '@human-protocol/sdk';
|
|
136
|
+
*
|
|
137
|
+
* const rpcUrl = 'YOUR_RPC_URL';
|
|
138
|
+
* const privateKey = 'YOUR_PRIVATE_KEY'
|
|
139
|
+
*
|
|
140
|
+
* const provider = new providers.JsonRpcProvider(rpcUrl);
|
|
141
|
+
* const signer = new Wallet(privateKey, provider);
|
|
142
|
+
* const stakingClient = await StakingClient.build(signer);
|
|
143
|
+
*
|
|
144
|
+
* const amount = ethers.utils.parseUnits(5, 'ether'); //convert from ETH to WEI
|
|
145
|
+
* await stakingClient.approveStake(amount); // if it was already approved before, this is not necessary
|
|
146
|
+
* await stakingClient.approveStake(amount);
|
|
147
|
+
* ```
|
|
43
148
|
*/
|
|
44
149
|
stake(amount: BigNumber): Promise<void>;
|
|
45
150
|
/**
|
|
46
|
-
*
|
|
47
|
-
*
|
|
151
|
+
* This function unstakes tokens from staking contract. The unstaked tokens stay locked for a period of time.
|
|
152
|
+
*
|
|
153
|
+
* > Must have tokens available to unstake
|
|
154
|
+
*
|
|
155
|
+
* @param {BigNumber} amount Amount in WEI of tokens to unstake.
|
|
156
|
+
* @returns Returns void if successful. Throws error if any.
|
|
157
|
+
*
|
|
158
|
+
*
|
|
159
|
+
* **Code example**
|
|
160
|
+
*
|
|
161
|
+
* ```ts
|
|
162
|
+
* import { ethers, Wallet, providers } from 'ethers';
|
|
163
|
+
* import { StakingClient } from '@human-protocol/sdk';
|
|
164
|
+
*
|
|
165
|
+
* const rpcUrl = 'YOUR_RPC_URL';
|
|
166
|
+
* const privateKey = 'YOUR_PRIVATE_KEY'
|
|
167
|
+
*
|
|
168
|
+
* const provider = new providers.JsonRpcProvider(rpcUrl);
|
|
169
|
+
* const signer = new Wallet(privateKey, provider);
|
|
170
|
+
* const stakingClient = await StakingClient.build(signer);
|
|
48
171
|
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
172
|
+
* const amount = ethers.utils.parseUnits(5, 'ether'); //convert from ETH to WEI
|
|
173
|
+
* await stakingClient.unstake(amount);
|
|
174
|
+
* ```
|
|
52
175
|
*/
|
|
53
176
|
unstake(amount: BigNumber): Promise<void>;
|
|
54
177
|
/**
|
|
55
|
-
*
|
|
178
|
+
* This function withdraws unstaked and non locked tokens form staking contract to the user wallet.
|
|
56
179
|
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
180
|
+
* > Must have tokens available to withdraw
|
|
181
|
+
*
|
|
182
|
+
* @returns Returns void if successful. Throws error if any.
|
|
183
|
+
*
|
|
184
|
+
*
|
|
185
|
+
* **Code example**
|
|
186
|
+
*
|
|
187
|
+
* ```ts
|
|
188
|
+
* import { Wallet, providers } from 'ethers';
|
|
189
|
+
* import { StakingClient } from '@human-protocol/sdk';
|
|
190
|
+
*
|
|
191
|
+
* const rpcUrl = 'YOUR_RPC_URL';
|
|
192
|
+
* const privateKey = 'YOUR_PRIVATE_KEY'
|
|
193
|
+
*
|
|
194
|
+
* const provider = new providers.JsonRpcProvider(rpcUrl);
|
|
195
|
+
* const signer = new Wallet(privateKey, provider);
|
|
196
|
+
* const stakingClient = await StakingClient.build(signer);
|
|
197
|
+
*
|
|
198
|
+
* await stakingClient.withdraw();
|
|
199
|
+
* ```
|
|
59
200
|
*/
|
|
60
201
|
withdraw(): Promise<void>;
|
|
61
202
|
/**
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
* @param {string}
|
|
66
|
-
* @param {string}
|
|
67
|
-
* @param {
|
|
68
|
-
* @
|
|
69
|
-
*
|
|
70
|
-
*
|
|
203
|
+
* This function reduces the allocated amount by an staker in an escrow and transfers those tokens to the reward pool. This allows the slasher to claim them later.
|
|
204
|
+
*
|
|
205
|
+
* @param {string} slasher Wallet address from who requested the slash
|
|
206
|
+
* @param {string} staker Wallet address from who is going to be slashed
|
|
207
|
+
* @param {string} escrowAddress Address of the escrow which allocation will be slashed
|
|
208
|
+
* @param {BigNumber} amount Amount in WEI of tokens to unstake.
|
|
209
|
+
* @returns Returns void if successful. Throws error if any.
|
|
210
|
+
*
|
|
211
|
+
*
|
|
212
|
+
* **Code example**
|
|
213
|
+
*
|
|
214
|
+
* ```ts
|
|
215
|
+
* import { ethers, Wallet, providers } from 'ethers';
|
|
216
|
+
* import { StakingClient } from '@human-protocol/sdk';
|
|
217
|
+
*
|
|
218
|
+
* const rpcUrl = 'YOUR_RPC_URL';
|
|
219
|
+
* const privateKey = 'YOUR_PRIVATE_KEY'
|
|
220
|
+
*
|
|
221
|
+
* const provider = new providers.JsonRpcProvider(rpcUrl);
|
|
222
|
+
* const signer = new Wallet(privateKey, provider);
|
|
223
|
+
* const stakingClient = await StakingClient.build(signer);
|
|
224
|
+
*
|
|
225
|
+
* const amount = ethers.utils.parseUnits(5, 'ether'); //convert from ETH to WEI
|
|
226
|
+
* await stakingClient.slash('0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266', '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266', '0x62dD51230A30401C455c8398d06F85e4EaB6309f', amount);
|
|
227
|
+
* ```
|
|
71
228
|
*/
|
|
72
229
|
slash(slasher: string, staker: string, escrowAddress: string, amount: BigNumber): Promise<void>;
|
|
73
230
|
/**
|
|
74
|
-
*
|
|
231
|
+
* This function allocates a portion of the staked tokens to a specific escrow.
|
|
232
|
+
*
|
|
233
|
+
* > Must have tokens staked
|
|
234
|
+
*
|
|
235
|
+
* @param {string} escrowAddress Address of the escrow contract to allocate in.
|
|
236
|
+
* @param {BigNumber} amount Amount in WEI of tokens to allocate.
|
|
237
|
+
* @returns Returns void if successful. Throws error if any.
|
|
238
|
+
*
|
|
239
|
+
*
|
|
240
|
+
* **Code example**
|
|
241
|
+
*
|
|
242
|
+
* ```ts
|
|
243
|
+
* import { ethers, Wallet, providers } from 'ethers';
|
|
244
|
+
* import { StakingClient } from '@human-protocol/sdk';
|
|
245
|
+
*
|
|
246
|
+
* const rpcUrl = 'YOUR_RPC_URL';
|
|
247
|
+
* const privateKey = 'YOUR_PRIVATE_KEY'
|
|
75
248
|
*
|
|
76
|
-
*
|
|
77
|
-
*
|
|
78
|
-
*
|
|
79
|
-
*
|
|
249
|
+
* const provider = new providers.JsonRpcProvider(rpcUrl);
|
|
250
|
+
* const signer = new Wallet(privateKey, provider);
|
|
251
|
+
* const stakingClient = await StakingClient.build(signer);
|
|
252
|
+
*
|
|
253
|
+
* const amount = ethers.utils.parseUnits(5, 'ether'); //convert from ETH to WEI
|
|
254
|
+
* await stakingClient.allocate('0x62dD51230A30401C455c8398d06F85e4EaB6309f', amount);
|
|
255
|
+
* ```
|
|
80
256
|
*/
|
|
81
257
|
allocate(escrowAddress: string, amount: BigNumber): Promise<void>;
|
|
82
258
|
/**
|
|
83
|
-
*
|
|
259
|
+
* This function drops the allocation from a specific escrow.
|
|
260
|
+
*
|
|
261
|
+
* > The escrow must have allocation
|
|
262
|
+
* > The escrow must be cancelled or completed.
|
|
263
|
+
*
|
|
264
|
+
* @param {string} escrowAddress Address of the escrow contract to close allocation from.
|
|
265
|
+
* @returns Returns void if successful. Throws error if any.
|
|
266
|
+
*
|
|
267
|
+
*
|
|
268
|
+
* **Code example**
|
|
84
269
|
*
|
|
85
|
-
*
|
|
86
|
-
*
|
|
87
|
-
*
|
|
270
|
+
* ```ts
|
|
271
|
+
* import { Wallet, providers } from 'ethers';
|
|
272
|
+
* import { StakingClient } from '@human-protocol/sdk';
|
|
273
|
+
*
|
|
274
|
+
* const rpcUrl = 'YOUR_RPC_URL';
|
|
275
|
+
* const privateKey = 'YOUR_PRIVATE_KEY'
|
|
276
|
+
*
|
|
277
|
+
* const provider = new providers.JsonRpcProvider(rpcUrl);
|
|
278
|
+
* const signer = new Wallet(privateKey, provider);
|
|
279
|
+
* const stakingClient = await StakingClient.build(signer);
|
|
280
|
+
*
|
|
281
|
+
* await stakingClient.closeAllocation('0x62dD51230A30401C455c8398d06F85e4EaB6309f');
|
|
282
|
+
* ```
|
|
88
283
|
*/
|
|
89
284
|
closeAllocation(escrowAddress: string): Promise<void>;
|
|
90
285
|
/**
|
|
91
|
-
*
|
|
286
|
+
* This function drops the allocation from a specific escrow.
|
|
287
|
+
*
|
|
288
|
+
* > The escrow must have rewards added
|
|
289
|
+
*
|
|
290
|
+
* @param {string} escrowAddress Escrow address from which rewards are distributed.
|
|
291
|
+
* @returns Returns void if successful. Throws error if any.
|
|
92
292
|
*
|
|
93
|
-
*
|
|
94
|
-
*
|
|
95
|
-
*
|
|
293
|
+
*
|
|
294
|
+
* **Code example**
|
|
295
|
+
*
|
|
296
|
+
* ```ts
|
|
297
|
+
* import { Wallet, providers } from 'ethers';
|
|
298
|
+
* import { StakingClient } from '@human-protocol/sdk';
|
|
299
|
+
*
|
|
300
|
+
* const rpcUrl = 'YOUR_RPC_URL';
|
|
301
|
+
* const privateKey = 'YOUR_PRIVATE_KEY'
|
|
302
|
+
*
|
|
303
|
+
* const provider = new providers.JsonRpcProvider(rpcUrl);
|
|
304
|
+
* const signer = new Wallet(privateKey, provider);
|
|
305
|
+
* const stakingClient = await StakingClient.build(signer);
|
|
306
|
+
*
|
|
307
|
+
* await stakingClient.distributeRewards('0x62dD51230A30401C455c8398d06F85e4EaB6309f');
|
|
308
|
+
* ```
|
|
96
309
|
*/
|
|
97
310
|
distributeRewards(escrowAddress: string): Promise<void>;
|
|
98
311
|
/**
|
|
99
|
-
*
|
|
312
|
+
* This function returns all the leader details of the protocol.
|
|
313
|
+
*
|
|
314
|
+
* @param {ILeadersFilter} filter Filter for the leaders.
|
|
315
|
+
* @returns {ILeader[]} Returns an array with all the leader details.
|
|
316
|
+
*
|
|
317
|
+
*
|
|
318
|
+
* **Code example**
|
|
319
|
+
*
|
|
320
|
+
* ```ts
|
|
321
|
+
* import { StakingClient } from '@human-protocol/sdk';
|
|
322
|
+
* import { providers } from 'ethers';
|
|
323
|
+
*
|
|
324
|
+
* const rpcUrl = 'YOUR_RPC_URL';
|
|
100
325
|
*
|
|
101
|
-
*
|
|
102
|
-
*
|
|
103
|
-
*
|
|
326
|
+
* const provider = new providers.JsonRpcProvider(rpcUrl);
|
|
327
|
+
* const stakingClient = await StakingClient.build(provider);
|
|
328
|
+
*
|
|
329
|
+
* const leaders = await stakingClient.getLeaders();
|
|
330
|
+
* ```
|
|
104
331
|
*/
|
|
105
332
|
getLeader(address: string): Promise<ILeader>;
|
|
106
333
|
/**
|
|
107
|
-
*
|
|
334
|
+
* This function returns the leader data for the given address.
|
|
335
|
+
*
|
|
336
|
+
* @param {string} address Leader address.
|
|
337
|
+
* @returns {ILeader} Returns the leader details.
|
|
338
|
+
*
|
|
339
|
+
*
|
|
340
|
+
* **Code example**
|
|
341
|
+
*
|
|
342
|
+
* ```ts
|
|
343
|
+
* import { StakingClient } from '@human-protocol/sdk';
|
|
344
|
+
* import { providers } from 'ethers';
|
|
108
345
|
*
|
|
109
|
-
*
|
|
110
|
-
*
|
|
346
|
+
* const rpcUrl = 'YOUR_RPC_URL';
|
|
347
|
+
*
|
|
348
|
+
* const provider = new providers.JsonRpcProvider(rpcUrl);
|
|
349
|
+
* const stakingClient = await StakingClient.build(provider);
|
|
350
|
+
*
|
|
351
|
+
* const leader = await stakingClient.getLeader('0x62dD51230A30401C455c8398d06F85e4EaB6309f');
|
|
352
|
+
* ```
|
|
111
353
|
*/
|
|
112
354
|
getLeaders(filter?: ILeadersFilter): Promise<ILeader[]>;
|
|
113
355
|
/**
|
|
114
|
-
*
|
|
356
|
+
* This function returns information about the allocation of the specified escrow.
|
|
357
|
+
*
|
|
358
|
+
* @param {string} escrowAddress Escrow address from which we want to get allocation information.
|
|
359
|
+
* @returns {IAllocation} Returns allocation info if exists.
|
|
360
|
+
*
|
|
361
|
+
*
|
|
362
|
+
* **Code example**
|
|
115
363
|
*
|
|
116
|
-
*
|
|
117
|
-
*
|
|
118
|
-
*
|
|
364
|
+
* ```ts
|
|
365
|
+
* import { StakingClient } from '@human-protocol/sdk';
|
|
366
|
+
* import { providers } from 'ethers';
|
|
367
|
+
*
|
|
368
|
+
* const rpcUrl = 'YOUR_RPC_URL';
|
|
369
|
+
*
|
|
370
|
+
* const provider = new providers.JsonRpcProvider(rpcUrl);
|
|
371
|
+
* const stakingClient = await StakingClient.build(provider);
|
|
372
|
+
*
|
|
373
|
+
* const allocationInfo = await stakingClient.getAllocation('0x62dD51230A30401C455c8398d06F85e4EaB6309f');
|
|
374
|
+
* ```
|
|
119
375
|
*/
|
|
120
376
|
getAllocation(escrowAddress: string): Promise<IAllocation>;
|
|
121
377
|
/**
|
|
122
|
-
*
|
|
378
|
+
* This function returns information about the rewards for a given slasher address.
|
|
379
|
+
*
|
|
380
|
+
* @param {string} slasherAddress Slasher address.
|
|
381
|
+
* @returns {IReward[]} Returns an array of Reward objects that contain the rewards earned by the user through slashing other users.
|
|
382
|
+
*
|
|
383
|
+
*
|
|
384
|
+
* **Code example**
|
|
385
|
+
*
|
|
386
|
+
* ```ts
|
|
387
|
+
* import { StakingClient } from '@human-protocol/sdk';
|
|
388
|
+
* import { providers } from 'ethers';
|
|
389
|
+
*
|
|
390
|
+
* const rpcUrl = 'YOUR_RPC_URL';
|
|
391
|
+
*
|
|
392
|
+
* const provider = new providers.JsonRpcProvider(rpcUrl);
|
|
393
|
+
* const stakingClient = await StakingClient.build(provider);
|
|
123
394
|
*
|
|
124
|
-
*
|
|
125
|
-
*
|
|
126
|
-
* @throws {Error} - An error object if an error occurred, results otherwise
|
|
395
|
+
* const rewards = await stakingClient.getRewards('0x62dD51230A30401C455c8398d06F85e4EaB6309f');
|
|
396
|
+
* ```
|
|
127
397
|
*/
|
|
128
398
|
getRewards(slasherAddress: string): Promise<IReward[]>;
|
|
129
399
|
}
|
package/dist/staking.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"staking.d.ts","sourceRoot":"","sources":["../src/staking.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAE5D,OAAO,EACL,aAAa,EAEb,OAAO,EAIP,OAAO,EAER,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,EAAU,MAAM,QAAQ,CAAC;AAenD,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAC7E,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAMtC,qBAAa,aAAa;IACjB,gBAAgB,EAAE,MAAM,GAAG,QAAQ,CAAC;IACpC,OAAO,EAAE,WAAW,CAAC;IACrB,aAAa,EAAE,OAAO,CAAC;IACvB,eAAe,EAAE,OAAO,CAAC;IACzB,qBAAqB,EAAE,aAAa,CAAC;IAE5C;;;;;OAKG;gBACS,gBAAgB,EAAE,MAAM,GAAG,QAAQ,EAAE,OAAO,EAAE,WAAW;IAoBrE;;;;;;;OAOG;WACiB,KAAK,CAAC,gBAAgB,EAAE,MAAM,GAAG,QAAQ;IAsB7D
|
|
1
|
+
{"version":3,"file":"staking.d.ts","sourceRoot":"","sources":["../src/staking.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAE5D,OAAO,EACL,aAAa,EAEb,OAAO,EAIP,OAAO,EAER,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,EAAU,MAAM,QAAQ,CAAC;AAenD,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE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