@human-protocol/sdk 3.0.7 → 4.0.0

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.
Files changed (64) hide show
  1. package/dist/constants.d.ts +2 -25
  2. package/dist/constants.d.ts.map +1 -1
  3. package/dist/constants.js +25 -66
  4. package/dist/decorators.js +1 -1
  5. package/dist/encryption.d.ts +21 -29
  6. package/dist/encryption.d.ts.map +1 -1
  7. package/dist/encryption.js +34 -36
  8. package/dist/error.d.ts +31 -28
  9. package/dist/error.d.ts.map +1 -1
  10. package/dist/error.js +36 -33
  11. package/dist/escrow.d.ts +118 -112
  12. package/dist/escrow.d.ts.map +1 -1
  13. package/dist/escrow.js +254 -180
  14. package/dist/graphql/queries/operator.d.ts.map +1 -1
  15. package/dist/graphql/queries/operator.js +15 -7
  16. package/dist/graphql/queries/statistics.d.ts.map +1 -1
  17. package/dist/graphql/queries/statistics.js +0 -2
  18. package/dist/graphql/queries/transaction.d.ts.map +1 -1
  19. package/dist/graphql/queries/transaction.js +23 -10
  20. package/dist/graphql/types.d.ts +0 -2
  21. package/dist/graphql/types.d.ts.map +1 -1
  22. package/dist/interfaces.d.ts +29 -12
  23. package/dist/interfaces.d.ts.map +1 -1
  24. package/dist/kvstore.d.ts +16 -16
  25. package/dist/kvstore.d.ts.map +1 -1
  26. package/dist/kvstore.js +16 -16
  27. package/dist/operator.d.ts +11 -10
  28. package/dist/operator.d.ts.map +1 -1
  29. package/dist/operator.js +36 -11
  30. package/dist/staking.d.ts +26 -118
  31. package/dist/staking.d.ts.map +1 -1
  32. package/dist/staking.js +46 -173
  33. package/dist/statistics.d.ts +10 -29
  34. package/dist/statistics.d.ts.map +1 -1
  35. package/dist/statistics.js +13 -30
  36. package/dist/storage.d.ts +13 -18
  37. package/dist/storage.d.ts.map +1 -1
  38. package/dist/storage.js +30 -25
  39. package/dist/transaction.js +1 -1
  40. package/dist/types.d.ts +23 -6
  41. package/dist/types.d.ts.map +1 -1
  42. package/dist/types.js +1 -1
  43. package/dist/utils.d.ts +0 -1
  44. package/dist/utils.d.ts.map +1 -1
  45. package/dist/utils.js +0 -1
  46. package/package.json +8 -4
  47. package/src/constants.ts +25 -66
  48. package/src/decorators.ts +1 -1
  49. package/src/encryption.ts +21 -29
  50. package/src/error.ts +39 -37
  51. package/src/escrow.ts +360 -216
  52. package/src/graphql/queries/operator.ts +15 -7
  53. package/src/graphql/queries/statistics.ts +0 -2
  54. package/src/graphql/queries/transaction.ts +23 -13
  55. package/src/graphql/types.ts +0 -2
  56. package/src/interfaces.ts +30 -13
  57. package/src/kvstore.ts +17 -17
  58. package/src/operator.ts +47 -12
  59. package/src/staking.ts +53 -187
  60. package/src/statistics.ts +13 -30
  61. package/src/storage.ts +13 -18
  62. package/src/transaction.ts +2 -2
  63. package/src/types.ts +24 -6
  64. package/src/utils.ts +0 -1
package/dist/escrow.d.ts CHANGED
@@ -3,23 +3,23 @@ import { BaseEthersClient } from './base';
3
3
  import { ChainId, OrderDirection } from './enums';
4
4
  import { EscrowData, StatusEvent } from './graphql';
5
5
  import { IEscrowConfig, IEscrowsFilter } from './interfaces';
6
- import { EscrowCancel, EscrowStatus, NetworkData } from './types';
6
+ import { EscrowCancel, EscrowStatus, EscrowWithdraw, NetworkData, TransactionLikeWithNonce } from './types';
7
7
  /**
8
8
  * ## Introduction
9
9
  *
10
- * This client enables to perform actions on Escrow contracts and obtain information from both the contracts and subgraph.
10
+ * This client enables performing actions on Escrow contracts and obtaining information from both the contracts and subgraph.
11
11
  *
12
12
  * Internally, the SDK will use one network or another according to the network ID of the `runner`.
13
13
  * To use this client, it is recommended to initialize it using the static `build` method.
14
14
  *
15
15
  * ```ts
16
- * static async build(runner: ContractRunner);
16
+ * static async build(runner: ContractRunner): Promise<EscrowClient>;
17
17
  * ```
18
18
  *
19
19
  * A `Signer` or a `Provider` should be passed depending on the use case of this module:
20
20
  *
21
- * - **Signer**: when the user wants to use this model in order to send transactions caling the contract functions.
22
- * - **Provider**: when the user wants to use this model in order to get information from the contracts or subgraph.
21
+ * - **Signer**: when the user wants to use this model to send transactions calling the contract functions.
22
+ * - **Provider**: when the user wants to use this model to get information from the contracts or subgraph.
23
23
  *
24
24
  * ## Installation
25
25
  *
@@ -37,21 +37,21 @@ import { EscrowCancel, EscrowStatus, NetworkData } from './types';
37
37
  *
38
38
  * ### Signer
39
39
  *
40
- * **Using private key(backend)**
40
+ * **Using private key (backend)**
41
41
  *
42
42
  * ```ts
43
43
  * import { EscrowClient } from '@human-protocol/sdk';
44
44
  * import { Wallet, providers } from 'ethers';
45
45
  *
46
46
  * const rpcUrl = 'YOUR_RPC_URL';
47
- * const privateKey = 'YOUR_PRIVATE_KEY'
47
+ * const privateKey = 'YOUR_PRIVATE_KEY';
48
48
  *
49
49
  * const provider = new providers.JsonRpcProvider(rpcUrl);
50
50
  * const signer = new Wallet(privateKey, provider);
51
51
  * const escrowClient = await EscrowClient.build(signer);
52
52
  * ```
53
53
  *
54
- * **Using Wagmi(frontend)**
54
+ * **Using Wagmi (frontend)**
55
55
  *
56
56
  * ```ts
57
57
  * import { useSigner, useChainId } from 'wagmi';
@@ -79,7 +79,7 @@ export declare class EscrowClient extends BaseEthersClient {
79
79
  * **EscrowClient constructor**
80
80
  *
81
81
  * @param {ContractRunner} runner The Runner object to interact with the Ethereum network
82
- * @param {NetworkData} network The network information required to connect to the Escrow contract
82
+ * @param {NetworkData} networkData The network information required to connect to the Escrow contract
83
83
  */
84
84
  constructor(runner: ContractRunner, networkData: NetworkData);
85
85
  /**
@@ -101,11 +101,11 @@ export declare class EscrowClient extends BaseEthersClient {
101
101
  /**
102
102
  * This function creates an escrow contract that uses the token passed to pay oracle fees and reward workers.
103
103
  *
104
- * @param {string} tokenAddress Token address to use for pay outs.
104
+ * @param {string} tokenAddress Token address to use for payouts.
105
105
  * @param {string[]} trustedHandlers Array of addresses that can perform actions on the contract.
106
106
  * @param {string} jobRequesterId Job Requester Id
107
107
  * @param {Overrides} [txOptions] - Additional transaction parameters (optional, defaults to an empty object).
108
- * @returns {Promise<string>} Return the address of the escrow created.
108
+ * @returns {Promise<string>} Returns the address of the escrow created.
109
109
  *
110
110
  *
111
111
  * **Code example**
@@ -117,7 +117,7 @@ export declare class EscrowClient extends BaseEthersClient {
117
117
  * import { EscrowClient } from '@human-protocol/sdk';
118
118
  *
119
119
  * const rpcUrl = 'YOUR_RPC_URL';
120
- * const privateKey = 'YOUR_PRIVATE_KEY'
120
+ * const privateKey = 'YOUR_PRIVATE_KEY';
121
121
  *
122
122
  * const provider = new providers.JsonRpcProvider(rpcUrl);
123
123
  * const signer = new Wallet(privateKey, provider);
@@ -148,7 +148,7 @@ export declare class EscrowClient extends BaseEthersClient {
148
148
  * import { EscrowClient } from '@human-protocol/sdk';
149
149
  *
150
150
  * const rpcUrl = 'YOUR_RPC_URL';
151
- * const privateKey = 'YOUR_PRIVATE_KEY'
151
+ * const privateKey = 'YOUR_PRIVATE_KEY';
152
152
  *
153
153
  * const provider = new providers.JsonRpcProvider(rpcUrl);
154
154
  * const signer = new Wallet(privateKey, provider);
@@ -159,58 +159,16 @@ export declare class EscrowClient extends BaseEthersClient {
159
159
  * recordingOracle: '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266',
160
160
  * reputationOracle: '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266',
161
161
  * exchangeOracle: '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266',
162
- * recordingOracleFee: bigint.from('10'),
163
- * reputationOracleFee: bigint.from('10'),
164
- * exchangeOracleFee: bigint.from('10'),
165
- * manifestUrl: 'htttp://localhost/manifest.json',
162
+ * recordingOracleFee: BigInt('10'),
163
+ * reputationOracleFee: BigInt('10'),
164
+ * exchangeOracleFee: BigInt('10'),
165
+ * manifestUrl: 'http://localhost/manifest.json',
166
166
  * manifestHash: 'b5dad76bf6772c0f07fd5e048f6e75a5f86ee079',
167
167
  * };
168
168
  * await escrowClient.setup(escrowAddress, escrowConfig);
169
169
  * ```
170
170
  */
171
171
  setup(escrowAddress: string, escrowConfig: IEscrowConfig, txOptions?: Overrides): Promise<void>;
172
- /**
173
- * This function creates and sets up an escrow.
174
- *
175
- * @param {string} tokenAddress Token address to use for pay outs.
176
- * @param {string[]} trustedHandlers Array of addresses that can perform actions on the contract.
177
- * @param {string} jobRequesterId Job Requester Id
178
- * @param {IEscrowConfig} escrowConfig Configuration object with escrow settings.
179
- * @returns {Promise<string>} Returns the address of the escrow created.
180
- *
181
- *
182
- * **Code example**
183
- *
184
- * ```ts
185
- * import { ethers, Wallet, providers } from 'ethers';
186
- * import { EscrowClient } from '@human-protocol/sdk';
187
- *
188
- * const rpcUrl = 'YOUR_RPC_URL';
189
- * const privateKey = 'YOUR_PRIVATE_KEY'
190
- *
191
- * const provider = new providers.JsonRpcProvider(rpcUrl);
192
- * const signer = new Wallet(privateKey, provider);
193
- * const escrowClient = await EscrowClient.build(signer);
194
- *
195
- * const tokenAddress = '0x0376D26246Eb35FF4F9924cF13E6C05fd0bD7Fb4';
196
- * const trustedHandlers = ['0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266', '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266'];
197
- * const jobRequesterId = "job-requester-id";
198
- *
199
- * const escrowConfig = {
200
- * recordingOracle: '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266',
201
- * reputationOracle: '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266',
202
- * exchangeOracle: '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266',
203
- * recordingOracleFee: bigint.from('10'),
204
- * reputationOracleFee: bigint.from('10'),
205
- * exchangeOracleFee: bigint.from('10'),
206
- * manifestUrl: 'htttp://localhost/manifest.json',
207
- * manifestHash: 'b5dad76bf6772c0f07fd5e048f6e75a5f86ee079',
208
- * };
209
- *
210
- * const escrowAddress = await escrowClient.createAndSetupEscrow(tokenAddress, trustedHandlers, jobRequesterId, escrowConfig);
211
- * ```
212
- */
213
- createAndSetupEscrow(tokenAddress: string, trustedHandlers: string[], jobRequesterId: string, escrowConfig: IEscrowConfig): Promise<string>;
214
172
  /**
215
173
  * This function adds funds of the chosen token to the escrow.
216
174
  *
@@ -227,7 +185,7 @@ export declare class EscrowClient extends BaseEthersClient {
227
185
  * import { EscrowClient } from '@human-protocol/sdk';
228
186
  *
229
187
  * const rpcUrl = 'YOUR_RPC_URL';
230
- * const privateKey = 'YOUR_PRIVATE_KEY'
188
+ * const privateKey = 'YOUR_PRIVATE_KEY';
231
189
  *
232
190
  * const provider = new providers.JsonRpcProvider(rpcUrl);
233
191
  * const signer = new Wallet(privateKey, provider);
@@ -239,10 +197,10 @@ export declare class EscrowClient extends BaseEthersClient {
239
197
  */
240
198
  fund(escrowAddress: string, amount: bigint, txOptions?: Overrides): Promise<void>;
241
199
  /**
242
- * This function stores the results url and hash.
200
+ * This function stores the results URL and hash.
243
201
  *
244
202
  * @param {string} escrowAddress Address of the escrow.
245
- * @param {string} url Results file url.
203
+ * @param {string} url Results file URL.
246
204
  * @param {string} hash Results file hash.
247
205
  * @param {Overrides} [txOptions] - Additional transaction parameters (optional, defaults to an empty object).
248
206
  * @returns Returns void if successful. Throws error if any.
@@ -257,13 +215,13 @@ export declare class EscrowClient extends BaseEthersClient {
257
215
  * import { EscrowClient } from '@human-protocol/sdk';
258
216
  *
259
217
  * const rpcUrl = 'YOUR_RPC_URL';
260
- * const privateKey = 'YOUR_PRIVATE_KEY'
218
+ * const privateKey = 'YOUR_PRIVATE_KEY';
261
219
  *
262
220
  * const provider = new providers.JsonRpcProvider(rpcUrl);
263
221
  * const signer = new Wallet(privateKey, provider);
264
222
  * const escrowClient = await EscrowClient.build(signer);
265
223
  *
266
- * await storeResults.storeResults('0x62dD51230A30401C455c8398d06F85e4EaB6309f', 'http://localhost/results.json', 'b5dad76bf6772c0f07fd5e048f6e75a5f86ee079');
224
+ * await escrowClient.storeResults('0x62dD51230A30401C455c8398d06F85e4EaB6309f', 'http://localhost/results.json', 'b5dad76bf6772c0f07fd5e048f6e75a5f86ee079');
267
225
  * ```
268
226
  */
269
227
  storeResults(escrowAddress: string, url: string, hash: string, txOptions?: Overrides): Promise<void>;
@@ -284,7 +242,7 @@ export declare class EscrowClient extends BaseEthersClient {
284
242
  * import { EscrowClient } from '@human-protocol/sdk';
285
243
  *
286
244
  * const rpcUrl = 'YOUR_RPC_URL';
287
- * const privateKey = 'YOUR_PRIVATE_KEY'
245
+ * const privateKey = 'YOUR_PRIVATE_KEY';
288
246
  *
289
247
  * const provider = new providers.JsonRpcProvider(rpcUrl);
290
248
  * const signer = new Wallet(privateKey, provider);
@@ -300,8 +258,10 @@ export declare class EscrowClient extends BaseEthersClient {
300
258
  * @param {string} escrowAddress Escrow address to payout.
301
259
  * @param {string[]} recipients Array of recipient addresses.
302
260
  * @param {bigint[]} amounts Array of amounts the recipients will receive.
303
- * @param {string} finalResultsUrl Final results file url.
261
+ * @param {string} finalResultsUrl Final results file URL.
304
262
  * @param {string} finalResultsHash Final results file hash.
263
+ * @param {number} txId Transaction ID.
264
+ * @param {boolean} forceComplete Indicates if remaining balance should be transferred to the escrow creator (optional, defaults to false).
305
265
  * @param {Overrides} [txOptions] - Additional transaction parameters (optional, defaults to an empty object).
306
266
  * @returns Returns void if successful. Throws error if any.
307
267
  *
@@ -315,7 +275,7 @@ export declare class EscrowClient extends BaseEthersClient {
315
275
  * import { EscrowClient } from '@human-protocol/sdk';
316
276
  *
317
277
  * const rpcUrl = 'YOUR_RPC_URL';
318
- * const privateKey = 'YOUR_PRIVATE_KEY'
278
+ * const privateKey = 'YOUR_PRIVATE_KEY';
319
279
  *
320
280
  * const provider = new providers.JsonRpcProvider(rpcUrl);
321
281
  * const signer = new Wallet(privateKey, provider);
@@ -324,12 +284,13 @@ export declare class EscrowClient extends BaseEthersClient {
324
284
  * const recipients = ['0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266', '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266'];
325
285
  * const amounts = [ethers.parseUnits(5, 'ether'), ethers.parseUnits(10, 'ether')];
326
286
  * const resultsUrl = 'http://localhost/results.json';
327
- * const resultsHash'b5dad76bf6772c0f07fd5e048f6e75a5f86ee079';
287
+ * const resultsHash = 'b5dad76bf6772c0f07fd5e048f6e75a5f86ee079';
288
+ * const txId = 1;
328
289
  *
329
- * await escrowClient.bulkPayOut('0x62dD51230A30401C455c8398d06F85e4EaB6309f', recipients, amounts, resultsUrl, resultsHash);
290
+ * await escrowClient.bulkPayOut('0x62dD51230A30401C455c8398d06F85e4EaB6309f', recipients, amounts, resultsUrl, resultsHash, txId);
330
291
  * ```
331
292
  */
332
- bulkPayOut(escrowAddress: string, recipients: string[], amounts: bigint[], finalResultsUrl: string, finalResultsHash: string, txOptions?: Overrides): Promise<void>;
293
+ bulkPayOut(escrowAddress: string, recipients: string[], amounts: bigint[], finalResultsUrl: string, finalResultsHash: string, txId: number, forceComplete?: boolean, txOptions?: Overrides): Promise<void>;
333
294
  /**
334
295
  * This function cancels the specified escrow and sends the balance to the canceler.
335
296
  *
@@ -347,7 +308,7 @@ export declare class EscrowClient extends BaseEthersClient {
347
308
  * import { EscrowClient } from '@human-protocol/sdk';
348
309
  *
349
310
  * const rpcUrl = 'YOUR_RPC_URL';
350
- * const privateKey = 'YOUR_PRIVATE_KEY'
311
+ * const privateKey = 'YOUR_PRIVATE_KEY';
351
312
  *
352
313
  * const provider = new providers.JsonRpcProvider(rpcUrl);
353
314
  * const signer = new Wallet(privateKey, provider);
@@ -358,9 +319,10 @@ export declare class EscrowClient extends BaseEthersClient {
358
319
  */
359
320
  cancel(escrowAddress: string, txOptions?: Overrides): Promise<EscrowCancel>;
360
321
  /**
361
- * This function cancels the specified escrow, sends the balance to the canceler and selfdestructs the escrow contract.
322
+ * This function adds an array of addresses to the trusted handlers list.
362
323
  *
363
324
  * @param {string} escrowAddress Address of the escrow.
325
+ * @param {string[]} trustedHandlers Array of addresses of trusted handlers to add.
364
326
  * @param {Overrides} [txOptions] - Additional transaction parameters (optional, defaults to an empty object).
365
327
  * @returns Returns void if successful. Throws error if any.
366
328
  *
@@ -374,50 +336,95 @@ export declare class EscrowClient extends BaseEthersClient {
374
336
  * import { EscrowClient } from '@human-protocol/sdk';
375
337
  *
376
338
  * const rpcUrl = 'YOUR_RPC_URL';
377
- * const privateKey = 'YOUR_PRIVATE_KEY'
339
+ * const privateKey = 'YOUR_PRIVATE_KEY';
378
340
  *
379
341
  * const provider = new providers.JsonRpcProvider(rpcUrl);
380
342
  * const signer = new Wallet(privateKey, provider);
381
343
  * const escrowClient = await EscrowClient.build(signer);
382
344
  *
383
- * await escrowClient.abort('0x62dD51230A30401C455c8398d06F85e4EaB6309f');
345
+ * const trustedHandlers = ['0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266', '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266'];
346
+ * await escrowClient.addTrustedHandlers('0x62dD51230A30401C455c8398d06F85e4EaB6309f', trustedHandlers);
384
347
  * ```
385
348
  */
386
- abort(escrowAddress: string, txOptions?: Overrides): Promise<void>;
349
+ addTrustedHandlers(escrowAddress: string, trustedHandlers: string[], txOptions?: Overrides): Promise<void>;
387
350
  /**
388
- * This function sets the status of an escrow to completed.
351
+ * This function withdraws additional tokens in the escrow to the canceler.
389
352
  *
390
- * @param {string} escrowAddress Address of the escrow.
391
- * @param {string[]} trustedHandlers Array of addresses of trusted handlers to add.
353
+ * @param {string} escrowAddress Address of the escrow to withdraw.
354
+ * @param {string} tokenAddress Address of the token to withdraw.
392
355
  * @param {Overrides} [txOptions] - Additional transaction parameters (optional, defaults to an empty object).
393
- * @returns Returns void if successful. Throws error if any.
356
+ * @returns {EscrowWithdraw} Returns the escrow withdrawal data including transaction hash and withdrawal amount. Throws error if any.
394
357
  *
395
358
  *
396
359
  * **Code example**
397
360
  *
398
- * > Only Job Launcher or trusted handler can call it.
361
+ * > Only Job Launcher or a trusted handler can call it.
399
362
  *
400
363
  * ```ts
401
- * import { Wallet, providers } from 'ethers';
364
+ * import { ethers, Wallet, providers } from 'ethers';
402
365
  * import { EscrowClient } from '@human-protocol/sdk';
403
366
  *
404
367
  * const rpcUrl = 'YOUR_RPC_URL';
405
- * const privateKey = 'YOUR_PRIVATE_KEY'
368
+ * const privateKey = 'YOUR_PRIVATE_KEY';
406
369
  *
407
370
  * const provider = new providers.JsonRpcProvider(rpcUrl);
408
371
  * const signer = new Wallet(privateKey, provider);
409
372
  * const escrowClient = await EscrowClient.build(signer);
410
373
  *
411
- * const trustedHandlers = ['0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266', '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266']
412
- * await escrowClient.addTrustedHandlers('0x62dD51230A30401C455c8398d06F85e4EaB6309f', trustedHandlers);
374
+ * await escrowClient.withdraw(
375
+ * '0x62dD51230A30401C455c8398d06F85e4EaB6309f',
376
+ * '0x0376D26246Eb35FF4F9924cF13E6C05fd0bD7Fb4'
377
+ * );
413
378
  * ```
414
379
  */
415
- addTrustedHandlers(escrowAddress: string, trustedHandlers: string[], txOptions?: Overrides): Promise<void>;
380
+ withdraw(escrowAddress: string, tokenAddress: string, txOptions?: Overrides): Promise<EscrowWithdraw>;
381
+ /**
382
+ * Creates a prepared transaction for bulk payout without immediately sending it.
383
+ * @param {string} escrowAddress Escrow address to payout.
384
+ * @param {string[]} recipients Array of recipient addresses.
385
+ * @param {bigint[]} amounts Array of amounts the recipients will receive.
386
+ * @param {string} finalResultsUrl Final results file URL.
387
+ * @param {string} finalResultsHash Final results file hash.
388
+ * @param {number} txId Transaction ID.
389
+ * @param {boolean} forceComplete Indicates if remaining balance should be transferred to the escrow creator (optional, defaults to false).
390
+ * @param {Overrides} [txOptions] - Additional transaction parameters (optional, defaults to an empty object).
391
+ * @returns Returns object with raw transaction and signed transaction hash
392
+ *
393
+ * **Code example**
394
+ *
395
+ * > Only Reputation Oracle or a trusted handler can call it.
396
+ *
397
+ * ```ts
398
+ * import { ethers, Wallet, providers } from 'ethers';
399
+ * import { EscrowClient } from '@human-protocol/sdk';
400
+ *
401
+ * const rpcUrl = 'YOUR_RPC_URL';
402
+ * const privateKey = 'YOUR_PRIVATE_KEY'
403
+ *
404
+ * const provider = new providers.JsonRpcProvider(rpcUrl);
405
+ * const signer = new Wallet(privateKey, provider);
406
+ * const escrowClient = await EscrowClient.build(signer);
407
+ *
408
+ * const recipients = ['0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266', '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266'];
409
+ * const amounts = [ethers.parseUnits(5, 'ether'), ethers.parseUnits(10, 'ether')];
410
+ * const resultsUrl = 'http://localhost/results.json';
411
+ * const resultsHash = 'b5dad76bf6772c0f07fd5e048f6e75a5f86ee079';
412
+ * const txId = 1;
413
+ *
414
+ * const rawTransaction = await escrowClient.createBulkPayoutTransaction('0x62dD51230A30401C455c8398d06F85e4EaB6309f', recipients, amounts, resultsUrl, resultsHash, txId);
415
+ * console.log('Raw transaction:', rawTransaction);
416
+ *
417
+ * const signedTransaction = await signer.signTransaction(rawTransaction);
418
+ * console.log('Tx hash:', ethers.keccak256(signedTransaction));
419
+ * (await signer.sendTransaction(rawTransaction)).wait();
420
+ */
421
+ createBulkPayoutTransaction(escrowAddress: string, recipients: string[], amounts: bigint[], finalResultsUrl: string, finalResultsHash: string, txId: number, forceComplete?: boolean, txOptions?: Overrides): Promise<TransactionLikeWithNonce>;
422
+ private ensureCorrectBulkPayoutInput;
416
423
  /**
417
424
  * This function returns the balance for a specified escrow address.
418
425
  *
419
426
  * @param {string} escrowAddress Address of the escrow.
420
- * @returns {bigint} Balance of the escrow in the token used to fund it.
427
+ * @returns {Promise<bigint>} Balance of the escrow in the token used to fund it.
421
428
  *
422
429
  * **Code example**
423
430
  *
@@ -428,7 +435,7 @@ export declare class EscrowClient extends BaseEthersClient {
428
435
  * const rpcUrl = 'YOUR_RPC_URL';
429
436
  *
430
437
  * const provider = new providers.JsonRpcProvider(rpcUrl);
431
- * const escrowClient = await EscrowClient.build(signer);
438
+ * const escrowClient = await EscrowClient.build(provider);
432
439
  *
433
440
  * const balance = await escrowClient.getBalance('0x62dD51230A30401C455c8398d06F85e4EaB6309f');
434
441
  * ```
@@ -438,7 +445,7 @@ export declare class EscrowClient extends BaseEthersClient {
438
445
  * This function returns the manifest file hash.
439
446
  *
440
447
  * @param {string} escrowAddress Address of the escrow.
441
- * @returns {string} Hash of the manifest file content.
448
+ * @returns {Promise<string>} Hash of the manifest file content.
442
449
  *
443
450
  * **Code example**
444
451
  *
@@ -449,7 +456,7 @@ export declare class EscrowClient extends BaseEthersClient {
449
456
  * const rpcUrl = 'YOUR_RPC_URL';
450
457
  *
451
458
  * const provider = new providers.JsonRpcProvider(rpcUrl);
452
- * const escrowClient = await EscrowClient.build(signer);
459
+ * const escrowClient = await EscrowClient.build(provider);
453
460
  *
454
461
  * const manifestHash = await escrowClient.getManifestHash('0x62dD51230A30401C455c8398d06F85e4EaB6309f');
455
462
  * ```
@@ -459,7 +466,7 @@ export declare class EscrowClient extends BaseEthersClient {
459
466
  * This function returns the manifest file URL.
460
467
  *
461
468
  * @param {string} escrowAddress Address of the escrow.
462
- * @returns {string} Url of the manifest.
469
+ * @returns {Promise<string>} Url of the manifest.
463
470
  *
464
471
  * **Code example**
465
472
  *
@@ -470,7 +477,7 @@ export declare class EscrowClient extends BaseEthersClient {
470
477
  * const rpcUrl = 'YOUR_RPC_URL';
471
478
  *
472
479
  * const provider = new providers.JsonRpcProvider(rpcUrl);
473
- * const escrowClient = await EscrowClient.build(signer);
480
+ * const escrowClient = await EscrowClient.build(provider);
474
481
  *
475
482
  * const manifestUrl = await escrowClient.getManifestUrl('0x62dD51230A30401C455c8398d06F85e4EaB6309f');
476
483
  * ```
@@ -480,7 +487,7 @@ export declare class EscrowClient extends BaseEthersClient {
480
487
  * This function returns the results file URL.
481
488
  *
482
489
  * @param {string} escrowAddress Address of the escrow.
483
- * @returns {string} Results file url.
490
+ * @returns {Promise<string>} Results file url.
484
491
  *
485
492
  * **Code example**
486
493
  *
@@ -491,7 +498,7 @@ export declare class EscrowClient extends BaseEthersClient {
491
498
  * const rpcUrl = 'YOUR_RPC_URL';
492
499
  *
493
500
  * const provider = new providers.JsonRpcProvider(rpcUrl);
494
- * const escrowClient = await EscrowClient.build(signer);
501
+ * const escrowClient = await EscrowClient.build(provider);
495
502
  *
496
503
  * const resultsUrl = await escrowClient.getResultsUrl('0x62dD51230A30401C455c8398d06F85e4EaB6309f');
497
504
  * ```
@@ -501,7 +508,7 @@ export declare class EscrowClient extends BaseEthersClient {
501
508
  * This function returns the intermediate results file URL.
502
509
  *
503
510
  * @param {string} escrowAddress Address of the escrow.
504
- * @returns {string} Url of the file that store results from Recording Oracle.
511
+ * @returns {Promise<string>} Url of the file that store results from Recording Oracle.
505
512
  *
506
513
  * **Code example**
507
514
  *
@@ -512,9 +519,9 @@ export declare class EscrowClient extends BaseEthersClient {
512
519
  * const rpcUrl = 'YOUR_RPC_URL';
513
520
  *
514
521
  * const provider = new providers.JsonRpcProvider(rpcUrl);
515
- * const escrowClient = await EscrowClient.build(signer);
522
+ * const escrowClient = await EscrowClient.build(provider);
516
523
  *
517
- * const intemediateResultsUrl = await escrowClient.getIntermediateResultsUrl('0x62dD51230A30401C455c8398d06F85e4EaB6309f');
524
+ * const intermediateResultsUrl = await escrowClient.getIntermediateResultsUrl('0x62dD51230A30401C455c8398d06F85e4EaB6309f');
518
525
  * ```
519
526
  */
520
527
  getIntermediateResultsUrl(escrowAddress: string): Promise<string>;
@@ -522,7 +529,7 @@ export declare class EscrowClient extends BaseEthersClient {
522
529
  * This function returns the token address used for funding the escrow.
523
530
  *
524
531
  * @param {string} escrowAddress Address of the escrow.
525
- * @returns {string} Address of the token used to fund the escrow.
532
+ * @returns {Promise<string>} Address of the token used to fund the escrow.
526
533
  *
527
534
  * **Code example**
528
535
  *
@@ -533,7 +540,7 @@ export declare class EscrowClient extends BaseEthersClient {
533
540
  * const rpcUrl = 'YOUR_RPC_URL';
534
541
  *
535
542
  * const provider = new providers.JsonRpcProvider(rpcUrl);
536
- * const escrowClient = await EscrowClient.build(signer);
543
+ * const escrowClient = await EscrowClient.build(provider);
537
544
  *
538
545
  * const tokenAddress = await escrowClient.getTokenAddress('0x62dD51230A30401C455c8398d06F85e4EaB6309f');
539
546
  * ```
@@ -543,7 +550,7 @@ export declare class EscrowClient extends BaseEthersClient {
543
550
  * This function returns the current status of the escrow.
544
551
  *
545
552
  * @param {string} escrowAddress Address of the escrow.
546
- * @returns {EscrowStatus} Current status of the escrow.
553
+ * @returns {Promise<EscrowStatus>} Current status of the escrow.
547
554
  *
548
555
  * **Code example**
549
556
  *
@@ -554,7 +561,7 @@ export declare class EscrowClient extends BaseEthersClient {
554
561
  * const rpcUrl = 'YOUR_RPC_URL';
555
562
  *
556
563
  * const provider = new providers.JsonRpcProvider(rpcUrl);
557
- * const escrowClient = await EscrowClient.build(signer);
564
+ * const escrowClient = await EscrowClient.build(provider);
558
565
  *
559
566
  * const status = await escrowClient.getStatus('0x62dD51230A30401C455c8398d06F85e4EaB6309f');
560
567
  * ```
@@ -564,7 +571,7 @@ export declare class EscrowClient extends BaseEthersClient {
564
571
  * This function returns the recording oracle address for a given escrow.
565
572
  *
566
573
  * @param {string} escrowAddress Address of the escrow.
567
- * @returns {string} Address of the Recording Oracle.
574
+ * @returns {Promise<string>} Address of the Recording Oracle.
568
575
  *
569
576
  * **Code example**
570
577
  *
@@ -575,7 +582,7 @@ export declare class EscrowClient extends BaseEthersClient {
575
582
  * const rpcUrl = 'YOUR_RPC_URL';
576
583
  *
577
584
  * const provider = new providers.JsonRpcProvider(rpcUrl);
578
- * const escrowClient = await EscrowClient.build(signer);
585
+ * const escrowClient = await EscrowClient.build(provider);
579
586
  *
580
587
  * const oracleAddress = await escrowClient.getRecordingOracleAddress('0x62dD51230A30401C455c8398d06F85e4EaB6309f');
581
588
  * ```
@@ -585,7 +592,7 @@ export declare class EscrowClient extends BaseEthersClient {
585
592
  * This function returns the job launcher address for a given escrow.
586
593
  *
587
594
  * @param {string} escrowAddress Address of the escrow.
588
- * @returns {string} Address of the Job Launcher.
595
+ * @returns {Promise<string>} Address of the Job Launcher.
589
596
  *
590
597
  * **Code example**
591
598
  *
@@ -596,7 +603,7 @@ export declare class EscrowClient extends BaseEthersClient {
596
603
  * const rpcUrl = 'YOUR_RPC_URL';
597
604
  *
598
605
  * const provider = new providers.JsonRpcProvider(rpcUrl);
599
- * const escrowClient = await EscrowClient.build(signer);
606
+ * const escrowClient = await EscrowClient.build(provider);
600
607
  *
601
608
  * const jobLauncherAddress = await escrowClient.getJobLauncherAddress('0x62dD51230A30401C455c8398d06F85e4EaB6309f');
602
609
  * ```
@@ -606,7 +613,7 @@ export declare class EscrowClient extends BaseEthersClient {
606
613
  * This function returns the reputation oracle address for a given escrow.
607
614
  *
608
615
  * @param {string} escrowAddress Address of the escrow.
609
- * @returns {EscrowStatus} Address of the Reputation Oracle.
616
+ * @returns {Promise<string>} Address of the Reputation Oracle.
610
617
  *
611
618
  * **Code example**
612
619
  *
@@ -617,7 +624,7 @@ export declare class EscrowClient extends BaseEthersClient {
617
624
  * const rpcUrl = 'YOUR_RPC_URL';
618
625
  *
619
626
  * const provider = new providers.JsonRpcProvider(rpcUrl);
620
- * const escrowClient = await EscrowClient.build(signer);
627
+ * const escrowClient = await EscrowClient.build(provider);
621
628
  *
622
629
  * const oracleAddress = await escrowClient.getReputationOracleAddress('0x62dD51230A30401C455c8398d06F85e4EaB6309f');
623
630
  * ```
@@ -627,7 +634,7 @@ export declare class EscrowClient extends BaseEthersClient {
627
634
  * This function returns the exchange oracle address for a given escrow.
628
635
  *
629
636
  * @param {string} escrowAddress Address of the escrow.
630
- * @returns {EscrowStatus} Address of the Exchange Oracle.
637
+ * @returns {Promise<string>} Address of the Exchange Oracle.
631
638
  *
632
639
  * **Code example**
633
640
  *
@@ -638,7 +645,7 @@ export declare class EscrowClient extends BaseEthersClient {
638
645
  * const rpcUrl = 'YOUR_RPC_URL';
639
646
  *
640
647
  * const provider = new providers.JsonRpcProvider(rpcUrl);
641
- * const escrowClient = await EscrowClient.build(signer);
648
+ * const escrowClient = await EscrowClient.build(provider);
642
649
  *
643
650
  * const oracleAddress = await escrowClient.getExchangeOracleAddress('0x62dD51230A30401C455c8398d06F85e4EaB6309f');
644
651
  * ```
@@ -648,7 +655,7 @@ export declare class EscrowClient extends BaseEthersClient {
648
655
  * This function returns the escrow factory address for a given escrow.
649
656
  *
650
657
  * @param {string} escrowAddress Address of the escrow.
651
- * @returns {EscrowStatus} Address of the escrow factory.
658
+ * @returns {Promise<string>} Address of the escrow factory.
652
659
  *
653
660
  * **Code example**
654
661
  *
@@ -659,7 +666,7 @@ export declare class EscrowClient extends BaseEthersClient {
659
666
  * const rpcUrl = 'YOUR_RPC_URL';
660
667
  *
661
668
  * const provider = new providers.JsonRpcProvider(rpcUrl);
662
- * const escrowClient = await EscrowClient.build(signer);
669
+ * const escrowClient = await EscrowClient.build(provider);
663
670
  *
664
671
  * const factoryAddress = await escrowClient.getFactoryAddress('0x62dD51230A30401C455c8398d06F85e4EaB6309f');
665
672
  * ```
@@ -693,7 +700,7 @@ export declare class EscrowClient extends BaseEthersClient {
693
700
  * import { ChainId, EscrowUtils } from '@human-protocol/sdk';
694
701
  *
695
702
  * const escrowAddresses = new EscrowUtils.getEscrows({
696
- * network: ChainId.POLYGON_AMOY
703
+ * chainId: ChainId.POLYGON_AMOY
697
704
  * });
698
705
  * ```
699
706
  */
@@ -738,7 +745,6 @@ export declare class EscrowUtils {
738
745
  * AVALANCHE_TESTNET = 43113,
739
746
  * CELO = 42220,
740
747
  * CELO_ALFAJORES = 44787,
741
- * = 1273227453,
742
748
  * LOCALHOST = 1338,
743
749
  * }
744
750
  * ```
@@ -1 +1 @@
1
- {"version":3,"file":"escrow.d.ts","sourceRoot":"","sources":["../src/escrow.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,cAAc,EAAY,SAAS,EAAU,MAAM,QAAQ,CAAC;AAErE,OAAO,EAAE,gBAAgB,EAAE,MAAM,QAAQ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