@human-protocol/sdk 2.1.3 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -80
- package/dist/constants.d.ts +1 -0
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +56 -24
- package/dist/enums.d.ts +7 -2
- package/dist/enums.d.ts.map +1 -1
- package/dist/enums.js +8 -2
- package/dist/error.d.ts +16 -0
- package/dist/error.d.ts.map +1 -1
- package/dist/error.js +18 -2
- package/dist/escrow.d.ts +91 -7
- package/dist/escrow.d.ts.map +1 -1
- package/dist/escrow.js +154 -39
- package/dist/graphql/queries/escrow.d.ts +1 -0
- package/dist/graphql/queries/escrow.d.ts.map +1 -1
- package/dist/graphql/queries/escrow.js +50 -9
- package/dist/graphql/queries/hmtoken.d.ts +1 -1
- package/dist/graphql/queries/hmtoken.d.ts.map +1 -1
- package/dist/graphql/queries/hmtoken.js +23 -7
- package/dist/graphql/queries/kvstore.d.ts +2 -0
- package/dist/graphql/queries/kvstore.d.ts.map +1 -0
- package/dist/graphql/queries/kvstore.js +28 -0
- package/dist/graphql/queries/statistics.d.ts.map +1 -1
- package/dist/graphql/queries/statistics.js +2 -0
- package/dist/graphql/queries/transaction.d.ts +4 -0
- package/dist/graphql/queries/transaction.d.ts.map +1 -0
- package/dist/graphql/queries/transaction.js +64 -0
- package/dist/graphql/types.d.ts +19 -0
- package/dist/graphql/types.d.ts.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/interfaces.d.ts +35 -4
- package/dist/interfaces.d.ts.map +1 -1
- package/dist/kvstore.d.ts +84 -0
- package/dist/kvstore.d.ts.map +1 -1
- package/dist/kvstore.js +103 -1
- package/dist/operator.d.ts +5 -2
- package/dist/operator.d.ts.map +1 -1
- package/dist/operator.js +68 -57
- package/dist/statistics.d.ts +29 -2
- package/dist/statistics.d.ts.map +1 -1
- package/dist/statistics.js +53 -7
- package/dist/transaction.d.ts +75 -0
- package/dist/transaction.d.ts.map +1 -0
- package/dist/transaction.js +130 -0
- package/dist/types.d.ts +4 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/utils.d.ts +9 -0
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +21 -1
- package/package.json +7 -6
- package/src/constants.ts +73 -23
- package/src/enums.ts +7 -1
- package/src/error.ts +23 -0
- package/src/escrow.ts +199 -51
- package/src/graphql/queries/escrow.ts +53 -8
- package/src/graphql/queries/hmtoken.ts +23 -7
- package/src/graphql/queries/kvstore.ts +23 -0
- package/src/graphql/queries/statistics.ts +2 -0
- package/src/graphql/queries/transaction.ts +64 -0
- package/src/graphql/types.ts +22 -0
- package/src/index.ts +2 -0
- package/src/interfaces.ts +40 -4
- package/src/kvstore.ts +114 -1
- package/src/operator.ts +90 -69
- package/src/statistics.ts +63 -9
- package/src/transaction.ts +152 -0
- package/src/types.ts +4 -0
- package/src/utils.ts +25 -0
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
|
-
*
|
|
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
|
-
*
|
|
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
|
*
|
|
@@ -1257,12 +1261,19 @@ class EscrowUtils {
|
|
|
1257
1261
|
* AVALANCHE_TESTNET = 43113,
|
|
1258
1262
|
* CELO = 42220,
|
|
1259
1263
|
* CELO_ALFAJORES = 44787,
|
|
1260
|
-
*
|
|
1264
|
+
* = 1273227453,
|
|
1261
1265
|
* LOCALHOST = 1338,
|
|
1262
1266
|
* }
|
|
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,
|
|
@@ -1313,15 +1324,12 @@ class EscrowUtils {
|
|
|
1313
1324
|
* status: EscrowStatus.Pending,
|
|
1314
1325
|
* from: new Date(2023, 4, 8),
|
|
1315
1326
|
* to: new Date(2023, 5, 8),
|
|
1316
|
-
*
|
|
1327
|
+
* chainId: ChainId.POLYGON_AMOY
|
|
1317
1328
|
* };
|
|
1318
1329
|
* const escrowDatas = await EscrowUtils.getEscrows(filters);
|
|
1319
1330
|
* ```
|
|
1320
1331
|
*/
|
|
1321
1332
|
static async getEscrows(filter) {
|
|
1322
|
-
if (!filter?.networks?.length) {
|
|
1323
|
-
throw error_1.ErrorUnsupportedChainID;
|
|
1324
|
-
}
|
|
1325
1333
|
if (filter.launcher && !ethers_1.ethers.isAddress(filter.launcher)) {
|
|
1326
1334
|
throw error_1.ErrorInvalidAddress;
|
|
1327
1335
|
}
|
|
@@ -1334,34 +1342,33 @@ class EscrowUtils {
|
|
|
1334
1342
|
if (filter.exchangeOracle && !ethers_1.ethers.isAddress(filter.exchangeOracle)) {
|
|
1335
1343
|
throw error_1.ErrorInvalidAddress;
|
|
1336
1344
|
}
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
}
|
|
1344
|
-
const { escrows } = await (0, graphql_request_1.default)(networkData.subgraphUrl, (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;
|
|
1345
|
+
const first = filter.first !== undefined ? Math.min(filter.first, 1000) : 10;
|
|
1346
|
+
const skip = filter.skip || 0;
|
|
1347
|
+
const orderDirection = filter.orderDirection || enums_1.OrderDirection.DESC;
|
|
1348
|
+
const networkData = constants_1.NETWORKS[filter.chainId];
|
|
1349
|
+
if (!networkData) {
|
|
1350
|
+
throw error_1.ErrorUnsupportedChainID;
|
|
1361
1351
|
}
|
|
1362
|
-
|
|
1363
|
-
|
|
1352
|
+
const { escrows } = await (0, graphql_request_1.default)((0, utils_1.getSubgraphUrl)(networkData), (0, graphql_1.GET_ESCROWS_QUERY)(filter), {
|
|
1353
|
+
...filter,
|
|
1354
|
+
launcher: filter.launcher?.toLowerCase(),
|
|
1355
|
+
reputationOracle: filter.reputationOracle?.toLowerCase(),
|
|
1356
|
+
recordingOracle: filter.recordingOracle?.toLowerCase(),
|
|
1357
|
+
exchangeOracle: filter.exchangeOracle?.toLowerCase(),
|
|
1358
|
+
status: filter.status !== undefined
|
|
1359
|
+
? Object.entries(types_1.EscrowStatus).find(([, value]) => value === filter.status)?.[0]
|
|
1360
|
+
: undefined,
|
|
1361
|
+
from: filter.from ? +filter.from.getTime() / 1000 : undefined,
|
|
1362
|
+
to: filter.to ? +filter.to.getTime() / 1000 : undefined,
|
|
1363
|
+
orderDirection: orderDirection,
|
|
1364
|
+
first: first,
|
|
1365
|
+
skip: skip,
|
|
1366
|
+
});
|
|
1367
|
+
escrows.map((escrow) => (escrow.chainId = networkData.chainId));
|
|
1368
|
+
if (!escrows) {
|
|
1369
|
+
return [];
|
|
1364
1370
|
}
|
|
1371
|
+
return escrows;
|
|
1365
1372
|
}
|
|
1366
1373
|
/**
|
|
1367
1374
|
* This function returns the escrow data for a given address.
|
|
@@ -1387,7 +1394,6 @@ class EscrowUtils {
|
|
|
1387
1394
|
* AVALANCHE_TESTNET = 43113,
|
|
1388
1395
|
* CELO = 42220,
|
|
1389
1396
|
* CELO_ALFAJORES = 44787,
|
|
1390
|
-
* SKALE = 1273227453,
|
|
1391
1397
|
* LOCALHOST = 1338,
|
|
1392
1398
|
* }
|
|
1393
1399
|
* ```
|
|
@@ -1440,13 +1446,122 @@ class EscrowUtils {
|
|
|
1440
1446
|
if (escrowAddress && !ethers_1.ethers.isAddress(escrowAddress)) {
|
|
1441
1447
|
throw error_1.ErrorInvalidAddress;
|
|
1442
1448
|
}
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1449
|
+
const { escrow } = await (0, graphql_request_1.default)((0, utils_1.getSubgraphUrl)(networkData), (0, graphql_1.GET_ESCROW_BY_ADDRESS_QUERY)(), { escrowAddress: escrowAddress.toLowerCase() });
|
|
1450
|
+
return escrow || null;
|
|
1451
|
+
}
|
|
1452
|
+
/**
|
|
1453
|
+
* This function returns the status events for a given set of networks within an optional date range.
|
|
1454
|
+
*
|
|
1455
|
+
* > This uses Subgraph
|
|
1456
|
+
*
|
|
1457
|
+
* **Input parameters**
|
|
1458
|
+
*
|
|
1459
|
+
* ```ts
|
|
1460
|
+
* enum ChainId {
|
|
1461
|
+
* ALL = -1,
|
|
1462
|
+
* MAINNET = 1,
|
|
1463
|
+
* RINKEBY = 4,
|
|
1464
|
+
* GOERLI = 5,
|
|
1465
|
+
* SEPOLIA = 11155111,
|
|
1466
|
+
* BSC_MAINNET = 56,
|
|
1467
|
+
* BSC_TESTNET = 97,
|
|
1468
|
+
* POLYGON = 137,
|
|
1469
|
+
* POLYGON_MUMBAI = 80001,
|
|
1470
|
+
* POLYGON_AMOY = 80002,
|
|
1471
|
+
* MOONBEAM = 1284,
|
|
1472
|
+
* MOONBASE_ALPHA = 1287,
|
|
1473
|
+
* AVALANCHE = 43114,
|
|
1474
|
+
* AVALANCHE_TESTNET = 43113,
|
|
1475
|
+
* CELO = 42220,
|
|
1476
|
+
* CELO_ALFAJORES = 44787,
|
|
1477
|
+
* LOCALHOST = 1338,
|
|
1478
|
+
* XLAYER_TESTNET = 195,
|
|
1479
|
+
* XLAYER = 196,
|
|
1480
|
+
* }
|
|
1481
|
+
* ```
|
|
1482
|
+
*
|
|
1483
|
+
* ```ts
|
|
1484
|
+
* enum OrderDirection {
|
|
1485
|
+
* ASC = 'asc',
|
|
1486
|
+
* DESC = 'desc',
|
|
1487
|
+
* }
|
|
1488
|
+
* ```
|
|
1489
|
+
*
|
|
1490
|
+
* ```ts
|
|
1491
|
+
* type Status = {
|
|
1492
|
+
* escrowAddress: string;
|
|
1493
|
+
* timestamp: string;
|
|
1494
|
+
* status: string;
|
|
1495
|
+
* };
|
|
1496
|
+
* ```
|
|
1497
|
+
*
|
|
1498
|
+
* @param {ChainId} chainId - List of network IDs to query for status events.
|
|
1499
|
+
* @param {EscrowStatus[]} [statuses] - Optional array of statuses to query for. If not provided, queries for all statuses.
|
|
1500
|
+
* @param {Date} [from] - Optional start date to filter events.
|
|
1501
|
+
* @param {Date} [to] - Optional end date to filter events.
|
|
1502
|
+
* @param {string} [launcher] - Optional launcher address to filter events. Must be a valid Ethereum address.
|
|
1503
|
+
* @param {number} [first] - Optional number of transactions per page. Default is 10.
|
|
1504
|
+
* @param {number} [skip] - Optional number of transactions to skip. Default is 0.
|
|
1505
|
+
* @param {OrderDirection} [orderDirection] - Optional order of the results. Default is DESC.
|
|
1506
|
+
* @returns {Promise<StatusEvent[]>} - Array of status events with their corresponding statuses.
|
|
1507
|
+
*
|
|
1508
|
+
* **Code example**
|
|
1509
|
+
*
|
|
1510
|
+
* ```ts
|
|
1511
|
+
* import { ChainId, EscrowUtils, EscrowStatus } from '@human-protocol/sdk';
|
|
1512
|
+
*
|
|
1513
|
+
* (async () => {
|
|
1514
|
+
* const fromDate = new Date('2023-01-01');
|
|
1515
|
+
* const toDate = new Date('2023-12-31');
|
|
1516
|
+
* const statusEvents = await EscrowUtils.getStatusEvents(
|
|
1517
|
+
* [ChainId.POLYGON, ChainId.MAINNET],
|
|
1518
|
+
* [EscrowStatus.Pending, EscrowStatus.Complete],
|
|
1519
|
+
* fromDate,
|
|
1520
|
+
* toDate
|
|
1521
|
+
* );
|
|
1522
|
+
* console.log(statusEvents);
|
|
1523
|
+
* })();
|
|
1524
|
+
* ```
|
|
1525
|
+
*/
|
|
1526
|
+
static async getStatusEvents(chainId, statuses, from, to, launcher, first, skip, orderDirection) {
|
|
1527
|
+
if (launcher && !ethers_1.ethers.isAddress(launcher)) {
|
|
1528
|
+
throw error_1.ErrorInvalidAddress;
|
|
1446
1529
|
}
|
|
1447
|
-
|
|
1448
|
-
|
|
1530
|
+
first = first !== undefined ? Math.min(first, 1000) : 10;
|
|
1531
|
+
skip = skip || 0;
|
|
1532
|
+
orderDirection = orderDirection || enums_1.OrderDirection.DESC;
|
|
1533
|
+
// If statuses are not provided, use all statuses except Launched
|
|
1534
|
+
const effectiveStatuses = statuses ?? [
|
|
1535
|
+
types_1.EscrowStatus.Launched,
|
|
1536
|
+
types_1.EscrowStatus.Pending,
|
|
1537
|
+
types_1.EscrowStatus.Partial,
|
|
1538
|
+
types_1.EscrowStatus.Paid,
|
|
1539
|
+
types_1.EscrowStatus.Complete,
|
|
1540
|
+
types_1.EscrowStatus.Cancelled,
|
|
1541
|
+
];
|
|
1542
|
+
const networkData = constants_1.NETWORKS[chainId];
|
|
1543
|
+
if (!networkData) {
|
|
1544
|
+
throw error_1.ErrorUnsupportedChainID;
|
|
1449
1545
|
}
|
|
1546
|
+
const statusNames = effectiveStatuses.map((status) => types_1.EscrowStatus[status]);
|
|
1547
|
+
const data = await (0, graphql_request_1.default)((0, utils_1.getSubgraphUrl)(networkData), (0, graphql_1.GET_STATUS_UPDATES_QUERY)(from, to, launcher), {
|
|
1548
|
+
status: statusNames,
|
|
1549
|
+
from: from ? Math.floor(from.getTime() / 1000) : undefined,
|
|
1550
|
+
to: to ? Math.floor(to.getTime() / 1000) : undefined,
|
|
1551
|
+
launcher: launcher || undefined,
|
|
1552
|
+
orderDirection: orderDirection,
|
|
1553
|
+
first: first,
|
|
1554
|
+
skip: skip,
|
|
1555
|
+
});
|
|
1556
|
+
if (!data || !data['escrowStatusEvents']) {
|
|
1557
|
+
return [];
|
|
1558
|
+
}
|
|
1559
|
+
const statusEvents = data['escrowStatusEvents'];
|
|
1560
|
+
const eventsWithChainId = statusEvents.map((event) => ({
|
|
1561
|
+
...event,
|
|
1562
|
+
chainId,
|
|
1563
|
+
}));
|
|
1564
|
+
return eventsWithChainId;
|
|
1450
1565
|
}
|
|
1451
1566
|
}
|
|
1452
1567
|
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,
|
|
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,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 {
|
|
@@ -44,14 +44,14 @@ const GET_ESCROWS_QUERY = (filter) => {
|
|
|
44
44
|
const { launcher, jobRequesterId, reputationOracle, recordingOracle, exchangeOracle, status, from, to, } = filter;
|
|
45
45
|
const WHERE_CLAUSE = `
|
|
46
46
|
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
|
|
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,` : ''}
|
|
55
55
|
}
|
|
56
56
|
`;
|
|
57
57
|
return (0, graphql_tag_1.default) `
|
|
@@ -64,9 +64,16 @@ const GET_ESCROWS_QUERY = (filter) => {
|
|
|
64
64
|
$status: String
|
|
65
65
|
$from: Int
|
|
66
66
|
$to: Int
|
|
67
|
+
$orderDirection: String
|
|
68
|
+
$first: Int
|
|
69
|
+
$skip: Int
|
|
67
70
|
) {
|
|
68
71
|
escrows(
|
|
69
72
|
${WHERE_CLAUSE}
|
|
73
|
+
orderBy: createdAt,
|
|
74
|
+
orderDirection: $orderDirection,
|
|
75
|
+
first: $first,
|
|
76
|
+
skip: $skip
|
|
70
77
|
) {
|
|
71
78
|
...EscrowFields
|
|
72
79
|
}
|
|
@@ -75,3 +82,37 @@ const GET_ESCROWS_QUERY = (filter) => {
|
|
|
75
82
|
`;
|
|
76
83
|
};
|
|
77
84
|
exports.GET_ESCROWS_QUERY = GET_ESCROWS_QUERY;
|
|
85
|
+
const GET_STATUS_UPDATES_QUERY = (from, to, launcher) => {
|
|
86
|
+
const WHERE_CLAUSE = `
|
|
87
|
+
where: {
|
|
88
|
+
status_in: $status
|
|
89
|
+
${from ? `timestamp_gte: $from` : ''}
|
|
90
|
+
${to ? `timestamp_lte: $to` : ''}
|
|
91
|
+
${launcher ? `launcher: $launcher` : ''}
|
|
92
|
+
}
|
|
93
|
+
`;
|
|
94
|
+
return (0, graphql_tag_1.default) `
|
|
95
|
+
query getStatus(
|
|
96
|
+
$status: [String!]!
|
|
97
|
+
$from: Int
|
|
98
|
+
$to: Int
|
|
99
|
+
$launcher: String
|
|
100
|
+
$orderDirection: String
|
|
101
|
+
$first: Int
|
|
102
|
+
$skip: Int
|
|
103
|
+
) {
|
|
104
|
+
escrowStatusEvents(
|
|
105
|
+
${WHERE_CLAUSE}
|
|
106
|
+
orderBy: timestamp,
|
|
107
|
+
orderDirection: $orderDirection,
|
|
108
|
+
first: $first,
|
|
109
|
+
skip: $skip
|
|
110
|
+
) {
|
|
111
|
+
escrowAddress,
|
|
112
|
+
timestamp,
|
|
113
|
+
status,
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
`;
|
|
117
|
+
};
|
|
118
|
+
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,
|
|
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
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
const GET_HOLDERS_QUERY = (address) => {
|
|
15
|
+
const WHERE_CLAUSE = `
|
|
16
|
+
where: {
|
|
17
|
+
${address ? `address: $address,` : ''}
|
|
18
18
|
}
|
|
19
|
-
|
|
20
|
-
|
|
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;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kvstore.d.ts","sourceRoot":"","sources":["../../../src/graphql/queries/kvstore.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,4BAA4B,sCASxC,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
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_KVSTORE_BY_ADDRESS_QUERY = void 0;
|
|
7
|
+
const graphql_tag_1 = __importDefault(require("graphql-tag"));
|
|
8
|
+
const KVSTORE_FRAGMENT = (0, graphql_tag_1.default) `
|
|
9
|
+
fragment KVStoreFields on KVStore {
|
|
10
|
+
id
|
|
11
|
+
block
|
|
12
|
+
timestamp
|
|
13
|
+
address
|
|
14
|
+
key
|
|
15
|
+
value
|
|
16
|
+
}
|
|
17
|
+
`;
|
|
18
|
+
const GET_KVSTORE_BY_ADDRESS_QUERY = () => {
|
|
19
|
+
return (0, graphql_tag_1.default) `
|
|
20
|
+
query getKVStoreData($address: String!) {
|
|
21
|
+
kvstores(where: { address: $address }) {
|
|
22
|
+
...KVStoreFields
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
${KVSTORE_FRAGMENT}
|
|
26
|
+
`;
|
|
27
|
+
};
|
|
28
|
+
exports.GET_KVSTORE_BY_ADDRESS_QUERY = GET_KVSTORE_BY_ADDRESS_QUERY;
|
|
@@ -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;
|
|
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,mCAyBjE,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) `
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ITransactionsFilter } from '../../../src/interfaces';
|
|
2
|
+
export declare const GET_TRANSACTIONS_QUERY: (filter: ITransactionsFilter) => import("graphql").DocumentNode;
|
|
3
|
+
export declare const GET_TRANSACTION_QUERY: import("graphql").DocumentNode;
|
|
4
|
+
//# sourceMappingURL=transaction.d.ts.map
|
|
@@ -0,0 +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,mCAuCjE,CAAC;AAEF,eAAO,MAAM,qBAAqB,gCAOjC,CAAC"}
|
|
@@ -0,0 +1,64 @@
|
|
|
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_TRANSACTION_QUERY = exports.GET_TRANSACTIONS_QUERY = void 0;
|
|
7
|
+
const graphql_tag_1 = __importDefault(require("graphql-tag"));
|
|
8
|
+
const TRANSACTION_FRAGMENT = (0, graphql_tag_1.default) `
|
|
9
|
+
fragment TransactionFields on Transaction {
|
|
10
|
+
block
|
|
11
|
+
txHash
|
|
12
|
+
from
|
|
13
|
+
to
|
|
14
|
+
timestamp
|
|
15
|
+
value
|
|
16
|
+
method
|
|
17
|
+
}
|
|
18
|
+
`;
|
|
19
|
+
const GET_TRANSACTIONS_QUERY = (filter) => {
|
|
20
|
+
const { startDate, endDate, startBlock, endBlock, fromAddress, toAddress } = filter;
|
|
21
|
+
const WHERE_CLAUSE = `
|
|
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,` : ''}
|
|
29
|
+
}
|
|
30
|
+
`;
|
|
31
|
+
return (0, graphql_tag_1.default) `
|
|
32
|
+
query getTransactions(
|
|
33
|
+
$fromAddress: String
|
|
34
|
+
$toAddress: String
|
|
35
|
+
$startDate: Int
|
|
36
|
+
$endDate: Int
|
|
37
|
+
$startBlock: Int
|
|
38
|
+
$endBlock: Int
|
|
39
|
+
$orderDirection: String
|
|
40
|
+
$first: Int
|
|
41
|
+
$skip: Int
|
|
42
|
+
) {
|
|
43
|
+
transactions(
|
|
44
|
+
${WHERE_CLAUSE}
|
|
45
|
+
orderBy: timestamp,
|
|
46
|
+
orderDirection: $orderDirection,
|
|
47
|
+
first: $first,
|
|
48
|
+
skip: $skip
|
|
49
|
+
) {
|
|
50
|
+
...TransactionFields
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
${TRANSACTION_FRAGMENT}
|
|
54
|
+
`;
|
|
55
|
+
};
|
|
56
|
+
exports.GET_TRANSACTIONS_QUERY = GET_TRANSACTIONS_QUERY;
|
|
57
|
+
exports.GET_TRANSACTION_QUERY = (0, graphql_tag_1.default) `
|
|
58
|
+
query getTransaction($hash: String!) {
|
|
59
|
+
transaction(id: $hash) {
|
|
60
|
+
...TransactionFields
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
${TRANSACTION_FRAGMENT}
|
|
64
|
+
`;
|
package/dist/graphql/types.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ChainId } from '../enums';
|
|
1
2
|
export type EscrowData = {
|
|
2
3
|
id: string;
|
|
3
4
|
address: string;
|
|
@@ -68,6 +69,8 @@ export type EventDayData = {
|
|
|
68
69
|
dailyPayoutAmount: string;
|
|
69
70
|
dailyHMTTransferCount: string;
|
|
70
71
|
dailyHMTTransferAmount: string;
|
|
72
|
+
dailyUniqueSenders: string;
|
|
73
|
+
dailyUniqueReceivers: string;
|
|
71
74
|
};
|
|
72
75
|
export type RewardAddedEventData = {
|
|
73
76
|
escrowAddress: string;
|
|
@@ -115,6 +118,8 @@ export type DailyHMTData = {
|
|
|
115
118
|
timestamp: Date;
|
|
116
119
|
totalTransactionAmount: bigint;
|
|
117
120
|
totalTransactionCount: number;
|
|
121
|
+
dailyUniqueSenders: number;
|
|
122
|
+
dailyUniqueReceivers: number;
|
|
118
123
|
};
|
|
119
124
|
export type HMTStatistics = {
|
|
120
125
|
totalTransferAmount: bigint;
|
|
@@ -136,4 +141,18 @@ export type DailyTaskData = {
|
|
|
136
141
|
export type TaskStatistics = {
|
|
137
142
|
dailyTasksData: DailyTaskData[];
|
|
138
143
|
};
|
|
144
|
+
export type StatusEvent = {
|
|
145
|
+
timestamp: number;
|
|
146
|
+
escrowAddress: string;
|
|
147
|
+
status: string;
|
|
148
|
+
chainId: ChainId;
|
|
149
|
+
};
|
|
150
|
+
export type KVStoreData = {
|
|
151
|
+
id: string;
|
|
152
|
+
address: string;
|
|
153
|
+
key: string;
|
|
154
|
+
value: string;
|
|
155
|
+
timestamp: Date;
|
|
156
|
+
block: number;
|
|
157
|
+
};
|
|
139
158
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -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;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,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CAAC;IAC9B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,oBAAoB,EAAE,MAAM,CAAC;CAC9B,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,SAAS,EAAE,CAAC;IACrB,YAAY,EAAE,YAAY,EAAE,CAAC;CAC9B,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
|
@@ -5,9 +5,10 @@ import { EscrowClient, EscrowUtils } from './escrow';
|
|
|
5
5
|
import { StatisticsClient } from './statistics';
|
|
6
6
|
import { Encryption, EncryptionUtils } from './encryption';
|
|
7
7
|
import { OperatorUtils } from './operator';
|
|
8
|
+
import { TransactionUtils } from './transaction';
|
|
8
9
|
export * from './constants';
|
|
9
10
|
export * from './types';
|
|
10
11
|
export * from './enums';
|
|
11
12
|
export * from './interfaces';
|
|
12
|
-
export { StakingClient, StorageClient, KVStoreClient, EscrowClient, EscrowUtils, StatisticsClient, Encryption, EncryptionUtils, OperatorUtils, };
|
|
13
|
+
export { StakingClient, StorageClient, KVStoreClient, EscrowClient, EscrowUtils, StatisticsClient, Encryption, EncryptionUtils, OperatorUtils, TransactionUtils, };
|
|
13
14
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -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;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,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;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,WAAW,EACX,gBAAgB,EAChB,UAAU,EACV,eAAe,EACf,aAAa,EACb,gBAAgB,GACjB,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.OperatorUtils = exports.EncryptionUtils = exports.Encryption = exports.StatisticsClient = exports.EscrowUtils = exports.EscrowClient = exports.KVStoreClient = exports.StorageClient = exports.StakingClient = void 0;
|
|
17
|
+
exports.TransactionUtils = 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");
|
|
@@ -31,6 +31,8 @@ Object.defineProperty(exports, "Encryption", { enumerable: true, get: function (
|
|
|
31
31
|
Object.defineProperty(exports, "EncryptionUtils", { enumerable: true, get: function () { return encryption_1.EncryptionUtils; } });
|
|
32
32
|
const operator_1 = require("./operator");
|
|
33
33
|
Object.defineProperty(exports, "OperatorUtils", { enumerable: true, get: function () { return operator_1.OperatorUtils; } });
|
|
34
|
+
const transaction_1 = require("./transaction");
|
|
35
|
+
Object.defineProperty(exports, "TransactionUtils", { enumerable: true, get: function () { return transaction_1.TransactionUtils; } });
|
|
34
36
|
__exportStar(require("./constants"), exports);
|
|
35
37
|
__exportStar(require("./types"), exports);
|
|
36
38
|
__exportStar(require("./enums"), exports);
|