@human-protocol/sdk 4.0.3 → 4.1.2

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 (50) hide show
  1. package/dist/constants.js +6 -6
  2. package/dist/escrow.d.ts +47 -27
  3. package/dist/escrow.d.ts.map +1 -1
  4. package/dist/escrow.js +73 -31
  5. package/dist/graphql/queries/escrow.d.ts.map +1 -1
  6. package/dist/graphql/queries/hmtoken.d.ts.map +1 -1
  7. package/dist/graphql/queries/operator.d.ts.map +1 -1
  8. package/dist/graphql/queries/payout.d.ts +1 -1
  9. package/dist/graphql/queries/payout.d.ts.map +1 -1
  10. package/dist/graphql/queries/payout.js +6 -5
  11. package/dist/graphql/queries/statistics.d.ts.map +1 -1
  12. package/dist/graphql/queries/statistics.js +1 -1
  13. package/dist/graphql/queries/transaction.d.ts.map +1 -1
  14. package/dist/graphql/queries/transaction.js +7 -1
  15. package/dist/graphql/queries/worker.d.ts +4 -0
  16. package/dist/graphql/queries/worker.d.ts.map +1 -0
  17. package/dist/graphql/queries/worker.js +44 -0
  18. package/dist/graphql/types.d.ts +1 -8
  19. package/dist/graphql/types.d.ts.map +1 -1
  20. package/dist/index.d.ts +2 -1
  21. package/dist/index.d.ts.map +1 -1
  22. package/dist/index.js +3 -1
  23. package/dist/interfaces.d.ts +44 -1
  24. package/dist/interfaces.d.ts.map +1 -1
  25. package/dist/statistics.js +2 -2
  26. package/dist/transaction.d.ts +25 -2
  27. package/dist/transaction.d.ts.map +1 -1
  28. package/dist/transaction.js +28 -2
  29. package/dist/types.d.ts +25 -0
  30. package/dist/types.d.ts.map +1 -1
  31. package/dist/utils.d.ts.map +1 -1
  32. package/dist/utils.js +2 -1
  33. package/dist/worker.d.ts +63 -0
  34. package/dist/worker.d.ts.map +1 -0
  35. package/dist/worker.js +109 -0
  36. package/package.json +13 -9
  37. package/src/constants.ts +6 -6
  38. package/src/escrow.ts +103 -45
  39. package/src/graphql/queries/payout.ts +7 -6
  40. package/src/graphql/queries/statistics.ts +1 -1
  41. package/src/graphql/queries/transaction.ts +17 -2
  42. package/src/graphql/queries/worker.ts +41 -0
  43. package/src/graphql/types.ts +1 -9
  44. package/src/index.ts +2 -0
  45. package/src/interfaces.ts +48 -1
  46. package/src/statistics.ts +2 -2
  47. package/src/transaction.ts +28 -2
  48. package/src/types.ts +26 -0
  49. package/src/utils.ts +2 -1
  50. package/src/worker.ts +120 -0
package/dist/constants.js CHANGED
@@ -28,7 +28,7 @@ exports.NETWORKS = {
28
28
  stakingAddress: '0xEf6Da3aB52c33925Be3F84038193a7e1331F51E6',
29
29
  kvstoreAddress: '0xB6d36B1CDaD50302BCB3DB43bAb0D349458e1b8D',
30
30
  subgraphUrl: 'https://api.studio.thegraph.com/query/74256/ethereum/version/latest',
31
- subgraphUrlApiKey: 'https://gateway-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/QmawHPbwEhAvmWgHQUH9Qgx5AqrXmq1uhfj69CGv9LLzNb',
31
+ subgraphUrlApiKey: 'https://gateway-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/QmZEF1exsjDwjDXy1kmN3MbdZKxfkkoTj2MbEPUyhLfEG3',
32
32
  oldSubgraphUrl: '',
33
33
  oldFactoryAddress: '',
34
34
  },
@@ -41,7 +41,7 @@ exports.NETWORKS = {
41
41
  stakingAddress: '0x2163e3A40032Af1C359ac731deaB48258b317890',
42
42
  kvstoreAddress: '0xCc0AF0635aa19fE799B6aFDBe28fcFAeA7f00a60',
43
43
  subgraphUrl: 'https://api.studio.thegraph.com/query/74256/sepolia/version/latest',
44
- subgraphUrlApiKey: 'https://gateway-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/QmYx4iD24iBTBgxhK95WV4u4o4QSFQFJxuvSNwwSEvCMsE',
44
+ subgraphUrlApiKey: 'https://gateway-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/QmeHhtntEYGdgTqHQTJu5mUXHS8JPt3RiwidLYeeEu6VpP',
45
45
  oldSubgraphUrl: '',
46
46
  oldFactoryAddress: '',
47
47
  },
@@ -54,7 +54,7 @@ exports.NETWORKS = {
54
54
  stakingAddress: '0xE24e5C08E28331D24758b69A5E9f383D2bDD1c98',
55
55
  kvstoreAddress: '0x21A0C4CED7aE447fCf87D9FE3A29FA9B3AB20Ff1',
56
56
  subgraphUrl: 'https://api.studio.thegraph.com/query/74256/bsc/version/latest',
57
- subgraphUrlApiKey: 'https://gateway-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/Qmai26kHVvYnn59QzGyBAfVWTQ98utfA2bJxQTMV2NeU8K',
57
+ subgraphUrlApiKey: 'https://gateway-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/QmWsXVhdFuZZcXDjXrv1QLSBYcjNShazFQmNUdpAErjQqD',
58
58
  oldSubgraphUrl: 'https://api.thegraph.com/subgraphs/name/humanprotocol/bsc',
59
59
  oldFactoryAddress: '0xc88bC422cAAb2ac8812de03176402dbcA09533f4',
60
60
  },
@@ -67,7 +67,7 @@ exports.NETWORKS = {
67
67
  stakingAddress: '0xD6D347ba6987519B4e42EcED43dF98eFf5465a23',
68
68
  kvstoreAddress: '0x32e27177BA6Ea91cf28dfd91a0Da9822A4b74EcF',
69
69
  subgraphUrl: 'https://api.studio.thegraph.com/query/74256/bsc-testnet/version/latest',
70
- subgraphUrlApiKey: 'https://gateway-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/QmbPzZWJMqCzdc6ZJir1Z2Va5mpLo8haGxAkfMySwfGxqs',
70
+ subgraphUrlApiKey: 'https://gateway-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/QmPv7asd21BA5LZJxjDPfoL5ZJkEGMvahrdMqgNQnP5sxn',
71
71
  oldSubgraphUrl: 'https://api.thegraph.com/subgraphs/name/humanprotocol/bsctest',
72
72
  oldFactoryAddress: '0xaae6a2646c1f88763e62e0cd08ad050ea66ac46f',
73
73
  },
@@ -80,7 +80,7 @@ exports.NETWORKS = {
80
80
  stakingAddress: '0x01D115E9E8bF0C58318793624CC662a030D07F1D',
81
81
  kvstoreAddress: '0xbcB28672F826a50B03EE91B28145EAbddA73B2eD',
82
82
  subgraphUrl: 'https://api.studio.thegraph.com/query/74256/polygon/version/latest',
83
- subgraphUrlApiKey: 'https://gateway-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/QmSyLqu2injQHCrMg68Wvp6n39J5piCDQkwHGWhKBqxhvV',
83
+ subgraphUrlApiKey: 'https://gateway-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/QmZSsJn5TERyEfRrrbY926hLHD321ijoMynrxWxc3boRa6',
84
84
  oldSubgraphUrl: 'https://api.thegraph.com/subgraphs/name/humanprotocol/polygon',
85
85
  oldFactoryAddress: '0x45eBc3eAE6DA485097054ae10BA1A0f8e8c7f794',
86
86
  },
@@ -93,7 +93,7 @@ exports.NETWORKS = {
93
93
  stakingAddress: '0xffE496683F842a923110415b7278ded3F265f2C5',
94
94
  kvstoreAddress: '0x724AeFC243EdacCA27EAB86D3ec5a76Af4436Fc7',
95
95
  subgraphUrl: 'https://api.studio.thegraph.com/query/74256/amoy/version/latest',
96
- subgraphUrlApiKey: 'https://gateway-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/QmYtZEaay5cX5XwGmoN8NpwfpFMbyqiKvtA1ub4GvavH2P',
96
+ subgraphUrlApiKey: 'https://gateway-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/QmYWc4ciJbAvTvcjoBzRSTWZrf1xD8WPRqEk3xtJZUKZqY',
97
97
  oldSubgraphUrl: '',
98
98
  oldFactoryAddress: '',
99
99
  },
package/dist/escrow.d.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  import { ContractRunner, Overrides } from 'ethers';
2
2
  import { BaseEthersClient } from './base';
3
- import { ChainId, OrderDirection } from './enums';
4
- import { EscrowData, StatusEvent } from './graphql';
5
- import { IEscrowConfig, IEscrowsFilter } from './interfaces';
6
- import { EscrowCancel, EscrowStatus, EscrowWithdraw, NetworkData, TransactionLikeWithNonce } from './types';
3
+ import { ChainId } from './enums';
4
+ import { StatusEvent } from './graphql';
5
+ import { IEscrow, IEscrowConfig, IEscrowsFilter, IPayoutFilter, IStatusEventFilter } from './interfaces';
6
+ import { EscrowCancel, EscrowStatus, EscrowWithdraw, NetworkData, TransactionLikeWithNonce, Payout } from './types';
7
7
  /**
8
8
  * ## Introduction
9
9
  *
@@ -760,7 +760,7 @@ export declare class EscrowUtils {
760
760
  * ```
761
761
  *
762
762
  * ```ts
763
- * type EscrowData = {
763
+ * interface IEscrow {
764
764
  * id: string;
765
765
  * address: string;
766
766
  * amountPaid: string;
@@ -785,7 +785,7 @@ export declare class EscrowUtils {
785
785
  *
786
786
  *
787
787
  * @param {IEscrowsFilter} filter Filter parameters.
788
- * @returns {EscrowData[]} List of escrows that match the filter.
788
+ * @returns {IEscrow[]} List of escrows that match the filter.
789
789
  *
790
790
  * **Code example**
791
791
  *
@@ -798,10 +798,10 @@ export declare class EscrowUtils {
798
798
  * to: new Date(2023, 5, 8),
799
799
  * chainId: ChainId.POLYGON_AMOY
800
800
  * };
801
- * const escrowDatas = await EscrowUtils.getEscrows(filters);
801
+ * const escrows = await EscrowUtils.getEscrows(filters);
802
802
  * ```
803
803
  */
804
- static getEscrows(filter: IEscrowsFilter): Promise<EscrowData[]>;
804
+ static getEscrows(filter: IEscrowsFilter): Promise<IEscrow[]>;
805
805
  /**
806
806
  * This function returns the escrow data for a given address.
807
807
  *
@@ -823,7 +823,7 @@ export declare class EscrowUtils {
823
823
  * ```
824
824
  *
825
825
  * ```ts
826
- * type EscrowData = {
826
+ * interface IEscrow {
827
827
  * id: string;
828
828
  * address: string;
829
829
  * amountPaid: string;
@@ -849,17 +849,17 @@ export declare class EscrowUtils {
849
849
  *
850
850
  * @param {ChainId} chainId Network in which the escrow has been deployed
851
851
  * @param {string} escrowAddress Address of the escrow
852
- * @returns {EscrowData} Escrow data
852
+ * @returns {IEscrow} Escrow data
853
853
  *
854
854
  * **Code example**
855
855
  *
856
856
  * ```ts
857
857
  * import { ChainId, EscrowUtils } from '@human-protocol/sdk';
858
858
  *
859
- * const escrowData = new EscrowUtils.getEscrow(ChainId.POLYGON_AMOY, "0x1234567890123456789012345678901234567890");
859
+ * const escrow = new EscrowUtils.getEscrow(ChainId.POLYGON_AMOY, "0x1234567890123456789012345678901234567890");
860
860
  * ```
861
861
  */
862
- static getEscrow(chainId: ChainId, escrowAddress: string): Promise<EscrowData>;
862
+ static getEscrow(chainId: ChainId, escrowAddress: string): Promise<IEscrow>;
863
863
  /**
864
864
  * This function returns the status events for a given set of networks within an optional date range.
865
865
  *
@@ -895,14 +895,7 @@ export declare class EscrowUtils {
895
895
  * };
896
896
  * ```
897
897
  *
898
- * @param {ChainId} chainId - List of network IDs to query for status events.
899
- * @param {EscrowStatus[]} [statuses] - Optional array of statuses to query for. If not provided, queries for all statuses.
900
- * @param {Date} [from] - Optional start date to filter events.
901
- * @param {Date} [to] - Optional end date to filter events.
902
- * @param {string} [launcher] - Optional launcher address to filter events. Must be a valid Ethereum address.
903
- * @param {number} [first] - Optional number of transactions per page. Default is 10.
904
- * @param {number} [skip] - Optional number of transactions to skip. Default is 0.
905
- * @param {OrderDirection} [orderDirection] - Optional order of the results. Default is DESC.
898
+ * @param {IStatusEventFilter} filter Filter parameters.
906
899
  * @returns {Promise<StatusEvent[]>} - Array of status events with their corresponding statuses.
907
900
  *
908
901
  * **Code example**
@@ -913,16 +906,43 @@ export declare class EscrowUtils {
913
906
  * (async () => {
914
907
  * const fromDate = new Date('2023-01-01');
915
908
  * const toDate = new Date('2023-12-31');
916
- * const statusEvents = await EscrowUtils.getStatusEvents(
917
- * [ChainId.POLYGON, ChainId.MAINNET],
918
- * [EscrowStatus.Pending, EscrowStatus.Complete],
919
- * fromDate,
920
- * toDate
921
- * );
909
+ * const statusEvents = await EscrowUtils.getStatusEvents({
910
+ * chainId: ChainId.POLYGON,
911
+ * statuses: [EscrowStatus.Pending, EscrowStatus.Complete],
912
+ * from: fromDate,
913
+ * to: toDate
914
+ * });
922
915
  * console.log(statusEvents);
923
916
  * })();
924
917
  * ```
925
918
  */
926
- static getStatusEvents(chainId: ChainId, statuses?: EscrowStatus[], from?: Date, to?: Date, launcher?: string, first?: number, skip?: number, orderDirection?: OrderDirection): Promise<StatusEvent[]>;
919
+ static getStatusEvents(filter: IStatusEventFilter): Promise<StatusEvent[]>;
920
+ /**
921
+ * This function returns the payouts for a given set of networks.
922
+ *
923
+ * > This uses Subgraph
924
+ *
925
+ * **Input parameters**
926
+ * Fetch payouts from the subgraph.
927
+ *
928
+ * @param {IPayoutFilter} filter Filter parameters.
929
+ * @returns {Promise<Payout[]>} List of payouts matching the filters.
930
+ *
931
+ * **Code example**
932
+ *
933
+ * ```ts
934
+ * import { ChainId, EscrowUtils } from '@human-protocol/sdk';
935
+ *
936
+ * const payouts = await EscrowUtils.getPayouts({
937
+ * chainId: ChainId.POLYGON,
938
+ * escrowAddress: '0x1234567890123456789012345678901234567890',
939
+ * recipient: '0xabcdefabcdefabcdefabcdefabcdefabcdefabcdef',
940
+ * from: new Date('2023-01-01'),
941
+ * to: new Date('2023-12-31')
942
+ * });
943
+ * console.log(payouts);
944
+ * ```
945
+ */
946
+ static getPayouts(filter: IPayoutFilter): Promise<Payout[]>;
927
947
  }
928
948
  //# sourceMappingURL=escrow.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"escrow.d.ts","sourceRoot":"","sources":["../src/escrow.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,cAAc,EAAY,SAAS,EAAkB,MAAM,QAAQ,CAAC;AAE7E,OAAO,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAG1C,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AA0B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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,qBAAa,WAAW;IACtB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+FG;WACiB,UAAU,CAAC,MAAM,EAAE,cAAc,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;IA2D1E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAwDG;WACiB,SAAS,CAC3B,OAAO,EAAE,OAAO,EAChB,aAAa,EAAE,MAAM,GACpB,OAAO,CAAC,OAAO,CAAC;IAoBnB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAuDG;WACiB,eAAe,CACjC,MAAM,EAAE,kBAAkB,GACzB,OAAO,CAAC,WAAW,EAAE,CAAC;IA+DzB;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;WACiB,UAAU,CAAC,MAAM,EAAE,aAAa,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;CAiCzE"}
package/dist/escrow.js CHANGED
@@ -1351,7 +1351,7 @@ class EscrowUtils {
1351
1351
  * ```
1352
1352
  *
1353
1353
  * ```ts
1354
- * type EscrowData = {
1354
+ * interface IEscrow {
1355
1355
  * id: string;
1356
1356
  * address: string;
1357
1357
  * amountPaid: string;
@@ -1376,7 +1376,7 @@ class EscrowUtils {
1376
1376
  *
1377
1377
  *
1378
1378
  * @param {IEscrowsFilter} filter Filter parameters.
1379
- * @returns {EscrowData[]} List of escrows that match the filter.
1379
+ * @returns {IEscrow[]} List of escrows that match the filter.
1380
1380
  *
1381
1381
  * **Code example**
1382
1382
  *
@@ -1389,7 +1389,7 @@ class EscrowUtils {
1389
1389
  * to: new Date(2023, 5, 8),
1390
1390
  * chainId: ChainId.POLYGON_AMOY
1391
1391
  * };
1392
- * const escrowDatas = await EscrowUtils.getEscrows(filters);
1392
+ * const escrows = await EscrowUtils.getEscrows(filters);
1393
1393
  * ```
1394
1394
  */
1395
1395
  static async getEscrows(filter) {
@@ -1454,7 +1454,7 @@ class EscrowUtils {
1454
1454
  * ```
1455
1455
  *
1456
1456
  * ```ts
1457
- * type EscrowData = {
1457
+ * interface IEscrow {
1458
1458
  * id: string;
1459
1459
  * address: string;
1460
1460
  * amountPaid: string;
@@ -1480,14 +1480,14 @@ class EscrowUtils {
1480
1480
  *
1481
1481
  * @param {ChainId} chainId Network in which the escrow has been deployed
1482
1482
  * @param {string} escrowAddress Address of the escrow
1483
- * @returns {EscrowData} Escrow data
1483
+ * @returns {IEscrow} Escrow data
1484
1484
  *
1485
1485
  * **Code example**
1486
1486
  *
1487
1487
  * ```ts
1488
1488
  * import { ChainId, EscrowUtils } from '@human-protocol/sdk';
1489
1489
  *
1490
- * const escrowData = new EscrowUtils.getEscrow(ChainId.POLYGON_AMOY, "0x1234567890123456789012345678901234567890");
1490
+ * const escrow = new EscrowUtils.getEscrow(ChainId.POLYGON_AMOY, "0x1234567890123456789012345678901234567890");
1491
1491
  * ```
1492
1492
  */
1493
1493
  static async getEscrow(chainId, escrowAddress) {
@@ -1536,14 +1536,7 @@ class EscrowUtils {
1536
1536
  * };
1537
1537
  * ```
1538
1538
  *
1539
- * @param {ChainId} chainId - List of network IDs to query for status events.
1540
- * @param {EscrowStatus[]} [statuses] - Optional array of statuses to query for. If not provided, queries for all statuses.
1541
- * @param {Date} [from] - Optional start date to filter events.
1542
- * @param {Date} [to] - Optional end date to filter events.
1543
- * @param {string} [launcher] - Optional launcher address to filter events. Must be a valid Ethereum address.
1544
- * @param {number} [first] - Optional number of transactions per page. Default is 10.
1545
- * @param {number} [skip] - Optional number of transactions to skip. Default is 0.
1546
- * @param {OrderDirection} [orderDirection] - Optional order of the results. Default is DESC.
1539
+ * @param {IStatusEventFilter} filter Filter parameters.
1547
1540
  * @returns {Promise<StatusEvent[]>} - Array of status events with their corresponding statuses.
1548
1541
  *
1549
1542
  * **Code example**
@@ -1554,23 +1547,25 @@ class EscrowUtils {
1554
1547
  * (async () => {
1555
1548
  * const fromDate = new Date('2023-01-01');
1556
1549
  * const toDate = new Date('2023-12-31');
1557
- * const statusEvents = await EscrowUtils.getStatusEvents(
1558
- * [ChainId.POLYGON, ChainId.MAINNET],
1559
- * [EscrowStatus.Pending, EscrowStatus.Complete],
1560
- * fromDate,
1561
- * toDate
1562
- * );
1550
+ * const statusEvents = await EscrowUtils.getStatusEvents({
1551
+ * chainId: ChainId.POLYGON,
1552
+ * statuses: [EscrowStatus.Pending, EscrowStatus.Complete],
1553
+ * from: fromDate,
1554
+ * to: toDate
1555
+ * });
1563
1556
  * console.log(statusEvents);
1564
1557
  * })();
1565
1558
  * ```
1566
1559
  */
1567
- static async getStatusEvents(chainId, statuses, from, to, launcher, first, skip, orderDirection) {
1560
+ static async getStatusEvents(filter) {
1561
+ const { chainId, statuses, from, to, launcher, first = 10, skip = 0, orderDirection = enums_1.OrderDirection.DESC, } = filter;
1568
1562
  if (launcher && !ethers_1.ethers.isAddress(launcher)) {
1569
1563
  throw error_1.ErrorInvalidAddress;
1570
1564
  }
1571
- first = first !== undefined ? Math.min(first, 1000) : 10;
1572
- skip = skip || 0;
1573
- orderDirection = orderDirection || enums_1.OrderDirection.DESC;
1565
+ const networkData = constants_1.NETWORKS[chainId];
1566
+ if (!networkData) {
1567
+ throw error_1.ErrorUnsupportedChainID;
1568
+ }
1574
1569
  // If statuses are not provided, use all statuses except Launched
1575
1570
  const effectiveStatuses = statuses ?? [
1576
1571
  types_1.EscrowStatus.Launched,
@@ -1580,19 +1575,15 @@ class EscrowUtils {
1580
1575
  types_1.EscrowStatus.Complete,
1581
1576
  types_1.EscrowStatus.Cancelled,
1582
1577
  ];
1583
- const networkData = constants_1.NETWORKS[chainId];
1584
- if (!networkData) {
1585
- throw error_1.ErrorUnsupportedChainID;
1586
- }
1587
1578
  const statusNames = effectiveStatuses.map((status) => types_1.EscrowStatus[status]);
1588
1579
  const data = await (0, graphql_request_1.default)((0, utils_1.getSubgraphUrl)(networkData), (0, graphql_1.GET_STATUS_UPDATES_QUERY)(from, to, launcher), {
1589
1580
  status: statusNames,
1590
1581
  from: from ? (0, utils_1.getUnixTimestamp)(from) : undefined,
1591
1582
  to: to ? (0, utils_1.getUnixTimestamp)(to) : undefined,
1592
1583
  launcher: launcher || undefined,
1593
- orderDirection: orderDirection,
1594
- first: first,
1595
- skip: skip,
1584
+ orderDirection,
1585
+ first: Math.min(first, 1000),
1586
+ skip,
1596
1587
  });
1597
1588
  if (!data || !data['escrowStatusEvents']) {
1598
1589
  return [];
@@ -1604,5 +1595,56 @@ class EscrowUtils {
1604
1595
  }));
1605
1596
  return eventsWithChainId;
1606
1597
  }
1598
+ /**
1599
+ * This function returns the payouts for a given set of networks.
1600
+ *
1601
+ * > This uses Subgraph
1602
+ *
1603
+ * **Input parameters**
1604
+ * Fetch payouts from the subgraph.
1605
+ *
1606
+ * @param {IPayoutFilter} filter Filter parameters.
1607
+ * @returns {Promise<Payout[]>} List of payouts matching the filters.
1608
+ *
1609
+ * **Code example**
1610
+ *
1611
+ * ```ts
1612
+ * import { ChainId, EscrowUtils } from '@human-protocol/sdk';
1613
+ *
1614
+ * const payouts = await EscrowUtils.getPayouts({
1615
+ * chainId: ChainId.POLYGON,
1616
+ * escrowAddress: '0x1234567890123456789012345678901234567890',
1617
+ * recipient: '0xabcdefabcdefabcdefabcdefabcdefabcdefabcdef',
1618
+ * from: new Date('2023-01-01'),
1619
+ * to: new Date('2023-12-31')
1620
+ * });
1621
+ * console.log(payouts);
1622
+ * ```
1623
+ */
1624
+ static async getPayouts(filter) {
1625
+ const networkData = constants_1.NETWORKS[filter.chainId];
1626
+ if (!networkData) {
1627
+ throw error_1.ErrorUnsupportedChainID;
1628
+ }
1629
+ if (filter.escrowAddress && !ethers_1.ethers.isAddress(filter.escrowAddress)) {
1630
+ throw error_1.ErrorInvalidAddress;
1631
+ }
1632
+ if (filter.recipient && !ethers_1.ethers.isAddress(filter.recipient)) {
1633
+ throw error_1.ErrorInvalidAddress;
1634
+ }
1635
+ const first = filter.first !== undefined ? Math.min(filter.first, 1000) : 10;
1636
+ const skip = filter.skip || 0;
1637
+ const orderDirection = filter.orderDirection || enums_1.OrderDirection.DESC;
1638
+ const { payouts } = await (0, graphql_request_1.default)((0, utils_1.getSubgraphUrl)(networkData), (0, graphql_1.GET_PAYOUTS_QUERY)(filter), {
1639
+ escrowAddress: filter.escrowAddress?.toLowerCase(),
1640
+ recipient: filter.recipient?.toLowerCase(),
1641
+ from: filter.from ? (0, utils_1.getUnixTimestamp)(filter.from) : undefined,
1642
+ to: filter.to ? (0, utils_1.getUnixTimestamp)(filter.to) : undefined,
1643
+ first: Math.min(first, 1000),
1644
+ skip,
1645
+ orderDirection,
1646
+ });
1647
+ return payouts || [];
1648
+ }
1607
1649
  }
1608
1650
  exports.EscrowUtils = EscrowUtils;
@@ -1 +1 @@
1
- {"version":3,"file":"escrow.d.ts","sourceRoot":"","sources":["../../../src/graphql/queries/escrow.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AA0BlD,eAAO,MAAM,2BAA2B,sCAOvC,CAAC;AAEF,eAAO,MAAM,iBAAiB,WAAY,cAAc,mCAmDvD,CAAC;AAEF,eAAO,MAAM,wBAAwB,UAC5B,IAAI,OACN,IAAI,aACE,MAAM,mCAiClB,CAAC"}
1
+ {"version":3,"file":"escrow.d.ts","sourceRoot":"","sources":["../../../src/graphql/queries/escrow.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AA0BlD,eAAO,MAAM,2BAA2B,sCAOvC,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,QAAQ,cAAc,mCAmDvD,CAAC;AAEF,eAAO,MAAM,wBAAwB,GACnC,OAAO,IAAI,EACX,KAAK,IAAI,EACT,WAAW,MAAM,mCAiClB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"hmtoken.d.ts","sourceRoot":"","sources":["../../../src/graphql/queries/hmtoken.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,iBAAiB,aAAc,MAAM,mCAuBjD,CAAC"}
1
+ {"version":3,"file":"hmtoken.d.ts","sourceRoot":"","sources":["../../../src/graphql/queries/hmtoken.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,iBAAiB,GAAI,UAAU,MAAM,mCAuBjD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"operator.d.ts","sourceRoot":"","sources":["../../../src/graphql/queries/operator.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AA4BlD,eAAO,MAAM,iBAAiB,WAAY,gBAAgB,mCA+BzD,CAAC;AAEF,eAAO,MAAM,4BAA4B,UAAW,MAAM,mCAsBzD,CAAC;AAEF,eAAO,MAAM,gBAAgB,gCAO5B,CAAC"}
1
+ {"version":3,"file":"operator.d.ts","sourceRoot":"","sources":["../../../src/graphql/queries/operator.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AA4BlD,eAAO,MAAM,iBAAiB,GAAI,QAAQ,gBAAgB,mCA+BzD,CAAC;AAEF,eAAO,MAAM,4BAA4B,GAAI,OAAO,MAAM,mCAsBzD,CAAC;AAEF,eAAO,MAAM,gBAAgB,gCAO5B,CAAC"}
@@ -1,3 +1,3 @@
1
- import { IPayoutFilter } from '../../interfaces';
1
+ import { IPayoutFilter } from 'src/interfaces';
2
2
  export declare const GET_PAYOUTS_QUERY: (filter: IPayoutFilter) => import("graphql").DocumentNode;
3
3
  //# sourceMappingURL=payout.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"payout.d.ts","sourceRoot":"","sources":["../../../src/graphql/queries/payout.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAYjD,eAAO,MAAM,iBAAiB,WAAY,aAAa,mCAiCtD,CAAC"}
1
+ {"version":3,"file":"payout.d.ts","sourceRoot":"","sources":["../../../src/graphql/queries/payout.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAY/C,eAAO,MAAM,iBAAiB,GAAI,QAAQ,aAAa,mCAkCtD,CAAC"}
@@ -23,9 +23,6 @@ const GET_PAYOUTS_QUERY = (filter) => {
23
23
  ${from ? `createdAt_gte: $from` : ''}
24
24
  ${to ? `createdAt_lt: $to` : ''}
25
25
  }
26
- `;
27
- const LIMIT_CLAUSE = `
28
- first: 1000
29
26
  `;
30
27
  return (0, graphql_tag_1.default) `
31
28
  query getPayouts(
@@ -33,12 +30,16 @@ const GET_PAYOUTS_QUERY = (filter) => {
33
30
  $recipient: String
34
31
  $from: Int
35
32
  $to: Int
33
+ $first: Int
34
+ $skip: Int
35
+ $orderDirection: String
36
36
  ) {
37
37
  payouts(
38
38
  ${WHERE_CLAUSE}
39
39
  orderBy: createdAt,
40
- orderDirection: desc,
41
- ${LIMIT_CLAUSE}
40
+ orderDirection: $orderDirection,
41
+ first: $first,
42
+ skip: $skip
42
43
  ) {
43
44
  ...PayoutFields
44
45
  }
@@ -1 +1 @@
1
- {"version":3,"file":"statistics.d.ts","sourceRoot":"","sources":["../../../src/graphql/queries/statistics.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAqDrD,eAAO,MAAM,4BAA4B,gCAOxC,CAAC;AAIF,eAAO,MAAM,2BAA2B,gCAOvC,CAAC;AAEF,eAAO,MAAM,wBAAwB,WAAY,iBAAiB,mCA6BjE,CAAC"}
1
+ {"version":3,"file":"statistics.d.ts","sourceRoot":"","sources":["../../../src/graphql/queries/statistics.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAqDrD,eAAO,MAAM,4BAA4B,gCAOxC,CAAC;AAIF,eAAO,MAAM,2BAA2B,gCAOvC,CAAC;AAEF,eAAO,MAAM,wBAAwB,GAAI,QAAQ,iBAAiB,mCA6BjE,CAAC"}
@@ -44,7 +44,7 @@ const EVENT_DAY_DATA_FRAGMENT = (0, graphql_tag_1.default) `
44
44
  dailyEscrowCount
45
45
  dailyWorkerCount
46
46
  dailyPayoutCount
47
- dailyPayoutAmount
47
+ dailyHMTPayoutAmount
48
48
  dailyHMTTransferCount
49
49
  dailyHMTTransferAmount
50
50
  dailyUniqueSenders
@@ -1 +1 @@
1
- {"version":3,"file":"transaction.d.ts","sourceRoot":"","sources":["../../../src/graphql/queries/transaction.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AA2B9D,eAAO,MAAM,sBAAsB,WAAY,mBAAmB,mCAkDjE,CAAC;AAEF,eAAO,MAAM,qBAAqB,gCAOjC,CAAC"}
1
+ {"version":3,"file":"transaction.d.ts","sourceRoot":"","sources":["../../../src/graphql/queries/transaction.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AA2B9D,eAAO,MAAM,sBAAsB,GAAI,QAAQ,mBAAmB,mCAiEjE,CAAC;AAEF,eAAO,MAAM,qBAAqB,gCAOjC,CAAC"}
@@ -30,7 +30,7 @@ const TRANSACTION_FRAGMENT = (0, graphql_tag_1.default) `
30
30
  }
31
31
  `;
32
32
  const GET_TRANSACTIONS_QUERY = (filter) => {
33
- const { startDate, endDate, startBlock, endBlock, fromAddress, toAddress } = filter;
33
+ const { startDate, endDate, startBlock, endBlock, fromAddress, toAddress, method, escrow, token, } = filter;
34
34
  const addressCondition = fromAddress === toAddress
35
35
  ? `
36
36
  ${fromAddress ? `{ from: $fromAddress }` : ''}
@@ -48,6 +48,9 @@ const GET_TRANSACTIONS_QUERY = (filter) => {
48
48
  ${endDate ? `{timestamp_lte: $endDate},` : ''}
49
49
  ${startBlock ? `{block_gte: $startBlock},` : ''}
50
50
  ${endBlock ? `{block_lte: $endBlock},` : ''}
51
+ ${method ? `{ method: $method },` : ''}
52
+ ${escrow ? `{ escrow: $escrow },` : ''}
53
+ ${token ? `{ token: $token },` : ''}
51
54
  ]
52
55
  }
53
56
  `;
@@ -59,6 +62,9 @@ const GET_TRANSACTIONS_QUERY = (filter) => {
59
62
  $endDate: Int
60
63
  $startBlock: Int
61
64
  $endBlock: Int
65
+ $method: String
66
+ $escrow: String
67
+ $token: String
62
68
  $orderDirection: String
63
69
  $first: Int
64
70
  $skip: Int
@@ -0,0 +1,4 @@
1
+ import { IWorkersFilter } from '../../interfaces';
2
+ export declare const GET_WORKER_QUERY: import("graphql").DocumentNode;
3
+ export declare const GET_WORKERS_QUERY: (filter: IWorkersFilter) => import("graphql").DocumentNode;
4
+ //# sourceMappingURL=worker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"worker.d.ts","sourceRoot":"","sources":["../../../src/graphql/queries/worker.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,eAAO,MAAM,gBAAgB,gCAS5B,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,QAAQ,cAAc,mCA0BvD,CAAC"}
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.GET_WORKERS_QUERY = exports.GET_WORKER_QUERY = void 0;
7
+ const graphql_tag_1 = __importDefault(require("graphql-tag"));
8
+ exports.GET_WORKER_QUERY = (0, graphql_tag_1.default) `
9
+ query GetWorker($address: String!) {
10
+ worker(id: $address) {
11
+ id
12
+ address
13
+ totalHMTAmountReceived
14
+ payoutCount
15
+ }
16
+ }
17
+ `;
18
+ const GET_WORKERS_QUERY = (filter) => {
19
+ const { address } = filter;
20
+ return (0, graphql_tag_1.default) `
21
+ query GetWorkers(
22
+ $address: String
23
+ $first: Int
24
+ $skip: Int
25
+ $orderBy: String
26
+ $orderDirection: String
27
+ ) {
28
+ workers(
29
+ where: {
30
+ ${address ? 'address: $address,' : ''}
31
+ }
32
+ first: $first
33
+ skip: $skip
34
+ orderBy: $orderBy
35
+ orderDirection: $orderDirection
36
+ ) {
37
+ id
38
+ address
39
+ totalHMTAmountReceived
40
+ payoutCount
41
+ }
42
+ }`;
43
+ };
44
+ exports.GET_WORKERS_QUERY = GET_WORKERS_QUERY;
@@ -20,13 +20,6 @@ export type EscrowData = {
20
20
  createdAt: string;
21
21
  chainId: number;
22
22
  };
23
- export type PayoutData = {
24
- id: string;
25
- escrowAddress: string;
26
- recipient: string;
27
- amount: string;
28
- createdAt: string;
29
- };
30
23
  export type HMTStatisticsData = {
31
24
  totalTransferEventCount: string;
32
25
  totalBulkTransferEventCount: string;
@@ -61,7 +54,7 @@ export type EventDayData = {
61
54
  dailyEscrowCount: string;
62
55
  dailyWorkerCount: string;
63
56
  dailyPayoutCount: string;
64
- dailyPayoutAmount: string;
57
+ dailyHMTPayoutAmount: string;
65
58
  dailyHMTTransferCount: string;
66
59
  dailyHMTTransferAmount: string;
67
60
  dailyUniqueSenders: string;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/graphql/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,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,M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AC;CAC9B,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,MAAM,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;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,IAAI,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC"}
package/dist/index.d.ts CHANGED
@@ -6,9 +6,10 @@ import { StatisticsClient } from './statistics';
6
6
  import { Encryption, EncryptionUtils } from './encryption';
7
7
  import { OperatorUtils } from './operator';
8
8
  import { TransactionUtils } from './transaction';
9
+ import { WorkerUtils } from './worker';
9
10
  export * from './constants';
10
11
  export * from './types';
11
12
  export * from './enums';
12
13
  export * from './interfaces';
13
- export { StakingClient, StorageClient, KVStoreClient, KVStoreUtils, EscrowClient, EscrowUtils, StatisticsClient, Encryption, EncryptionUtils, OperatorUtils, TransactionUtils, };
14
+ export { StakingClient, StorageClient, KVStoreClient, KVStoreUtils, EscrowClient, EscrowUtils, StatisticsClient, Encryption, EncryptionUtils, OperatorUtils, TransactionUtils, WorkerUtils, };
14
15
  //# 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,YAAY,EAAE,MAAM,WAAW,CAAC;AACxD,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;AAC3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEjD,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,YAAY,EACZ,WAAW,EACX,gBAAgB,EAChB,UAAU,EACV,eAAe,EACf,aAAa,EACb,gBAAgB,GACjB,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,YAAY,EAAE,MAAM,WAAW,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC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