@human-protocol/sdk 1.1.19 → 2.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 (53) hide show
  1. package/dist/base.d.ts +4 -5
  2. package/dist/base.d.ts.map +1 -1
  3. package/dist/base.js +3 -3
  4. package/dist/decorators.d.ts.map +1 -1
  5. package/dist/decorators.js +4 -2
  6. package/dist/error.d.ts +0 -6
  7. package/dist/error.d.ts.map +1 -1
  8. package/dist/error.js +2 -14
  9. package/dist/escrow.d.ts +23 -24
  10. package/dist/escrow.d.ts.map +1 -1
  11. package/dist/escrow.js +86 -90
  12. package/dist/graphql/queries/{staking.d.ts → operator.d.ts} +2 -1
  13. package/dist/graphql/queries/operator.d.ts.map +1 -0
  14. package/dist/graphql/queries/{staking.js → operator.js} +24 -1
  15. package/dist/graphql/types.d.ts +5 -6
  16. package/dist/graphql/types.d.ts.map +1 -1
  17. package/dist/index.d.ts +2 -1
  18. package/dist/index.d.ts.map +1 -1
  19. package/dist/index.js +3 -1
  20. package/dist/interfaces.d.ts +28 -18
  21. package/dist/interfaces.d.ts.map +1 -1
  22. package/dist/kvstore.d.ts +8 -9
  23. package/dist/kvstore.d.ts.map +1 -1
  24. package/dist/kvstore.js +18 -31
  25. package/dist/operator.d.ts +68 -0
  26. package/dist/operator.d.ts.map +1 -0
  27. package/dist/operator.js +153 -0
  28. package/dist/staking.d.ts +24 -91
  29. package/dist/staking.d.ts.map +1 -1
  30. package/dist/staking.js +47 -166
  31. package/dist/statistics.d.ts.map +1 -1
  32. package/dist/statistics.js +7 -6
  33. package/dist/types.d.ts +1 -2
  34. package/dist/types.d.ts.map +1 -1
  35. package/dist/utils.d.ts +0 -7
  36. package/dist/utils.d.ts.map +1 -1
  37. package/dist/utils.js +8 -28
  38. package/package.json +4 -4
  39. package/src/base.ts +5 -6
  40. package/src/decorators.ts +3 -2
  41. package/src/error.ts +0 -12
  42. package/src/escrow.ts +101 -114
  43. package/src/graphql/queries/{staking.ts → operator.ts} +24 -0
  44. package/src/graphql/types.ts +5 -7
  45. package/src/index.ts +2 -0
  46. package/src/interfaces.ts +30 -18
  47. package/src/kvstore.ts +20 -38
  48. package/src/operator.ts +192 -0
  49. package/src/staking.ts +49 -182
  50. package/src/statistics.ts +8 -9
  51. package/src/types.ts +1 -3
  52. package/src/utils.ts +7 -29
  53. package/dist/graphql/queries/staking.d.ts.map +0 -1
package/dist/escrow.js CHANGED
@@ -13,6 +13,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
13
13
  };
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
15
  exports.EscrowUtils = exports.EscrowClient = void 0;
16
+ /* eslint-disable @typescript-eslint/no-explicit-any */
16
17
  const typechain_types_1 = require("@human-protocol/core/typechain-types");
17
18
  const ethers_1 = require("ethers");
18
19
  const graphql_request_1 = __importDefault(require("graphql-request"));
@@ -20,19 +21,19 @@ const base_1 = require("./base");
20
21
  const constants_1 = require("./constants");
21
22
  const decorators_1 = require("./decorators");
22
23
  const error_1 = require("./error");
24
+ const graphql_1 = require("./graphql");
23
25
  const types_1 = require("./types");
24
26
  const utils_1 = require("./utils");
25
- const graphql_1 = require("./graphql");
26
27
  /**
27
28
  * ## Introduction
28
29
  *
29
30
  * This client enables to perform actions on Escrow contracts and obtain information from both the contracts and subgraph.
30
31
  *
31
- * Internally, the SDK will use one network or another according to the network ID of the `signerOrProvider`.
32
+ * Internally, the SDK will use one network or another according to the network ID of the `runner`.
32
33
  * To use this client, it is recommended to initialize it using the static `build` method.
33
34
  *
34
35
  * ```ts
35
- * static async build(signerOrProvider: Signer | Provider);
36
+ * static async build(runner: ContractRunner);
36
37
  * ```
37
38
  *
38
39
  * A `Signer` or a `Provider` should be passed depending on the use case of this module:
@@ -96,39 +97,33 @@ class EscrowClient extends base_1.BaseEthersClient {
96
97
  /**
97
98
  * **EscrowClient constructor**
98
99
  *
99
- * @param {Signer | Provider} signerOrProvider The Signer or Provider object to interact with the Ethereum network
100
+ * @param {ContractRunner} runner The Runner object to interact with the Ethereum network
100
101
  * @param {NetworkData} network The network information required to connect to the Escrow contract
101
102
  */
102
- constructor(signerOrProvider, networkData) {
103
- super(signerOrProvider, networkData);
104
- this.escrowFactoryContract = typechain_types_1.EscrowFactory__factory.connect(networkData.factoryAddress, signerOrProvider);
103
+ constructor(runner, networkData) {
104
+ super(runner, networkData);
105
+ this.escrowFactoryContract = typechain_types_1.EscrowFactory__factory.connect(networkData.factoryAddress, runner);
105
106
  }
106
107
  /**
107
- * Creates an instance of EscrowClient from a Signer or Provider.
108
+ * Creates an instance of EscrowClient from a Runner.
108
109
  *
109
- * @param {Signer | Provider} signerOrProvider The Signer or Provider object to interact with the Ethereum network
110
+ * @param {ContractRunner} runner The Runner object to interact with the Ethereum network
110
111
  *
111
112
  * @returns {Promise<EscrowClient>} An instance of EscrowClient
112
113
  * @throws {ErrorProviderDoesNotExist} Thrown if the provider does not exist for the provided Signer
113
114
  * @throws {ErrorUnsupportedChainID} Thrown if the network's chainId is not supported
114
115
  */
115
- static async build(signerOrProvider) {
116
- let network;
117
- if (ethers_1.Signer.isSigner(signerOrProvider)) {
118
- if (!signerOrProvider.provider) {
119
- throw error_1.ErrorProviderDoesNotExist;
120
- }
121
- network = await signerOrProvider.provider.getNetwork();
116
+ static async build(runner) {
117
+ if (!runner.provider) {
118
+ throw error_1.ErrorProviderDoesNotExist;
122
119
  }
123
- else {
124
- network = await signerOrProvider.getNetwork();
125
- }
126
- const chainId = network.chainId;
120
+ const network = await runner.provider?.getNetwork();
121
+ const chainId = Number(network?.chainId);
127
122
  const networkData = constants_1.NETWORKS[chainId];
128
123
  if (!networkData) {
129
124
  throw error_1.ErrorUnsupportedChainID;
130
125
  }
131
- return new EscrowClient(signerOrProvider, networkData);
126
+ return new EscrowClient(runner, networkData);
132
127
  }
133
128
  /**
134
129
  * Connects to the escrow contract
@@ -137,7 +132,7 @@ class EscrowClient extends base_1.BaseEthersClient {
137
132
  */
138
133
  getEscrowContract(escrowAddress) {
139
134
  try {
140
- return typechain_types_1.Escrow__factory.connect(escrowAddress, this.signerOrProvider);
135
+ return typechain_types_1.Escrow__factory.connect(escrowAddress, this.runner);
141
136
  }
142
137
  catch (e) {
143
138
  return (0, utils_1.throwError)(e);
@@ -175,17 +170,17 @@ class EscrowClient extends base_1.BaseEthersClient {
175
170
  * ```
176
171
  */
177
172
  async createEscrow(tokenAddress, trustedHandlers, jobRequesterId, txOptions = {}) {
178
- if (!ethers_1.ethers.utils.isAddress(tokenAddress)) {
173
+ if (!ethers_1.ethers.isAddress(tokenAddress)) {
179
174
  throw error_1.ErrorInvalidTokenAddress;
180
175
  }
181
176
  trustedHandlers.forEach((trustedHandler) => {
182
- if (!ethers_1.ethers.utils.isAddress(trustedHandler)) {
177
+ if (!ethers_1.ethers.isAddress(trustedHandler)) {
183
178
  throw new error_1.InvalidEthereumAddressError(trustedHandler);
184
179
  }
185
180
  });
186
181
  try {
187
182
  const result = await (await this.escrowFactoryContract.createEscrow(tokenAddress, trustedHandlers, jobRequesterId, txOptions)).wait();
188
- const event = result.events?.find(({ topics }) => topics.includes(ethers_1.ethers.utils.id('LaunchedV2(address,address,string)')))?.args;
183
+ const event = result?.logs?.find(({ topics }) => topics.includes(ethers_1.ethers.id('LaunchedV2(address,address,string)')))?.args;
189
184
  if (!event) {
190
185
  throw error_1.ErrorLaunchedEventIsNotEmitted;
191
186
  }
@@ -224,9 +219,9 @@ class EscrowClient extends base_1.BaseEthersClient {
224
219
  * recordingOracle: '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266',
225
220
  * reputationOracle: '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266',
226
221
  * exchangeOracle: '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266',
227
- * recordingOracleFee: BigNumber.from('10'),
228
- * reputationOracleFee: BigNumber.from('10'),
229
- * exchangeOracleFee: BigNumber.from('10'),
222
+ * recordingOracleFee: bigint.from('10'),
223
+ * reputationOracleFee: bigint.from('10'),
224
+ * exchangeOracleFee: bigint.from('10'),
230
225
  * manifestUrl: 'htttp://localhost/manifest.json',
231
226
  * manifestHash: 'b5dad76bf6772c0f07fd5e048f6e75a5f86ee079',
232
227
  * };
@@ -235,24 +230,24 @@ class EscrowClient extends base_1.BaseEthersClient {
235
230
  */
236
231
  async setup(escrowAddress, escrowConfig, txOptions = {}) {
237
232
  const { recordingOracle, reputationOracle, exchangeOracle, recordingOracleFee, reputationOracleFee, exchangeOracleFee, manifestUrl, manifestHash, } = escrowConfig;
238
- if (!ethers_1.ethers.utils.isAddress(recordingOracle)) {
233
+ if (!ethers_1.ethers.isAddress(recordingOracle)) {
239
234
  throw error_1.ErrorInvalidRecordingOracleAddressProvided;
240
235
  }
241
- if (!ethers_1.ethers.utils.isAddress(reputationOracle)) {
236
+ if (!ethers_1.ethers.isAddress(reputationOracle)) {
242
237
  throw error_1.ErrorInvalidReputationOracleAddressProvided;
243
238
  }
244
- if (!ethers_1.ethers.utils.isAddress(exchangeOracle)) {
239
+ if (!ethers_1.ethers.isAddress(exchangeOracle)) {
245
240
  throw error_1.ErrorInvalidExchangeOracleAddressProvided;
246
241
  }
247
- if (!ethers_1.ethers.utils.isAddress(escrowAddress)) {
242
+ if (!ethers_1.ethers.isAddress(escrowAddress)) {
248
243
  throw error_1.ErrorInvalidEscrowAddressProvided;
249
244
  }
250
- if (recordingOracleFee.lte(0) ||
251
- reputationOracleFee.lte(0) ||
252
- exchangeOracleFee.lte(0)) {
245
+ if (recordingOracleFee <= 0 ||
246
+ reputationOracleFee <= 0 ||
247
+ exchangeOracleFee <= 0) {
253
248
  throw error_1.ErrorAmountMustBeGreaterThanZero;
254
249
  }
255
- if (recordingOracleFee.add(reputationOracleFee).add(exchangeOracleFee).gt(100)) {
250
+ if (recordingOracleFee + reputationOracleFee + exchangeOracleFee > 100) {
256
251
  throw error_1.ErrorTotalFeeMustBeLessThanHundred;
257
252
  }
258
253
  if (!manifestUrl) {
@@ -307,9 +302,9 @@ class EscrowClient extends base_1.BaseEthersClient {
307
302
  * recordingOracle: '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266',
308
303
  * reputationOracle: '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266',
309
304
  * exchangeOracle: '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266',
310
- * recordingOracleFee: BigNumber.from('10'),
311
- * reputationOracleFee: BigNumber.from('10'),
312
- * exchangeOracleFee: BigNumber.from('10'),
305
+ * recordingOracleFee: bigint.from('10'),
306
+ * reputationOracleFee: bigint.from('10'),
307
+ * exchangeOracleFee: bigint.from('10'),
313
308
  * manifestUrl: 'htttp://localhost/manifest.json',
314
309
  * manifestHash: 'b5dad76bf6772c0f07fd5e048f6e75a5f86ee079',
315
310
  * };
@@ -331,7 +326,7 @@ class EscrowClient extends base_1.BaseEthersClient {
331
326
  * This function adds funds of the chosen token to the escrow.
332
327
  *
333
328
  * @param {string} escrowAddress Address of the escrow to fund.
334
- * @param {BigNumber} amount Amount to be added as funds.
329
+ * @param {bigint} amount Amount to be added as funds.
335
330
  * @param {Overrides} [txOptions] - Additional transaction parameters (optional, defaults to an empty object).
336
331
  * @returns Returns void if successful. Throws error if any.
337
332
  *
@@ -349,15 +344,15 @@ class EscrowClient extends base_1.BaseEthersClient {
349
344
  * const signer = new Wallet(privateKey, provider);
350
345
  * const escrowClient = await EscrowClient.build(signer);
351
346
  *
352
- * const amount = ethers.utils.parseUnits(5, 'ether'); //convert from ETH to WEI
347
+ * const amount = ethers.parseUnits(5, 'ether'); //convert from ETH to WEI
353
348
  * await escrowClient.fund('0x62dD51230A30401C455c8398d06F85e4EaB6309f', amount);
354
349
  * ```
355
350
  */
356
351
  async fund(escrowAddress, amount, txOptions = {}) {
357
- if (!ethers_1.ethers.utils.isAddress(escrowAddress)) {
352
+ if (!ethers_1.ethers.isAddress(escrowAddress)) {
358
353
  throw error_1.ErrorInvalidEscrowAddressProvided;
359
354
  }
360
- if (amount.lte(0)) {
355
+ if (amount <= 0n) {
361
356
  throw error_1.ErrorAmountMustBeGreaterThanZero;
362
357
  }
363
358
  if (!(await this.escrowFactoryContract.hasEscrow(escrowAddress))) {
@@ -366,7 +361,7 @@ class EscrowClient extends base_1.BaseEthersClient {
366
361
  try {
367
362
  const escrowContract = this.getEscrowContract(escrowAddress);
368
363
  const tokenAddress = await escrowContract.token();
369
- const tokenContract = typechain_types_1.HMToken__factory.connect(tokenAddress, this.signerOrProvider);
364
+ const tokenContract = typechain_types_1.HMToken__factory.connect(tokenAddress, this.runner);
370
365
  await (await tokenContract.transfer(escrowAddress, amount, txOptions)).wait;
371
366
  return;
372
367
  }
@@ -403,7 +398,7 @@ class EscrowClient extends base_1.BaseEthersClient {
403
398
  * ```
404
399
  */
405
400
  async storeResults(escrowAddress, url, hash, txOptions = {}) {
406
- if (!ethers_1.ethers.utils.isAddress(escrowAddress)) {
401
+ if (!ethers_1.ethers.isAddress(escrowAddress)) {
407
402
  throw error_1.ErrorInvalidEscrowAddressProvided;
408
403
  }
409
404
  if (!url) {
@@ -454,7 +449,7 @@ class EscrowClient extends base_1.BaseEthersClient {
454
449
  * ```
455
450
  */
456
451
  async complete(escrowAddress, txOptions = {}) {
457
- if (!ethers_1.ethers.utils.isAddress(escrowAddress)) {
452
+ if (!ethers_1.ethers.isAddress(escrowAddress)) {
458
453
  throw error_1.ErrorInvalidEscrowAddressProvided;
459
454
  }
460
455
  if (!(await this.escrowFactoryContract.hasEscrow(escrowAddress))) {
@@ -474,7 +469,7 @@ class EscrowClient extends base_1.BaseEthersClient {
474
469
  *
475
470
  * @param {string} escrowAddress Escrow address to payout.
476
471
  * @param {string[]} recipients Array of recipient addresses.
477
- * @param {BigNumber[]} amounts Array of amounts the recipients will receive.
472
+ * @param {bigint[]} amounts Array of amounts the recipients will receive.
478
473
  * @param {string} finalResultsUrl Final results file url.
479
474
  * @param {string} finalResultsHash Final results file hash.
480
475
  * @param {Overrides} [txOptions] - Additional transaction parameters (optional, defaults to an empty object).
@@ -497,7 +492,7 @@ class EscrowClient extends base_1.BaseEthersClient {
497
492
  * const escrowClient = await EscrowClient.build(signer);
498
493
  *
499
494
  * const recipients = ['0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266', '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266'];
500
- * const amounts = [ethers.utils.parseUnits(5, 'ether'), ethers.utils.parseUnits(10, 'ether')];
495
+ * const amounts = [ethers.parseUnits(5, 'ether'), ethers.parseUnits(10, 'ether')];
501
496
  * const resultsUrl = 'http://localhost/results.json';
502
497
  * const resultsHash'b5dad76bf6772c0f07fd5e048f6e75a5f86ee079';
503
498
  *
@@ -505,7 +500,7 @@ class EscrowClient extends base_1.BaseEthersClient {
505
500
  * ```
506
501
  */
507
502
  async bulkPayOut(escrowAddress, recipients, amounts, finalResultsUrl, finalResultsHash, txOptions = {}) {
508
- if (!ethers_1.ethers.utils.isAddress(escrowAddress)) {
503
+ if (!ethers_1.ethers.isAddress(escrowAddress)) {
509
504
  throw error_1.ErrorInvalidEscrowAddressProvided;
510
505
  }
511
506
  if (recipients.length === 0) {
@@ -518,7 +513,7 @@ class EscrowClient extends base_1.BaseEthersClient {
518
513
  throw error_1.ErrorRecipientAndAmountsMustBeSameLength;
519
514
  }
520
515
  recipients.forEach((recipient) => {
521
- if (!ethers_1.ethers.utils.isAddress(recipient)) {
516
+ if (!ethers_1.ethers.isAddress(recipient)) {
522
517
  throw new error_1.InvalidEthereumAddressError(recipient);
523
518
  }
524
519
  });
@@ -532,11 +527,11 @@ class EscrowClient extends base_1.BaseEthersClient {
532
527
  throw error_1.ErrorHashIsEmptyString;
533
528
  }
534
529
  const balance = await this.getBalance(escrowAddress);
535
- let totalAmount = ethers_1.BigNumber.from(0);
530
+ let totalAmount = 0n;
536
531
  amounts.forEach((amount) => {
537
- totalAmount = totalAmount.add(amount);
532
+ totalAmount = totalAmount + amount;
538
533
  });
539
- if (balance.lt(totalAmount)) {
534
+ if (balance < totalAmount) {
540
535
  throw error_1.ErrorEscrowDoesNotHaveEnoughBalance;
541
536
  }
542
537
  if (!(await this.escrowFactoryContract.hasEscrow(escrowAddress))) {
@@ -578,7 +573,7 @@ class EscrowClient extends base_1.BaseEthersClient {
578
573
  * ```
579
574
  */
580
575
  async cancel(escrowAddress, txOptions = {}) {
581
- if (!ethers_1.ethers.utils.isAddress(escrowAddress)) {
576
+ if (!ethers_1.ethers.isAddress(escrowAddress)) {
582
577
  throw error_1.ErrorInvalidEscrowAddressProvided;
583
578
  }
584
579
  if (!(await this.escrowFactoryContract.hasEscrow(escrowAddress))) {
@@ -589,22 +584,26 @@ class EscrowClient extends base_1.BaseEthersClient {
589
584
  const transactionReceipt = await (await escrowContract.cancel(txOptions)).wait();
590
585
  let amountTransferred = undefined;
591
586
  const tokenAddress = await escrowContract.token();
592
- const tokenContract = typechain_types_1.HMToken__factory.connect(tokenAddress, this.signerOrProvider);
593
- for (const log of transactionReceipt.logs) {
594
- if (log.address === tokenAddress) {
595
- const parsedLog = tokenContract.interface.parseLog(log);
596
- const from = parsedLog.args[0];
597
- if (parsedLog.name === 'Transfer' && from === escrowAddress) {
598
- amountTransferred = parsedLog.args[2];
599
- break;
587
+ const tokenContract = typechain_types_1.HMToken__factory.connect(tokenAddress, this.runner);
588
+ if (transactionReceipt)
589
+ for (const log of transactionReceipt.logs) {
590
+ if (log.address === tokenAddress) {
591
+ const parsedLog = tokenContract.interface.parseLog({
592
+ topics: log.topics,
593
+ data: log.data,
594
+ });
595
+ const from = parsedLog?.args[0];
596
+ if (parsedLog?.name === 'Transfer' && from === escrowAddress) {
597
+ amountTransferred = parsedLog?.args[2];
598
+ break;
599
+ }
600
600
  }
601
601
  }
602
- }
603
602
  if (amountTransferred === undefined) {
604
603
  throw error_1.ErrorTransferEventNotFoundInTransactionLogs;
605
604
  }
606
605
  const escrowCancelData = {
607
- txHash: transactionReceipt.transactionHash,
606
+ txHash: transactionReceipt?.hash || '',
608
607
  amountRefunded: amountTransferred,
609
608
  };
610
609
  return escrowCancelData;
@@ -640,7 +639,7 @@ class EscrowClient extends base_1.BaseEthersClient {
640
639
  * ```
641
640
  */
642
641
  async abort(escrowAddress, txOptions = {}) {
643
- if (!ethers_1.ethers.utils.isAddress(escrowAddress)) {
642
+ if (!ethers_1.ethers.isAddress(escrowAddress)) {
644
643
  throw error_1.ErrorInvalidEscrowAddressProvided;
645
644
  }
646
645
  if (!(await this.escrowFactoryContract.hasEscrow(escrowAddress))) {
@@ -684,14 +683,14 @@ class EscrowClient extends base_1.BaseEthersClient {
684
683
  * ```
685
684
  */
686
685
  async addTrustedHandlers(escrowAddress, trustedHandlers, txOptions = {}) {
687
- if (!ethers_1.ethers.utils.isAddress(escrowAddress)) {
686
+ if (!ethers_1.ethers.isAddress(escrowAddress)) {
688
687
  throw error_1.ErrorInvalidEscrowAddressProvided;
689
688
  }
690
689
  if (trustedHandlers.length === 0) {
691
690
  throw error_1.ErrorListOfHandlersCannotBeEmpty;
692
691
  }
693
692
  trustedHandlers.forEach((trustedHandler) => {
694
- if (!ethers_1.ethers.utils.isAddress(trustedHandler)) {
693
+ if (!ethers_1.ethers.isAddress(trustedHandler)) {
695
694
  throw new error_1.InvalidEthereumAddressError(trustedHandler);
696
695
  }
697
696
  });
@@ -711,7 +710,7 @@ class EscrowClient extends base_1.BaseEthersClient {
711
710
  * This function returns the balance for a specified escrow address.
712
711
  *
713
712
  * @param {string} escrowAddress Address of the escrow.
714
- * @returns {BigNumber} Balance of the escrow in the token used to fund it.
713
+ * @returns {bigint} Balance of the escrow in the token used to fund it.
715
714
  *
716
715
  * **Code example**
717
716
  *
@@ -728,7 +727,7 @@ class EscrowClient extends base_1.BaseEthersClient {
728
727
  * ```
729
728
  */
730
729
  async getBalance(escrowAddress) {
731
- if (!ethers_1.ethers.utils.isAddress(escrowAddress)) {
730
+ if (!ethers_1.ethers.isAddress(escrowAddress)) {
732
731
  throw error_1.ErrorInvalidEscrowAddressProvided;
733
732
  }
734
733
  if (!(await this.escrowFactoryContract.hasEscrow(escrowAddress))) {
@@ -763,7 +762,7 @@ class EscrowClient extends base_1.BaseEthersClient {
763
762
  * ```
764
763
  */
765
764
  async getManifestHash(escrowAddress) {
766
- if (!ethers_1.ethers.utils.isAddress(escrowAddress)) {
765
+ if (!ethers_1.ethers.isAddress(escrowAddress)) {
767
766
  throw error_1.ErrorInvalidEscrowAddressProvided;
768
767
  }
769
768
  if (!(await this.escrowFactoryContract.hasEscrow(escrowAddress))) {
@@ -798,7 +797,7 @@ class EscrowClient extends base_1.BaseEthersClient {
798
797
  * ```
799
798
  */
800
799
  async getManifestUrl(escrowAddress) {
801
- if (!ethers_1.ethers.utils.isAddress(escrowAddress)) {
800
+ if (!ethers_1.ethers.isAddress(escrowAddress)) {
802
801
  throw error_1.ErrorInvalidEscrowAddressProvided;
803
802
  }
804
803
  if (!(await this.escrowFactoryContract.hasEscrow(escrowAddress))) {
@@ -833,7 +832,7 @@ class EscrowClient extends base_1.BaseEthersClient {
833
832
  * ```
834
833
  */
835
834
  async getResultsUrl(escrowAddress) {
836
- if (!ethers_1.ethers.utils.isAddress(escrowAddress)) {
835
+ if (!ethers_1.ethers.isAddress(escrowAddress)) {
837
836
  throw error_1.ErrorInvalidEscrowAddressProvided;
838
837
  }
839
838
  if (!(await this.escrowFactoryContract.hasEscrow(escrowAddress))) {
@@ -868,7 +867,7 @@ class EscrowClient extends base_1.BaseEthersClient {
868
867
  * ```
869
868
  */
870
869
  async getIntermediateResultsUrl(escrowAddress) {
871
- if (!ethers_1.ethers.utils.isAddress(escrowAddress)) {
870
+ if (!ethers_1.ethers.isAddress(escrowAddress)) {
872
871
  throw error_1.ErrorInvalidEscrowAddressProvided;
873
872
  }
874
873
  if (!(await this.escrowFactoryContract.hasEscrow(escrowAddress))) {
@@ -903,7 +902,7 @@ class EscrowClient extends base_1.BaseEthersClient {
903
902
  * ```
904
903
  */
905
904
  async getTokenAddress(escrowAddress) {
906
- if (!ethers_1.ethers.utils.isAddress(escrowAddress)) {
905
+ if (!ethers_1.ethers.isAddress(escrowAddress)) {
907
906
  throw error_1.ErrorInvalidEscrowAddressProvided;
908
907
  }
909
908
  if (!(await this.escrowFactoryContract.hasEscrow(escrowAddress))) {
@@ -938,7 +937,7 @@ class EscrowClient extends base_1.BaseEthersClient {
938
937
  * ```
939
938
  */
940
939
  async getStatus(escrowAddress) {
941
- if (!ethers_1.ethers.utils.isAddress(escrowAddress)) {
940
+ if (!ethers_1.ethers.isAddress(escrowAddress)) {
942
941
  throw error_1.ErrorInvalidEscrowAddressProvided;
943
942
  }
944
943
  if (!(await this.escrowFactoryContract.hasEscrow(escrowAddress))) {
@@ -946,7 +945,7 @@ class EscrowClient extends base_1.BaseEthersClient {
946
945
  }
947
946
  try {
948
947
  const escrowContract = this.getEscrowContract(escrowAddress);
949
- return escrowContract.status();
948
+ return Number(await escrowContract.status());
950
949
  }
951
950
  catch (e) {
952
951
  return (0, utils_1.throwError)(e);
@@ -973,7 +972,7 @@ class EscrowClient extends base_1.BaseEthersClient {
973
972
  * ```
974
973
  */
975
974
  async getRecordingOracleAddress(escrowAddress) {
976
- if (!ethers_1.ethers.utils.isAddress(escrowAddress)) {
975
+ if (!ethers_1.ethers.isAddress(escrowAddress)) {
977
976
  throw error_1.ErrorInvalidEscrowAddressProvided;
978
977
  }
979
978
  if (!(await this.escrowFactoryContract.hasEscrow(escrowAddress))) {
@@ -1008,7 +1007,7 @@ class EscrowClient extends base_1.BaseEthersClient {
1008
1007
  * ```
1009
1008
  */
1010
1009
  async getJobLauncherAddress(escrowAddress) {
1011
- if (!ethers_1.ethers.utils.isAddress(escrowAddress)) {
1010
+ if (!ethers_1.ethers.isAddress(escrowAddress)) {
1012
1011
  throw error_1.ErrorInvalidEscrowAddressProvided;
1013
1012
  }
1014
1013
  if (!(await this.escrowFactoryContract.hasEscrow(escrowAddress))) {
@@ -1043,7 +1042,7 @@ class EscrowClient extends base_1.BaseEthersClient {
1043
1042
  * ```
1044
1043
  */
1045
1044
  async getReputationOracleAddress(escrowAddress) {
1046
- if (!ethers_1.ethers.utils.isAddress(escrowAddress)) {
1045
+ if (!ethers_1.ethers.isAddress(escrowAddress)) {
1047
1046
  throw error_1.ErrorInvalidEscrowAddressProvided;
1048
1047
  }
1049
1048
  if (!(await this.escrowFactoryContract.hasEscrow(escrowAddress))) {
@@ -1078,7 +1077,7 @@ class EscrowClient extends base_1.BaseEthersClient {
1078
1077
  * ```
1079
1078
  */
1080
1079
  async getExchangeOracleAddress(escrowAddress) {
1081
- if (!ethers_1.ethers.utils.isAddress(escrowAddress)) {
1080
+ if (!ethers_1.ethers.isAddress(escrowAddress)) {
1082
1081
  throw error_1.ErrorInvalidEscrowAddressProvided;
1083
1082
  }
1084
1083
  if (!(await this.escrowFactoryContract.hasEscrow(escrowAddress))) {
@@ -1113,7 +1112,7 @@ class EscrowClient extends base_1.BaseEthersClient {
1113
1112
  * ```
1114
1113
  */
1115
1114
  async getFactoryAddress(escrowAddress) {
1116
- if (!ethers_1.ethers.utils.isAddress(escrowAddress)) {
1115
+ if (!ethers_1.ethers.isAddress(escrowAddress)) {
1117
1116
  throw error_1.ErrorInvalidEscrowAddressProvided;
1118
1117
  }
1119
1118
  if (!(await this.escrowFactoryContract.hasEscrow(escrowAddress))) {
@@ -1149,7 +1148,7 @@ __decorate([
1149
1148
  __decorate([
1150
1149
  decorators_1.requiresSigner,
1151
1150
  __metadata("design:type", Function),
1152
- __metadata("design:paramtypes", [String, ethers_1.BigNumber, Object]),
1151
+ __metadata("design:paramtypes", [String, BigInt, Object]),
1153
1152
  __metadata("design:returntype", Promise)
1154
1153
  ], EscrowClient.prototype, "fund", null);
1155
1154
  __decorate([
@@ -1322,19 +1321,16 @@ class EscrowUtils {
1322
1321
  if (!filter?.networks?.length) {
1323
1322
  throw error_1.ErrorUnsupportedChainID;
1324
1323
  }
1325
- if (filter.launcher && !ethers_1.ethers.utils.isAddress(filter.launcher)) {
1324
+ if (filter.launcher && !ethers_1.ethers.isAddress(filter.launcher)) {
1326
1325
  throw error_1.ErrorInvalidAddress;
1327
1326
  }
1328
- if (filter.recordingOracle &&
1329
- !ethers_1.ethers.utils.isAddress(filter.recordingOracle)) {
1327
+ if (filter.recordingOracle && !ethers_1.ethers.isAddress(filter.recordingOracle)) {
1330
1328
  throw error_1.ErrorInvalidAddress;
1331
1329
  }
1332
- if (filter.reputationOracle &&
1333
- !ethers_1.ethers.utils.isAddress(filter.reputationOracle)) {
1330
+ if (filter.reputationOracle && !ethers_1.ethers.isAddress(filter.reputationOracle)) {
1334
1331
  throw error_1.ErrorInvalidAddress;
1335
1332
  }
1336
- if (filter.exchangeOracle &&
1337
- !ethers_1.ethers.utils.isAddress(filter.exchangeOracle)) {
1333
+ if (filter.exchangeOracle && !ethers_1.ethers.isAddress(filter.exchangeOracle)) {
1338
1334
  throw error_1.ErrorInvalidAddress;
1339
1335
  }
1340
1336
  try {
@@ -1439,7 +1435,7 @@ class EscrowUtils {
1439
1435
  if (!networkData) {
1440
1436
  throw error_1.ErrorUnsupportedChainID;
1441
1437
  }
1442
- if (escrowAddress && !ethers_1.ethers.utils.isAddress(escrowAddress)) {
1438
+ if (escrowAddress && !ethers_1.ethers.isAddress(escrowAddress)) {
1443
1439
  throw error_1.ErrorInvalidAddress;
1444
1440
  }
1445
1441
  try {
@@ -1,4 +1,5 @@
1
1
  import { ILeadersFilter } from 'src/interfaces';
2
2
  export declare const GET_LEADERS_QUERY: (filter: ILeadersFilter) => import("graphql").DocumentNode;
3
+ export declare const GET_REPUTATION_NETWORK_QUERY: (role?: string) => import("graphql").DocumentNode;
3
4
  export declare const GET_LEADER_QUERY: import("graphql").DocumentNode;
4
- //# sourceMappingURL=staking.d.ts.map
5
+ //# sourceMappingURL=operator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"operator.d.ts","sourceRoot":"","sources":["../../../src/graphql/queries/operator.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAuBhD,eAAO,MAAM,iBAAiB,WAAY,cAAc,mCAuBvD,CAAC;AAEF,eAAO,MAAM,4BAA4B,UAAW,MAAM,mCAsBzD,CAAC;AAEF,eAAO,MAAM,gBAAgB,gCAO5B,CAAC"}
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.GET_LEADER_QUERY = exports.GET_LEADERS_QUERY = void 0;
6
+ exports.GET_LEADER_QUERY = exports.GET_REPUTATION_NETWORK_QUERY = exports.GET_LEADERS_QUERY = void 0;
7
7
  const graphql_tag_1 = __importDefault(require("graphql-tag"));
8
8
  const LEADER_FRAGMENT = (0, graphql_tag_1.default) `
9
9
  fragment LeaderFields on Leader {
@@ -48,6 +48,29 @@ const GET_LEADERS_QUERY = (filter) => {
48
48
  `;
49
49
  };
50
50
  exports.GET_LEADERS_QUERY = GET_LEADERS_QUERY;
51
+ const GET_REPUTATION_NETWORK_QUERY = (role) => {
52
+ const WHERE_CLAUSE = `
53
+ where: {
54
+ ${role ? `role: $role` : ''}
55
+ }
56
+ `;
57
+ return (0, graphql_tag_1.default) `
58
+ query getReputationNetwork(
59
+ $address: String,
60
+ $role: String
61
+ ) {
62
+ reputationNetwork(id: $address) {
63
+ operators(
64
+ ${WHERE_CLAUSE}
65
+ ) {
66
+ address,
67
+ role
68
+ }
69
+ }
70
+ }
71
+ `;
72
+ };
73
+ exports.GET_REPUTATION_NETWORK_QUERY = GET_REPUTATION_NETWORK_QUERY;
51
74
  exports.GET_LEADER_QUERY = (0, graphql_tag_1.default) `
52
75
  query getLeader($address: String!) {
53
76
  leader(id: $address) {
@@ -1,4 +1,3 @@
1
- import { BigNumber } from 'ethers';
2
1
  export type EscrowData = {
3
2
  id: string;
4
3
  address: string;
@@ -97,9 +96,9 @@ export type WorkerStatistics = {
97
96
  };
98
97
  export type DailyPaymentData = {
99
98
  timestamp: Date;
100
- totalAmountPaid: BigNumber;
99
+ totalAmountPaid: bigint;
101
100
  totalCount: number;
102
- averageAmountPerWorker: BigNumber;
101
+ averageAmountPerWorker: bigint;
103
102
  };
104
103
  export type PaymentStatistics = {
105
104
  dailyPaymentsData: DailyPaymentData[];
@@ -110,15 +109,15 @@ export type HMTHolderData = {
110
109
  };
111
110
  export type HMTHolder = {
112
111
  address: string;
113
- balance: BigNumber;
112
+ balance: bigint;
114
113
  };
115
114
  export type DailyHMTData = {
116
115
  timestamp: Date;
117
- totalTransactionAmount: BigNumber;
116
+ totalTransactionAmount: bigint;
118
117
  totalTransactionCount: number;
119
118
  };
120
119
  export type HMTStatistics = {
121
- totalTransferAmount: BigNumber;
120
+ totalTransferAmount: bigint;
122
121
  totalTransferCount: number;
123
122
  totalHolders: number;
124
123
  holders: HMTHolder[];
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/graphql/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAEnC,MAAM,MAAM,UAAU,GAAG;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC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AM,GAAG,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;AAElD,MAAM,MAAM,aAAa,GAAG;IAC1B,SAAS,EAAE,IAAI,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,cAAc,EAAE,aAAa,EAAE,CAAC;CACjC,CAAC"}
package/dist/index.d.ts CHANGED
@@ -4,9 +4,10 @@ import { KVStoreClient } from './kvstore';
4
4
  import { EscrowClient, EscrowUtils } from './escrow';
5
5
  import { StatisticsClient } from './statistics';
6
6
  import { Encryption, EncryptionUtils } from './encryption';
7
+ import { OperatorUtils } from './operator';
7
8
  export * from './constants';
8
9
  export * from './types';
9
10
  export * from './enums';
10
11
  export * from './interfaces';
11
- export { StakingClient, StorageClient, KVStoreClient, EscrowClient, EscrowUtils, StatisticsClient, Encryption, EncryptionUtils, };
12
+ export { StakingClient, StorageClient, KVStoreClient, EscrowClient, EscrowUtils, StatisticsClient, Encryption, EncryptionUtils, OperatorUtils, };
12
13
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE3D,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAE7B,OAAO,EACL,aAAa,EACb,aAAa,EACb,aAAa,EACb,YAAY,EACZ,WAAW,EACX,gBAAgB,EAChB,UAAU,EACV,eAAe,GAChB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE3C,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAE7B,OAAO,EACL,aAAa,EACb,aAAa,EACb,aAAa,EACb,YAAY,EACZ,WAAW,EACX,gBAAgB,EAChB,UAAU,EACV,eAAe,EACf,aAAa,GACd,CAAC"}
package/dist/index.js CHANGED
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.EncryptionUtils = exports.Encryption = exports.StatisticsClient = exports.EscrowUtils = exports.EscrowClient = exports.KVStoreClient = exports.StorageClient = exports.StakingClient = void 0;
17
+ exports.OperatorUtils = exports.EncryptionUtils = exports.Encryption = exports.StatisticsClient = exports.EscrowUtils = exports.EscrowClient = exports.KVStoreClient = exports.StorageClient = exports.StakingClient = void 0;
18
18
  const staking_1 = require("./staking");
19
19
  Object.defineProperty(exports, "StakingClient", { enumerable: true, get: function () { return staking_1.StakingClient; } });
20
20
  const storage_1 = require("./storage");
@@ -29,6 +29,8 @@ Object.defineProperty(exports, "StatisticsClient", { enumerable: true, get: func
29
29
  const encryption_1 = require("./encryption");
30
30
  Object.defineProperty(exports, "Encryption", { enumerable: true, get: function () { return encryption_1.Encryption; } });
31
31
  Object.defineProperty(exports, "EncryptionUtils", { enumerable: true, get: function () { return encryption_1.EncryptionUtils; } });
32
+ const operator_1 = require("./operator");
33
+ Object.defineProperty(exports, "OperatorUtils", { enumerable: true, get: function () { return operator_1.OperatorUtils; } });
32
34
  __exportStar(require("./constants"), exports);
33
35
  __exportStar(require("./types"), exports);
34
36
  __exportStar(require("./enums"), exports);