@human-protocol/sdk 3.0.0 → 3.0.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 (64) hide show
  1. package/README.md +23 -80
  2. package/dist/constants.d.ts +1 -0
  3. package/dist/constants.d.ts.map +1 -1
  4. package/dist/constants.js +1 -0
  5. package/dist/enums.d.ts +4 -0
  6. package/dist/enums.d.ts.map +1 -1
  7. package/dist/enums.js +6 -1
  8. package/dist/error.d.ts +7 -0
  9. package/dist/error.d.ts.map +1 -1
  10. package/dist/error.js +8 -1
  11. package/dist/escrow.d.ts +90 -11
  12. package/dist/escrow.d.ts.map +1 -1
  13. package/dist/escrow.js +153 -43
  14. package/dist/graphql/queries/escrow.d.ts +1 -0
  15. package/dist/graphql/queries/escrow.d.ts.map +1 -1
  16. package/dist/graphql/queries/escrow.js +50 -12
  17. package/dist/graphql/queries/hmtoken.d.ts +1 -1
  18. package/dist/graphql/queries/hmtoken.d.ts.map +1 -1
  19. package/dist/graphql/queries/hmtoken.js +23 -7
  20. package/dist/graphql/queries/kvstore.d.ts +1 -0
  21. package/dist/graphql/queries/kvstore.d.ts.map +1 -1
  22. package/dist/graphql/queries/kvstore.js +12 -1
  23. package/dist/graphql/queries/operator.js +1 -1
  24. package/dist/graphql/queries/statistics.d.ts +2 -2
  25. package/dist/graphql/queries/statistics.d.ts.map +1 -1
  26. package/dist/graphql/queries/statistics.js +13 -7
  27. package/dist/graphql/queries/transaction.d.ts.map +1 -1
  28. package/dist/graphql/queries/transaction.js +12 -7
  29. package/dist/graphql/types.d.ts +11 -5
  30. package/dist/graphql/types.d.ts.map +1 -1
  31. package/dist/index.d.ts +3 -2
  32. package/dist/index.d.ts.map +1 -1
  33. package/dist/index.js +4 -1
  34. package/dist/interfaces.d.ts +16 -9
  35. package/dist/interfaces.d.ts.map +1 -1
  36. package/dist/kvstore.d.ts +69 -106
  37. package/dist/kvstore.d.ts.map +1 -1
  38. package/dist/kvstore.js +123 -159
  39. package/dist/operator.d.ts.map +1 -1
  40. package/dist/operator.js +64 -81
  41. package/dist/statistics.d.ts +91 -59
  42. package/dist/statistics.d.ts.map +1 -1
  43. package/dist/statistics.js +162 -85
  44. package/dist/transaction.d.ts +10 -4
  45. package/dist/transaction.d.ts.map +1 -1
  46. package/dist/transaction.js +36 -27
  47. package/package.json +5 -4
  48. package/src/constants.ts +1 -0
  49. package/src/enums.ts +5 -0
  50. package/src/error.ts +8 -0
  51. package/src/escrow.ts +197 -54
  52. package/src/graphql/queries/escrow.ts +53 -11
  53. package/src/graphql/queries/hmtoken.ts +23 -7
  54. package/src/graphql/queries/kvstore.ts +11 -0
  55. package/src/graphql/queries/operator.ts +1 -1
  56. package/src/graphql/queries/statistics.ts +15 -9
  57. package/src/graphql/queries/transaction.ts +12 -7
  58. package/src/graphql/types.ts +13 -5
  59. package/src/index.ts +4 -1
  60. package/src/interfaces.ts +18 -9
  61. package/src/kvstore.ts +145 -158
  62. package/src/operator.ts +79 -91
  63. package/src/statistics.ts +186 -96
  64. package/src/transaction.ts +40 -30
package/dist/escrow.js CHANGED
@@ -20,6 +20,7 @@ const graphql_request_1 = __importDefault(require("graphql-request"));
20
20
  const base_1 = require("./base");
21
21
  const constants_1 = require("./constants");
22
22
  const decorators_1 = require("./decorators");
23
+ const enums_1 = require("./enums");
23
24
  const error_1 = require("./error");
24
25
  const graphql_1 = require("./graphql");
25
26
  const types_1 = require("./types");
@@ -1215,7 +1216,7 @@ exports.EscrowClient = EscrowClient;
1215
1216
  * import { ChainId, EscrowUtils } from '@human-protocol/sdk';
1216
1217
  *
1217
1218
  * const escrowAddresses = new EscrowUtils.getEscrows({
1218
- * networks: [ChainId.POLYGON_AMOY]
1219
+ * network: ChainId.POLYGON_AMOY
1219
1220
  * });
1220
1221
  * ```
1221
1222
  */
@@ -1228,7 +1229,7 @@ class EscrowUtils {
1228
1229
  *
1229
1230
  * ```ts
1230
1231
  * interface IEscrowsFilter {
1231
- * networks: ChainId[];
1232
+ * chainId: ChainId;
1232
1233
  * launcher?: string;
1233
1234
  * reputationOracle?: string;
1234
1235
  * recordingOracle?: string;
@@ -1237,6 +1238,9 @@ class EscrowUtils {
1237
1238
  * status?: EscrowStatus;
1238
1239
  * from?: Date;
1239
1240
  * to?: Date;
1241
+ * first?: number;
1242
+ * skip?: number;
1243
+ * orderDirection?: OrderDirection;
1240
1244
  * }
1241
1245
  * ```
1242
1246
  *
@@ -1263,6 +1267,13 @@ class EscrowUtils {
1263
1267
  * ```
1264
1268
  *
1265
1269
  * ```ts
1270
+ * enum OrderDirection {
1271
+ * ASC = 'asc',
1272
+ * DESC = 'desc',
1273
+ * }
1274
+ * ```
1275
+ *
1276
+ * ```ts
1266
1277
  * enum EscrowStatus {
1267
1278
  * Launched,
1268
1279
  * Pending,
@@ -1288,11 +1299,8 @@ class EscrowUtils {
1288
1299
  * manifestHash?: string;
1289
1300
  * manifestUrl?: string;
1290
1301
  * recordingOracle?: string;
1291
- * recordingOracleFee?: string;
1292
1302
  * reputationOracle?: string;
1293
- * reputationOracleFee?: string;
1294
1303
  * exchangeOracle?: string;
1295
- * exchangeOracleFee?: string;
1296
1304
  * status: EscrowStatus;
1297
1305
  * token: string;
1298
1306
  * totalFundedAmount: string;
@@ -1313,15 +1321,12 @@ class EscrowUtils {
1313
1321
  * status: EscrowStatus.Pending,
1314
1322
  * from: new Date(2023, 4, 8),
1315
1323
  * to: new Date(2023, 5, 8),
1316
- * networks: [ChainId.POLYGON_AMOY]
1324
+ * chainId: ChainId.POLYGON_AMOY
1317
1325
  * };
1318
1326
  * const escrowDatas = await EscrowUtils.getEscrows(filters);
1319
1327
  * ```
1320
1328
  */
1321
1329
  static async getEscrows(filter) {
1322
- if (!filter?.networks?.length) {
1323
- throw error_1.ErrorUnsupportedChainID;
1324
- }
1325
1330
  if (filter.launcher && !ethers_1.ethers.isAddress(filter.launcher)) {
1326
1331
  throw error_1.ErrorInvalidAddress;
1327
1332
  }
@@ -1334,34 +1339,33 @@ class EscrowUtils {
1334
1339
  if (filter.exchangeOracle && !ethers_1.ethers.isAddress(filter.exchangeOracle)) {
1335
1340
  throw error_1.ErrorInvalidAddress;
1336
1341
  }
1337
- try {
1338
- const escrowAddresses = [];
1339
- for (const chainId of filter.networks) {
1340
- const networkData = constants_1.NETWORKS[chainId];
1341
- if (!networkData) {
1342
- throw error_1.ErrorUnsupportedChainID;
1343
- }
1344
- const { escrows } = await (0, graphql_request_1.default)((0, utils_1.getSubgraphUrl)(networkData), (0, graphql_1.GET_ESCROWS_QUERY)(filter), {
1345
- ...filter,
1346
- launcher: filter.launcher?.toLowerCase(),
1347
- reputationOracle: filter.reputationOracle?.toLowerCase(),
1348
- recordingOracle: filter.recordingOracle?.toLowerCase(),
1349
- exchangeOracle: filter.exchangeOracle?.toLowerCase(),
1350
- status: filter.status !== undefined
1351
- ? Object.entries(types_1.EscrowStatus).find(([, value]) => value === filter.status)?.[0]
1352
- : undefined,
1353
- from: filter.from ? +filter.from.getTime() / 1000 : undefined,
1354
- to: filter.to ? +filter.to.getTime() / 1000 : undefined,
1355
- });
1356
- escrows.map((escrow) => (escrow.chainId = networkData.chainId));
1357
- escrowAddresses.push(...escrows);
1358
- }
1359
- escrowAddresses.sort((a, b) => Number(b.createdAt) - Number(a.createdAt));
1360
- return escrowAddresses;
1342
+ const first = filter.first !== undefined ? Math.min(filter.first, 1000) : 10;
1343
+ const skip = filter.skip || 0;
1344
+ const orderDirection = filter.orderDirection || enums_1.OrderDirection.DESC;
1345
+ const networkData = constants_1.NETWORKS[filter.chainId];
1346
+ if (!networkData) {
1347
+ throw error_1.ErrorUnsupportedChainID;
1361
1348
  }
1362
- catch (e) {
1363
- return (0, utils_1.throwError)(e);
1349
+ const { escrows } = await (0, graphql_request_1.default)((0, utils_1.getSubgraphUrl)(networkData), (0, graphql_1.GET_ESCROWS_QUERY)(filter), {
1350
+ ...filter,
1351
+ launcher: filter.launcher?.toLowerCase(),
1352
+ reputationOracle: filter.reputationOracle?.toLowerCase(),
1353
+ recordingOracle: filter.recordingOracle?.toLowerCase(),
1354
+ exchangeOracle: filter.exchangeOracle?.toLowerCase(),
1355
+ status: filter.status !== undefined
1356
+ ? Object.entries(types_1.EscrowStatus).find(([, value]) => value === filter.status)?.[0]
1357
+ : undefined,
1358
+ from: filter.from ? +filter.from.getTime() / 1000 : undefined,
1359
+ to: filter.to ? +filter.to.getTime() / 1000 : undefined,
1360
+ orderDirection: orderDirection,
1361
+ first: first,
1362
+ skip: skip,
1363
+ });
1364
+ escrows.map((escrow) => (escrow.chainId = networkData.chainId));
1365
+ if (!escrows) {
1366
+ return [];
1364
1367
  }
1368
+ return escrows;
1365
1369
  }
1366
1370
  /**
1367
1371
  * This function returns the escrow data for a given address.
@@ -1406,11 +1410,8 @@ class EscrowUtils {
1406
1410
  * manifestHash?: string;
1407
1411
  * manifestUrl?: string;
1408
1412
  * recordingOracle?: string;
1409
- * recordingOracleFee?: string;
1410
1413
  * reputationOracle?: string;
1411
- * reputationOracleFee?: string;
1412
1414
  * exchangeOracle?: string;
1413
- * exchangeOracleFee?: string;
1414
1415
  * status: EscrowStatus;
1415
1416
  * token: string;
1416
1417
  * totalFundedAmount: string;
@@ -1439,13 +1440,122 @@ class EscrowUtils {
1439
1440
  if (escrowAddress && !ethers_1.ethers.isAddress(escrowAddress)) {
1440
1441
  throw error_1.ErrorInvalidAddress;
1441
1442
  }
1442
- try {
1443
- const { escrow } = await (0, graphql_request_1.default)((0, utils_1.getSubgraphUrl)(networkData), (0, graphql_1.GET_ESCROW_BY_ADDRESS_QUERY)(), { escrowAddress: escrowAddress.toLowerCase() });
1444
- return escrow || null;
1443
+ const { escrow } = await (0, graphql_request_1.default)((0, utils_1.getSubgraphUrl)(networkData), (0, graphql_1.GET_ESCROW_BY_ADDRESS_QUERY)(), { escrowAddress: escrowAddress.toLowerCase() });
1444
+ return escrow || null;
1445
+ }
1446
+ /**
1447
+ * This function returns the status events for a given set of networks within an optional date range.
1448
+ *
1449
+ * > This uses Subgraph
1450
+ *
1451
+ * **Input parameters**
1452
+ *
1453
+ * ```ts
1454
+ * enum ChainId {
1455
+ * ALL = -1,
1456
+ * MAINNET = 1,
1457
+ * RINKEBY = 4,
1458
+ * GOERLI = 5,
1459
+ * SEPOLIA = 11155111,
1460
+ * BSC_MAINNET = 56,
1461
+ * BSC_TESTNET = 97,
1462
+ * POLYGON = 137,
1463
+ * POLYGON_MUMBAI = 80001,
1464
+ * POLYGON_AMOY = 80002,
1465
+ * MOONBEAM = 1284,
1466
+ * MOONBASE_ALPHA = 1287,
1467
+ * AVALANCHE = 43114,
1468
+ * AVALANCHE_TESTNET = 43113,
1469
+ * CELO = 42220,
1470
+ * CELO_ALFAJORES = 44787,
1471
+ * LOCALHOST = 1338,
1472
+ * XLAYER_TESTNET = 195,
1473
+ * XLAYER = 196,
1474
+ * }
1475
+ * ```
1476
+ *
1477
+ * ```ts
1478
+ * enum OrderDirection {
1479
+ * ASC = 'asc',
1480
+ * DESC = 'desc',
1481
+ * }
1482
+ * ```
1483
+ *
1484
+ * ```ts
1485
+ * type Status = {
1486
+ * escrowAddress: string;
1487
+ * timestamp: string;
1488
+ * status: string;
1489
+ * };
1490
+ * ```
1491
+ *
1492
+ * @param {ChainId} chainId - List of network IDs to query for status events.
1493
+ * @param {EscrowStatus[]} [statuses] - Optional array of statuses to query for. If not provided, queries for all statuses.
1494
+ * @param {Date} [from] - Optional start date to filter events.
1495
+ * @param {Date} [to] - Optional end date to filter events.
1496
+ * @param {string} [launcher] - Optional launcher address to filter events. Must be a valid Ethereum address.
1497
+ * @param {number} [first] - Optional number of transactions per page. Default is 10.
1498
+ * @param {number} [skip] - Optional number of transactions to skip. Default is 0.
1499
+ * @param {OrderDirection} [orderDirection] - Optional order of the results. Default is DESC.
1500
+ * @returns {Promise<StatusEvent[]>} - Array of status events with their corresponding statuses.
1501
+ *
1502
+ * **Code example**
1503
+ *
1504
+ * ```ts
1505
+ * import { ChainId, EscrowUtils, EscrowStatus } from '@human-protocol/sdk';
1506
+ *
1507
+ * (async () => {
1508
+ * const fromDate = new Date('2023-01-01');
1509
+ * const toDate = new Date('2023-12-31');
1510
+ * const statusEvents = await EscrowUtils.getStatusEvents(
1511
+ * [ChainId.POLYGON, ChainId.MAINNET],
1512
+ * [EscrowStatus.Pending, EscrowStatus.Complete],
1513
+ * fromDate,
1514
+ * toDate
1515
+ * );
1516
+ * console.log(statusEvents);
1517
+ * })();
1518
+ * ```
1519
+ */
1520
+ static async getStatusEvents(chainId, statuses, from, to, launcher, first, skip, orderDirection) {
1521
+ if (launcher && !ethers_1.ethers.isAddress(launcher)) {
1522
+ throw error_1.ErrorInvalidAddress;
1445
1523
  }
1446
- catch (e) {
1447
- return (0, utils_1.throwError)(e);
1524
+ first = first !== undefined ? Math.min(first, 1000) : 10;
1525
+ skip = skip || 0;
1526
+ orderDirection = orderDirection || enums_1.OrderDirection.DESC;
1527
+ // If statuses are not provided, use all statuses except Launched
1528
+ const effectiveStatuses = statuses ?? [
1529
+ types_1.EscrowStatus.Launched,
1530
+ types_1.EscrowStatus.Pending,
1531
+ types_1.EscrowStatus.Partial,
1532
+ types_1.EscrowStatus.Paid,
1533
+ types_1.EscrowStatus.Complete,
1534
+ types_1.EscrowStatus.Cancelled,
1535
+ ];
1536
+ const networkData = constants_1.NETWORKS[chainId];
1537
+ if (!networkData) {
1538
+ throw error_1.ErrorUnsupportedChainID;
1448
1539
  }
1540
+ const statusNames = effectiveStatuses.map((status) => types_1.EscrowStatus[status]);
1541
+ const data = await (0, graphql_request_1.default)((0, utils_1.getSubgraphUrl)(networkData), (0, graphql_1.GET_STATUS_UPDATES_QUERY)(from, to, launcher), {
1542
+ status: statusNames,
1543
+ from: from ? Math.floor(from.getTime() / 1000) : undefined,
1544
+ to: to ? Math.floor(to.getTime() / 1000) : undefined,
1545
+ launcher: launcher || undefined,
1546
+ orderDirection: orderDirection,
1547
+ first: first,
1548
+ skip: skip,
1549
+ });
1550
+ if (!data || !data['escrowStatusEvents']) {
1551
+ return [];
1552
+ }
1553
+ const statusEvents = data['escrowStatusEvents'];
1554
+ const eventsWithChainId = statusEvents.map((event) => ({
1555
+ ...event,
1556
+ chainId,
1557
+ }));
1558
+ return eventsWithChainId;
1449
1559
  }
1450
1560
  }
1451
1561
  exports.EscrowUtils = EscrowUtils;
@@ -1,4 +1,5 @@
1
1
  import { IEscrowsFilter } from '../../interfaces';
2
2
  export declare const GET_ESCROW_BY_ADDRESS_QUERY: () => import("graphql").DocumentNode;
3
3
  export declare const GET_ESCROWS_QUERY: (filter: IEscrowsFilter) => import("graphql").DocumentNode;
4
+ export declare const GET_STATUS_UPDATES_QUERY: (from?: Date, to?: Date, launcher?: string) => import("graphql").DocumentNode;
4
5
  //# sourceMappingURL=escrow.d.ts.map
@@ -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;AA6BlD,eAAO,MAAM,2BAA2B,sCAOvC,CAAC;AAEF,eAAO,MAAM,iBAAiB,WAAY,cAAc,mCA4CvD,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,WAAY,cAAc,mCAmDvD,CAAC;AAEF,eAAO,MAAM,wBAAwB,UAC5B,IAAI,OACN,IAAI,aACE,MAAM,mCAiClB,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_ESCROWS_QUERY = exports.GET_ESCROW_BY_ADDRESS_QUERY = void 0;
6
+ exports.GET_STATUS_UPDATES_QUERY = exports.GET_ESCROWS_QUERY = exports.GET_ESCROW_BY_ADDRESS_QUERY = void 0;
7
7
  const graphql_tag_1 = __importDefault(require("graphql-tag"));
8
8
  const ESCROW_FRAGMENT = (0, graphql_tag_1.default) `
9
9
  fragment EscrowFields on Escrow {
@@ -20,11 +20,8 @@ const ESCROW_FRAGMENT = (0, graphql_tag_1.default) `
20
20
  manifestHash
21
21
  manifestUrl
22
22
  recordingOracle
23
- recordingOracleFee
24
23
  reputationOracle
25
- reputationOracleFee
26
24
  exchangeOracle
27
- exchangeOracleFee
28
25
  status
29
26
  token
30
27
  totalFundedAmount
@@ -44,14 +41,14 @@ const GET_ESCROWS_QUERY = (filter) => {
44
41
  const { launcher, jobRequesterId, reputationOracle, recordingOracle, exchangeOracle, status, from, to, } = filter;
45
42
  const WHERE_CLAUSE = `
46
43
  where: {
47
- ${launcher ? `launcher: $launcher` : ''}
48
- ${jobRequesterId ? `jobRequesterId: $jobRequesterId` : ''}
49
- ${reputationOracle ? `reputationOracle: $reputationOracle` : ''}
50
- ${recordingOracle ? `recordingOracle: $recordingOracle` : ''}
51
- ${exchangeOracle ? `exchangeOracle: $exchangeOracle` : ''}
52
- ${status !== undefined ? `status: $status` : ''}
53
- ${from ? `createdAt_gte: $from` : ''}
54
- ${to ? `createdAt_lte: $to` : ''}
44
+ ${launcher ? `launcher: $launcher,` : ''}
45
+ ${jobRequesterId ? `jobRequesterId: $jobRequesterId,` : ''}
46
+ ${reputationOracle ? `reputationOracle: $reputationOracle,` : ''}
47
+ ${recordingOracle ? `recordingOracle: $recordingOracle,` : ''}
48
+ ${exchangeOracle ? `exchangeOracle: $exchangeOracle,` : ''}
49
+ ${status !== undefined ? `status: $status,` : ''}
50
+ ${from ? `createdAt_gte: $from,` : ''}
51
+ ${to ? `createdAt_lte: $to,` : ''}
55
52
  }
56
53
  `;
57
54
  return (0, graphql_tag_1.default) `
@@ -64,9 +61,16 @@ const GET_ESCROWS_QUERY = (filter) => {
64
61
  $status: String
65
62
  $from: Int
66
63
  $to: Int
64
+ $orderDirection: String
65
+ $first: Int
66
+ $skip: Int
67
67
  ) {
68
68
  escrows(
69
69
  ${WHERE_CLAUSE}
70
+ orderBy: createdAt,
71
+ orderDirection: $orderDirection,
72
+ first: $first,
73
+ skip: $skip
70
74
  ) {
71
75
  ...EscrowFields
72
76
  }
@@ -75,3 +79,37 @@ const GET_ESCROWS_QUERY = (filter) => {
75
79
  `;
76
80
  };
77
81
  exports.GET_ESCROWS_QUERY = GET_ESCROWS_QUERY;
82
+ const GET_STATUS_UPDATES_QUERY = (from, to, launcher) => {
83
+ const WHERE_CLAUSE = `
84
+ where: {
85
+ status_in: $status
86
+ ${from ? `timestamp_gte: $from` : ''}
87
+ ${to ? `timestamp_lte: $to` : ''}
88
+ ${launcher ? `launcher: $launcher` : ''}
89
+ }
90
+ `;
91
+ return (0, graphql_tag_1.default) `
92
+ query getStatus(
93
+ $status: [String!]!
94
+ $from: Int
95
+ $to: Int
96
+ $launcher: String
97
+ $orderDirection: String
98
+ $first: Int
99
+ $skip: Int
100
+ ) {
101
+ escrowStatusEvents(
102
+ ${WHERE_CLAUSE}
103
+ orderBy: timestamp,
104
+ orderDirection: $orderDirection,
105
+ first: $first,
106
+ skip: $skip
107
+ ) {
108
+ escrowAddress,
109
+ timestamp,
110
+ status,
111
+ }
112
+ }
113
+ `;
114
+ };
115
+ exports.GET_STATUS_UPDATES_QUERY = GET_STATUS_UPDATES_QUERY;
@@ -1,2 +1,2 @@
1
- export declare const GET_HOLDERS_QUERY: import("graphql").DocumentNode;
1
+ export declare const GET_HOLDERS_QUERY: (address?: string) => import("graphql").DocumentNode;
2
2
  //# sourceMappingURL=hmtoken.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"hmtoken.d.ts","sourceRoot":"","sources":["../../../src/graphql/queries/hmtoken.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,iBAAiB,gCAO7B,CAAC"}
1
+ {"version":3,"file":"hmtoken.d.ts","sourceRoot":"","sources":["../../../src/graphql/queries/hmtoken.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,iBAAiB,aAAc,MAAM,mCAuBjD,CAAC"}
@@ -11,11 +11,27 @@ const HOLDER_FRAGMENT = (0, graphql_tag_1.default) `
11
11
  balance
12
12
  }
13
13
  `;
14
- exports.GET_HOLDERS_QUERY = (0, graphql_tag_1.default) `
15
- query GetHolders {
16
- holders {
17
- ...HolderFields
14
+ const GET_HOLDERS_QUERY = (address) => {
15
+ const WHERE_CLAUSE = `
16
+ where: {
17
+ ${address ? `address: $address,` : ''}
18
18
  }
19
- }
20
- ${HOLDER_FRAGMENT}
21
- `;
19
+ `;
20
+ return (0, graphql_tag_1.default) `
21
+ query GetHolders(
22
+ $address: String
23
+ $orderBy: String
24
+ $orderDirection: String
25
+ ) {
26
+ holders(
27
+ ${WHERE_CLAUSE}
28
+ orderBy: $orderBy,
29
+ orderDirection: $orderDirection
30
+ ) {
31
+ ...HolderFields
32
+ }
33
+ }
34
+ ${HOLDER_FRAGMENT}
35
+ `;
36
+ };
37
+ exports.GET_HOLDERS_QUERY = GET_HOLDERS_QUERY;
@@ -1,2 +1,3 @@
1
1
  export declare const GET_KVSTORE_BY_ADDRESS_QUERY: () => import("graphql").DocumentNode;
2
+ export declare const GET_KVSTORE_BY_ADDRESS_AND_KEY_QUERY: () => import("graphql").DocumentNode;
2
3
  //# sourceMappingURL=kvstore.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"kvstore.d.ts","sourceRoot":"","sources":["../../../src/graphql/queries/kvstore.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,4BAA4B,sCASxC,CAAC"}
1
+ {"version":3,"file":"kvstore.d.ts","sourceRoot":"","sources":["../../../src/graphql/queries/kvstore.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,4BAA4B,sCASxC,CAAC;AAEF,eAAO,MAAM,oCAAoC,sCAShD,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_KVSTORE_BY_ADDRESS_QUERY = void 0;
6
+ exports.GET_KVSTORE_BY_ADDRESS_AND_KEY_QUERY = exports.GET_KVSTORE_BY_ADDRESS_QUERY = void 0;
7
7
  const graphql_tag_1 = __importDefault(require("graphql-tag"));
8
8
  const KVSTORE_FRAGMENT = (0, graphql_tag_1.default) `
9
9
  fragment KVStoreFields on KVStore {
@@ -26,3 +26,14 @@ const GET_KVSTORE_BY_ADDRESS_QUERY = () => {
26
26
  `;
27
27
  };
28
28
  exports.GET_KVSTORE_BY_ADDRESS_QUERY = GET_KVSTORE_BY_ADDRESS_QUERY;
29
+ const GET_KVSTORE_BY_ADDRESS_AND_KEY_QUERY = () => {
30
+ return (0, graphql_tag_1.default) `
31
+ query getKVStoreDataByKey($address: String!, $key: String!) {
32
+ kvstores(where: { address: $address, key: $key }) {
33
+ ...KVStoreFields
34
+ }
35
+ }
36
+ ${KVSTORE_FRAGMENT}
37
+ `;
38
+ };
39
+ exports.GET_KVSTORE_BY_ADDRESS_AND_KEY_QUERY = GET_KVSTORE_BY_ADDRESS_AND_KEY_QUERY;
@@ -17,7 +17,7 @@ const LEADER_FRAGMENT = (0, graphql_tag_1.default) `
17
17
  amountSlashed
18
18
  reputation
19
19
  reward
20
- amountJobsLaunched
20
+ amountJobsProcessed
21
21
  role
22
22
  fee
23
23
  publicKey
@@ -1,5 +1,5 @@
1
- import { IStatisticsParams } from '../../interfaces';
1
+ import { IStatisticsFilter } from '../../interfaces';
2
2
  export declare const GET_HMTOKEN_STATISTICS_QUERY: import("graphql").DocumentNode;
3
3
  export declare const GET_ESCROW_STATISTICS_QUERY: import("graphql").DocumentNode;
4
- export declare const GET_EVENT_DAY_DATA_QUERY: (params: IStatisticsParams) => import("graphql").DocumentNode;
4
+ export declare const GET_EVENT_DAY_DATA_QUERY: (params: IStatisticsFilter) => import("graphql").DocumentNode;
5
5
  //# sourceMappingURL=statistics.d.ts.map
@@ -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;AAmDrD,eAAO,MAAM,4BAA4B,gCAOxC,CAAC;AAEF,eAAO,MAAM,2BAA2B,gCAOvC,CAAC;AAEF,eAAO,MAAM,wBAAwB,WAAY,iBAAiB,mCAyBjE,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;AAEF,eAAO,MAAM,2BAA2B,gCAOvC,CAAC;AAEF,eAAO,MAAM,wBAAwB,WAAY,iBAAiB,mCA6BjE,CAAC"}
@@ -49,6 +49,8 @@ const EVENT_DAY_DATA_FRAGMENT = (0, graphql_tag_1.default) `
49
49
  dailyPayoutAmount
50
50
  dailyHMTTransferCount
51
51
  dailyHMTTransferAmount
52
+ dailyUniqueSenders
53
+ dailyUniqueReceivers
52
54
  }
53
55
  `;
54
56
  exports.GET_HMTOKEN_STATISTICS_QUERY = (0, graphql_tag_1.default) `
@@ -68,23 +70,27 @@ exports.GET_ESCROW_STATISTICS_QUERY = (0, graphql_tag_1.default) `
68
70
  ${ESCROW_STATISTICS_FRAGMENT}
69
71
  `;
70
72
  const GET_EVENT_DAY_DATA_QUERY = (params) => {
71
- const { from, to, limit } = params;
73
+ const { from, to } = params;
72
74
  const WHERE_CLAUSE = `
73
75
  where: {
74
76
  ${from !== undefined ? `timestamp_gte: $from` : ''}
75
77
  ${to !== undefined ? `timestamp_lte: $to` : ''}
76
78
  }
77
- `;
78
- const LIMIT_CLAUSE = `
79
- first: ${limit ? `$limit` : `1000`}
80
79
  `;
81
80
  return (0, graphql_tag_1.default) `
82
- query GetEscrowDayData($from: Int, $to: Int) {
81
+ query GetEscrowDayData(
82
+ $from: Int,
83
+ $to: Int,
84
+ $orderDirection: String
85
+ $first: Int
86
+ $skip: Int
87
+ ) {
83
88
  eventDayDatas(
84
89
  ${WHERE_CLAUSE},
85
90
  orderBy: timestamp,
86
- orderDirection: desc,
87
- ${LIMIT_CLAUSE}
91
+ orderDirection: $orderDirection,
92
+ first: $first,
93
+ skip: $skip
88
94
  ) {
89
95
  ...EventDayDataFields
90
96
  }
@@ -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;AAc9D,eAAO,MAAM,sBAAsB,WAAY,mBAAmB,mCAkCjE,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;AAc9D,eAAO,MAAM,sBAAsB,WAAY,mBAAmB,mCAuCjE,CAAC;AAEF,eAAO,MAAM,qBAAqB,gCAOjC,CAAC"}
@@ -20,12 +20,12 @@ const GET_TRANSACTIONS_QUERY = (filter) => {
20
20
  const { startDate, endDate, startBlock, endBlock, fromAddress, toAddress } = filter;
21
21
  const WHERE_CLAUSE = `
22
22
  where: {
23
- ${fromAddress ? `from: $fromAddress` : ''}
24
- ${toAddress ? `to: $toAddress` : ''}
25
- ${startDate ? `timestamp_gte: $startDate` : ''}
26
- ${endDate ? `timestamp_lte: $endDate` : ''}
27
- ${startBlock ? `block_gte: $startBlock` : ''}
28
- ${endBlock ? `block_lte: $endBlock` : ''}
23
+ ${fromAddress ? `from: $fromAddress,` : ''}
24
+ ${toAddress ? `to: $toAddress,` : ''}
25
+ ${startDate ? `timestamp_gte: $startDate,` : ''}
26
+ ${endDate ? `timestamp_lte: $endDate,` : ''}
27
+ ${startBlock ? `block_gte: $startBlock,` : ''}
28
+ ${endBlock ? `block_lte: $endBlock,` : ''}
29
29
  }
30
30
  `;
31
31
  return (0, graphql_tag_1.default) `
@@ -36,11 +36,16 @@ const GET_TRANSACTIONS_QUERY = (filter) => {
36
36
  $endDate: Int
37
37
  $startBlock: Int
38
38
  $endBlock: Int
39
+ $orderDirection: String
40
+ $first: Int
41
+ $skip: Int
39
42
  ) {
40
43
  transactions(
41
44
  ${WHERE_CLAUSE}
42
45
  orderBy: timestamp,
43
- orderDirection: asc,
46
+ orderDirection: $orderDirection,
47
+ first: $first,
48
+ skip: $skip
44
49
  ) {
45
50
  ...TransactionFields
46
51
  }
@@ -1,3 +1,4 @@
1
+ import { ChainId } from '../enums';
1
2
  export type EscrowData = {
2
3
  id: string;
3
4
  address: string;
@@ -11,11 +12,8 @@ export type EscrowData = {
11
12
  manifestHash?: string;
12
13
  manifestUrl?: string;
13
14
  recordingOracle?: string;
14
- recordingOracleFee?: string;
15
15
  reputationOracle?: string;
16
- reputationOracleFee?: string;
17
16
  exchangeOracle?: string;
18
- exchangeOracleFee?: string;
19
17
  status: string;
20
18
  token: string;
21
19
  totalFundedAmount: string;
@@ -68,6 +66,8 @@ export type EventDayData = {
68
66
  dailyPayoutAmount: string;
69
67
  dailyHMTTransferCount: string;
70
68
  dailyHMTTransferAmount: string;
69
+ dailyUniqueSenders: string;
70
+ dailyUniqueReceivers: string;
71
71
  };
72
72
  export type RewardAddedEventData = {
73
73
  escrowAddress: string;
@@ -115,13 +115,13 @@ export type DailyHMTData = {
115
115
  timestamp: Date;
116
116
  totalTransactionAmount: bigint;
117
117
  totalTransactionCount: number;
118
+ dailyUniqueSenders: number;
119
+ dailyUniqueReceivers: number;
118
120
  };
119
121
  export type HMTStatistics = {
120
122
  totalTransferAmount: bigint;
121
123
  totalTransferCount: number;
122
124
  totalHolders: number;
123
- holders: HMTHolder[];
124
- dailyHMTData: DailyHMTData[];
125
125
  };
126
126
  export type IMDataEntity = {
127
127
  served: number;
@@ -136,6 +136,12 @@ export type DailyTaskData = {
136
136
  export type TaskStatistics = {
137
137
  dailyTasksData: DailyTaskData[];
138
138
  };
139
+ export type StatusEvent = {
140
+ timestamp: number;
141
+ escrowAddress: string;
142
+ status: string;
143
+ chainId: ChainId;
144
+ };
139
145
  export type KVStoreData = {
140
146
  id: string;
141
147
  address: string;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/graphql/types.ts"],"names":[],"mappings":"AAAA,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;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,iBAAiB,EAAE,MAAM,CAAC;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,aAAa,EAAE,MAAM,CAAC;I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