@requestnetwork/payment-detection 0.36.1-next.1885 → 0.36.1-next.1887
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/dist/any/any-to-erc20-proxy.d.ts +1 -1
- package/dist/any/any-to-erc20-proxy.d.ts.map +1 -1
- package/dist/any/any-to-erc20-proxy.js.map +1 -1
- package/dist/any/any-to-eth-proxy.d.ts +1 -1
- package/dist/any/any-to-eth-proxy.d.ts.map +1 -1
- package/dist/any/any-to-eth-proxy.js.map +1 -1
- package/dist/erc20/fee-proxy-contract.d.ts +13 -6
- package/dist/erc20/fee-proxy-contract.d.ts.map +1 -1
- package/dist/erc20/fee-proxy-contract.js +33 -10
- package/dist/erc20/fee-proxy-contract.js.map +1 -1
- package/dist/erc20/proxy-contract.d.ts +1 -1
- package/dist/erc20/proxy-contract.d.ts.map +1 -1
- package/dist/erc20/proxy-contract.js.map +1 -1
- package/dist/erc20/transferable-receivable.d.ts +1 -1
- package/dist/erc20/transferable-receivable.d.ts.map +1 -1
- package/dist/erc20/transferable-receivable.js.map +1 -1
- package/dist/eth/fee-proxy-detector.d.ts +1 -1
- package/dist/eth/fee-proxy-detector.d.ts.map +1 -1
- package/dist/eth/fee-proxy-detector.js.map +1 -1
- package/dist/eth/input-data.d.ts +1 -1
- package/dist/eth/input-data.d.ts.map +1 -1
- package/dist/eth/input-data.js.map +1 -1
- package/dist/native-token-detector.d.ts +4 -2
- package/dist/native-token-detector.d.ts.map +1 -1
- package/dist/native-token-detector.js +3 -1
- package/dist/native-token-detector.js.map +1 -1
- package/dist/near/near-conversion-detector.d.ts +3 -2
- package/dist/near/near-conversion-detector.d.ts.map +1 -1
- package/dist/near/near-conversion-detector.js +20 -8
- package/dist/near/near-conversion-detector.js.map +1 -1
- package/dist/near/near-detector.d.ts.map +1 -1
- package/dist/near/near-detector.js +13 -2
- package/dist/near/near-detector.js.map +1 -1
- package/dist/near/retrievers/near-conversion-info-retriever.d.ts +22 -15
- package/dist/near/retrievers/near-conversion-info-retriever.d.ts.map +1 -1
- package/dist/near/retrievers/near-conversion-info-retriever.js +34 -37
- package/dist/near/retrievers/near-conversion-info-retriever.js.map +1 -1
- package/dist/near/retrievers/near-info-retriever.d.ts +23 -12
- package/dist/near/retrievers/near-info-retriever.d.ts.map +1 -1
- package/dist/near/retrievers/near-info-retriever.js +39 -34
- package/dist/near/retrievers/near-info-retriever.js.map +1 -1
- package/dist/payment-detector-base.d.ts +1 -1
- package/dist/payment-detector-base.d.ts.map +1 -1
- package/dist/payment-network-factory.d.ts +1 -1
- package/dist/payment-network-factory.d.ts.map +1 -1
- package/dist/payment-network-factory.js +10 -1
- package/dist/payment-network-factory.js.map +1 -1
- package/dist/thegraph/client.d.ts +8 -1
- package/dist/thegraph/client.d.ts.map +1 -1
- package/dist/thegraph/client.js +0 -1
- package/dist/thegraph/client.js.map +1 -1
- package/dist/thegraph/generated/graphql-near.d.ts +66 -35
- package/dist/thegraph/generated/graphql-near.d.ts.map +1 -1
- package/dist/thegraph/generated/graphql-near.js +83 -6
- package/dist/thegraph/generated/graphql-near.js.map +1 -1
- package/dist/types.d.ts +12 -9
- package/dist/types.d.ts.map +1 -1
- package/dist/utils.d.ts +5 -2
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +8 -1
- package/dist/utils.js.map +1 -1
- package/package.json +7 -7
|
@@ -1,28 +1,35 @@
|
|
|
1
|
-
import { PaymentTypes } from '@requestnetwork/types';
|
|
1
|
+
import { CurrencyTypes, PaymentTypes } from '@requestnetwork/types';
|
|
2
2
|
import { CurrencyDefinition } from '@requestnetwork/currency';
|
|
3
|
-
import { NearInfoRetriever } from './near-info-retriever';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
import { NearInfoRetriever, NearPaymentEvent } from './near-info-retriever';
|
|
4
|
+
import { TheGraphClient } from '../../thegraph';
|
|
5
|
+
export type TransferEventsParams = {
|
|
6
|
+
/** The reference to identify the payment*/
|
|
7
|
+
paymentReference: string;
|
|
8
|
+
/** Request denomination (usually fiat) */
|
|
9
|
+
requestCurrency: CurrencyDefinition;
|
|
10
|
+
/** The recipient of the transfer */
|
|
11
|
+
toAddress: string;
|
|
12
|
+
/** The address of the payment proxy */
|
|
13
|
+
contractAddress: string;
|
|
14
|
+
/** The chain to check for payment */
|
|
15
|
+
paymentChain: CurrencyTypes.VMChainName;
|
|
16
|
+
/** Indicates if it is an address for payment or refund */
|
|
17
|
+
eventName: PaymentTypes.EVENTS_NAMES;
|
|
18
|
+
/** The maximum span between the time the rate was fetched and the payment */
|
|
19
|
+
maxRateTimespan?: number;
|
|
20
|
+
};
|
|
7
21
|
/**
|
|
8
22
|
* Gets a list of transfer events for a set of Near payment details
|
|
9
23
|
*/
|
|
10
24
|
export declare class NearConversionInfoRetriever extends NearInfoRetriever {
|
|
11
|
-
protected
|
|
12
|
-
protected paymentReference: string;
|
|
13
|
-
protected toAddress: string;
|
|
14
|
-
protected proxyContractName: string;
|
|
15
|
-
protected eventName: PaymentTypes.EVENTS_NAMES;
|
|
16
|
-
protected network: string;
|
|
17
|
-
protected maxRateTimespan: number;
|
|
25
|
+
protected readonly client: TheGraphClient<CurrencyTypes.NearChainName>;
|
|
18
26
|
/**
|
|
19
27
|
* @param paymentReference The reference to identify the payment
|
|
20
28
|
* @param toAddress Address to check
|
|
21
29
|
* @param eventName Indicate if it is an address for payment or refund
|
|
22
30
|
* @param network The id of network we want to check
|
|
23
31
|
*/
|
|
24
|
-
constructor(
|
|
25
|
-
getTransferEvents(): Promise<PaymentTypes.
|
|
32
|
+
constructor(client: TheGraphClient<CurrencyTypes.NearChainName>);
|
|
33
|
+
getTransferEvents(params: TransferEventsParams): Promise<PaymentTypes.AllNetworkEvents<NearPaymentEvent>>;
|
|
26
34
|
}
|
|
27
|
-
export {};
|
|
28
35
|
//# sourceMappingURL=near-conversion-info-retriever.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"near-conversion-info-retriever.d.ts","sourceRoot":"","sources":["../../../src/near/retrievers/near-conversion-info-retriever.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"near-conversion-info-retriever.d.ts","sourceRoot":"","sources":["../../../src/near/retrievers/near-conversion-info-retriever.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC5E,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEhD,MAAM,MAAM,oBAAoB,GAAG;IACjC,2CAA2C;IAC3C,gBAAgB,EAAE,MAAM,CAAC;IACzB,0CAA0C;IAC1C,eAAe,EAAE,kBAAkB,CAAC;IACpC,oCAAoC;IACpC,SAAS,EAAE,MAAM,CAAC;IAClB,uCAAuC;IACvC,eAAe,EAAE,MAAM,CAAC;IACxB,qCAAqC;IACrC,YAAY,EAAE,aAAa,CAAC,WAAW,CAAC;IACxC,0DAA0D;IAC1D,SAAS,EAAE,YAAY,CAAC,YAAY,CAAC;IACrC,6EAA6E;IAC7E,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF;;GAEG;AACH,qBAAa,2BAA4B,SAAQ,iBAAiB;IAOpD,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC,aAAa,CAAC,aAAa,CAAC;IANlF;;;;;OAKG;gBAC4B,MAAM,EAAE,cAAc,CAAC,aAAa,CAAC,aAAa,CAAC;IAGrE,iBAAiB,CAC5B,MAAM,EAAE,oBAAoB,GAC3B,OAAO,CAAC,YAAY,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;CAsC5D"}
|
|
@@ -13,47 +13,44 @@ class NearConversionInfoRetriever extends near_info_retriever_1.NearInfoRetrieve
|
|
|
13
13
|
* @param eventName Indicate if it is an address for payment or refund
|
|
14
14
|
* @param network The id of network we want to check
|
|
15
15
|
*/
|
|
16
|
-
constructor(
|
|
17
|
-
super(
|
|
18
|
-
this.
|
|
19
|
-
this.paymentReference = paymentReference;
|
|
20
|
-
this.toAddress = toAddress;
|
|
21
|
-
this.proxyContractName = proxyContractName;
|
|
22
|
-
this.eventName = eventName;
|
|
23
|
-
this.network = network;
|
|
24
|
-
this.maxRateTimespan = maxRateTimespan;
|
|
16
|
+
constructor(client) {
|
|
17
|
+
super(client);
|
|
18
|
+
this.client = client;
|
|
25
19
|
}
|
|
26
|
-
getTransferEvents() {
|
|
20
|
+
getTransferEvents(params) {
|
|
27
21
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
22
|
+
const { requestCurrency, paymentReference, toAddress, contractAddress, eventName, maxRateTimespan, } = params;
|
|
28
23
|
const payments = yield this.client.GetAnyToNativePayments({
|
|
29
|
-
reference:
|
|
30
|
-
to:
|
|
31
|
-
currency:
|
|
32
|
-
maxRateTimespan:
|
|
33
|
-
contractAddress:
|
|
34
|
-
});
|
|
35
|
-
return payments.payments.map((p) => {
|
|
36
|
-
var _a;
|
|
37
|
-
return ({
|
|
38
|
-
amount: p.amount,
|
|
39
|
-
name: this.eventName,
|
|
40
|
-
parameters: {
|
|
41
|
-
block: p.block,
|
|
42
|
-
feeAddress: p.feeAddress || undefined,
|
|
43
|
-
feeAmount: p.feeAmount,
|
|
44
|
-
feeAmountInCrypto: p.feeAmountInCrypto || undefined,
|
|
45
|
-
amountInCrypto: p.amountInCrypto,
|
|
46
|
-
to: this.toAddress,
|
|
47
|
-
maxRateTimespan: (_a = p.maxRateTimespan) === null || _a === void 0 ? void 0 : _a.toString(),
|
|
48
|
-
from: p.from,
|
|
49
|
-
gasUsed: p.gasUsed,
|
|
50
|
-
gasPrice: p.gasPrice,
|
|
51
|
-
receiptId: p.receiptId,
|
|
52
|
-
currency: p.currency,
|
|
53
|
-
},
|
|
54
|
-
timestamp: Number(p.timestamp),
|
|
55
|
-
});
|
|
24
|
+
reference: paymentReference,
|
|
25
|
+
to: toAddress,
|
|
26
|
+
currency: requestCurrency.symbol,
|
|
27
|
+
maxRateTimespan: maxRateTimespan !== null && maxRateTimespan !== void 0 ? maxRateTimespan : 0,
|
|
28
|
+
contractAddress: contractAddress,
|
|
56
29
|
});
|
|
30
|
+
return {
|
|
31
|
+
paymentEvents: payments.payments.map((p) => {
|
|
32
|
+
var _a;
|
|
33
|
+
return ({
|
|
34
|
+
amount: p.amount,
|
|
35
|
+
name: eventName,
|
|
36
|
+
parameters: {
|
|
37
|
+
block: p.block,
|
|
38
|
+
feeAddress: p.feeAddress || undefined,
|
|
39
|
+
feeAmount: p.feeAmount,
|
|
40
|
+
feeAmountInCrypto: p.feeAmountInCrypto || undefined,
|
|
41
|
+
amountInCrypto: p.amountInCrypto,
|
|
42
|
+
to: toAddress,
|
|
43
|
+
maxRateTimespan: (_a = p.maxRateTimespan) === null || _a === void 0 ? void 0 : _a.toString(),
|
|
44
|
+
from: p.from,
|
|
45
|
+
gasUsed: p.gasUsed,
|
|
46
|
+
gasPrice: p.gasPrice,
|
|
47
|
+
receiptId: p.receiptId,
|
|
48
|
+
currency: p.currency,
|
|
49
|
+
},
|
|
50
|
+
timestamp: Number(p.timestamp),
|
|
51
|
+
});
|
|
52
|
+
}),
|
|
53
|
+
};
|
|
57
54
|
});
|
|
58
55
|
}
|
|
59
56
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"near-conversion-info-retriever.js","sourceRoot":"","sources":["../../../src/near/retrievers/near-conversion-info-retriever.ts"],"names":[],"mappings":";;;;AAEA,+
|
|
1
|
+
{"version":3,"file":"near-conversion-info-retriever.js","sourceRoot":"","sources":["../../../src/near/retrievers/near-conversion-info-retriever.ts"],"names":[],"mappings":";;;;AAEA,+DAA4E;AAoB5E;;GAEG;AACH,MAAa,2BAA4B,SAAQ,uCAA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AM,CAAC,CAAC,CAAC,SAAS,CAAC;qBAC/B,CAAC,CAAA;iBAAA,CAAC;aACJ,CAAC;QACJ,CAAC;KAAA;CACF;AAlDD,kEAkDC"}
|
|
@@ -1,26 +1,37 @@
|
|
|
1
|
-
import { PaymentTypes } from '@requestnetwork/types';
|
|
1
|
+
import { CurrencyTypes, PaymentTypes } from '@requestnetwork/types';
|
|
2
2
|
import { TheGraphClient } from '../../thegraph';
|
|
3
|
-
|
|
3
|
+
import { ITheGraphBaseInfoRetriever } from 'payment-detection/src/types';
|
|
4
|
+
export interface NearPaymentEvent extends PaymentTypes.IERC20FeePaymentEventParameters {
|
|
4
5
|
receiptId: string;
|
|
5
6
|
}
|
|
7
|
+
export type TransferEventsParams = {
|
|
8
|
+
/** The reference to identify the payment*/
|
|
9
|
+
paymentReference: string;
|
|
10
|
+
/** The recipient of the transfer */
|
|
11
|
+
toAddress: string;
|
|
12
|
+
/** The address of the payment proxy */
|
|
13
|
+
contractAddress: string;
|
|
14
|
+
/** The chain to check for payment */
|
|
15
|
+
paymentChain: CurrencyTypes.VMChainName;
|
|
16
|
+
/** Indicates if it is an address for payment or refund */
|
|
17
|
+
eventName: PaymentTypes.EVENTS_NAMES;
|
|
18
|
+
/** The list of ERC20 tokens addresses accepted for payments and refunds. Set to `undefined` for payments in NEAR token. */
|
|
19
|
+
acceptedTokens?: string[];
|
|
20
|
+
};
|
|
6
21
|
/**
|
|
7
22
|
* Gets a list of transfer events for a set of Near payment details
|
|
23
|
+
* TheGraph-based etriever for ERC20 Fee Proxy and Native token payments.
|
|
8
24
|
*/
|
|
9
|
-
export declare class NearInfoRetriever {
|
|
10
|
-
protected
|
|
11
|
-
protected toAddress: string;
|
|
12
|
-
protected proxyContractName: string;
|
|
13
|
-
protected eventName: PaymentTypes.EVENTS_NAMES;
|
|
14
|
-
protected client: TheGraphClient<'near'>;
|
|
25
|
+
export declare class NearInfoRetriever implements ITheGraphBaseInfoRetriever<NearPaymentEvent> {
|
|
26
|
+
protected readonly client: TheGraphClient<CurrencyTypes.NearChainName>;
|
|
15
27
|
/**
|
|
16
28
|
* @param paymentReference The reference to identify the payment
|
|
17
29
|
* @param toAddress Address to check
|
|
18
30
|
* @param eventName Indicate if it is an address for payment or refund
|
|
19
|
-
* @param network The id of network we want to check
|
|
20
31
|
*
|
|
21
32
|
*/
|
|
22
|
-
constructor(
|
|
23
|
-
getTransferEvents(): Promise<PaymentTypes.
|
|
33
|
+
constructor(client: TheGraphClient<CurrencyTypes.NearChainName>);
|
|
34
|
+
getTransferEvents(params: TransferEventsParams): Promise<PaymentTypes.AllNetworkEvents<NearPaymentEvent>>;
|
|
35
|
+
private mapPaymentEvent;
|
|
24
36
|
}
|
|
25
|
-
export {};
|
|
26
37
|
//# sourceMappingURL=near-info-retriever.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"near-info-retriever.d.ts","sourceRoot":"","sources":["../../../src/near/retrievers/near-info-retriever.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"near-info-retriever.d.ts","sourceRoot":"","sources":["../../../src/near/retrievers/near-info-retriever.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEhD,OAAO,EAAE,0BAA0B,EAAE,MAAM,6BAA6B,CAAC;AAGzE,MAAM,WAAW,gBAAiB,SAAQ,YAAY,CAAC,+BAA+B;IACpF,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,MAAM,oBAAoB,GAAG;IACjC,2CAA2C;IAC3C,gBAAgB,EAAE,MAAM,CAAC;IACzB,oCAAoC;IACpC,SAAS,EAAE,MAAM,CAAC;IAClB,uCAAuC;IACvC,eAAe,EAAE,MAAM,CAAC;IACxB,qCAAqC;IACrC,YAAY,EAAE,aAAa,CAAC,WAAW,CAAC;IACxC,0DAA0D;IAC1D,SAAS,EAAE,YAAY,CAAC,YAAY,CAAC;IACrC,2HAA2H;IAC3H,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;CAC3B,CAAC;AACF;;;GAGG;AACH,qBAAa,iBAAkB,YAAW,0BAA0B,CAAC,gBAAgB,CAAC;IAOxE,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC,aAAa,CAAC,aAAa,CAAC;IANlF;;;;;OAKG;gBAC4B,MAAM,EAAE,cAAc,CAAC,aAAa,CAAC,aAAa,CAAC;IAErE,iBAAiB,CAC5B,MAAM,EAAE,oBAAoB,GAC3B,OAAO,CAAC,YAAY,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;IAsB3D,OAAO,CAAC,eAAe;CAmBxB"}
|
|
@@ -2,54 +2,59 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.NearInfoRetriever = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const thegraph_1 = require("../../thegraph");
|
|
6
|
-
const currency_1 = require("@requestnetwork/currency");
|
|
7
5
|
/**
|
|
8
6
|
* Gets a list of transfer events for a set of Near payment details
|
|
7
|
+
* TheGraph-based etriever for ERC20 Fee Proxy and Native token payments.
|
|
9
8
|
*/
|
|
10
9
|
class NearInfoRetriever {
|
|
11
10
|
/**
|
|
12
11
|
* @param paymentReference The reference to identify the payment
|
|
13
12
|
* @param toAddress Address to check
|
|
14
13
|
* @param eventName Indicate if it is an address for payment or refund
|
|
15
|
-
* @param network The id of network we want to check
|
|
16
14
|
*
|
|
17
15
|
*/
|
|
18
|
-
constructor(
|
|
19
|
-
this.
|
|
20
|
-
this.toAddress = toAddress;
|
|
21
|
-
this.proxyContractName = proxyContractName;
|
|
22
|
-
this.eventName = eventName;
|
|
23
|
-
try {
|
|
24
|
-
currency_1.NearChains.assertChainSupported(network);
|
|
25
|
-
}
|
|
26
|
-
catch (_a) {
|
|
27
|
-
throw new Error('Near input data info-retriever only works with Near mainnet and testnet');
|
|
28
|
-
}
|
|
29
|
-
network = network.replace('aurora', 'near');
|
|
30
|
-
this.client = (0, thegraph_1.getTheGraphNearClient)(`https://api.thegraph.com/subgraphs/name/requestnetwork/request-payments-${network}`);
|
|
16
|
+
constructor(client) {
|
|
17
|
+
this.client = client;
|
|
31
18
|
}
|
|
32
|
-
getTransferEvents() {
|
|
19
|
+
getTransferEvents(params) {
|
|
33
20
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
|
|
21
|
+
const { paymentReference, toAddress, contractAddress, acceptedTokens } = params;
|
|
22
|
+
if (acceptedTokens && acceptedTokens.length > 1)
|
|
23
|
+
throw new Error(`NearInfoRetriever does not support multiple accepted tokens.`);
|
|
24
|
+
const payments = (acceptedTokens === null || acceptedTokens === void 0 ? void 0 : acceptedTokens.length) === 1
|
|
25
|
+
? yield this.client.GetFungibleTokenPayments({
|
|
26
|
+
reference: paymentReference,
|
|
27
|
+
to: toAddress,
|
|
28
|
+
contractAddress,
|
|
29
|
+
tokenAddress: acceptedTokens[0],
|
|
30
|
+
})
|
|
31
|
+
: yield this.client.GetNearPayments({
|
|
32
|
+
reference: paymentReference,
|
|
33
|
+
to: toAddress,
|
|
34
|
+
contractAddress,
|
|
35
|
+
});
|
|
36
|
+
return {
|
|
37
|
+
paymentEvents: payments.payments.map((p) => this.mapPaymentEvent(p, params)),
|
|
38
|
+
};
|
|
51
39
|
});
|
|
52
40
|
}
|
|
41
|
+
mapPaymentEvent(payment, params) {
|
|
42
|
+
var _a;
|
|
43
|
+
return {
|
|
44
|
+
amount: payment.amount,
|
|
45
|
+
name: params.eventName,
|
|
46
|
+
timestamp: Number(payment.timestamp),
|
|
47
|
+
parameters: {
|
|
48
|
+
feeAmount: payment.feeAmount,
|
|
49
|
+
receiptId: payment.receiptId,
|
|
50
|
+
block: payment.block,
|
|
51
|
+
to: params.toAddress,
|
|
52
|
+
from: payment.from,
|
|
53
|
+
feeAddress: (_a = payment.feeAddress) !== null && _a !== void 0 ? _a : undefined,
|
|
54
|
+
tokenAddress: params.acceptedTokens ? params.acceptedTokens[0] : undefined,
|
|
55
|
+
},
|
|
56
|
+
};
|
|
57
|
+
}
|
|
53
58
|
}
|
|
54
59
|
exports.NearInfoRetriever = NearInfoRetriever;
|
|
55
60
|
//# sourceMappingURL=near-info-retriever.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"near-info-retriever.js","sourceRoot":"","sources":["../../../src/near/retrievers/near-info-retriever.ts"],"names":[],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"near-info-retriever.js","sourceRoot":"","sources":["../../../src/near/retrievers/near-info-retriever.ts"],"names":[],"mappings":";;;;AAwBA;;;GAGG;AACH,MAAa,iBAAiB;IAC5B;;;;;OAKG;IACH,YAA+B,MAAmD;QAAnD,WAAM,GAAN,MAAM,CAA6C;IAAG,CAAC;IAEzE,iBAAiB,CAC5B,MAA4B;;YAE5B,MAAM,EAAE,gBAAgB,EAAE,SAAS,EAAE,eAAe,EAAE,cAAc,EAAE,GAAG,MAAM,CAAC;YAChF,IAAI,cAAc,IAAI,cAAc,CAAC,MAAM,GAAG,CAAC;gBAC7C,MAAM,IAAI,KAAK,CAAC,8DAA8D,CAAC,CAAC;YAClF,MAAM,QAAQ,GACZ,CAAA,cAAc,aAAd,cAAc,uBAAd,cAAc,CAAE,MAAM,MAAK,CAAC;gBAC1B,CAAC,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,wBAAwB,CAAC;oBACzC,SAAS,EAAE,gBAAgB;oBAC3B,EAAE,EAAE,SAAS;oBACb,eAAe;oBACf,YAAY,EAAE,cAAc,CAAC,CAAC,CAAC;iBAChC,CAAC;gBACJ,CAAC,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC;oBAChC,SAAS,EAAE,gBAAgB;oBAC3B,EAAE,EAAE,SAAS;oBACb,eAAe;iBAChB,CAAC,CAAC;YACT,OAAO;gBACL,aAAa,EAAE,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;aAC7E,CAAC;QACJ,CAAC;KAAA;IAEO,eAAe,CACrB,OAA4C,EAC5C,MAA4B;;QAE5B,OAAO;YACL,MAAM,EAAE,OAAO,CAAC,MAAM;YACtB,IAAI,EAAE,MAAM,CAAC,SAAS;YACtB,SAAS,EAAE,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC;YACpC,UAAU,EAAE;gBACV,SAAS,EAAE,OAAO,CAAC,SAAS;gBAC5B,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,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS;aAC3E;SACF,CAAC;IACJ,CAAC;CACF;AApDD,8CAoDC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BigNumber } from 'ethers';
|
|
2
2
|
import { ExtensionTypes, PaymentTypes, RequestLogicTypes } from '@requestnetwork/types';
|
|
3
|
-
export declare abstract class PaymentDetectorBase<TExtension extends ExtensionTypes.IExtension, TPaymentEventParameters> implements PaymentTypes.IPaymentNetwork<TPaymentEventParameters> {
|
|
3
|
+
export declare abstract class PaymentDetectorBase<TExtension extends ExtensionTypes.IExtension, TPaymentEventParameters extends PaymentTypes.GenericEventParameters> implements PaymentTypes.IPaymentNetwork<TPaymentEventParameters> {
|
|
4
4
|
readonly paymentNetworkId: ExtensionTypes.PAYMENT_NETWORK_ID;
|
|
5
5
|
readonly extension: TExtension;
|
|
6
6
|
protected constructor(paymentNetworkId: ExtensionTypes.PAYMENT_NETWORK_ID, extension: TExtension);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payment-detector-base.d.ts","sourceRoot":"","sources":["../src/payment-detector-base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAOxF,8BAAsB,mBAAmB,CACvC,UAAU,SAAS,cAAc,CAAC,UAAU,EAC5C,uBAAuB,
|
|
1
|
+
{"version":3,"file":"payment-detector-base.d.ts","sourceRoot":"","sources":["../src/payment-detector-base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAOxF,8BAAsB,mBAAmB,CACvC,UAAU,SAAS,cAAc,CAAC,UAAU,EAC5C,uBAAuB,SAAS,YAAY,CAAC,sBAAsB,CACnE,YAAW,YAAY,CAAC,eAAe,CAAC,uBAAuB,CAAC;aAG9C,gBAAgB,EAAE,cAAc,CAAC,kBAAkB;aACnD,SAAS,EAAE,UAAU;IAFvC,SAAS,aACS,gBAAgB,EAAE,cAAc,CAAC,kBAAkB,EACnD,SAAS,EAAE,UAAU;IAGvC,QAAQ,CAAC,+BAA+B,CACtC,gCAAgC,EAAE,YAAY,CAAC,8BAA8B,CAAC,YAAY,CAAC,GAC1F,OAAO,CAAC,GAAG,CAAC;IACf,QAAQ,CAAC,2CAA2C,CAAC,UAAU,EAAE,GAAG,GAAG,GAAG;IAC1E,QAAQ,CAAC,4CAA4C,CAAC,UAAU,EAAE,GAAG,GAAG,GAAG;IAE3E;;;;;OAKG;IACU,UAAU,CACrB,OAAO,EAAE,iBAAiB,CAAC,QAAQ,GAClC,OAAO,CAAC,YAAY,CAAC,kBAAkB,CAAC,uBAAuB,CAAC,CAAC;IAkBpE;;OAEG;IACH,SAAS,CAAC,QAAQ,CAAC,SAAS,CAC1B,OAAO,EAAE,iBAAiB,CAAC,QAAQ,GAClC,OAAO,CAAC,YAAY,CAAC,gBAAgB,CAAC,uBAAuB,CAAC,CAAC;IAElE,SAAS,CAAC,mBAAmB,CAC3B,OAAO,EAAE,iBAAiB,CAAC,QAAQ,GAClC,UAAU,SAAS,cAAc,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,GAAG,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,KAAK;IAW3F,SAAS,CAAC,cAAc,CAAC,MAAM,EAAE,YAAY,CAAC,oBAAoB,CAAC,OAAO,CAAC,EAAE,GAAG,SAAS;IAYzF,SAAS,CAAC,UAAU,CAClB,MAAM,EAAE,YAAY,CAAC,oBAAoB,CAAC,uBAAuB,CAAC,EAAE,GACnE,YAAY,CAAC,oBAAoB,CAAC,uBAAuB,CAAC,EAAE;IAI/D,SAAS,CAAC,gBAAgB,CACxB,MAAM,EAAE,YAAY,CAAC,kBAAkB,EAAE,GACxC,YAAY,CAAC,kBAAkB,EAAE;IAIpC,SAAS,CAAC,sBAAsB,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,SAAS,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,IAAI,CAAC;CAK5F"}
|
|
@@ -15,7 +15,7 @@ export declare class PaymentNetworkFactory {
|
|
|
15
15
|
constructor(advancedLogic: AdvancedLogicTypes.IAdvancedLogic, currencyManager: ICurrencyManager, options?: Partial<PaymentNetworkOptions>);
|
|
16
16
|
private buildOptions;
|
|
17
17
|
/**
|
|
18
|
-
* Creates a payment network according to payment network creation parameters
|
|
18
|
+
* Creates a payment network interpretor according to payment network creation parameters
|
|
19
19
|
* It throws if the payment network given is not supported by this library
|
|
20
20
|
*
|
|
21
21
|
* @param paymentNetworkId the ID of the payment network to instantiate
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payment-network-factory.d.ts","sourceRoot":"","sources":["../src/payment-network-factory.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,aAAa,EACb,cAAc,EACd,YAAY,EACZ,iBAAiB,EAClB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAIL,qBAAqB,EACtB,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"payment-network-factory.d.ts","sourceRoot":"","sources":["../src/payment-network-factory.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,aAAa,EACb,cAAc,EACd,YAAY,EACZ,iBAAiB,EAClB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAIL,qBAAqB,EACtB,MAAM,SAAS,CAAC;AA0EjB,+FAA+F;AAC/F,qBAAa,qBAAqB;IAS9B,OAAO,CAAC,QAAQ,CAAC,aAAa;IAC9B,OAAO,CAAC,QAAQ,CAAC,eAAe;IATlC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAkC;IAC1D;;;;;OAKG;gBAEgB,aAAa,EAAE,kBAAkB,CAAC,cAAc,EAChD,eAAe,EAAE,gBAAgB,EAClD,OAAO,CAAC,EAAE,OAAO,CAAC,qBAAqB,CAAC;IAK1C,OAAO,CAAC,YAAY;IAepB;;;;;;;;OAQG;IACI,oBAAoB,CACzB,gBAAgB,EAAE,cAAc,CAAC,kBAAkB,EACnD,YAAY,EAAE,iBAAiB,CAAC,QAAQ,EACxC,YAAY,CAAC,EAAE,aAAa,CAAC,SAAS,EACtC,qBAAqB,CAAC,EAAE,MAAM,GAC7B,YAAY,CAAC,eAAe;IAqC/B;;;;;;OAMG;IACI,4BAA4B,CACjC,OAAO,EAAE,iBAAiB,CAAC,QAAQ,GAClC,YAAY,CAAC,eAAe,GAAG,IAAI;CAgBvC"}
|
|
@@ -29,6 +29,15 @@ const supportedPaymentNetwork = {
|
|
|
29
29
|
},
|
|
30
30
|
},
|
|
31
31
|
ERC20: {
|
|
32
|
+
aurora: {
|
|
33
|
+
[PN_ID.ERC20_FEE_PROXY_CONTRACT]: (erc20_1.ERC20FeeProxyPaymentDetector),
|
|
34
|
+
},
|
|
35
|
+
'aurora-testnet': {
|
|
36
|
+
[PN_ID.ERC20_FEE_PROXY_CONTRACT]: (erc20_1.ERC20FeeProxyPaymentDetector),
|
|
37
|
+
},
|
|
38
|
+
'near-testnet': {
|
|
39
|
+
[PN_ID.ERC20_FEE_PROXY_CONTRACT]: (erc20_1.ERC20FeeProxyPaymentDetector),
|
|
40
|
+
},
|
|
32
41
|
'*': {
|
|
33
42
|
[PN_ID.ERC20_ADDRESS_BASED]: erc20_1.ERC20AddressBasedPaymentDetector,
|
|
34
43
|
[PN_ID.ERC20_PROXY_CONTRACT]: erc20_1.ERC20ProxyPaymentDetector,
|
|
@@ -82,7 +91,7 @@ class PaymentNetworkFactory {
|
|
|
82
91
|
return Object.assign(Object.assign({}, defaultOptions), options);
|
|
83
92
|
}
|
|
84
93
|
/**
|
|
85
|
-
* Creates a payment network according to payment network creation parameters
|
|
94
|
+
* Creates a payment network interpretor according to payment network creation parameters
|
|
86
95
|
* It throws if the payment network given is not supported by this library
|
|
87
96
|
*
|
|
88
97
|
* @param paymentNetworkId the ID of the payment network to instantiate
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payment-network-factory.js","sourceRoot":"","sources":["../src/payment-network-factory.ts"],"names":[],"mappings":";;;AAAA,iDAM+B;A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;QAE1D,IAAI,CAAC,aAAa,EAAE;YAClB,MAAM,IAAI,KAAK,CACb,2BAA2B,gBAAgB,uCAAuC,YAAY,eAAe,OAAO,EAAE,CACvH,CAAC;SACH;QAED,MAAM,QAAQ,GAAG,IAAI,aAAa,iBAChC,OAAO,EACP,aAAa,EAAE,IAAI,CAAC,aAAa,EACjC,eAAe,EAAE,IAAI,CAAC,eAAe,IAClC,IAAI,CAAC,OAAO,EACf,CAAC;QAEH,IAAI,QAAQ,CAAC,SAAS,IAAI,0BAA0B,IAAI,aAAa,EAAE;YACrE,uFAAuF;YACtF,aAAuC,CAAC,wBAAwB,CAC/D,
|
|
1
|
+
{"version":3,"file":"payment-network-factory.js","sourceRoot":"","sources":["../src/payment-network-factory.ts"],"names":[],"mappings":";;;AAAA,iDAM+B;AAQ/B,+BAAuF;AACvF,+CAA2D;AAC3D,mCAKiB;AACjB,sEAAyE;AACzE,+BAAgF;AAChF,+BAAmF;AACnF,iCAAkG;AAClG,mCAAqD;AACrD,yCAA+C;AAC/C,mCAA4C;AAE5C,MAAM,KAAK,GAAG,sBAAc,CAAC,kBAAkB,CAAC;AAEhD,wDAAwD;AACxD,MAAM,uBAAuB,GAAuC;IAClE,GAAG,EAAE;QACH,OAAO,EAAE;YACP,CAAC,KAAK,CAAC,qBAAqB,CAAC,EAAE,oCAA8B;SAC9D;QACD,OAAO,EAAE;YACP,CAAC,KAAK,CAAC,6BAA6B,CAAC,EAAE,oCAA8B;SACtE;KACF;IACD,MAAM,EAAE;QACN,GAAG,EAAE;YACH,CAAC,KAAK,CAAC,aAAa,CAAC,EAAE,+CAAyB;SACjD;KACF;IACD,KAAK,EAAE;QACL,MAAM,EAAE;YACN,CAAC,KAAK,CAAC,wBAAwB,CAAC,EAAE,CAAA,oCAAyD,CAAA;SAC5F;QACD,gBAAgB,EAAE;YAChB,CAAC,KAAK,CAAC,wBAAwB,CAAC,EAAE,CAAA,oCAAyD,CAAA;SAC5F;QACD,cAAc,EAAE;YACd,CAAC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;SACH;QAED,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED;;;;;;OAMG;IACI,4BAA4B,CACjC,OAAmC;;QAEnC,MAAM,EAAE,GAAG,IAAA,kCAA0B,EAAC,OAAO,CAAC,CAAC;QAC/C,IAAI,CAAC,EAAE,EAAE;YACP,OAAO,IAAI,CAAC;SACb;QAED,MAAM,cAAc,GAAG,MAAA,MAAA,EAAE,CAAC,MAAM,0CAAE,OAAO,mCAAI,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC;QAEtE,MAAM,EAAE,EAAE,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC;QAC3B,OAAO,IAAI,CAAC,oBAAoB,CAC9B,EAAkD,EAClD,OAAO,CAAC,QAAQ,CAAC,IAAI,EACrB,cAAc,EACd,OAAO,CACR,CAAC;IACJ,CAAC;CACF;AA3GD,sDA2GC"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { CurrencyTypes } from '@requestnetwork/types';
|
|
1
2
|
/**
|
|
2
3
|
* A GraphQL client to query Request's subgraph.
|
|
3
4
|
*
|
|
4
5
|
* @type TGraphClientVariant: null if no variant, 'near' if native token payments detection on Near
|
|
5
6
|
*/
|
|
6
|
-
export type TheGraphClient<
|
|
7
|
+
export type TheGraphClient<TChain extends CurrencyTypes.VMChainName = CurrencyTypes.EvmChainName> = TChain extends CurrencyTypes.NearChainName ? ReturnType<typeof getTheGraphNearClient> : ReturnType<typeof getTheGraphClient>;
|
|
7
8
|
export type TheGraphClientOptions = {
|
|
8
9
|
timeout?: number;
|
|
9
10
|
};
|
|
@@ -47,6 +48,12 @@ export declare const getTheGraphNearClient: (url: string, options?: TheGraphClie
|
|
|
47
48
|
maxRateTimespan: number;
|
|
48
49
|
contractAddress: string;
|
|
49
50
|
}>, requestHeaders?: (Record<string, string> | import("graphql-request/dist/types.dom").Headers | string[][]) | undefined): Promise<import("./generated/graphql-near").GetAnyToNativePaymentsQuery>;
|
|
51
|
+
GetFungibleTokenPayments(variables: import("./generated/graphql-near").Exact<{
|
|
52
|
+
reference: string;
|
|
53
|
+
to: string;
|
|
54
|
+
contractAddress: string;
|
|
55
|
+
tokenAddress: string;
|
|
56
|
+
}>, requestHeaders?: (Record<string, string> | import("graphql-request/dist/types.dom").Headers | string[][]) | undefined): Promise<import("./generated/graphql-near").GetFungibleTokenPaymentsQuery>;
|
|
50
57
|
GetNearPayments(variables: import("./generated/graphql-near").Exact<{
|
|
51
58
|
reference: string;
|
|
52
59
|
to: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/thegraph/client.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/thegraph/client.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAQtD;;;;GAIG;AACH,MAAM,MAAM,cAAc,CAAC,MAAM,SAAS,aAAa,CAAC,WAAW,GAAG,aAAa,CAAC,YAAY,IAC9F,MAAM,SAAS,aAAa,CAAC,aAAa,GACtC,UAAU,CAAC,OAAO,qBAAqB,CAAC,GACxC,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE3C,MAAM,MAAM,qBAAqB,GAAG;IAClC,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,eAAO,MAAM,iBAAiB,QAAS,MAAM,YAAY,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACrC,CAAC;AAE1C,eAAO,MAAM,qBAAqB,QAAS,MAAM,YAAY,qBAAqB;;;;;;;;;;;;;;;;;;;CACrC,CAAC"}
|
package/dist/thegraph/client.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getTheGraphNearClient = exports.getTheGraphClient = void 0;
|
|
4
|
-
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
|
|
5
4
|
const graphql_request_1 = require("graphql-request");
|
|
6
5
|
const graphql_1 = require("./generated/graphql");
|
|
7
6
|
const graphql_near_1 = require("./generated/graphql-near");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/thegraph/client.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/thegraph/client.ts"],"names":[],"mappings":";;;AAEA,qDAAgD;AAChD,iDAA6C;AAC7C,2DAAgE;AAmBzD,MAAM,iBAAiB,GAAG,CAAC,GAAW,EAAE,OAA+B,EAAE,EAAE,CAChF,IAAA,gBAAM,EAAC,IAAI,+BAAa,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC;AAD7B,QAAA,iBAAiB,qBACY;AAEnC,MAAM,qBAAqB,GAAG,CAAC,GAAW,EAAE,OAA+B,EAAE,EAAE,CACpF,IAAA,qBAAU,EAAC,IAAI,+BAAa,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC;AADjC,QAAA,qBAAqB,yBACY"}
|
|
@@ -365,7 +365,7 @@ export type Payment = {
|
|
|
365
365
|
__typename?: 'Payment';
|
|
366
366
|
id: Scalars['ID'];
|
|
367
367
|
contractAddress: Scalars['String'];
|
|
368
|
-
tokenAddress?: Maybe<Scalars['
|
|
368
|
+
tokenAddress?: Maybe<Scalars['String']>;
|
|
369
369
|
to: Scalars['String'];
|
|
370
370
|
from: Scalars['String'];
|
|
371
371
|
reference: Scalars['String'];
|
|
@@ -376,9 +376,9 @@ export type Payment = {
|
|
|
376
376
|
gasUsed: Scalars['BigInt'];
|
|
377
377
|
gasPrice: Scalars['BigInt'];
|
|
378
378
|
amount: Scalars['BigDecimal'];
|
|
379
|
+
currency: Scalars['String'];
|
|
379
380
|
feeAmount?: Maybe<Scalars['BigDecimal']>;
|
|
380
381
|
feeAddress?: Maybe<Scalars['String']>;
|
|
381
|
-
currency?: Maybe<Scalars['String']>;
|
|
382
382
|
amountInCrypto?: Maybe<Scalars['BigDecimal']>;
|
|
383
383
|
feeAmountInCrypto?: Maybe<Scalars['BigDecimal']>;
|
|
384
384
|
maxRateTimespan?: Maybe<Scalars['Int']>;
|
|
@@ -412,16 +412,26 @@ export type Payment_Filter = {
|
|
|
412
412
|
contractAddress_ends_with_nocase?: Maybe<Scalars['String']>;
|
|
413
413
|
contractAddress_not_ends_with?: Maybe<Scalars['String']>;
|
|
414
414
|
contractAddress_not_ends_with_nocase?: Maybe<Scalars['String']>;
|
|
415
|
-
tokenAddress?: Maybe<Scalars['
|
|
416
|
-
tokenAddress_not?: Maybe<Scalars['
|
|
417
|
-
tokenAddress_gt?: Maybe<Scalars['
|
|
418
|
-
tokenAddress_lt?: Maybe<Scalars['
|
|
419
|
-
tokenAddress_gte?: Maybe<Scalars['
|
|
420
|
-
tokenAddress_lte?: Maybe<Scalars['
|
|
421
|
-
tokenAddress_in?: Maybe<Array<Scalars['
|
|
422
|
-
tokenAddress_not_in?: Maybe<Array<Scalars['
|
|
423
|
-
tokenAddress_contains?: Maybe<Scalars['
|
|
424
|
-
|
|
415
|
+
tokenAddress?: Maybe<Scalars['String']>;
|
|
416
|
+
tokenAddress_not?: Maybe<Scalars['String']>;
|
|
417
|
+
tokenAddress_gt?: Maybe<Scalars['String']>;
|
|
418
|
+
tokenAddress_lt?: Maybe<Scalars['String']>;
|
|
419
|
+
tokenAddress_gte?: Maybe<Scalars['String']>;
|
|
420
|
+
tokenAddress_lte?: Maybe<Scalars['String']>;
|
|
421
|
+
tokenAddress_in?: Maybe<Array<Scalars['String']>>;
|
|
422
|
+
tokenAddress_not_in?: Maybe<Array<Scalars['String']>>;
|
|
423
|
+
tokenAddress_contains?: Maybe<Scalars['String']>;
|
|
424
|
+
tokenAddress_contains_nocase?: Maybe<Scalars['String']>;
|
|
425
|
+
tokenAddress_not_contains?: Maybe<Scalars['String']>;
|
|
426
|
+
tokenAddress_not_contains_nocase?: Maybe<Scalars['String']>;
|
|
427
|
+
tokenAddress_starts_with?: Maybe<Scalars['String']>;
|
|
428
|
+
tokenAddress_starts_with_nocase?: Maybe<Scalars['String']>;
|
|
429
|
+
tokenAddress_not_starts_with?: Maybe<Scalars['String']>;
|
|
430
|
+
tokenAddress_not_starts_with_nocase?: Maybe<Scalars['String']>;
|
|
431
|
+
tokenAddress_ends_with?: Maybe<Scalars['String']>;
|
|
432
|
+
tokenAddress_ends_with_nocase?: Maybe<Scalars['String']>;
|
|
433
|
+
tokenAddress_not_ends_with?: Maybe<Scalars['String']>;
|
|
434
|
+
tokenAddress_not_ends_with_nocase?: Maybe<Scalars['String']>;
|
|
425
435
|
to?: Maybe<Scalars['String']>;
|
|
426
436
|
to_not?: Maybe<Scalars['String']>;
|
|
427
437
|
to_gt?: Maybe<Scalars['String']>;
|
|
@@ -562,6 +572,26 @@ export type Payment_Filter = {
|
|
|
562
572
|
amount_lte?: Maybe<Scalars['BigDecimal']>;
|
|
563
573
|
amount_in?: Maybe<Array<Scalars['BigDecimal']>>;
|
|
564
574
|
amount_not_in?: Maybe<Array<Scalars['BigDecimal']>>;
|
|
575
|
+
currency?: Maybe<Scalars['String']>;
|
|
576
|
+
currency_not?: Maybe<Scalars['String']>;
|
|
577
|
+
currency_gt?: Maybe<Scalars['String']>;
|
|
578
|
+
currency_lt?: Maybe<Scalars['String']>;
|
|
579
|
+
currency_gte?: Maybe<Scalars['String']>;
|
|
580
|
+
currency_lte?: Maybe<Scalars['String']>;
|
|
581
|
+
currency_in?: Maybe<Array<Scalars['String']>>;
|
|
582
|
+
currency_not_in?: Maybe<Array<Scalars['String']>>;
|
|
583
|
+
currency_contains?: Maybe<Scalars['String']>;
|
|
584
|
+
currency_contains_nocase?: Maybe<Scalars['String']>;
|
|
585
|
+
currency_not_contains?: Maybe<Scalars['String']>;
|
|
586
|
+
currency_not_contains_nocase?: Maybe<Scalars['String']>;
|
|
587
|
+
currency_starts_with?: Maybe<Scalars['String']>;
|
|
588
|
+
currency_starts_with_nocase?: Maybe<Scalars['String']>;
|
|
589
|
+
currency_not_starts_with?: Maybe<Scalars['String']>;
|
|
590
|
+
currency_not_starts_with_nocase?: Maybe<Scalars['String']>;
|
|
591
|
+
currency_ends_with?: Maybe<Scalars['String']>;
|
|
592
|
+
currency_ends_with_nocase?: Maybe<Scalars['String']>;
|
|
593
|
+
currency_not_ends_with?: Maybe<Scalars['String']>;
|
|
594
|
+
currency_not_ends_with_nocase?: Maybe<Scalars['String']>;
|
|
565
595
|
feeAmount?: Maybe<Scalars['BigDecimal']>;
|
|
566
596
|
feeAmount_not?: Maybe<Scalars['BigDecimal']>;
|
|
567
597
|
feeAmount_gt?: Maybe<Scalars['BigDecimal']>;
|
|
@@ -590,26 +620,6 @@ export type Payment_Filter = {
|
|
|
590
620
|
feeAddress_ends_with_nocase?: Maybe<Scalars['String']>;
|
|
591
621
|
feeAddress_not_ends_with?: Maybe<Scalars['String']>;
|
|
592
622
|
feeAddress_not_ends_with_nocase?: Maybe<Scalars['String']>;
|
|
593
|
-
currency?: Maybe<Scalars['String']>;
|
|
594
|
-
currency_not?: Maybe<Scalars['String']>;
|
|
595
|
-
currency_gt?: Maybe<Scalars['String']>;
|
|
596
|
-
currency_lt?: Maybe<Scalars['String']>;
|
|
597
|
-
currency_gte?: Maybe<Scalars['String']>;
|
|
598
|
-
currency_lte?: Maybe<Scalars['String']>;
|
|
599
|
-
currency_in?: Maybe<Array<Scalars['String']>>;
|
|
600
|
-
currency_not_in?: Maybe<Array<Scalars['String']>>;
|
|
601
|
-
currency_contains?: Maybe<Scalars['String']>;
|
|
602
|
-
currency_contains_nocase?: Maybe<Scalars['String']>;
|
|
603
|
-
currency_not_contains?: Maybe<Scalars['String']>;
|
|
604
|
-
currency_not_contains_nocase?: Maybe<Scalars['String']>;
|
|
605
|
-
currency_starts_with?: Maybe<Scalars['String']>;
|
|
606
|
-
currency_starts_with_nocase?: Maybe<Scalars['String']>;
|
|
607
|
-
currency_not_starts_with?: Maybe<Scalars['String']>;
|
|
608
|
-
currency_not_starts_with_nocase?: Maybe<Scalars['String']>;
|
|
609
|
-
currency_ends_with?: Maybe<Scalars['String']>;
|
|
610
|
-
currency_ends_with_nocase?: Maybe<Scalars['String']>;
|
|
611
|
-
currency_not_ends_with?: Maybe<Scalars['String']>;
|
|
612
|
-
currency_not_ends_with_nocase?: Maybe<Scalars['String']>;
|
|
613
623
|
amountInCrypto?: Maybe<Scalars['BigDecimal']>;
|
|
614
624
|
amountInCrypto_not?: Maybe<Scalars['BigDecimal']>;
|
|
615
625
|
amountInCrypto_gt?: Maybe<Scalars['BigDecimal']>;
|
|
@@ -653,9 +663,9 @@ export declare enum Payment_OrderBy {
|
|
|
653
663
|
GasUsed = "gasUsed",
|
|
654
664
|
GasPrice = "gasPrice",
|
|
655
665
|
Amount = "amount",
|
|
666
|
+
Currency = "currency",
|
|
656
667
|
FeeAmount = "feeAmount",
|
|
657
668
|
FeeAddress = "feeAddress",
|
|
658
|
-
Currency = "currency",
|
|
659
669
|
AmountInCrypto = "amountInCrypto",
|
|
660
670
|
FeeAmountInCrypto = "feeAmountInCrypto",
|
|
661
671
|
MaxRateTimespan = "maxRateTimespan"
|
|
@@ -814,7 +824,23 @@ export type GetAnyToNativePaymentsQuery = ({
|
|
|
814
824
|
} & {
|
|
815
825
|
payments: Array<({
|
|
816
826
|
__typename?: 'Payment';
|
|
817
|
-
} & Pick<Payment, 'amount' | 'block' | 'receiptId' | 'feeAmount' | 'feeAddress' | 'from' | 'timestamp' | 'currency' | 'maxRateTimespan' | 'amountInCrypto' | 'feeAmountInCrypto'>)>;
|
|
827
|
+
} & Pick<Payment, 'amount' | 'block' | 'receiptId' | 'feeAmount' | 'feeAddress' | 'from' | 'timestamp' | 'currency' | 'gasPrice' | 'gasUsed' | 'maxRateTimespan' | 'amountInCrypto' | 'feeAmountInCrypto'>)>;
|
|
828
|
+
});
|
|
829
|
+
export type NearPaymentEventResultFragment = ({
|
|
830
|
+
__typename?: 'Payment';
|
|
831
|
+
} & Pick<Payment, 'amount' | 'block' | 'receiptId' | 'txHash' | 'feeAmount' | 'feeAddress' | 'from' | 'gasUsed' | 'gasPrice' | 'timestamp' | 'contractAddress' | 'to' | 'tokenAddress' | 'currency' | 'amountInCrypto' | 'feeAmountInCrypto' | 'maxRateTimespan'>);
|
|
832
|
+
export type GetFungibleTokenPaymentsQueryVariables = Exact<{
|
|
833
|
+
reference: Scalars['String'];
|
|
834
|
+
to: Scalars['String'];
|
|
835
|
+
contractAddress: Scalars['String'];
|
|
836
|
+
tokenAddress: Scalars['String'];
|
|
837
|
+
}>;
|
|
838
|
+
export type GetFungibleTokenPaymentsQuery = ({
|
|
839
|
+
__typename?: 'Query';
|
|
840
|
+
} & {
|
|
841
|
+
payments: Array<({
|
|
842
|
+
__typename?: 'Payment';
|
|
843
|
+
} & NearPaymentEventResultFragment)>;
|
|
818
844
|
});
|
|
819
845
|
export type GetNearPaymentsQueryVariables = Exact<{
|
|
820
846
|
reference: Scalars['String'];
|
|
@@ -826,16 +852,21 @@ export type GetNearPaymentsQuery = ({
|
|
|
826
852
|
} & {
|
|
827
853
|
payments: Array<({
|
|
828
854
|
__typename?: 'Payment';
|
|
829
|
-
} & Pick<Payment, 'amount' | 'block' | 'receiptId' | 'feeAmount' | 'feeAddress' | 'from' | 'timestamp'>)>;
|
|
855
|
+
} & Pick<Payment, 'amount' | 'currency' | 'block' | 'receiptId' | 'feeAmount' | 'feeAddress' | 'from' | 'timestamp' | 'gasPrice' | 'gasUsed'>)>;
|
|
830
856
|
});
|
|
857
|
+
export declare const NearPaymentEventResultFragmentDoc: import("graphql/language/ast").DocumentNode;
|
|
831
858
|
export declare const GetAnyToNativePaymentsDocument: import("graphql/language/ast").DocumentNode;
|
|
859
|
+
export declare const GetFungibleTokenPaymentsDocument: import("graphql/language/ast").DocumentNode;
|
|
832
860
|
export declare const GetNearPaymentsDocument: import("graphql/language/ast").DocumentNode;
|
|
833
861
|
export type SdkFunctionWrapper = <T>(action: (requestHeaders?: Record<string, string>) => Promise<T>, operationName: string) => Promise<T>;
|
|
834
862
|
export declare function getSdk(client: GraphQLClient, withWrapper?: SdkFunctionWrapper): {
|
|
835
863
|
GetAnyToNativePayments(variables: GetAnyToNativePaymentsQueryVariables, requestHeaders?: Dom.RequestInit["headers"]): Promise<GetAnyToNativePaymentsQuery>;
|
|
864
|
+
GetFungibleTokenPayments(variables: GetFungibleTokenPaymentsQueryVariables, requestHeaders?: Dom.RequestInit["headers"]): Promise<GetFungibleTokenPaymentsQuery>;
|
|
836
865
|
GetNearPayments(variables: GetNearPaymentsQueryVariables, requestHeaders?: Dom.RequestInit["headers"]): Promise<GetNearPaymentsQuery>;
|
|
837
866
|
};
|
|
838
867
|
export type Sdk = ReturnType<typeof getSdk>;
|
|
868
|
+
export declare const NearPaymentEventResult: import("graphql/language/ast").DocumentNode;
|
|
839
869
|
export declare const GetAnyToNativePayments: import("graphql/language/ast").DocumentNode;
|
|
870
|
+
export declare const GetFungibleTokenPayments: import("graphql/language/ast").DocumentNode;
|
|
840
871
|
export declare const GetNearPayments: import("graphql/language/ast").DocumentNode;
|
|
841
872
|
//# sourceMappingURL=graphql-near.d.ts.map
|