@requestnetwork/payment-detection 0.55.0 → 0.57.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/README.md +93 -0
  2. package/dist/erc20/fee-proxy-contract.d.ts +2 -1
  3. package/dist/erc20/fee-proxy-contract.d.ts.map +1 -1
  4. package/dist/erc20/fee-proxy-contract.js +4 -1
  5. package/dist/erc20/fee-proxy-contract.js.map +1 -1
  6. package/dist/index.d.ts +4 -2
  7. package/dist/index.d.ts.map +1 -1
  8. package/dist/index.js +7 -1
  9. package/dist/index.js.map +1 -1
  10. package/dist/payment-network-factory.d.ts.map +1 -1
  11. package/dist/payment-network-factory.js +8 -0
  12. package/dist/payment-network-factory.js.map +1 -1
  13. package/dist/thegraph/client.d.ts +5 -3
  14. package/dist/thegraph/client.d.ts.map +1 -1
  15. package/dist/thegraph/client.js +19 -1
  16. package/dist/thegraph/client.js.map +1 -1
  17. package/dist/thegraph/generated/graphql-tron.d.ts +156 -0
  18. package/dist/thegraph/generated/graphql-tron.d.ts.map +1 -0
  19. package/dist/thegraph/generated/graphql-tron.js +101 -0
  20. package/dist/thegraph/generated/graphql-tron.js.map +1 -0
  21. package/dist/thegraph/generated/graphql.d.ts +346 -0
  22. package/dist/thegraph/generated/graphql.d.ts.map +1 -1
  23. package/dist/thegraph/generated/graphql.js +60 -1
  24. package/dist/thegraph/generated/graphql.js.map +1 -1
  25. package/dist/tron/index.d.ts +7 -0
  26. package/dist/tron/index.d.ts.map +1 -0
  27. package/dist/tron/index.js +13 -0
  28. package/dist/tron/index.js.map +1 -0
  29. package/dist/tron/retrievers/hasura-client.d.ts +62 -0
  30. package/dist/tron/retrievers/hasura-client.d.ts.map +1 -0
  31. package/dist/tron/retrievers/hasura-client.js +106 -0
  32. package/dist/tron/retrievers/hasura-client.js.map +1 -0
  33. package/dist/tron/retrievers/index.d.ts +3 -0
  34. package/dist/tron/retrievers/index.d.ts.map +1 -0
  35. package/dist/tron/retrievers/index.js +6 -0
  36. package/dist/tron/retrievers/index.js.map +1 -0
  37. package/dist/tron/retrievers/tron-info-retriever.d.ts +24 -0
  38. package/dist/tron/retrievers/tron-info-retriever.d.ts.map +1 -0
  39. package/dist/tron/retrievers/tron-info-retriever.js +71 -0
  40. package/dist/tron/retrievers/tron-info-retriever.js.map +1 -0
  41. package/dist/tron/retrievers/tron-thegraph-info-retriever.d.ts +20 -0
  42. package/dist/tron/retrievers/tron-thegraph-info-retriever.d.ts.map +1 -0
  43. package/dist/tron/retrievers/tron-thegraph-info-retriever.js +57 -0
  44. package/dist/tron/retrievers/tron-thegraph-info-retriever.js.map +1 -0
  45. package/dist/tron/tron-fee-proxy-detector.d.ts +29 -0
  46. package/dist/tron/tron-fee-proxy-detector.d.ts.map +1 -0
  47. package/dist/tron/tron-fee-proxy-detector.js +76 -0
  48. package/dist/tron/tron-fee-proxy-detector.js.map +1 -0
  49. package/package.json +8 -8
@@ -0,0 +1,106 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.HasuraClient = void 0;
4
+ exports.getHasuraClient = getHasuraClient;
5
+ const tslib_1 = require("tslib");
6
+ /**
7
+ * Client for querying payment data from Hasura GraphQL API
8
+ */
9
+ class HasuraClient {
10
+ constructor(options) {
11
+ this.url = options.url;
12
+ this.headers = Object.assign(Object.assign(Object.assign(Object.assign({ 'Content-Type': 'application/json' }, (options.adminSecret && { 'x-hasura-admin-secret': options.adminSecret })), (options.jwtToken && { Authorization: `Bearer ${options.jwtToken}` })), (options.hasuraRole && { 'x-hasura-role': options.hasuraRole })), options.headers);
13
+ }
14
+ /**
15
+ * Query payments by payment reference
16
+ */
17
+ getPaymentsByReference(params) {
18
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
19
+ const variableDefinitions = ['$paymentReference: String!', '$toAddress: String!'];
20
+ const whereConditions = [
21
+ 'payment_reference: { _eq: $paymentReference }',
22
+ 'to_address: { _ilike: $toAddress }',
23
+ ];
24
+ const variables = {
25
+ paymentReference: params.paymentReference,
26
+ toAddress: params.toAddress,
27
+ };
28
+ if (params.chain) {
29
+ variableDefinitions.push('$chain: String!');
30
+ whereConditions.push('chain: { _eq: $chain }');
31
+ variables.chain = params.chain;
32
+ }
33
+ if (params.tokenAddress) {
34
+ variableDefinitions.push('$tokenAddress: String!');
35
+ whereConditions.push('token_address: { _ilike: $tokenAddress }');
36
+ variables.tokenAddress = params.tokenAddress;
37
+ }
38
+ if (params.contractAddress) {
39
+ variableDefinitions.push('$contractAddress: String!');
40
+ whereConditions.push('contract_address: { _ilike: $contractAddress }');
41
+ variables.contractAddress = params.contractAddress;
42
+ }
43
+ const query = `
44
+ query GetPayments(${variableDefinitions.join(', ')}) {
45
+ payments(
46
+ where: { ${whereConditions.join(', ')} }
47
+ order_by: { block_number: asc }
48
+ ) {
49
+ id
50
+ chain
51
+ tx_hash
52
+ block_number
53
+ timestamp
54
+ contract_address
55
+ token_address
56
+ from_address
57
+ to_address
58
+ amount
59
+ fee_amount
60
+ fee_address
61
+ payment_reference
62
+ energy_used
63
+ energy_fee
64
+ net_fee
65
+ }
66
+ }
67
+ `;
68
+ const response = yield fetch(this.url, {
69
+ method: 'POST',
70
+ headers: this.headers,
71
+ body: JSON.stringify({ query, variables }),
72
+ });
73
+ if (!response.ok) {
74
+ throw new Error(`Hasura request failed: ${response.statusText}`);
75
+ }
76
+ const result = yield response.json();
77
+ if (result.errors) {
78
+ throw new Error(`Hasura query error: ${JSON.stringify(result.errors)}`);
79
+ }
80
+ return result.data.payments;
81
+ });
82
+ }
83
+ }
84
+ exports.HasuraClient = HasuraClient;
85
+ /** TRON network identifiers supported by the Hasura client */
86
+ const SUPPORTED_TRON_NETWORKS = ['tron', 'nile'];
87
+ /**
88
+ * Factory function to create a Hasura client
89
+ */
90
+ function getHasuraClient(network, options) {
91
+ // Only return a client for TRON networks (mainnet and Nile testnet)
92
+ if (!SUPPORTED_TRON_NETWORKS.includes(network.toLowerCase())) {
93
+ return undefined;
94
+ }
95
+ const defaultUrl = process.env.HASURA_GRAPHQL_URL || 'https://graphql.request.network/v1/graphql';
96
+ const adminSecret = process.env.HASURA_ADMIN_SECRET;
97
+ const jwtToken = process.env.HASURA_GRAPHQL_JWT_TOKEN;
98
+ return new HasuraClient({
99
+ url: (options === null || options === void 0 ? void 0 : options.url) || defaultUrl,
100
+ adminSecret: (options === null || options === void 0 ? void 0 : options.adminSecret) || adminSecret,
101
+ jwtToken: (options === null || options === void 0 ? void 0 : options.jwtToken) || jwtToken,
102
+ hasuraRole: options === null || options === void 0 ? void 0 : options.hasuraRole,
103
+ headers: options === null || options === void 0 ? void 0 : options.headers,
104
+ });
105
+ }
106
+ //# sourceMappingURL=hasura-client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hasura-client.js","sourceRoot":"","sources":["../../../src/tron/retrievers/hasura-client.ts"],"names":[],"mappings":";;;AAwJA,0CAoBC;;AAhID;;GAEG;AACH,MAAa,YAAY;IAIvB,YAAY,OAA4B;QACtC,IAAI,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC;QACvB,IAAI,CAAC,OAAO,6DACV,cAAc,EAAE,kBAAkB,IAC/B,CAAC,OAAO,CAAC,WAAW,IAAI,EAAE,uBAAuB,EAAE,OAAO,CAAC,WAAW,EAAE,CAAC,GACzE,CAAC,OAAO,CAAC,QAAQ,IAAI,EAAE,aAAa,EAAE,UAAU,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,GACrE,CAAC,OAAO,CAAC,UAAU,IAAI,EAAE,eAAe,EAAE,OAAO,CAAC,UAAU,EAAE,CAAC,GAC/D,OAAO,CAAC,OAAO,CACnB,CAAC;IACJ,CAAC;IAED;;OAEG;IACG,sBAAsB,CAAC,MAM5B;;YACC,MAAM,mBAAmB,GAAa,CAAC,4BAA4B,EAAE,qBAAqB,CAAC,CAAC;YAC5F,MAAM,eAAe,GAAa;gBAChC,+CAA+C;gBAC/C,oCAAoC;aACrC,CAAC;Y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OAAO;KAC1B,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from './tron-info-retriever';
2
+ export * from './hasura-client';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tron/retrievers/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,iBAAiB,CAAC"}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./tron-info-retriever"), exports);
5
+ tslib_1.__exportStar(require("./hasura-client"), exports);
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tron/retrievers/index.ts"],"names":[],"mappings":";;;AAAA,gEAAsC;AACtC,0DAAgC"}
@@ -0,0 +1,24 @@
1
+ import { PaymentTypes } from '@requestnetwork/types';
2
+ import { ITheGraphBaseInfoRetriever, TransferEventsParams } from '../../types';
3
+ import { HasuraClient } from './hasura-client';
4
+ /**
5
+ * TRON-specific payment event parameters
6
+ */
7
+ export interface TronPaymentEvent extends PaymentTypes.IERC20FeePaymentEventParameters {
8
+ txHash: string;
9
+ energyUsed?: string;
10
+ energyFee?: string;
11
+ netFee?: string;
12
+ }
13
+ /**
14
+ * Gets a list of transfer events for TRON payments via Hasura
15
+ * Retriever for ERC20 Fee Proxy payments on TRON blockchain.
16
+ */
17
+ export declare class TronInfoRetriever implements ITheGraphBaseInfoRetriever<TronPaymentEvent> {
18
+ protected readonly client: HasuraClient;
19
+ constructor(client: HasuraClient);
20
+ getTransferEvents(params: TransferEventsParams): Promise<PaymentTypes.AllNetworkEvents<TronPaymentEvent>>;
21
+ private getChainIdentifier;
22
+ private mapPaymentEvent;
23
+ }
24
+ //# sourceMappingURL=tron-info-retriever.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tron-info-retriever.d.ts","sourceRoot":"","sources":["../../../src/tron/retrievers/tron-info-retriever.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAEpE,OAAO,EAAE,0BAA0B,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAC/E,OAAO,EAAE,YAAY,EAAiB,MAAM,iBAAiB,CAAC;AAE9D;;GAEG;AACH,MAAM,WAAW,gBAAiB,SAAQ,YAAY,CAAC,+BAA+B;IACpF,MAAM,EAAE,MAAM,CAAC;IAEf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,qBAAa,iBAAkB,YAAW,0BAA0B,CAAC,gBAAgB,CAAC;IACxE,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,YAAY;gBAApB,MAAM,EAAE,YAAY;IAEtC,iBAAiB,CAC5B,MAAM,EAAE,oBAAoB,GAC3B,OAAO,CAAC,YAAY,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;IA2B3D,OAAO,CAAC,kBAAkB;IAU1B,OAAO,CAAC,eAAe;CA2BxB"}
@@ -0,0 +1,71 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TronInfoRetriever = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const ethers_1 = require("ethers");
6
+ /**
7
+ * Gets a list of transfer events for TRON payments via Hasura
8
+ * Retriever for ERC20 Fee Proxy payments on TRON blockchain.
9
+ */
10
+ class TronInfoRetriever {
11
+ constructor(client) {
12
+ this.client = client;
13
+ }
14
+ getTransferEvents(params) {
15
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
16
+ const { paymentReference, toAddress, contractAddress, acceptedTokens, paymentChain } = params;
17
+ if (acceptedTokens && acceptedTokens.length > 1) {
18
+ throw new Error(`TronInfoRetriever does not support multiple accepted tokens.`);
19
+ }
20
+ // Map chain name to the chain identifier used in the database
21
+ const chainIdentifier = this.getChainIdentifier(paymentChain);
22
+ // The substream stores the keccak256 hash of the payment reference (from the indexed event topic)
23
+ // so we must hash the raw reference before querying, matching the TheGraph-based retriever behavior
24
+ const hashedReference = ethers_1.utils.keccak256(`0x${paymentReference}`);
25
+ const payments = yield this.client.getPaymentsByReference({
26
+ paymentReference: hashedReference,
27
+ toAddress,
28
+ chain: chainIdentifier,
29
+ tokenAddress: acceptedTokens === null || acceptedTokens === void 0 ? void 0 : acceptedTokens[0],
30
+ contractAddress,
31
+ });
32
+ return {
33
+ paymentEvents: payments.map((p) => this.mapPaymentEvent(p, params)),
34
+ };
35
+ });
36
+ }
37
+ getChainIdentifier(paymentChain) {
38
+ // Map SDK chain names to the chain identifiers stored in Hasura
39
+ const chainMap = {
40
+ tron: 'tron',
41
+ nile: 'tron-nile',
42
+ };
43
+ return chainMap[paymentChain.toLowerCase()] || paymentChain.toLowerCase();
44
+ }
45
+ mapPaymentEvent(payment, params) {
46
+ // Note: TRON addresses use Base58 format, not Ethereum checksum format
47
+ // So we don't use formatAddress which expects EVM addresses
48
+ // Hasura returns NUMERIC fields as JSON numbers; we must coerce to strings
49
+ // since IPaymentNetworkEvent.amount and feeAmount expect string types
50
+ return {
51
+ amount: String(payment.amount),
52
+ name: params.eventName,
53
+ timestamp: payment.timestamp,
54
+ parameters: {
55
+ txHash: payment.tx_hash,
56
+ feeAmount: String(payment.fee_amount),
57
+ block: payment.block_number,
58
+ to: payment.to_address,
59
+ from: payment.from_address,
60
+ feeAddress: payment.fee_address || undefined,
61
+ tokenAddress: payment.token_address || undefined,
62
+ // TRON-specific resource fields
63
+ energyUsed: payment.energy_used || undefined,
64
+ energyFee: payment.energy_fee || undefined,
65
+ netFee: payment.net_fee || undefined,
66
+ },
67
+ };
68
+ }
69
+ }
70
+ exports.TronInfoRetriever = TronInfoRetriever;
71
+ //# sourceMappingURL=tron-info-retriever.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tron-info-retriever.js","sourceRoot":"","sources":["../../../src/tron/retrievers/tron-info-retriever.ts"],"names":[],"mappings":";;;;AACA,mCAA+B;AAe/B;;;GAGG;AACH,MAAa,iBAAiB;IAC5B,YAA+B,MAAoB;QAApB,WAAM,GAAN,MAAM,CAAc;IAAG,CAAC;IAE1C,iBAAiB,CAC5B,MAA4B;;YAE5B,MAAM,EAAE,gBAAgB,EAAE,SAAS,EAAE,eAAe,EAAE,cAAc,EAAE,YAAY,EAAE,GAAG,MAAM,CAAC;YAE9F,IAAI,cAAc,IAAI,cAAc,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBAChD,MAAM,IAAI,KAAK,CAAC,8DAA8D,CAAC,CAAC;YAClF,CAAC;YAED,8DAA8D;YAC9D,MAAM,eAAe,GAAG,IAAI,CAAC,kBAAkB,CAAC,YAAY,CAAC,CAAC;YAE9D,kGAAkG;YAClG,oGAAoG;YACpG,MAAM,eAAe,GAAG,cAAK,CAAC,SAAS,CAAC,KAAK,gBAAgB,EAAE,CAAC,CAAC;YAEjE,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,sBAAsB,CAAC;gBACxD,gBAAgB,EAAE,eAAe;gBACjC,SAAS;gBACT,KAAK,EAAE,eAAe;gBACtB,YAAY,EAAE,cAAc,aAAd,cAAc,uBAAd,cAAc,CAAG,CAAC,CAAC;gBACjC,eAAe;aAChB,CAAC,CAAC;YAEH,OAAO;gBACL,aAAa,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;aACpE,CAAC;QACJ,CAAC;KAAA;IAEO,kBAAkB,CAAC,YAAuC;QAChE,gEAAgE;QAChE,MAAM,QAAQ,GAA2B;YACvC,IAAI,EAAE,MAAM;YACZ,IAAI,EAAE,WAAW;SAClB,CAAC;QAEF,OAAO,QAAQ,CAAC,YAAY,CAAC,WAAW,EAAE,CAAC,IAAI,YAAY,CAAC,WAAW,EAAE,CAAC;IAC5E,CAAC;IAEO,eAAe,CACrB,OAAsB,EACtB,MAA4B;QAE5B,uEAAuE;QACvE,4DAA4D;QAC5D,2EAA2E;QAC3E,sEAAsE;QACtE,OAAO;YACL,MAAM,EAAE,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC;YAC9B,IAAI,EAAE,MAAM,CAAC,SAAS;YACtB,SAAS,EAAE,OAAO,CAAC,SAAS;YAC5B,UAAU,EAAE;gBACV,MAAM,EAAE,OAAO,CAAC,OAAO;gBACvB,SAAS,EAAE,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC;gBACrC,KAAK,EAAE,OAAO,CAAC,YAAY;gBAC3B,EAAE,EAAE,OAAO,CAAC,UAAU;gBACtB,IAAI,EAAE,OAAO,CAAC,YAAY;gBAC1B,UAAU,EAAE,OAAO,CAAC,WAAW,IAAI,SAAS;gBAC5C,YAAY,EAAE,OAAO,CAAC,aAAa,IAAI,SAAS;gBAChD,gCAAgC;gBAChC,UAAU,EAAE,OAAO,CAAC,WAAW,IAAI,SAAS;gBAC5C,SAAS,EAAE,OAAO,CAAC,UAAU,IAAI,SAAS;gBAC1C,MAAM,EAAE,OAAO,CAAC,OAAO,IAAI,SAAS;aACrC;SACF,CAAC;IACJ,CAAC;CACF;AArED,8CAqEC"}
@@ -0,0 +1,20 @@
1
+ import { CurrencyTypes, PaymentTypes } from '@requestnetwork/types';
2
+ import { TheGraphClient } from '../../thegraph';
3
+ import { ITheGraphBaseInfoRetriever, TransferEventsParams } from '../../types';
4
+ /**
5
+ * TRON-specific payment event parameters (TheGraph-based)
6
+ */
7
+ export interface TronTheGraphPaymentEvent extends PaymentTypes.IERC20FeePaymentEventParameters {
8
+ txHash: string;
9
+ }
10
+ /**
11
+ * TheGraph-based info retriever for ERC20 Fee Proxy payments on TRON.
12
+ * Uses the TRON subgraph (Substreams-powered) via TheGraphClient.
13
+ */
14
+ export declare class TronTheGraphInfoRetriever implements ITheGraphBaseInfoRetriever<TronTheGraphPaymentEvent> {
15
+ protected readonly client: TheGraphClient<CurrencyTypes.TronChainName>;
16
+ constructor(client: TheGraphClient<CurrencyTypes.TronChainName>);
17
+ getTransferEvents(params: TransferEventsParams): Promise<PaymentTypes.AllNetworkEvents<TronTheGraphPaymentEvent>>;
18
+ private mapPaymentEvent;
19
+ }
20
+ //# sourceMappingURL=tron-thegraph-info-retriever.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tron-thegraph-info-retriever.d.ts","sourceRoot":"","sources":["../../../src/tron/retrievers/tron-thegraph-info-retriever.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAEpE,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEhD,OAAO,EAAE,0BAA0B,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAE/E;;GAEG;AACH,MAAM,WAAW,wBAAyB,SAAQ,YAAY,CAAC,+BAA+B;IAC5F,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;GAGG;AACH,qBAAa,yBACX,YAAW,0BAA0B,CAAC,wBAAwB,CAAC;IAEnD,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC,aAAa,CAAC,aAAa,CAAC;gBAAnD,MAAM,EAAE,cAAc,CAAC,aAAa,CAAC,aAAa,CAAC;IAErE,iBAAiB,CAC5B,MAAM,EAAE,oBAAoB,GAC3B,OAAO,CAAC,YAAY,CAAC,gBAAgB,CAAC,wBAAwB,CAAC,CAAC;IA4BnE,OAAO,CAAC,eAAe;CAmBxB"}
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TronTheGraphInfoRetriever = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const ethers_1 = require("ethers");
6
+ /**
7
+ * TheGraph-based info retriever for ERC20 Fee Proxy payments on TRON.
8
+ * Uses the TRON subgraph (Substreams-powered) via TheGraphClient.
9
+ */
10
+ class TronTheGraphInfoRetriever {
11
+ constructor(client) {
12
+ this.client = client;
13
+ }
14
+ getTransferEvents(params) {
15
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
16
+ const { paymentReference, toAddress, contractAddress, acceptedTokens } = params;
17
+ if (acceptedTokens && acceptedTokens.length > 1) {
18
+ throw new Error('TronTheGraphInfoRetriever does not support multiple accepted tokens.');
19
+ }
20
+ const reference = ethers_1.utils.keccak256(`0x${paymentReference}`);
21
+ const payments = (acceptedTokens === null || acceptedTokens === void 0 ? void 0 : acceptedTokens.length) === 1
22
+ ? yield this.client.GetTronPayments({
23
+ reference,
24
+ to: toAddress,
25
+ tokenAddress: acceptedTokens[0],
26
+ contractAddress,
27
+ })
28
+ : yield this.client.GetTronPaymentsAnyToken({
29
+ reference,
30
+ to: toAddress,
31
+ contractAddress,
32
+ });
33
+ return {
34
+ paymentEvents: payments.payments.map((p) => this.mapPaymentEvent(p, params)),
35
+ };
36
+ });
37
+ }
38
+ mapPaymentEvent(payment, params) {
39
+ var _a, _b;
40
+ return {
41
+ amount: payment.amount,
42
+ name: params.eventName,
43
+ timestamp: payment.timestamp,
44
+ parameters: {
45
+ txHash: payment.txHash,
46
+ feeAmount: payment.feeAmount,
47
+ block: payment.block,
48
+ to: params.toAddress,
49
+ from: payment.from,
50
+ feeAddress: (_a = payment.feeAddress) !== null && _a !== void 0 ? _a : undefined,
51
+ tokenAddress: (_b = payment.tokenAddress) !== null && _b !== void 0 ? _b : undefined,
52
+ },
53
+ };
54
+ }
55
+ }
56
+ exports.TronTheGraphInfoRetriever = TronTheGraphInfoRetriever;
57
+ //# sourceMappingURL=tron-thegraph-info-retriever.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tron-thegraph-info-retriever.js","sourceRoot":"","sources":["../../../src/tron/retrievers/tron-thegraph-info-retriever.ts"],"names":[],"mappings":";;;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AM;gBACtB,SAAS,EAAE,OAAO,CAAC,SAAS;gBAC5B,KAAK,EAAE,OAAO,CAAC,KAAK;gBACpB,EAAE,EAAE,MAAM,CAAC,SAAS;gBACpB,IAAI,EAAE,OAAO,CAAC,IAAI;gBAClB,UAAU,EAAE,MAAA,OAAO,CAAC,UAAU,mCAAI,SAAS;gBAC3C,YAAY,EAAE,MAAA,OAAO,CAAC,YAAY,mCAAI,SAAS;aAChD;SACF,CAAC;IACJ,CAAC;CACF;AAtDD,8DAsDC"}
@@ -0,0 +1,29 @@
1
+ import { CurrencyTypes, ExtensionTypes, PaymentTypes, RequestLogicTypes } from '@requestnetwork/types';
2
+ import { ERC20FeeProxyPaymentDetectorBase } from '../erc20/fee-proxy-contract';
3
+ import { ReferenceBasedDetectorOptions } from '../types';
4
+ import { TronPaymentEvent } from './retrievers/tron-info-retriever';
5
+ import { HasuraClientOptions } from './retrievers/hasura-client';
6
+ /**
7
+ * Handle payment networks with ERC20 fee proxy contract extension on TRON chains
8
+ */
9
+ export declare class TronERC20FeeProxyPaymentDetector extends ERC20FeeProxyPaymentDetectorBase<ExtensionTypes.PnFeeReferenceBased.IFeeReferenceBased, TronPaymentEvent> {
10
+ private readonly hasuraClientOptions?;
11
+ protected readonly network: CurrencyTypes.TronChainName | undefined;
12
+ constructor({ advancedLogic, currencyManager, network, hasuraClientOptions, }: ReferenceBasedDetectorOptions & {
13
+ network?: CurrencyTypes.TronChainName;
14
+ hasuraClientOptions?: Partial<HasuraClientOptions>;
15
+ });
16
+ /**
17
+ * Gets the deployment information for the ERC20FeeProxy contract on TRON
18
+ */
19
+ static getDeploymentInformation(network: CurrencyTypes.VMChainName, _paymentNetworkVersion?: string): {
20
+ address: string;
21
+ creationBlockNumber: number;
22
+ contractVersion: string;
23
+ };
24
+ /**
25
+ * Extracts the payment events of a request on TRON
26
+ */
27
+ protected extractEvents(eventName: PaymentTypes.EVENTS_NAMES, toAddress: string | undefined, paymentReference: string, requestCurrency: RequestLogicTypes.ICurrency, paymentChain: CurrencyTypes.TronChainName, _paymentNetwork: ExtensionTypes.IState): Promise<PaymentTypes.AllNetworkEvents<TronPaymentEvent>>;
28
+ }
29
+ //# sourceMappingURL=tron-fee-proxy-detector.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tron-fee-proxy-detector.d.ts","sourceRoot":"","sources":["../../src/tron/tron-fee-proxy-detector.ts"],"names":[],"mappings":"AACA,OAAO,EACL,aAAa,EACb,cAAc,EACd,YAAY,EACZ,iBAAiB,EAClB,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EAAE,gCAAgC,EAAE,MAAM,6BAA6B,CAAC;AAE/E,OAAO,EAAE,6BAA6B,EAAE,MAAM,UAAU,CAAC;AACzD,OAAO,EAAqB,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACvF,OAAO,EAAmB,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAElF;;GAEG;AACH,qBAAa,gCAAiC,SAAQ,gCAAgC,CACpF,cAAc,CAAC,mBAAmB,CAAC,kBAAkB,EACrD,gBAAgB,CACjB;IACC,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAAC,CAA+B;IACpE,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC,aAAa,GAAG,SAAS,CAAC;gBAExD,EACV,aAAa,EACb,eAAe,EACf,OAAO,EACP,mBAAmB,GACpB,EAAE,6BAA6B,GAAG;QACjC,OAAO,CAAC,EAAE,aAAa,CAAC,aAAa,CAAC;QACtC,mBAAmB,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC,CAAC;KACpD;IAWD;;OAEG;WACW,wBAAwB,CACpC,OAAO,EAAE,aAAa,CAAC,WAAW,EAClC,sBAAsB,CAAC,EAAE,MAAM,GAC9B;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,mBAAmB,EAAE,MAAM,CAAC;QAAC,eAAe,EAAE,MAAM,CAAA;KAAE;IAqB5E;;OAEG;cACa,aAAa,CAC3B,SAAS,EAAE,YAAY,CAAC,YAAY,EACpC,SAAS,EAAE,MAAM,GAAG,SAAS,EAC7B,gBAAgB,EAAE,MAAM,EACxB,eAAe,EAAE,iBAAiB,CAAC,SAAS,EAC5C,YAAY,EAAE,aAAa,CAAC,aAAa,EACzC,eAAe,EAAE,cAAc,CAAC,MAAM,GACrC,OAAO,CAAC,YAAY,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;CA4C5D"}
@@ -0,0 +1,76 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TronERC20FeeProxyPaymentDetector = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const smart_contracts_1 = require("@requestnetwork/smart-contracts");
6
+ const types_1 = require("@requestnetwork/types");
7
+ const currency_1 = require("@requestnetwork/currency");
8
+ const fee_proxy_contract_1 = require("../erc20/fee-proxy-contract");
9
+ const balance_error_1 = require("../balance-error");
10
+ const tron_info_retriever_1 = require("./retrievers/tron-info-retriever");
11
+ const hasura_client_1 = require("./retrievers/hasura-client");
12
+ /**
13
+ * Handle payment networks with ERC20 fee proxy contract extension on TRON chains
14
+ */
15
+ class TronERC20FeeProxyPaymentDetector extends fee_proxy_contract_1.ERC20FeeProxyPaymentDetectorBase {
16
+ constructor({ advancedLogic, currencyManager, network, hasuraClientOptions, }) {
17
+ var _a;
18
+ super(types_1.ExtensionTypes.PAYMENT_NETWORK_ID.ERC20_FEE_PROXY_CONTRACT, (_a = advancedLogic.getFeeProxyContractErc20ForNetwork(network)) !== null && _a !== void 0 ? _a : advancedLogic.extensions.feeProxyContractErc20, currencyManager);
19
+ this.hasuraClientOptions = hasuraClientOptions;
20
+ this.network = network;
21
+ }
22
+ /**
23
+ * Gets the deployment information for the ERC20FeeProxy contract on TRON
24
+ */
25
+ static getDeploymentInformation(network, _paymentNetworkVersion) {
26
+ void _paymentNetworkVersion; // Parameter kept for API compatibility
27
+ // Validate that the network is a TRON chain
28
+ if (network !== 'tron' && network !== 'nile') {
29
+ throw new Error(`TronERC20FeeProxyPaymentDetector only supports TRON networks, got: ${network}`);
30
+ }
31
+ // For TRON, we use the 'tron' version of the artifact
32
+ const tronNetwork = network;
33
+ const address = smart_contracts_1.erc20FeeProxyArtifact.getAddress(tronNetwork, 'tron');
34
+ const creationBlockNumber = tronNetwork === 'tron'
35
+ ? 79216121 // TRON mainnet
36
+ : 63208782; // Nile testnet
37
+ return { address, creationBlockNumber, contractVersion: 'tron' };
38
+ }
39
+ /**
40
+ * Extracts the payment events of a request on TRON
41
+ */
42
+ extractEvents(eventName, toAddress, paymentReference, requestCurrency, paymentChain, _paymentNetwork) {
43
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
44
+ void _paymentNetwork; // Parameter required by parent class signature
45
+ // Validate that the payment chain is a supported TRON chain
46
+ if (!currency_1.TronChains.isChainSupported(paymentChain)) {
47
+ throw new balance_error_1.NetworkNotSupported(`Unsupported TRON network '${paymentChain}' for TRON payment detector`);
48
+ }
49
+ if (this.network && !(0, currency_1.isSameChain)(paymentChain, this.network)) {
50
+ throw new balance_error_1.NetworkNotSupported(`Unsupported network '${paymentChain}' for payment detector instantiated with '${this.network}'`);
51
+ }
52
+ if (!toAddress) {
53
+ return {
54
+ paymentEvents: [],
55
+ };
56
+ }
57
+ const { address: proxyContractAddress } = TronERC20FeeProxyPaymentDetector.getDeploymentInformation(paymentChain);
58
+ const hasuraClient = (0, hasura_client_1.getHasuraClient)(paymentChain, this.hasuraClientOptions);
59
+ if (!hasuraClient) {
60
+ throw new Error(`Could not get a Hasura client for TRON chain ${paymentChain}. ` +
61
+ `Ensure HASURA_GRAPHQL_URL is configured or the network is supported.`);
62
+ }
63
+ const infoRetriever = new tron_info_retriever_1.TronInfoRetriever(hasuraClient);
64
+ return infoRetriever.getTransferEvents({
65
+ eventName,
66
+ paymentReference,
67
+ toAddress,
68
+ contractAddress: proxyContractAddress,
69
+ paymentChain,
70
+ acceptedTokens: [requestCurrency.value],
71
+ });
72
+ });
73
+ }
74
+ }
75
+ exports.TronERC20FeeProxyPaymentDetector = TronERC20FeeProxyPaymentDetector;
76
+ //# sourceMappingURL=tron-fee-proxy-detector.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tron-fee-proxy-detector.js","sourceRoot":"","sources":["../../src/tron/tron-fee-proxy-detector.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,iDAK+B;AAC/B,uDAAmE;AAEnE,oEAA+E;AAC/E,oDAAuD;AAEvD,0EAAuF;AACvF,8DAAkF;AAElF;;GAEG;AACH,MAAa,gCAAiC,SAAQ,qDAGrD;IAIC,YAAY,EACV,aAAa,EACb,eAAe,EACf,OAAO,EACP,mBAAmB,GAIpB;;QACC,KAAK,CACH,sBAAc,CAAC,kBAAkB,CAAC,wBAAwB,EAC1D,MAAA,aAAa,CAAC,kCAAkC,CAAC,OAAO,CAAC,mCACvD,aAAa,CAAC,UAAU,CAAC,qBAAqB,EAChD,eAAe,CAChB,CAAC;QACF,IAAI,CAAC,mBAAmB,GAAG,mBAAmB,CAAC;QAC/C,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAED;;OAEG;IACI,MAAM,CAAC,wBAAwB,CACpC,OAAkC,EAClC,sBAA+B;QAE/B,KAAK,sBAAsB,CAAC,CAAC,uCAAuC;QAEpE,4CAA4C;QAC5C,IAAI,OAAO,KAAK,MAAM,IAAI,OAAO,KAAK,MAAM,EAAE,CAAC;YAC7C,MAAM,IAAI,KAAK,CACb,sEAAsE,OAAO,EAAE,CAChF,CAAC;QACJ,CAAC;QAED,sDAAsD;QACtD,MAAM,WAAW,GAAG,OAAsC,CAAC;QAC3D,MAAM,OAAO,GAAG,uCAAqB,CAAC,UAAU,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;QACtE,MAAM,mBAAmB,GACvB,WAAW,KAAK,MAAM;YACpB,CAAC,CAAC,QAAQ,CAAC,eAAe;YAC1B,CAAC,CAAC,QAAQ,CAAC,CAAC,eAAe;QAE/B,OAAO,E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C,KAAK,CAAC;aACxC,CAAC,CAAC;QACL,CAAC;KAAA;CACF;AA3GD,4EA2GC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@requestnetwork/payment-detection",
3
- "version": "0.55.0",
3
+ "version": "0.57.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -38,13 +38,13 @@
38
38
  "prepare": "yarn run build",
39
39
  "test": "jest --runInBand",
40
40
  "test:watch": "yarn test --watch",
41
- "codegen": "graphql-codegen --config codegen.yml ; graphql-codegen --config codegen-superfluid.yml; graphql-codegen --config codegen-near.yml"
41
+ "codegen": "graphql-codegen --config codegen.yml ; graphql-codegen --config codegen-superfluid.yml; graphql-codegen --config codegen-near.yml; graphql-codegen --config codegen-tron.yml"
42
42
  },
43
43
  "dependencies": {
44
- "@requestnetwork/currency": "0.29.0",
45
- "@requestnetwork/smart-contracts": "0.49.0",
46
- "@requestnetwork/types": "0.55.0",
47
- "@requestnetwork/utils": "0.55.0",
44
+ "@requestnetwork/currency": "0.31.0",
45
+ "@requestnetwork/smart-contracts": "0.51.0",
46
+ "@requestnetwork/types": "0.57.0",
47
+ "@requestnetwork/utils": "0.57.0",
48
48
  "ethers": "5.7.2",
49
49
  "graphql": "16.8.1",
50
50
  "graphql-request": "7.1.2",
@@ -60,7 +60,7 @@
60
60
  "@graphql-codegen/typescript-operations": "4.0.1",
61
61
  "@graphql-codegen/typescript-resolvers": "4.0.1",
62
62
  "@jridgewell/gen-mapping": "0.3.2",
63
- "@requestnetwork/advanced-logic": "0.55.0",
63
+ "@requestnetwork/advanced-logic": "0.57.0",
64
64
  "@types/jest": "29.5.6",
65
65
  "jest": "29.5.0",
66
66
  "jest-junit": "16.0.0",
@@ -69,5 +69,5 @@
69
69
  "ts-node": "10.9.1",
70
70
  "typescript": "5.8.3"
71
71
  },
72
- "gitHead": "4cb3f3ff04677c126d49c9395deffe93b3d781ab"
72
+ "gitHead": "738e627a024a8bf77f9f5d69e6a7a137e7af4eff"
73
73
  }