@funkit/api-base 0.0.2 → 0.0.4
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/CHANGELOG.md +13 -0
- package/dist/src/consts/api.d.ts +1 -0
- package/dist/src/consts/api.js +2 -1
- package/dist/src/consts/api.js.map +1 -1
- package/dist/src/services/assets/endpoints.js +6 -7
- package/dist/src/services/assets/endpoints.js.map +1 -1
- package/dist/src/services/assets/types.d.ts +10 -5
- package/dist/src/services/checkout/endpoints.d.ts +2 -1
- package/dist/src/services/checkout/endpoints.js +26 -8
- package/dist/src/services/checkout/endpoints.js.map +1 -1
- package/dist/src/services/checkout/types.d.ts +9 -1
- package/dist/src/services/checkout/types.js +1 -0
- package/dist/src/services/checkout/types.js.map +1 -1
- package/dist/src/services/faucet/endpoints.d.ts +2 -0
- package/dist/src/services/faucet/endpoints.js +12 -0
- package/dist/src/services/faucet/endpoints.js.map +1 -0
- package/dist/src/services/faucet/index.d.ts +2 -0
- package/dist/src/services/faucet/index.js +19 -0
- package/dist/src/services/faucet/index.js.map +1 -0
- package/dist/src/services/faucet/types.d.ts +6 -0
- package/dist/src/services/faucet/types.js +3 -0
- package/dist/src/services/faucet/types.js.map +1 -0
- package/dist/src/services/index.d.ts +3 -0
- package/dist/src/services/index.js +3 -0
- package/dist/src/services/index.js.map +1 -1
- package/dist/src/services/mesh/endpoints.d.ts +2 -2
- package/dist/src/services/mesh/endpoints.js +5 -6
- package/dist/src/services/mesh/endpoints.js.map +1 -1
- package/dist/src/services/mesh/types.d.ts +31 -4
- package/dist/src/services/mesh/types.js +20 -0
- package/dist/src/services/mesh/types.js.map +1 -1
- package/dist/src/services/moonpay/endpoints.d.ts +9 -1
- package/dist/src/services/moonpay/endpoints.js +42 -3
- package/dist/src/services/moonpay/endpoints.js.map +1 -1
- package/dist/src/services/moonpay/types.d.ts +33 -0
- package/dist/src/services/support/endpoints.d.ts +2 -0
- package/dist/src/services/support/endpoints.js +20 -0
- package/dist/src/services/support/endpoints.js.map +1 -0
- package/dist/src/services/support/index.d.ts +2 -0
- package/dist/src/services/support/index.js +19 -0
- package/dist/src/services/support/index.js.map +1 -0
- package/dist/src/services/support/types.d.ts +6 -0
- package/dist/src/services/support/types.js +3 -0
- package/dist/src/services/support/types.js.map +1 -0
- package/dist/src/services/turnkey/endpoints.d.ts +3 -0
- package/dist/src/services/turnkey/endpoints.js +26 -0
- package/dist/src/services/turnkey/endpoints.js.map +1 -0
- package/dist/src/services/turnkey/index.d.ts +2 -0
- package/dist/src/services/turnkey/index.js +19 -0
- package/dist/src/services/turnkey/index.js.map +1 -0
- package/dist/src/services/turnkey/types.d.ts +12 -0
- package/dist/src/services/turnkey/types.js +3 -0
- package/dist/src/services/turnkey/types.js.map +1 -0
- package/dist/src/utils/checkout.d.ts +1 -0
- package/dist/src/utils/checkout.js +5 -5
- package/dist/src/utils/checkout.js.map +1 -1
- package/dist/src/utils/request.js +5 -5
- package/dist/src/utils/request.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @funkit/api-base
|
|
2
2
|
|
|
3
|
+
## 0.0.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 3a65cb2: feat: new checkout state
|
|
8
|
+
- 10819e5: feat: deactivate checkout api
|
|
9
|
+
|
|
10
|
+
## 0.0.3
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- ad4a3ce: chore: add unit tests for checkout utils
|
|
15
|
+
|
|
3
16
|
## 0.0.2
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
package/dist/src/consts/api.d.ts
CHANGED
package/dist/src/consts/api.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.API_BASE_URL = void 0;
|
|
3
|
+
exports.FUN_FAUCET_URL = exports.API_BASE_URL = void 0;
|
|
4
4
|
exports.API_BASE_URL = process.env.NODE_ENV === 'staging'
|
|
5
5
|
? 'https://api.fun.xyz/staging/v1'
|
|
6
6
|
: process.env.NODE_ENV === 'testing'
|
|
@@ -9,4 +9,5 @@ exports.API_BASE_URL = process.env.NODE_ENV === 'staging'
|
|
|
9
9
|
? 'http://127.0.0.1:3000'
|
|
10
10
|
: // Production
|
|
11
11
|
'https://api.fun.xyz/v1';
|
|
12
|
+
exports.FUN_FAUCET_URL = 'https://api.fun.xyz/demo-faucet';
|
|
12
13
|
//# sourceMappingURL=api.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.js","sourceRoot":"","sources":["../../../src/consts/api.ts"],"names":[],"mappings":";;;AAAa,QAAA,YAAY,GACvB,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,SAAS;IAChC,CAAC,CAAC,gCAAgC;IAClC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,SAAS;QACpC,CAAC,CAAC,gCAAgC;QAClC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,OAAO;YAClC,CAAC,CAAC,uBAAuB;YACzB,CAAC,CAAC,aAAa;gBACb,wBAAwB,CAAA"}
|
|
1
|
+
{"version":3,"file":"api.js","sourceRoot":"","sources":["../../../src/consts/api.ts"],"names":[],"mappings":";;;AAAa,QAAA,YAAY,GACvB,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,SAAS;IAChC,CAAC,CAAC,gCAAgC;IAClC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,SAAS;QACpC,CAAC,CAAC,gCAAgC;QAClC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,OAAO;YAClC,CAAC,CAAC,uBAAuB;YACzB,CAAC,CAAC,aAAa;gBACb,wBAAwB,CAAA;AAEjB,QAAA,cAAc,GAAG,iCAAiC,CAAA"}
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.getAssetPriceInfo = getAssetPriceInfo;
|
|
4
|
+
exports.getAllWalletTokens = getAllWalletTokens;
|
|
5
|
+
exports.getAllWalletTokensByChainId = getAllWalletTokensByChainId;
|
|
6
|
+
exports.getAllWalletNFTs = getAllWalletNFTs;
|
|
7
|
+
exports.getAllWalletNFTsByChainId = getAllWalletNFTsByChainId;
|
|
8
|
+
exports.getWalletLidoWithdrawalsByChainId = getWalletLidoWithdrawalsByChainId;
|
|
4
9
|
const consts_1 = require("../../consts");
|
|
5
10
|
const utils_1 = require("../../utils");
|
|
6
11
|
/**===========================================================
|
|
@@ -21,7 +26,6 @@ async function getAssetPriceInfo({ chainId, assetTokenAddress, apiKey, }) {
|
|
|
21
26
|
});
|
|
22
27
|
return priceInfo;
|
|
23
28
|
}
|
|
24
|
-
exports.getAssetPriceInfo = getAssetPriceInfo;
|
|
25
29
|
/**
|
|
26
30
|
* Get all tokens for a given wallet address
|
|
27
31
|
* @param walletAddress
|
|
@@ -35,7 +39,6 @@ async function getAllWalletTokens({ walletAddress, onlyVerifiedTokens, apiKey, }
|
|
|
35
39
|
retryOptions: { maxAttempts: 2 },
|
|
36
40
|
});
|
|
37
41
|
}
|
|
38
|
-
exports.getAllWalletTokens = getAllWalletTokens;
|
|
39
42
|
/**
|
|
40
43
|
* Get all tokens for a given wallet address on a specific chain
|
|
41
44
|
* @param chainId https://chainlist.org/
|
|
@@ -50,7 +53,6 @@ async function getAllWalletTokensByChainId({ chainId, walletAddress, onlyVerifie
|
|
|
50
53
|
retryOptions: { maxAttempts: 2 },
|
|
51
54
|
});
|
|
52
55
|
}
|
|
53
|
-
exports.getAllWalletTokensByChainId = getAllWalletTokensByChainId;
|
|
54
56
|
/**=======================
|
|
55
57
|
* POTENTIAL DEPRECATION
|
|
56
58
|
*=======================*/
|
|
@@ -65,7 +67,6 @@ async function getAllWalletNFTs({ walletAddress, apiKey, }) {
|
|
|
65
67
|
apiKey,
|
|
66
68
|
});
|
|
67
69
|
}
|
|
68
|
-
exports.getAllWalletNFTs = getAllWalletNFTs;
|
|
69
70
|
/**
|
|
70
71
|
* Get all the NFTs owned by a wallet on a specific chain
|
|
71
72
|
* @param chainId From https://chainlist.org/
|
|
@@ -78,7 +79,6 @@ async function getAllWalletNFTsByChainId({ chainId, walletAddress, apiKey, }) {
|
|
|
78
79
|
apiKey,
|
|
79
80
|
});
|
|
80
81
|
}
|
|
81
|
-
exports.getAllWalletNFTsByChainId = getAllWalletNFTsByChainId;
|
|
82
82
|
/**
|
|
83
83
|
* Get all lido withdrawal request ids for a wallet address on a specific chain
|
|
84
84
|
* @param {string} chainId https://chainlist.org/ ie "1" for ethereum
|
|
@@ -91,5 +91,4 @@ async function getWalletLidoWithdrawalsByChainId({ chainId, walletAddress, apiKe
|
|
|
91
91
|
apiKey,
|
|
92
92
|
});
|
|
93
93
|
}
|
|
94
|
-
exports.getWalletLidoWithdrawalsByChainId = getWalletLidoWithdrawalsByChainId;
|
|
95
94
|
//# sourceMappingURL=endpoints.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"endpoints.js","sourceRoot":"","sources":["../../../../src/services/assets/endpoints.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"endpoints.js","sourceRoot":"","sources":["../../../../src/services/assets/endpoints.ts"],"names":[],"mappings":";;AA4BA,8CAWC;AAQD,gDAUC;AASD,kEAWC;AAWD,4CAQC;AAQD,8DASC;AAQD,8EASC;AAlID,yCAA2C;AAC3C,uCAA4C;AAgB5C;;;+DAG+D;AAE/D;;;;;GAKG;AACI,KAAK,UAAU,iBAAiB,CAAC,EACtC,OAAO,EACP,iBAAiB,EACjB,MAAM,GACmB;IACzB,MAAM,SAAS,GAAG,MAAM,IAAA,sBAAc,EAAC;QACrC,GAAG,EAAE,GAAG,qBAAY,sBAAs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AAiC,CAAC,EACtD,OAAO,EACP,aAAa,EACb,MAAM,GAC4B;IAClC,OAAO,MAAM,IAAA,sBAAc,EAAC;QAC1B,GAAG,EAAE,GAAG,qBAAY,4BAA4B,aAAa,IAAI,OAAO,EAAE;QAC1E,MAAM;KACP,CAAC,CAAA;AACJ,CAAC"}
|
|
@@ -14,7 +14,7 @@ export interface GetAllWalletTokensRequest {
|
|
|
14
14
|
onlyVerifiedTokens: boolean;
|
|
15
15
|
apiKey: string;
|
|
16
16
|
}
|
|
17
|
-
interface AssetBalanceInfo {
|
|
17
|
+
export interface AssetBalanceInfo {
|
|
18
18
|
chainId: string;
|
|
19
19
|
contractAddress: string;
|
|
20
20
|
decimals: number;
|
|
@@ -25,7 +25,7 @@ interface AssetBalanceInfo {
|
|
|
25
25
|
tokenBalance: string;
|
|
26
26
|
totalUsdValue: number | null;
|
|
27
27
|
}
|
|
28
|
-
interface ChainAssetBalanceInfo {
|
|
28
|
+
export interface ChainAssetBalanceInfo {
|
|
29
29
|
[tokenAddress: string]: AssetBalanceInfo;
|
|
30
30
|
}
|
|
31
31
|
export interface GetAllWalletTokensResponse {
|
|
@@ -42,20 +42,25 @@ export interface GetAllWalletNFTsRequest {
|
|
|
42
42
|
walletAddress: string;
|
|
43
43
|
apiKey: string;
|
|
44
44
|
}
|
|
45
|
-
interface ChainNFTInfo {
|
|
45
|
+
export interface ChainNFTInfo {
|
|
46
46
|
address: string;
|
|
47
47
|
token_id: string;
|
|
48
48
|
floor_price: string;
|
|
49
49
|
}
|
|
50
|
-
export interface
|
|
50
|
+
export interface ChainToNFTMapInfo {
|
|
51
51
|
[chainId: string]: ChainNFTInfo[];
|
|
52
52
|
}
|
|
53
|
+
export interface GetAllWalletNFTsResponse {
|
|
54
|
+
nfts: ChainToNFTMapInfo;
|
|
55
|
+
}
|
|
53
56
|
export interface GetAllWalletNFTsByChainIdRequest {
|
|
54
57
|
chainId: string;
|
|
55
58
|
walletAddress: string;
|
|
56
59
|
apiKey: string;
|
|
57
60
|
}
|
|
58
|
-
export
|
|
61
|
+
export interface GetAllWalletNFTsByChainIdResponse {
|
|
62
|
+
nfts: ChainNFTInfo[];
|
|
63
|
+
}
|
|
59
64
|
export interface GetWalletLidoWithdrawalsByChainId {
|
|
60
65
|
chainId: string;
|
|
61
66
|
walletAddress: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Address } from 'viem';
|
|
2
|
-
import { CheckoutHistoryItem, CheckoutInitParams, CheckoutQuoteParams, CheckoutQuoteResponse, CheckoutTransferSponsorshipParams, CheckoutTransferSponsorshipResponse } from './types';
|
|
2
|
+
import { CheckoutDeactivateParams, CheckoutHistoryItem, CheckoutInitParams, CheckoutQuoteParams, CheckoutQuoteResponse, CheckoutTransferSponsorshipParams, CheckoutTransferSponsorshipResponse } from './types';
|
|
3
3
|
/**
|
|
4
4
|
* Gets a checkout quote (estimation).
|
|
5
5
|
* @param fromChainId The ID of the chain where funds will be provided from.
|
|
@@ -22,6 +22,7 @@ export declare function getCheckoutQuote({ fromChainId, fromTokenAddress, fromTo
|
|
|
22
22
|
* @return {Address} The generated deposit address
|
|
23
23
|
*/
|
|
24
24
|
export declare function initializeCheckout({ userOp, quoteId, sourceOfFund, apiKey, clientMetadata, }: CheckoutInitParams): Promise<Address>;
|
|
25
|
+
export declare function deactivateCheckout({ depositAddress, apiKey, }: CheckoutDeactivateParams): Promise<boolean>;
|
|
25
26
|
/**
|
|
26
27
|
* Gets a checkout given a depositAddress
|
|
27
28
|
* @param depositAddress A unique deposit address associated with a backend checkout item.
|
|
@@ -3,11 +3,18 @@ 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.
|
|
6
|
+
exports.getCheckoutQuote = getCheckoutQuote;
|
|
7
|
+
exports.initializeCheckout = initializeCheckout;
|
|
8
|
+
exports.deactivateCheckout = deactivateCheckout;
|
|
9
|
+
exports.getCheckoutByDepositAddress = getCheckoutByDepositAddress;
|
|
10
|
+
exports.getCheckoutsByFunWalletAddress = getCheckoutsByFunWalletAddress;
|
|
11
|
+
exports.getCheckoutsByRecipientAddress = getCheckoutsByRecipientAddress;
|
|
12
|
+
exports.getPaymasterDataForCheckoutSponsoredTransfer = getPaymasterDataForCheckoutSponsoredTransfer;
|
|
7
13
|
const big_js_1 = __importDefault(require("big.js"));
|
|
8
14
|
const consts_1 = require("../../consts");
|
|
9
15
|
const errors_1 = require("../../errors");
|
|
10
16
|
const utils_1 = require("../../utils");
|
|
17
|
+
const types_1 = require("./types");
|
|
11
18
|
/**
|
|
12
19
|
* Gets a checkout quote (estimation).
|
|
13
20
|
* @param fromChainId The ID of the chain where funds will be provided from.
|
|
@@ -38,6 +45,7 @@ async function getCheckoutQuote({ fromChainId, fromTokenAddress, fromTokenDecima
|
|
|
38
45
|
// Note: Rounding *down* instead of a regular round to safeguard against edge case of timing passing frontend range validation but failing backend range validation
|
|
39
46
|
checkoutExpirationTimestampSeconds: (0, utils_1.roundToNearestBottomTenth)(Math.round((Date.now() + expirationTimestampMs) / 1000)).toString(),
|
|
40
47
|
sponsorInitialTransferGasLimit,
|
|
48
|
+
// @deprecated Not in use
|
|
41
49
|
refuel: needsRefuel.toString(),
|
|
42
50
|
};
|
|
43
51
|
const searchParams = new URLSearchParams(queryParams);
|
|
@@ -73,7 +81,6 @@ async function getCheckoutQuote({ fromChainId, fromTokenAddress, fromTokenDecima
|
|
|
73
81
|
throw new Error(`An error occured trying to generate a checkout quote: ${err.message}`);
|
|
74
82
|
}
|
|
75
83
|
}
|
|
76
|
-
exports.getCheckoutQuote = getCheckoutQuote;
|
|
77
84
|
/**
|
|
78
85
|
* Initializes a checkout
|
|
79
86
|
* @param userOp The checkout UserOp, signed.
|
|
@@ -99,7 +106,22 @@ async function initializeCheckout({ userOp, quoteId, sourceOfFund, apiKey, clien
|
|
|
99
106
|
}
|
|
100
107
|
return res.depositAddr;
|
|
101
108
|
}
|
|
102
|
-
|
|
109
|
+
async function deactivateCheckout({ depositAddress, apiKey, }) {
|
|
110
|
+
try {
|
|
111
|
+
await (0, utils_1.sendPostRequest)({
|
|
112
|
+
uri: `${consts_1.API_BASE_URL}/checkout/${depositAddress}`,
|
|
113
|
+
body: {
|
|
114
|
+
// Fixed state to cancel the checkout
|
|
115
|
+
state: types_1.CheckoutState.CANCELLED,
|
|
116
|
+
},
|
|
117
|
+
apiKey,
|
|
118
|
+
});
|
|
119
|
+
return true;
|
|
120
|
+
}
|
|
121
|
+
catch (err) {
|
|
122
|
+
throw new Error('Unable to deactivate checkout');
|
|
123
|
+
}
|
|
124
|
+
}
|
|
103
125
|
/**
|
|
104
126
|
* Gets a checkout given a depositAddress
|
|
105
127
|
* @param depositAddress A unique deposit address associated with a backend checkout item.
|
|
@@ -120,7 +142,6 @@ async function getCheckoutByDepositAddress({ depositAddress, apiKey, }) {
|
|
|
120
142
|
throw err;
|
|
121
143
|
}
|
|
122
144
|
}
|
|
123
|
-
exports.getCheckoutByDepositAddress = getCheckoutByDepositAddress;
|
|
124
145
|
/**
|
|
125
146
|
* Gets all checkouts associated with a funWallet
|
|
126
147
|
* @param funWalletAddress A funWallet address.
|
|
@@ -134,7 +155,6 @@ async function getCheckoutsByFunWalletAddress({ funWalletAddress, apiKey, }) {
|
|
|
134
155
|
});
|
|
135
156
|
return res || [];
|
|
136
157
|
}
|
|
137
|
-
exports.getCheckoutsByFunWalletAddress = getCheckoutsByFunWalletAddress;
|
|
138
158
|
/**
|
|
139
159
|
* Gets all checkouts associated with a recipient address
|
|
140
160
|
* @param recipientAddress A wallet address.
|
|
@@ -148,14 +168,13 @@ async function getCheckoutsByRecipientAddress({ recipientAddress, apiKey, }) {
|
|
|
148
168
|
});
|
|
149
169
|
return res || [];
|
|
150
170
|
}
|
|
151
|
-
exports.getCheckoutsByRecipientAddress = getCheckoutsByRecipientAddress;
|
|
152
171
|
async function getPaymasterDataForCheckoutSponsoredTransfer({ depositAddress, transferUserOp, apiKey, }) {
|
|
153
172
|
const body = {
|
|
154
173
|
depositAddress,
|
|
155
174
|
userOp: transferUserOp,
|
|
156
175
|
};
|
|
157
176
|
const res = await (0, utils_1.sendPostRequest)({
|
|
158
|
-
uri: `${consts_1.API_BASE_URL}/checkout/
|
|
177
|
+
uri: `${consts_1.API_BASE_URL}/checkout/sponsor-transfer`,
|
|
159
178
|
body,
|
|
160
179
|
apiKey,
|
|
161
180
|
});
|
|
@@ -165,5 +184,4 @@ async function getPaymasterDataForCheckoutSponsoredTransfer({ depositAddress, tr
|
|
|
165
184
|
}
|
|
166
185
|
return res;
|
|
167
186
|
}
|
|
168
|
-
exports.getPaymasterDataForCheckoutSponsoredTransfer = getPaymasterDataForCheckoutSponsoredTransfer;
|
|
169
187
|
//# sourceMappingURL=endpoints.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"endpoints.js","sourceRoot":"","sources":["../../../../src/services/checkout/endpoints.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"endpoints.js","sourceRoot":"","sources":["../../../../src/services/checkout/endpoints.ts"],"names":[],"mappings":";;;;;AAwCA,4CAsEC;AASD,gDA6BC;AAED,gDAiBC;AAQD,kEAkBC;AAQD,wEAYC;AAQD,wEAYC;AAED,oGAmBC;AA9PD,oDAAwB;AAGxB,yCAA2C;AAC3C,yCAA+D;AAC/D,uCAKoB;AACpB,mCAcgB;AAEhB;;;;;;;;;;;;GAYG;AACI,KAAK,UAAU,gBAAgB,CAAC,EACrC,WAAW,EACX,gBAAgB,EAChB,iBAAiB,EACjB,SAAS,EACT,cAAc,EACd,eAAe,EACf,aAAa,EACb,qBAAqB,EACrB,8BAA8B,EAC9B,aAAa,EACb,WAAW,EACX,MAAM,GACc;IACpB,IAAI,CAAC;QACH,MAAM,WAAW,GAAG,EAAE,IAAI,eAAe,CAAA;QACzC,MAAM,kBAAkB,GAAG,MAAM,CAAC,IAAI,CA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AAEM,KAAK,UAAU,4CAA4C,CAAC,EACjE,cAAc,EACd,cAAc,EACd,MAAM,GAC4B;IAClC,MAAM,IAAI,GAAG;QACX,cAAc;QACd,MAAM,EAAE,cAAc;KACiB,CAAA;IACzC,MAAM,GAAG,GAAG,MAAM,IAAA,uBAAe,EAAC;QAChC,GAAG,EAAE,GAAG,qBAAY,4BAA4B;QAChD,IAAI;QACJ,MAAM;KACP,CAAC,CAAA;IACF,IAAI,CAAC,GAAG,EAAE,CAAC;QACT,8BAA8B;QAC9B,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAA;IAC1D,CAAC;IACD,OAAO,GAA0C,CAAA;AACnD,CAAC"}
|
|
@@ -52,6 +52,13 @@ export type CheckoutInitParams = Omit<CheckoutApiInitParams, 'salt'> & {
|
|
|
52
52
|
apiKey: string;
|
|
53
53
|
};
|
|
54
54
|
export type CheckoutInitResponse = Address;
|
|
55
|
+
/**=====================*
|
|
56
|
+
* CHECKOUT DEACTIVATE *
|
|
57
|
+
*======================*/
|
|
58
|
+
export type CheckoutDeactivateParams = {
|
|
59
|
+
depositAddress: Address;
|
|
60
|
+
apiKey: string;
|
|
61
|
+
};
|
|
55
62
|
export declare enum CheckoutState {
|
|
56
63
|
FROM_UNFUNDED = "FROM_UNFUNDED",
|
|
57
64
|
FROM_FUNDED = "FROM_FUNDED",
|
|
@@ -63,7 +70,8 @@ export declare enum CheckoutState {
|
|
|
63
70
|
PENDING_RECEIVAL = "PENDING_RECEIVAL",
|
|
64
71
|
COMPLETED = "COMPLETED",
|
|
65
72
|
CHECKOUT_ERROR = "CHECKOUT_ERROR",
|
|
66
|
-
EXPIRED = "EXPIRED"
|
|
73
|
+
EXPIRED = "EXPIRED",
|
|
74
|
+
CANCELLED = "CANCELLED"
|
|
67
75
|
}
|
|
68
76
|
export type CheckoutHistoryItem = {
|
|
69
77
|
createdTimeMs: number;
|
|
@@ -17,5 +17,6 @@ var CheckoutState;
|
|
|
17
17
|
CheckoutState["COMPLETED"] = "COMPLETED";
|
|
18
18
|
CheckoutState["CHECKOUT_ERROR"] = "CHECKOUT_ERROR";
|
|
19
19
|
CheckoutState["EXPIRED"] = "EXPIRED";
|
|
20
|
+
CheckoutState["CANCELLED"] = "CANCELLED";
|
|
20
21
|
})(CheckoutState || (exports.CheckoutState = CheckoutState = {}));
|
|
21
22
|
//# sourceMappingURL=types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/services/checkout/types.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/services/checkout/types.ts"],"names":[],"mappings":";;;AAgFA,6HAA6H;AAC7H,IAAY,aAeX;AAfD,WAAY,aAAa;IACvB,qBAAqB;IACrB,gDAA+B,CAAA;IAC/B,4CAA2B,CAAA;IAC3B,4CAA2B,CAAA;IAC3B,4CAA2B,CAAA;IAC3B,wCAAuB,CAAA;IACvB,wCAAuB,CAAA;IACvB,sCAAqB,CAAA;IACrB,sDAAqC,CAAA;IACrC,kBAAkB;IAClB,wCAAuB,CAAA;IACvB,kDAAiC,CAAA;IACjC,oCAAmB,CAAA;IACnB,wCAAuB,CAAA;AACzB,CAAC,EAfW,aAAa,6BAAb,aAAa,QAexB"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getAssetFromFaucet = getAssetFromFaucet;
|
|
4
|
+
const consts_1 = require("../../consts");
|
|
5
|
+
const utils_1 = require("../../utils");
|
|
6
|
+
async function getAssetFromFaucet({ token, chain, walletAddress, apiKey, }) {
|
|
7
|
+
return await (0, utils_1.sendGetRequest)({
|
|
8
|
+
uri: `${consts_1.FUN_FAUCET_URL}/get-faucet?token=${token}&testnet=${chain}&addr=${walletAddress}`,
|
|
9
|
+
apiKey,
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=endpoints.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"endpoints.js","sourceRoot":"","sources":["../../../../src/services/faucet/endpoints.ts"],"names":[],"mappings":";;AAIA,gDAUC;AAdD,yCAA6C;AAC7C,uCAA4C;AAGrC,KAAK,UAAU,kBAAkB,CAAC,EACvC,KAAK,EACL,KAAK,EACL,aAAa,EACb,MAAM,GACoB;IAC1B,OAAO,MAAM,IAAA,sBAAc,EAAC;QAC1B,GAAG,EAAE,GAAG,uBAAc,qBAAqB,KAAK,YAAY,KAAK,SAAS,aAAa,EAAE;QACzF,MAAM;KACP,CAAC,CAAA;AACJ,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./endpoints"), exports);
|
|
18
|
+
__exportStar(require("./types"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/services/faucet/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA2B;AAC3B,0CAAuB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/services/faucet/types.ts"],"names":[],"mappings":""}
|
|
@@ -16,6 +16,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./assets"), exports);
|
|
18
18
|
__exportStar(require("./checkout"), exports);
|
|
19
|
+
__exportStar(require("./faucet"), exports);
|
|
19
20
|
__exportStar(require("./mesh"), exports);
|
|
20
21
|
__exportStar(require("./moonpay"), exports);
|
|
22
|
+
__exportStar(require("./support"), exports);
|
|
23
|
+
__exportStar(require("./turnkey"), exports);
|
|
21
24
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/services/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAwB;AACxB,6CAA0B;AAC1B,yCAAsB;AACtB,4CAAyB"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/services/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAwB;AACxB,6CAA0B;AAC1B,2CAAwB;AACxB,yCAAsB;AACtB,4CAAyB;AACzB,4CAAyB;AACzB,4CAAyB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { GetCryptocurrencyHoldingsRequest, GetLinkTokenRequest, GetLinkTokenResponse, GetTransferIntegrationsRequest, GetTransferIntegrationsResponse, MeshExecuteTransferRequest, MeshExecuteTransferResponse, PreviewTransferRequest } from './types';
|
|
2
2
|
/**
|
|
3
3
|
* @param authToken The authentication token to send the asset from.
|
|
4
4
|
* @param type The type of the integration to send the asset from.
|
|
@@ -42,4 +42,4 @@ export declare function meshPreviewTransfer({ fromAuthToken, fromType, toAuthTok
|
|
|
42
42
|
* @param mfaCode Multi-factor auth code that should be provided if the status of the transfer was MfaRequired.
|
|
43
43
|
* @returns https://docs.meshconnect.com/reference/post_api-v1-transfers-managed-execute
|
|
44
44
|
*/
|
|
45
|
-
export declare function meshExecuteTransfer({ fromAuthToken, fromType, previewId, mfaCode, apiKey, }:
|
|
45
|
+
export declare function meshExecuteTransfer({ fromAuthToken, fromType, previewId, mfaCode, apiKey, }: MeshExecuteTransferRequest): Promise<MeshExecuteTransferResponse>;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.meshGetCryptocurrencyHoldings = meshGetCryptocurrencyHoldings;
|
|
4
|
+
exports.meshGetTransferIntegrations = meshGetTransferIntegrations;
|
|
5
|
+
exports.meshGetLinkToken = meshGetLinkToken;
|
|
6
|
+
exports.meshPreviewTransfer = meshPreviewTransfer;
|
|
7
|
+
exports.meshExecuteTransfer = meshExecuteTransfer;
|
|
4
8
|
const consts_1 = require("../../consts");
|
|
5
9
|
const utils_1 = require("../../utils");
|
|
6
10
|
/**
|
|
@@ -16,7 +20,6 @@ async function meshGetCryptocurrencyHoldings({ authToken, type, apiKey, }) {
|
|
|
16
20
|
});
|
|
17
21
|
return res;
|
|
18
22
|
}
|
|
19
|
-
exports.meshGetCryptocurrencyHoldings = meshGetCryptocurrencyHoldings;
|
|
20
23
|
/**
|
|
21
24
|
* @return https://docs.meshconnect.com/reference/get_api-v1-transfers-managed-integrations
|
|
22
25
|
*/
|
|
@@ -27,7 +30,6 @@ async function meshGetTransferIntegrations({ apiKey, }) {
|
|
|
27
30
|
});
|
|
28
31
|
return res;
|
|
29
32
|
}
|
|
30
|
-
exports.meshGetTransferIntegrations = meshGetTransferIntegrations;
|
|
31
33
|
/**
|
|
32
34
|
* @param userId A unique Id representing the end user. Typically this will be a user Id from the
|
|
33
35
|
client application. Personally identifiable information, such as an email address or phone number,
|
|
@@ -56,7 +58,6 @@ async function meshGetLinkToken({ userId, integrationId, restrictMultipleAccount
|
|
|
56
58
|
});
|
|
57
59
|
return res;
|
|
58
60
|
}
|
|
59
|
-
exports.meshGetLinkToken = meshGetLinkToken;
|
|
60
61
|
/**
|
|
61
62
|
* @param fromAuthToken The authentication token to send the asset from.
|
|
62
63
|
* @param fromType The type of the integration to send the asset from.
|
|
@@ -104,7 +105,6 @@ async function meshPreviewTransfer({ fromAuthToken, fromType, toAuthToken, toTyp
|
|
|
104
105
|
});
|
|
105
106
|
return res;
|
|
106
107
|
}
|
|
107
|
-
exports.meshPreviewTransfer = meshPreviewTransfer;
|
|
108
108
|
/**
|
|
109
109
|
*
|
|
110
110
|
* @param fromAuthToken The authentication token to send the asset from.
|
|
@@ -125,5 +125,4 @@ async function meshExecuteTransfer({ fromAuthToken, fromType, previewId, mfaCode
|
|
|
125
125
|
});
|
|
126
126
|
return res;
|
|
127
127
|
}
|
|
128
|
-
exports.meshExecuteTransfer = meshExecuteTransfer;
|
|
129
128
|
//# sourceMappingURL=endpoints.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"endpoints.js","sourceRoot":"","sources":["../../../../src/services/mesh/endpoints.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"endpoints.js","sourceRoot":"","sources":["../../../../src/services/mesh/endpoints.ts"],"names":[],"mappings":";;AAkBA,sEAWC;AAKD,kEAQC;AAYD,4CAuBC;AAeD,kDA8CC;AASD,kDAiBC;AApKD,yCAA2C;AAC3C,uCAA6D;AAY7D;;;;GAIG;AACI,KAAK,UAAU,6BAA6B,CAAC,EAClD,SAAS,EACT,IAAI,EACJ,MAAM,GAC2B;IACjC,MAAM,GAAG,GAAG,MAAM,IAAA,uBAAe,EAAC;QAChC,GAAG,EAAE,GAAG,qBAAY,oBAAoB;QACxC,IAAI,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE;QACzB,MAAM;KACP,CAAC,CA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AAM,GAAG,GAAG,MAAM,IAAA,uBAAe,EAAC;QAChC,GAAG,EAAE,GAAG,qBAAY,iCAAiC;QACrD,IAAI;QACJ,MAAM;KACP,CAAC,CAAA;IACF,OAAO,GAAG,CAAA;AACZ,CAAC"}
|
|
@@ -6,7 +6,7 @@ export interface GetCryptocurrencyHoldingsRequest {
|
|
|
6
6
|
export interface GetTransferIntegrationsRequest {
|
|
7
7
|
apiKey: string;
|
|
8
8
|
}
|
|
9
|
-
interface IntegrationNetworkInfo {
|
|
9
|
+
export interface IntegrationNetworkInfo {
|
|
10
10
|
chainId: string;
|
|
11
11
|
id: string;
|
|
12
12
|
logoUrl: string;
|
|
@@ -14,7 +14,7 @@ interface IntegrationNetworkInfo {
|
|
|
14
14
|
nativeSymbol: string;
|
|
15
15
|
supportedTokens: string[];
|
|
16
16
|
}
|
|
17
|
-
interface TransferIntegration {
|
|
17
|
+
export interface TransferIntegration {
|
|
18
18
|
networks: IntegrationNetworkInfo[];
|
|
19
19
|
supportsIncomingTransfers: boolean;
|
|
20
20
|
supportsOutgoingTransfers: boolean;
|
|
@@ -46,11 +46,38 @@ export interface PreviewTransferRequest {
|
|
|
46
46
|
amountInFiat?: string | null;
|
|
47
47
|
fiatCurrency?: string | null;
|
|
48
48
|
}
|
|
49
|
-
export interface
|
|
49
|
+
export interface MeshExecuteTransferRequest {
|
|
50
50
|
apiKey: string;
|
|
51
51
|
fromAuthToken: string;
|
|
52
52
|
fromType: string;
|
|
53
53
|
previewId: string;
|
|
54
54
|
mfaCode?: string | null;
|
|
55
55
|
}
|
|
56
|
-
export {
|
|
56
|
+
export declare enum MeshExecuteTransferStatus {
|
|
57
|
+
succeeded = "succeeded",
|
|
58
|
+
failed = "failed",
|
|
59
|
+
mfaRequired = "mfaRequired",
|
|
60
|
+
emailConfirmationRequired = "emailConfirmationRequired",
|
|
61
|
+
deviceConfirmationRequired = "deviceConfirmationRequired",
|
|
62
|
+
mfaFailed = "mfaFailed",
|
|
63
|
+
addressWhitelistRequired = "addressWhitelistRequired",
|
|
64
|
+
secondMfaRequired = "secondMfaRequired"
|
|
65
|
+
}
|
|
66
|
+
export declare enum MeshExecuteTransferMfaType {
|
|
67
|
+
unspecified = "unspecified",
|
|
68
|
+
phone = "phone",
|
|
69
|
+
email = "email",
|
|
70
|
+
otp = "otp"
|
|
71
|
+
}
|
|
72
|
+
export interface MeshExecuteTransferContent {
|
|
73
|
+
status: MeshExecuteTransferStatus;
|
|
74
|
+
mfaType: MeshExecuteTransferMfaType;
|
|
75
|
+
errorMessage: string | null;
|
|
76
|
+
executeTransferResult: object | null;
|
|
77
|
+
}
|
|
78
|
+
export interface MeshExecuteTransferResponse {
|
|
79
|
+
status: MeshExecuteTransferStatus;
|
|
80
|
+
mfaType: MeshExecuteTransferMfaType;
|
|
81
|
+
errorMessage: string | null;
|
|
82
|
+
executeTransferResult: object | null;
|
|
83
|
+
}
|
|
@@ -1,3 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MeshExecuteTransferMfaType = exports.MeshExecuteTransferStatus = void 0;
|
|
4
|
+
// Reference: https://docs.meshconnect.com/reference/post_api-v1-transfers-managed-execute
|
|
5
|
+
var MeshExecuteTransferStatus;
|
|
6
|
+
(function (MeshExecuteTransferStatus) {
|
|
7
|
+
MeshExecuteTransferStatus["succeeded"] = "succeeded";
|
|
8
|
+
MeshExecuteTransferStatus["failed"] = "failed";
|
|
9
|
+
MeshExecuteTransferStatus["mfaRequired"] = "mfaRequired";
|
|
10
|
+
MeshExecuteTransferStatus["emailConfirmationRequired"] = "emailConfirmationRequired";
|
|
11
|
+
MeshExecuteTransferStatus["deviceConfirmationRequired"] = "deviceConfirmationRequired";
|
|
12
|
+
MeshExecuteTransferStatus["mfaFailed"] = "mfaFailed";
|
|
13
|
+
MeshExecuteTransferStatus["addressWhitelistRequired"] = "addressWhitelistRequired";
|
|
14
|
+
MeshExecuteTransferStatus["secondMfaRequired"] = "secondMfaRequired";
|
|
15
|
+
})(MeshExecuteTransferStatus || (exports.MeshExecuteTransferStatus = MeshExecuteTransferStatus = {}));
|
|
16
|
+
var MeshExecuteTransferMfaType;
|
|
17
|
+
(function (MeshExecuteTransferMfaType) {
|
|
18
|
+
MeshExecuteTransferMfaType["unspecified"] = "unspecified";
|
|
19
|
+
MeshExecuteTransferMfaType["phone"] = "phone";
|
|
20
|
+
MeshExecuteTransferMfaType["email"] = "email";
|
|
21
|
+
MeshExecuteTransferMfaType["otp"] = "otp";
|
|
22
|
+
})(MeshExecuteTransferMfaType || (exports.MeshExecuteTransferMfaType = MeshExecuteTransferMfaType = {}));
|
|
3
23
|
//# sourceMappingURL=types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/services/mesh/types.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/services/mesh/types.ts"],"names":[],"mappings":";;;AAgEA,0FAA0F;AAC1F,IAAY,yBASX;AATD,WAAY,yBAAyB;IACnC,oDAAuB,CAAA;IACvB,8CAAiB,CAAA;IACjB,wDAA2B,CAAA;IAC3B,oFAAuD,CAAA;IACvD,sFAAyD,CAAA;IACzD,oDAAuB,CAAA;IACvB,kFAAqD,CAAA;IACrD,oEAAuC,CAAA;AACzC,CAAC,EATW,yBAAyB,yCAAzB,yBAAyB,QASpC;AAED,IAAY,0BAKX;AALD,WAAY,0BAA0B;IACpC,yDAA2B,CAAA;IAC3B,6CAAe,CAAA;IACf,6CAAe,CAAA;IACf,yCAAW,CAAA;AACb,CAAC,EALW,0BAA0B,0CAA1B,0BAA0B,QAKrC"}
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
-
import { GetMoonpayBuyQuoteForCreditCardRequest, GetMoonpayUrlSignatureRequest } from './types';
|
|
1
|
+
import { GetMoonpayBuyQuoteForCreditCardRequest, GetMoonpayOffRampUrlRequest, GetMoonpayOnRampUrlRequest, GetMoonpayUrlSignatureRequest, MoonpayCurrency } from './types';
|
|
2
2
|
export declare function getMoonpayUrlSignature({ url, isSandbox, apiKey, }: GetMoonpayUrlSignatureRequest): Promise<string>;
|
|
3
3
|
export declare function getMoonpayBuyQuoteForCreditCard({ currencyCode, baseCurrencyCode, quoteCurrencyAmount, baseCurrencyAmount, extraFeePercentage, areFeesIncluded, apiKey, }: GetMoonpayBuyQuoteForCreditCardRequest): Promise<any>;
|
|
4
|
+
/**=======================
|
|
5
|
+
* POTENTIAL DEPRECATION
|
|
6
|
+
*=======================*/
|
|
7
|
+
export declare function getMoonpayOnRampUrl({ apiKey, walletAddr, currencyCode, }: GetMoonpayOnRampUrlRequest): Promise<string>;
|
|
8
|
+
export declare function getMoonpayOffRampUrl({ walletAddr, apiKey, }: GetMoonpayOffRampUrlRequest): Promise<string>;
|
|
9
|
+
export declare function getMoonpayOnRampSupportedCurrencies({ apiKey, }: {
|
|
10
|
+
apiKey: string;
|
|
11
|
+
}): Promise<MoonpayCurrency[]>;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.getMoonpayUrlSignature = getMoonpayUrlSignature;
|
|
4
|
+
exports.getMoonpayBuyQuoteForCreditCard = getMoonpayBuyQuoteForCreditCard;
|
|
5
|
+
exports.getMoonpayOnRampUrl = getMoonpayOnRampUrl;
|
|
6
|
+
exports.getMoonpayOffRampUrl = getMoonpayOffRampUrl;
|
|
7
|
+
exports.getMoonpayOnRampSupportedCurrencies = getMoonpayOnRampSupportedCurrencies;
|
|
4
8
|
const consts_1 = require("../../consts");
|
|
5
9
|
const errors_1 = require("../../errors");
|
|
6
10
|
const utils_1 = require("../../utils");
|
|
@@ -15,7 +19,6 @@ async function getMoonpayUrlSignature({ url, isSandbox, apiKey, }) {
|
|
|
15
19
|
}
|
|
16
20
|
return signature.url;
|
|
17
21
|
}
|
|
18
|
-
exports.getMoonpayUrlSignature = getMoonpayUrlSignature;
|
|
19
22
|
async function getMoonpayBuyQuoteForCreditCard({ currencyCode, baseCurrencyCode, quoteCurrencyAmount, baseCurrencyAmount, extraFeePercentage, areFeesIncluded, apiKey, }) {
|
|
20
23
|
const params = new URLSearchParams({
|
|
21
24
|
currencyCode,
|
|
@@ -39,5 +42,41 @@ async function getMoonpayBuyQuoteForCreditCard({ currencyCode, baseCurrencyCode,
|
|
|
39
42
|
});
|
|
40
43
|
return res;
|
|
41
44
|
}
|
|
42
|
-
|
|
45
|
+
/**=======================
|
|
46
|
+
* POTENTIAL DEPRECATION
|
|
47
|
+
*=======================*/
|
|
48
|
+
async function getMoonpayOnRampUrl({ apiKey, walletAddr, currencyCode, }) {
|
|
49
|
+
const endpoint = `on-ramp/${walletAddr}?provider=moonpay`;
|
|
50
|
+
if (currencyCode) {
|
|
51
|
+
endpoint.concat(`¤cyCode=${currencyCode}`);
|
|
52
|
+
}
|
|
53
|
+
const url = (await (0, utils_1.sendGetRequest)({
|
|
54
|
+
uri: `${consts_1.API_BASE_URL}/${endpoint}`,
|
|
55
|
+
apiKey,
|
|
56
|
+
}))?.url;
|
|
57
|
+
if (!url) {
|
|
58
|
+
throw new errors_1.InternalFailureError(errors_1.ErrorCode.UnknownServerError, 'No onramp url found.', { walletAddr }, 'This is an internal error, please contact support.', 'https://docs.fun.xyz');
|
|
59
|
+
}
|
|
60
|
+
return url;
|
|
61
|
+
}
|
|
62
|
+
async function getMoonpayOffRampUrl({ walletAddr, apiKey, }) {
|
|
63
|
+
const url = (await (0, utils_1.sendGetRequest)({
|
|
64
|
+
uri: `${consts_1.API_BASE_URL}/off-ramp/${walletAddr}?provider=moonpay`,
|
|
65
|
+
apiKey,
|
|
66
|
+
}))?.url;
|
|
67
|
+
if (!url) {
|
|
68
|
+
throw new errors_1.InternalFailureError(errors_1.ErrorCode.UnknownServerError, 'No offramp url found.', { walletAddr }, 'This is an internal error, please contact support.', 'https://docs.fun.xyz');
|
|
69
|
+
}
|
|
70
|
+
return url;
|
|
71
|
+
}
|
|
72
|
+
async function getMoonpayOnRampSupportedCurrencies({ apiKey, }) {
|
|
73
|
+
const currencies = await (0, utils_1.sendGetRequest)({
|
|
74
|
+
uri: `${consts_1.API_BASE_URL}/on-ramp/moonpay-currencies`,
|
|
75
|
+
apiKey,
|
|
76
|
+
});
|
|
77
|
+
if (!currencies || !currencies.length) {
|
|
78
|
+
throw new errors_1.InternalFailureError(errors_1.ErrorCode.UnknownServerError, 'No supported currencies found.', {}, 'This is an internal error, please contact support.', 'https://docs.fun.xyz');
|
|
79
|
+
}
|
|
80
|
+
return currencies;
|
|
81
|
+
}
|
|
43
82
|
//# sourceMappingURL=endpoints.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"endpoints.js","sourceRoot":"","sources":["../../../../src/services/moonpay/endpoints.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"endpoints.js","sourceRoot":"","sources":["../../../../src/services/moonpay/endpoints.ts"],"names":[],"mappings":";;AAWA,wDAoBC;AAED,0EA+BC;AAMD,kDAyBC;AAED,oDAoBC;AAED,kFAmBC;AA1ID,yCAA2C;AAC3C,yCAA8D;AAC9D,uCAA6D;AAStD,KAAK,UAAU,sBAAsB,CAAC,EAC3C,GAAG,EACH,SAAS,EACT,MAAM,GACwB;IAC9B,MAAM,SAAS,GAAG,MAAM,IAAA,uBAAe,EAAC;QACtC,GAAG,EAAE,GAAG,qBAAY,6BAA6B;QACjD,IAAI,EAAE,EAAE,GAAG,EAAE,SAAS,EAAE;QACxB,MAAM;KACP,CAAC,CAAA;IACF,IAAI,CAAC,SAAS,IAAI,CAAC,SAAS,EAAE,GAAG,EAAE,CAAC;QAClC,MAAM,IAAI,6BAAoB,CAC5B,kBAAS,CAAC,kBAAkB,EAC5B,sBAAsB,EACtB,EAAE,GAAG,EAAE,EACP,oDAAoD,EACpD,sBAAsB,CACvB,CAAA;IACH,CAAC;IAC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
|
12
12
|
extraFeePercentage?: number;
|
|
13
13
|
areFeesIncluded?: boolean;
|
|
14
14
|
}
|
|
15
|
+
export interface GetMoonpayOnRampUrlRequest {
|
|
16
|
+
apiKey: string;
|
|
17
|
+
walletAddr: string;
|
|
18
|
+
currencyCode?: string;
|
|
19
|
+
}
|
|
20
|
+
export interface GetMoonpayOffRampUrlRequest {
|
|
21
|
+
apiKey: string;
|
|
22
|
+
walletAddr: string;
|
|
23
|
+
}
|
|
24
|
+
export interface MoonpayCurrency {
|
|
25
|
+
id: string;
|
|
26
|
+
name: string;
|
|
27
|
+
code: string;
|
|
28
|
+
createdAt?: string;
|
|
29
|
+
updatedAt?: string;
|
|
30
|
+
type?: string;
|
|
31
|
+
precision?: number;
|
|
32
|
+
addressRegex?: string;
|
|
33
|
+
testnetAddressRegex?: string;
|
|
34
|
+
maxAmount?: number;
|
|
35
|
+
maxBuyAmount?: number;
|
|
36
|
+
maxSellAmount?: number;
|
|
37
|
+
minAmount?: number;
|
|
38
|
+
minBuyAmount?: number;
|
|
39
|
+
minSellAmount?: number;
|
|
40
|
+
supportsAddressTag?: boolean;
|
|
41
|
+
addressTagRegex?: string;
|
|
42
|
+
supportsTestMode?: boolean;
|
|
43
|
+
isSuspended?: boolean;
|
|
44
|
+
isSupportedInUS?: boolean;
|
|
45
|
+
isSellSupported?: boolean;
|
|
46
|
+
notAllowedUSStates?: string[];
|
|
47
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.sendSupportMessage = sendSupportMessage;
|
|
4
|
+
const consts_1 = require("../../consts");
|
|
5
|
+
const utils_1 = require("../../utils");
|
|
6
|
+
async function sendSupportMessage({ title, description, userEmail, apiKey, }) {
|
|
7
|
+
try {
|
|
8
|
+
await (0, utils_1.sendPostRequest)({
|
|
9
|
+
uri: `${consts_1.API_BASE_URL}/support/send-message`,
|
|
10
|
+
body: { title, description, userEmail },
|
|
11
|
+
apiKey,
|
|
12
|
+
retryOptions: { maxAttempts: 1 },
|
|
13
|
+
});
|
|
14
|
+
return true;
|
|
15
|
+
}
|
|
16
|
+
catch (err) {
|
|
17
|
+
return false;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=endpoints.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"endpoints.js","sourceRoot":"","sources":["../../../../src/services/support/endpoints.ts"],"names":[],"mappings":";;AAIA,gDAiBC;AArBD,yCAA2C;AAC3C,uCAA6C;AAGtC,KAAK,UAAU,kBAAkB,CAAC,EACvC,KAAK,EACL,WAAW,EACX,SAAS,EACT,MAAM,GACoB;IAC1B,IAAI,CAAC;QACH,MAAM,IAAA,uBAAe,EAAC;YACpB,GAAG,EAAE,GAAG,qBAAY,uBAAuB;YAC3C,IAAI,EAAE,EAAE,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE;YACvC,MAAM;YACN,YAAY,EAAE,EAAE,WAAW,EAAE,CAAC,EAAE;SACjC,CAAC,CAAA;QACF,OAAO,IAAI,CAAA;IACb,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,OAAO,KAAK,CAAA;IACd,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./endpoints"), exports);
|
|
18
|
+
__exportStar(require("./types"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/services/support/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA2B;AAC3B,0CAAuB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/services/support/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { CreateTurnkeyPrivateKeyRequest, CreateTurnkeyPrivateKeyResponse, CreateTurnkeySubOrgRequest } from './types';
|
|
2
|
+
export declare function createTurnkeySubOrg({ createSubOrgRequest, apiKey, }: CreateTurnkeySubOrgRequest): Promise<string>;
|
|
3
|
+
export declare function createTurnkeyPrivateKey({ signedRequest, apiKey, }: CreateTurnkeyPrivateKeyRequest): Promise<CreateTurnkeyPrivateKeyResponse>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createTurnkeySubOrg = createTurnkeySubOrg;
|
|
4
|
+
exports.createTurnkeyPrivateKey = createTurnkeyPrivateKey;
|
|
5
|
+
const consts_1 = require("../../consts");
|
|
6
|
+
const utils_1 = require("../../utils");
|
|
7
|
+
async function createTurnkeySubOrg({ createSubOrgRequest, apiKey, }) {
|
|
8
|
+
const res = await (0, utils_1.sendPostRequest)({
|
|
9
|
+
uri: `${consts_1.API_BASE_URL}/turnkey/sub-org`,
|
|
10
|
+
body: createSubOrgRequest,
|
|
11
|
+
apiKey,
|
|
12
|
+
});
|
|
13
|
+
return res;
|
|
14
|
+
}
|
|
15
|
+
async function createTurnkeyPrivateKey({ signedRequest, apiKey, }) {
|
|
16
|
+
const res = await (0, utils_1.sendPostRequest)({
|
|
17
|
+
uri: `${consts_1.API_BASE_URL}/turnkey/private-key`,
|
|
18
|
+
body: signedRequest,
|
|
19
|
+
apiKey,
|
|
20
|
+
});
|
|
21
|
+
return {
|
|
22
|
+
id: res.id,
|
|
23
|
+
address: res.address,
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=endpoints.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"endpoints.js","sourceRoot":"","sources":["../../../../src/services/turnkey/endpoints.ts"],"names":[],"mappings":";;AAQA,kDAUC;AAED,0DAaC;AAjCD,yCAA2C;AAC3C,uCAA6C;AAOtC,KAAK,UAAU,mBAAmB,CAAC,EACxC,mBAAmB,EACnB,MAAM,GACqB;IAC3B,MAAM,GAAG,GAAG,MAAM,IAAA,uBAAe,EAAC;QAChC,GAAG,EAAE,GAAG,qBAAY,kBAAkB;QACtC,IAAI,EAAE,mBAAmB;QACzB,MAAM;KACP,CAAC,CAAA;IACF,OAAO,GAAG,CAAA;AACZ,CAAC;AAEM,KAAK,UAAU,uBAAuB,CAAC,EAC5C,aAAa,EACb,MAAM,GACyB;IAC/B,MAAM,GAAG,GAAG,MAAM,IAAA,uBAAe,EAAC;QAChC,GAAG,EAAE,GAAG,qBAAY,sBAAsB;QAC1C,IAAI,EAAE,aAAa;QACnB,MAAM;KACP,CAAC,CAAA;IACF,OAAO;QACL,EAAE,EAAE,GAAG,CAAC,EAAE;QACV,OAAO,EAAE,GAAG,CAAC,OAAO;KACrB,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./endpoints"), exports);
|
|
18
|
+
__exportStar(require("./types"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/services/turnkey/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA2B;AAC3B,0CAAuB"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface CreateTurnkeySubOrgRequest {
|
|
2
|
+
apiKey: string;
|
|
3
|
+
createSubOrgRequest: object;
|
|
4
|
+
}
|
|
5
|
+
export interface CreateTurnkeyPrivateKeyRequest {
|
|
6
|
+
apiKey: string;
|
|
7
|
+
signedRequest: object;
|
|
8
|
+
}
|
|
9
|
+
export interface CreateTurnkeyPrivateKeyResponse {
|
|
10
|
+
id: string;
|
|
11
|
+
address: string;
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/services/turnkey/types.ts"],"names":[],"mappings":""}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.randomBytes = randomBytes;
|
|
4
|
+
exports.generateRandomCheckoutSalt = generateRandomCheckoutSalt;
|
|
5
|
+
exports.roundToNearestBottomTenth = roundToNearestBottomTenth;
|
|
4
6
|
const viem_1 = require("viem");
|
|
5
|
-
|
|
7
|
+
function randomBytes(length) {
|
|
6
8
|
const bytes = new Uint8Array(length);
|
|
7
9
|
for (let i = 0; i < length; i++) {
|
|
8
10
|
bytes[i] = Math.floor(Math.random() * 256);
|
|
9
11
|
}
|
|
10
12
|
return (0, viem_1.toHex)(bytes);
|
|
11
|
-
}
|
|
13
|
+
}
|
|
12
14
|
function generateRandomCheckoutSalt() {
|
|
13
15
|
return BigInt(randomBytes(32));
|
|
14
16
|
}
|
|
15
|
-
exports.generateRandomCheckoutSalt = generateRandomCheckoutSalt;
|
|
16
17
|
function roundToNearestBottomTenth(n) {
|
|
17
18
|
return Math.floor(n / 10) * 10;
|
|
18
19
|
}
|
|
19
|
-
exports.roundToNearestBottomTenth = roundToNearestBottomTenth;
|
|
20
20
|
//# sourceMappingURL=checkout.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkout.js","sourceRoot":"","sources":["../../../src/utils/checkout.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"checkout.js","sourceRoot":"","sources":["../../../src/utils/checkout.ts"],"names":[],"mappings":";;AAEA,kCAMC;AAED,gEAEC;AAED,8DAEC;AAhBD,+BAA4B;AAE5B,SAAgB,WAAW,CAAC,MAAc;IACxC,MAAM,KAAK,GAAG,IAAI,UAAU,CAAC,MAAM,CAAC,CAAA;IACpC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QAChC,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,GAAG,CAAC,CAAA;IAC5C,CAAC;IACD,OAAO,IAAA,YAAK,EAAC,KAAK,CAAC,CAAA;AACrB,CAAC;AAED,SAAgB,0BAA0B;IACxC,OAAO,MAAM,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC,CAAA;AAChC,CAAC;AAED,SAAgB,yBAAyB,CAAC,CAAS;IACjD,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,CAAC,GAAG,EAAE,CAAA;AAChC,CAAC"}
|
|
@@ -23,7 +23,11 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.
|
|
26
|
+
exports.sendRequest = void 0;
|
|
27
|
+
exports.sendGetRequest = sendGetRequest;
|
|
28
|
+
exports.sendPostRequest = sendPostRequest;
|
|
29
|
+
exports.sendDeleteRequest = sendDeleteRequest;
|
|
30
|
+
exports.sendPutRequest = sendPutRequest;
|
|
27
31
|
const attempt_1 = require("@lifeomic/attempt");
|
|
28
32
|
const viem_1 = require("viem");
|
|
29
33
|
const fetch = (...args) => Promise.resolve().then(() => __importStar(require('node-fetch'))).then(({ default: fetch }) => fetch(...args));
|
|
@@ -95,7 +99,6 @@ async function sendGetRequest({ uri, apiKey, retryOptions, }) {
|
|
|
95
99
|
method: 'GET',
|
|
96
100
|
});
|
|
97
101
|
}
|
|
98
|
-
exports.sendGetRequest = sendGetRequest;
|
|
99
102
|
async function sendPostRequest({ uri, body, apiKey, retryOptions, }) {
|
|
100
103
|
return await (0, exports.sendRequest)({
|
|
101
104
|
uri,
|
|
@@ -105,7 +108,6 @@ async function sendPostRequest({ uri, body, apiKey, retryOptions, }) {
|
|
|
105
108
|
method: 'POST',
|
|
106
109
|
});
|
|
107
110
|
}
|
|
108
|
-
exports.sendPostRequest = sendPostRequest;
|
|
109
111
|
async function sendDeleteRequest({ uri, apiKey, retryOptions, }) {
|
|
110
112
|
await (0, exports.sendRequest)({
|
|
111
113
|
uri,
|
|
@@ -114,7 +116,6 @@ async function sendDeleteRequest({ uri, apiKey, retryOptions, }) {
|
|
|
114
116
|
retryOptions,
|
|
115
117
|
});
|
|
116
118
|
}
|
|
117
|
-
exports.sendDeleteRequest = sendDeleteRequest;
|
|
118
119
|
async function sendPutRequest({ uri, body, apiKey, retryOptions, }) {
|
|
119
120
|
return await (0, exports.sendRequest)({
|
|
120
121
|
uri,
|
|
@@ -124,5 +125,4 @@ async function sendPutRequest({ uri, body, apiKey, retryOptions, }) {
|
|
|
124
125
|
method: 'PUT',
|
|
125
126
|
});
|
|
126
127
|
}
|
|
127
|
-
exports.sendPutRequest = sendPutRequest;
|
|
128
128
|
//# sourceMappingURL=request.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request.js","sourceRoot":"","sources":["../../../src/utils/request.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"request.js","sourceRoot":"","sources":["../../../src/utils/request.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AA+IA,wCAWC;AAED,0CAaC;AAED,8CAWC;AAED,wCAaC;AArMD,+CAAyC;AACzC,+BAA4B;AAE5B,MAAM,KAAK,GAAG,CAAC,GAAG,IAAI,EAAE,EAAE,CACxB,kDAAO,YAAY,IAAE,IAAI,CAAC,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,CAAC,CAAA;AAGnE,2CAAqE;AACrE,sCAQkB;AASlB,MAAM,+BAA+B,GAAG,CAAC,MAAW,EAAE,EAAE;IACtD,OAAO,IAAI,CAAC,SAAS,CACnB,MAAM,EACN,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAA,YAAK,EAAC,KAAK,CAAC,CAAC,CAAC,C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