@funkit/core 1.0.13 → 1.0.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/dist/src/apis/index.d.ts +0 -6
  2. package/dist/src/apis/index.js +0 -6
  3. package/dist/src/apis/index.js.map +1 -1
  4. package/dist/src/apis/types.d.ts +0 -5
  5. package/dist/src/apis/types.js.map +1 -1
  6. package/dist/src/utils/ChainUtils.js +27 -5
  7. package/dist/src/utils/ChainUtils.js.map +1 -1
  8. package/dist/src/utils/index.d.ts +0 -1
  9. package/dist/src/utils/index.js +0 -1
  10. package/dist/src/utils/index.js.map +1 -1
  11. package/dist/src/viem/Converter.d.ts +16 -16
  12. package/dist/src/wallet/FunWallet.d.ts +7 -6
  13. package/dist/src/wallet/FunWallet.js +60 -20
  14. package/dist/src/wallet/FunWallet.js.map +1 -1
  15. package/package.json +3 -2
  16. package/dist/src/apis/AssetApis.d.ts +0 -89
  17. package/dist/src/apis/AssetApis.js +0 -110
  18. package/dist/src/apis/AssetApis.js.map +0 -1
  19. package/dist/src/apis/CheckoutApis.d.ts +0 -55
  20. package/dist/src/apis/CheckoutApis.js +0 -174
  21. package/dist/src/apis/CheckoutApis.js.map +0 -1
  22. package/dist/src/apis/FaucetApis.d.ts +0 -1
  23. package/dist/src/apis/FaucetApis.js +0 -10
  24. package/dist/src/apis/FaucetApis.js.map +0 -1
  25. package/dist/src/apis/MeshApis.d.ts +0 -44
  26. package/dist/src/apis/MeshApis.js +0 -109
  27. package/dist/src/apis/MeshApis.js.map +0 -1
  28. package/dist/src/apis/OnOffRampApis.d.ts +0 -37
  29. package/dist/src/apis/OnOffRampApis.js +0 -63
  30. package/dist/src/apis/OnOffRampApis.js.map +0 -1
  31. package/dist/src/apis/OnOffRampUtils.d.ts +0 -2
  32. package/dist/src/apis/OnOffRampUtils.js +0 -23
  33. package/dist/src/apis/OnOffRampUtils.js.map +0 -1
  34. package/dist/src/apis/SupportApis.d.ts +0 -6
  35. package/dist/src/apis/SupportApis.js +0 -16
  36. package/dist/src/apis/SupportApis.js.map +0 -1
  37. package/dist/src/apis/TurnkeyApis.d.ts +0 -3
  38. package/dist/src/apis/TurnkeyApis.js +0 -19
  39. package/dist/src/apis/TurnkeyApis.js.map +0 -1
  40. package/dist/src/utils/AssetUtils.d.ts +0 -9
  41. package/dist/src/utils/AssetUtils.js +0 -48
  42. package/dist/src/utils/AssetUtils.js.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@funkit/core",
3
- "version": "1.0.13",
3
+ "version": "1.0.14",
4
4
  "description": "Funkit core SDK provides feature-rich and extensible smart wallets built on account abstraction",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -25,7 +25,8 @@
25
25
  "ethers": "5.7.2",
26
26
  "node-fetch": "^2.6.11",
27
27
  "uuid": "^9.0.0",
28
- "viem": "^2.9.2"
28
+ "viem": "^2.9.2",
29
+ "@funkit/api-base": "0.0.3"
29
30
  },
30
31
  "devDependencies": {
31
32
  "@types/big.js": "^6.2.2",
@@ -1,89 +0,0 @@
1
- /**
2
- * Get all tokens for a specific chain
3
- * @param {string} chainId https://chainlist.org/
4
- * @param {string} holderAddr
5
- * @param {string} onlyVerifiedTokens If true, only return alchemy tokens that are verified(filters spam)
6
- * @returns JSON
7
- * {
8
- * "0xTokenAddress": {
9
- * "tokenBalance": "0x00001",
10
- * "symbol": "USDC",
11
- * "decimals": 6,
12
- * "logo": "https://static.alchemyapi.io/images/assets/3408.png",
13
- * "price": 1.0001,
14
- * }
15
- * }
16
- */
17
- export declare function getTokens(chainId: string, holderAddr: string, onlyVerifiedTokens: boolean): Promise<any>;
18
- /**
19
- * Calls the fun api server to get all the NFTs owned by the holder
20
- * @param {string} chainId From https://chainlist.org/
21
- * @param {string} holderAddr Address of holder
22
- * @returns array
23
- * [
24
- * {
25
- * "address": "string",
26
- * "token_id": "string",
27
- * "floor_price": "string",
28
- * }
29
- * ]
30
- */
31
- export declare function getNFTs(chainId: string, holderAddr: string): Promise<any>;
32
- /**
33
- * Calls the fun api server to get all the NFTs owned by the holder
34
- * @param {string} holderAddr Address of holder
35
- * @returns array
36
- * {
37
- * "1" : [{
38
- * "address": "string",
39
- * "token_id": "string",
40
- * "floor_price": "string",
41
- * }],
42
- * }
43
- */
44
- export declare function getAllNFTs(holderAddr: string): Promise<any>;
45
- /**
46
- * Get all tokens for a specific chain
47
- * @param {string} holderAddr
48
- * @param {string} onlyVerifiedTokens If true, only return alchemy tokens that are verified(filters spam)
49
- * @returns JSON
50
- * {
51
- * 1: {
52
- * "0xTokenAddress": {
53
- * "tokenBalance": "0x00001",
54
- * "symbol": "USDC",
55
- * "decimals": 6,
56
- * "logo": "https://static.alchemyapi.io/images/assets/3408.png",
57
- * "price": 1.0001,
58
- * }
59
- * }
60
- * }
61
- */
62
- export declare function getAllTokens(holderAddr: string, onlyVerifiedTokens: boolean): Promise<any>;
63
- /**
64
- * Get all lido withdrawal request ids for all chains
65
- * @param {string} chainId https://chainlist.org/ ie "1" for ethereum
66
- * @param {string} holderAddr Address of holder
67
- * @returns [readyToWithdrawRequestIds, notReadyToWithdrawRequestIds]
68
- * [
69
- * [
70
- * 123,
71
- * 124,
72
- * ],
73
- * [
74
- * 412
75
- * 413
76
- * ]
77
- * ]
78
- */
79
- export declare function getLidoWithdrawals(chainId: string, holderAddr: string): Promise<any>;
80
- /**
81
- * Gets the estimated dollar unit price of a tokenAddress for checkout
82
- * @param chainId https://chainlist.org/ ie "1" for ethereum
83
- * @param assetTokenAddress tokenAddress of the asset
84
- */
85
- export declare function getAssetPriceInfoForCheckout(chainId: string, assetTokenAddress: string, apiKey?: string): Promise<{
86
- unitPrice: number;
87
- amount: number;
88
- total: number;
89
- }>;
@@ -1,110 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getAssetPriceInfoForCheckout = exports.getLidoWithdrawals = exports.getAllTokens = exports.getAllNFTs = exports.getNFTs = exports.getTokens = void 0;
4
- const constants_1 = require("../common/constants");
5
- const ApiUtils_1 = require("../utils/ApiUtils");
6
- /**
7
- * Get all tokens for a specific chain
8
- * @param {string} chainId https://chainlist.org/
9
- * @param {string} holderAddr
10
- * @param {string} onlyVerifiedTokens If true, only return alchemy tokens that are verified(filters spam)
11
- * @returns JSON
12
- * {
13
- * "0xTokenAddress": {
14
- * "tokenBalance": "0x00001",
15
- * "symbol": "USDC",
16
- * "decimals": 6,
17
- * "logo": "https://static.alchemyapi.io/images/assets/3408.png",
18
- * "price": 1.0001,
19
- * }
20
- * }
21
- */
22
- async function getTokens(chainId, holderAddr, onlyVerifiedTokens) {
23
- return await (0, ApiUtils_1.sendGetRequest)(constants_1.API_URL, `assets/erc20s/${holderAddr}/${chainId}?onlyVerifiedTokens=${onlyVerifiedTokens}`);
24
- }
25
- exports.getTokens = getTokens;
26
- /**
27
- * Calls the fun api server to get all the NFTs owned by the holder
28
- * @param {string} chainId From https://chainlist.org/
29
- * @param {string} holderAddr Address of holder
30
- * @returns array
31
- * [
32
- * {
33
- * "address": "string",
34
- * "token_id": "string",
35
- * "floor_price": "string",
36
- * }
37
- * ]
38
- */
39
- async function getNFTs(chainId, holderAddr) {
40
- return await (0, ApiUtils_1.sendGetRequest)(constants_1.API_URL, `assets/nfts/${holderAddr}/${chainId}`);
41
- }
42
- exports.getNFTs = getNFTs;
43
- /**
44
- * Calls the fun api server to get all the NFTs owned by the holder
45
- * @param {string} holderAddr Address of holder
46
- * @returns array
47
- * {
48
- * "1" : [{
49
- * "address": "string",
50
- * "token_id": "string",
51
- * "floor_price": "string",
52
- * }],
53
- * }
54
- */
55
- async function getAllNFTs(holderAddr) {
56
- return await (0, ApiUtils_1.sendGetRequest)(constants_1.API_URL, `assets/nfts/${holderAddr}`);
57
- }
58
- exports.getAllNFTs = getAllNFTs;
59
- /**
60
- * Get all tokens for a specific chain
61
- * @param {string} holderAddr
62
- * @param {string} onlyVerifiedTokens If true, only return alchemy tokens that are verified(filters spam)
63
- * @returns JSON
64
- * {
65
- * 1: {
66
- * "0xTokenAddress": {
67
- * "tokenBalance": "0x00001",
68
- * "symbol": "USDC",
69
- * "decimals": 6,
70
- * "logo": "https://static.alchemyapi.io/images/assets/3408.png",
71
- * "price": 1.0001,
72
- * }
73
- * }
74
- * }
75
- */
76
- async function getAllTokens(holderAddr, onlyVerifiedTokens) {
77
- return await (0, ApiUtils_1.sendGetRequest)(constants_1.API_URL, `assets/erc20s/${holderAddr}?onlyVerifiedTokens=${onlyVerifiedTokens}`);
78
- }
79
- exports.getAllTokens = getAllTokens;
80
- /**
81
- * Get all lido withdrawal request ids for all chains
82
- * @param {string} chainId https://chainlist.org/ ie "1" for ethereum
83
- * @param {string} holderAddr Address of holder
84
- * @returns [readyToWithdrawRequestIds, notReadyToWithdrawRequestIds]
85
- * [
86
- * [
87
- * 123,
88
- * 124,
89
- * ],
90
- * [
91
- * 412
92
- * 413
93
- * ]
94
- * ]
95
- */
96
- async function getLidoWithdrawals(chainId, holderAddr) {
97
- return await (0, ApiUtils_1.sendGetRequest)(constants_1.API_URL, `assets/lido-withdrawals/${holderAddr}/${chainId}`);
98
- }
99
- exports.getLidoWithdrawals = getLidoWithdrawals;
100
- /**
101
- * Gets the estimated dollar unit price of a tokenAddress for checkout
102
- * @param chainId https://chainlist.org/ ie "1" for ethereum
103
- * @param assetTokenAddress tokenAddress of the asset
104
- */
105
- async function getAssetPriceInfoForCheckout(chainId, assetTokenAddress, apiKey) {
106
- const priceInfo = await (0, ApiUtils_1.sendGetRequest)(constants_1.API_URL, `asset/erc20/price/${chainId}/${assetTokenAddress}`, apiKey, { maxAttempts: 2 });
107
- return priceInfo;
108
- }
109
- exports.getAssetPriceInfoForCheckout = getAssetPriceInfoForCheckout;
110
- //# sourceMappingURL=AssetApis.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AssetApis.js","sourceRoot":"","sources":["../../../src/apis/AssetApis.ts"],"names":[],"mappings":";;;AAA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AA;IACD,OAAO,SAAS,CAAA;AAClB,CAAC;AAhBD,oEAgBC"}
@@ -1,55 +0,0 @@
1
- import { Address } from 'viem';
2
- import { CheckoutCoreInitParams, CheckoutCoreQuoteParams, CheckoutCoreQuoteResponse, CheckoutHistoryItem, CheckoutRequestRefuelCoreParams, CheckoutRequestRefuelResponse, CheckoutTransferSponsorshipCoreParams, CheckoutTransferSponsorshipResponse } from './types';
3
- /**
4
- * Gets a checkout quote (estimation).
5
- * @param fromChainId The ID of the chain where funds will be provided from.
6
- * @param fromTokenAddress The asset to fund the checkout. This must be either a chain native token or an ERC-20, on the fromChainId.
7
- * @param toChainId The ID of the chain where the checkout operation is to be performed.
8
- * @param toTokenAddress The wanted asset for the checkout operation. This must be either a chain native token or an ERC-20, on the target chain.
9
- * @param toTokenAmount The amount of wanted asset for the checkout operation in base units.
10
- * @param expirationTimestampMs The amount of time (duration) from now before the checkout operation expires.
11
- * @param apiKey A valid fun api key.
12
- * @return {Promise<CheckoutCoreQuoteResponse>} The formatted quote object
13
- */
14
- export declare function getCheckoutQuote({ fromChainId, fromTokenAddress, toChainId, toTokenAddress, toTokenAmount, expirationTimestampMs, sponsorInitialTransferGasLimit, recipientAddr, needsRefuel, apiKey, }: CheckoutCoreQuoteParams): Promise<CheckoutCoreQuoteResponse>;
15
- /**
16
- * Initializes a checkout
17
- * @param userOp The checkout UserOp, signed.
18
- * @param quoteId The quoteId specific to the checkout.
19
- * @param apiKey A valid fun api key.
20
- * @return {Address} The generated deposit address
21
- */
22
- export declare function initializeCheckout({ userOp, quoteId, sourceOfFund, apiKey, clientMetadata, }: CheckoutCoreInitParams): Promise<Address>;
23
- /**
24
- * Gets a checkout given a depositAddress
25
- * @param depositAddress A unique deposit address associated with a backend checkout item.
26
- * @param apiKey A valid fun api key.
27
- * // TODO: Return interface
28
- * @returns The checkout object if exists. Otherwise, null.
29
- */
30
- export declare function getCheckoutByDepositAddress({ depositAddress, apiKey, }: {
31
- depositAddress: Address;
32
- apiKey: string;
33
- }): Promise<any>;
34
- /**
35
- * Gets all checkouts associated with a funWallet
36
- * @param funWalletAddress A funWallet address.
37
- * @param apiKey A valid fun api key.
38
- * @returns A list of checkout objects if exists. Otherwise, an empty array.
39
- */
40
- export declare function getCheckoutsByFunWalletAddress({ funWalletAddress, apiKey, }: {
41
- funWalletAddress: Address;
42
- apiKey: string;
43
- }): Promise<CheckoutHistoryItem[]>;
44
- /**
45
- * Gets all checkouts associated with a recipient address
46
- * @param recipientAddress A wallet address.
47
- * @param apiKey A valid fun api key.
48
- * @returns A list of checkout objects if exists. Otherwise, an empty array.
49
- */
50
- export declare function getCheckoutsByRecipientAddress({ recipientAddress, apiKey, }: {
51
- recipientAddress: Address;
52
- apiKey: string;
53
- }): Promise<CheckoutHistoryItem[]>;
54
- export declare function getPaymasterDataForCheckoutSponsoredTransfer({ depositAddress, transferUserOp, apiKey, }: CheckoutTransferSponsorshipCoreParams): Promise<CheckoutTransferSponsorshipResponse>;
55
- export declare function requestCheckoutRefuel({ signedTxData, depositAddress, apiKey, }: CheckoutRequestRefuelCoreParams): Promise<CheckoutRequestRefuelResponse>;
@@ -1,174 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.requestCheckoutRefuel = exports.getPaymasterDataForCheckoutSponsoredTransfer = exports.getCheckoutsByRecipientAddress = exports.getCheckoutsByFunWalletAddress = exports.getCheckoutByDepositAddress = exports.initializeCheckout = exports.getCheckoutQuote = void 0;
7
- const big_js_1 = __importDefault(require("big.js"));
8
- const viem_1 = require("viem");
9
- const constants_1 = require("../common/constants");
10
- const errors_1 = require("../errors");
11
- const ApiUtils_1 = require("../utils/ApiUtils");
12
- const CheckoutUtils_1 = require("../utils/CheckoutUtils");
13
- /**
14
- * Gets a checkout quote (estimation).
15
- * @param fromChainId The ID of the chain where funds will be provided from.
16
- * @param fromTokenAddress The asset to fund the checkout. This must be either a chain native token or an ERC-20, on the fromChainId.
17
- * @param toChainId The ID of the chain where the checkout operation is to be performed.
18
- * @param toTokenAddress The wanted asset for the checkout operation. This must be either a chain native token or an ERC-20, on the target chain.
19
- * @param toTokenAmount The amount of wanted asset for the checkout operation in base units.
20
- * @param expirationTimestampMs The amount of time (duration) from now before the checkout operation expires.
21
- * @param apiKey A valid fun api key.
22
- * @return {Promise<CheckoutCoreQuoteResponse>} The formatted quote object
23
- */
24
- async function getCheckoutQuote({ fromChainId, fromTokenAddress, toChainId, toTokenAddress, toTokenAmount, expirationTimestampMs, sponsorInitialTransferGasLimit, recipientAddr, needsRefuel, apiKey, }) {
25
- try {
26
- const toDecimals = await (0, CheckoutUtils_1.getDecimals)({
27
- chainId: toChainId,
28
- tokenAddress: toTokenAddress,
29
- });
30
- const toMultipler = 10 ** toDecimals;
31
- const toAmountBaseUnitBI = BigInt(Math.floor(toTokenAmount * toMultipler));
32
- const queryParams = {
33
- fromChainId,
34
- fromTokenAddress,
35
- toChainId,
36
- toTokenAddress,
37
- toAmountBaseUnit: toAmountBaseUnitBI.toString(),
38
- // Only pass in recipientAddr if specified
39
- ...((0, viem_1.isAddress)(recipientAddr || '') ? { recipientAddr } : {}),
40
- // Rounding nearest tenth second (instead of seconds) to better support backend quote caching feature
41
- // Reference: https://vintage-heaven-3cd.notion.site/API-Gateway-Caching-and-Pre-Warming-System-Draft-ee7909d9b85f43c793ce7bd2607bec02?pvs=4
42
- // Note: Rounding *down* instead of a regular round to safeguard against edge case of timing passing frontend range validation but failing backend range validation
43
- checkoutExpirationTimestampSeconds: (0, CheckoutUtils_1.roundToNearestBottomTenth)(Math.round((Date.now() + expirationTimestampMs) / 1000)).toString(),
44
- sponsorInitialTransferGasLimit,
45
- refuel: needsRefuel.toString(),
46
- };
47
- const searchParams = new URLSearchParams(queryParams);
48
- const url = `checkout/quote?${searchParams}`;
49
- const quoteRes = (await (0, ApiUtils_1.sendGetRequest)(constants_1.API_URL, url, apiKey));
50
- const fromDecimals = await (0, CheckoutUtils_1.getDecimals)({
51
- chainId: fromChainId,
52
- tokenAddress: fromTokenAddress,
53
- });
54
- const fromMultipler = 10 ** fromDecimals;
55
- // Format the response for frontend usage
56
- return {
57
- quoteId: quoteRes.quoteId,
58
- fromTokenAddress: quoteRes.fromTokenAddress,
59
- estFeesUsd: quoteRes.estFeesUsd,
60
- estSubtotalUsd: quoteRes.estSubtotalUsd,
61
- estTotalUsd: quoteRes.estTotalUsd,
62
- estCheckoutTimeMs: quoteRes.estCheckoutTimeMs,
63
- estTotalFromAmountBaseUnit: quoteRes.estTotalFromAmountBaseUnit,
64
- estSubtotalFromAmountBaseUnit: quoteRes.estSubtotalFromAmountBaseUnit,
65
- estFeesFromAmountBaseUnit: quoteRes.estFeesFromAmountBaseUnit,
66
- // Added fields
67
- estFeesFromAmount: new big_js_1.default(quoteRes.estFeesFromAmountBaseUnit)
68
- .div(fromMultipler)
69
- .toString(),
70
- estSubtotalFromAmount: new big_js_1.default(quoteRes.estSubtotalFromAmountBaseUnit)
71
- .div(fromMultipler)
72
- .toString(),
73
- estTotalFromAmount: new big_js_1.default(quoteRes.estTotalFromAmountBaseUnit)
74
- .div(fromMultipler)
75
- .toString(),
76
- };
77
- }
78
- catch (err) {
79
- throw new Error(`An error occured trying to generate a checkout quote: ${err.message}`);
80
- }
81
- }
82
- exports.getCheckoutQuote = getCheckoutQuote;
83
- /**
84
- * Initializes a checkout
85
- * @param userOp The checkout UserOp, signed.
86
- * @param quoteId The quoteId specific to the checkout.
87
- * @param apiKey A valid fun api key.
88
- * @return {Address} The generated deposit address
89
- */
90
- async function initializeCheckout({ userOp, quoteId, sourceOfFund, apiKey, clientMetadata, }) {
91
- const body = {
92
- ...(userOp ? { userOp } : {}),
93
- quoteId,
94
- sourceOfFund,
95
- salt: (0, CheckoutUtils_1.generateRandomCheckoutSalt)(),
96
- clientMetadata,
97
- };
98
- const res = await (0, ApiUtils_1.sendPostRequest)(constants_1.API_URL, 'checkout', body, apiKey);
99
- if (!res?.depositAddr) {
100
- throw new errors_1.ResourceNotFoundError(errors_1.ErrorCode.CheckoutInitDepositAddrNotFound, 'Unable to initialize checkout', body, '', 'https://docs.fun.xyz');
101
- }
102
- return res.depositAddr;
103
- }
104
- exports.initializeCheckout = initializeCheckout;
105
- /**
106
- * Gets a checkout given a depositAddress
107
- * @param depositAddress A unique deposit address associated with a backend checkout item.
108
- * @param apiKey A valid fun api key.
109
- * // TODO: Return interface
110
- * @returns The checkout object if exists. Otherwise, null.
111
- */
112
- async function getCheckoutByDepositAddress({ depositAddress, apiKey, }) {
113
- try {
114
- return await (0, ApiUtils_1.sendGetRequest)(constants_1.API_URL, `checkout/${depositAddress}`, apiKey);
115
- }
116
- catch (err) {
117
- if (err instanceof errors_1.ResourceNotFoundError) {
118
- return null;
119
- }
120
- throw err;
121
- }
122
- }
123
- exports.getCheckoutByDepositAddress = getCheckoutByDepositAddress;
124
- /**
125
- * Gets all checkouts associated with a funWallet
126
- * @param funWalletAddress A funWallet address.
127
- * @param apiKey A valid fun api key.
128
- * @returns A list of checkout objects if exists. Otherwise, an empty array.
129
- */
130
- async function getCheckoutsByFunWalletAddress({ funWalletAddress, apiKey, }) {
131
- const url = `checkout/fun-wallet/${funWalletAddress}`;
132
- const res = await (0, ApiUtils_1.sendGetRequest)(constants_1.API_URL, url, apiKey);
133
- return res || [];
134
- }
135
- exports.getCheckoutsByFunWalletAddress = getCheckoutsByFunWalletAddress;
136
- /**
137
- * Gets all checkouts associated with a recipient address
138
- * @param recipientAddress A wallet address.
139
- * @param apiKey A valid fun api key.
140
- * @returns A list of checkout objects if exists. Otherwise, an empty array.
141
- */
142
- async function getCheckoutsByRecipientAddress({ recipientAddress, apiKey, }) {
143
- const url = `checkout/recipient/${recipientAddress}`;
144
- const res = await (0, ApiUtils_1.sendGetRequest)(constants_1.API_URL, url, apiKey);
145
- return res || [];
146
- }
147
- exports.getCheckoutsByRecipientAddress = getCheckoutsByRecipientAddress;
148
- async function getPaymasterDataForCheckoutSponsoredTransfer({ depositAddress, transferUserOp, apiKey, }) {
149
- const body = {
150
- depositAddress,
151
- userOp: transferUserOp,
152
- };
153
- const res = await (0, ApiUtils_1.sendPostRequest)(constants_1.API_URL, 'checkout/sponsor-transfer', body, apiKey);
154
- if (!res) {
155
- // TODO: Better error handling
156
- throw new Error('Unable to get sponsorship information');
157
- }
158
- return res;
159
- }
160
- exports.getPaymasterDataForCheckoutSponsoredTransfer = getPaymasterDataForCheckoutSponsoredTransfer;
161
- async function requestCheckoutRefuel({ signedTxData, depositAddress, apiKey, }) {
162
- const body = {
163
- depositAddr: depositAddress,
164
- signedTx: signedTxData,
165
- };
166
- const res = await (0, ApiUtils_1.sendPostRequest)(constants_1.API_URL, 'checkout/refuel', body, apiKey);
167
- if (!res) {
168
- // TODO: Better error handling
169
- throw new Error('Unable to perform refuelling');
170
- }
171
- return res;
172
- }
173
- exports.requestCheckoutRefuel = requestCheckoutRefuel;
174
- //# sourceMappingURL=CheckoutApis.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CheckoutApis.js","sourceRoot":"","sources":["../../../src/apis/CheckoutApis.ts"],"names":[],"mappings":";;;;;;AAAA,oDAAwB;AACxB,+BAAyC;AAEzC,mDAA6C;AAC7C,sCAA4D;AAC5D,gDAAmE;AACnE,0DAI+B;AAkB/B;;;;;;;;;;GAUG;AACI,KAAK,UAAU,gBAAgB,CAAC,EACrC,WAAW,EACX,gBAAgB,EAChB,SAAS,EACT,cAAc,EACd,aAAa,EACb,qBAAqB,EACrB,8BAA8B,EAC9B,aAAa,EACb,WAAW,EACX,MAAM,GACkB;IACxB,IAAI,CAAC;QACH,MAAM,UAAU,GAAG,MAAM,IAAA,2BAAW,EAAC;YACnC,OAAO,EAAE,SAAS;YAClB,YAAY,EAAE,cAAc;SAC7B,CAAC,CAAA;QACF,MAAM,WAAW,GAAG,EAAE,IAAI,UAAU,CAAA;QACpC,MAAM,kBAAkB,GAAG,MAAM,CAAC,IA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,EACP,2BAA2B,EAC3B,IAAI,EACJ,MAAM,CACP,CAAA;IACD,IAAI,CAAC,GAAG,EAAE,CAAC;QACT,8BAA8B;QAC9B,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAA;IAC1D,CAAC;IACD,OAAO,GAA0C,CAAA;AACnD,CAAC;AApBD,oGAoBC;AAEM,KAAK,UAAU,qBAAqB,CAAC,EAC1C,YAAY,EACZ,cAAc,EACd,MAAM,GAC0B;IAChC,MAAM,IAAI,GAAG;QACX,WAAW,EAAE,cAAc;QAC3B,QAAQ,EAAE,YAAY;KACW,CAAA;IACnC,MAAM,GAAG,GAAG,MAAM,IAAA,0BAAe,EAAC,mBAAO,EAAE,iBAAiB,EAAE,IAAI,EAAE,MAAM,CAAC,CAAA;IAC3E,IAAI,CAAC,GAAG,EAAE,CAAC;QACT,8BAA8B;QAC9B,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAA;IACjD,CAAC;IACD,OAAO,GAAoC,CAAA;AAC7C,CAAC;AAfD,sDAeC"}
@@ -1 +0,0 @@
1
- export declare const sendAsset: (token: string, chain: string, walletAddress: string) => Promise<any>;
@@ -1,10 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.sendAsset = void 0;
4
- const common_1 = require("../common");
5
- const utils_1 = require("../utils");
6
- const sendAsset = async function (token, chain, walletAddress) {
7
- return await (0, utils_1.sendGetRequest)(common_1.FUN_FAUCET_URL, `get-faucet?token=${token}&testnet=${chain}&addr=${walletAddress}`);
8
- };
9
- exports.sendAsset = sendAsset;
10
- //# sourceMappingURL=FaucetApis.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FaucetApis.js","sourceRoot":"","sources":["../../../src/apis/FaucetApis.ts"],"names":[],"mappings":";;;AAAA,sCAA0C;AAC1C,oCAAyC;AAElC,MAAM,SAAS,GAAG,KAAK,WAC5B,KAAa,EACb,KAAa,EACb,aAAqB;IAErB,OAAO,MAAM,IAAA,sBAAc,EACzB,uBAAc,EACd,oBAAoB,KAAK,YAAY,KAAK,SAAS,aAAa,EAAE,CACnE,CAAA;AACH,CAAC,CAAA;AATY,QAAA,SAAS,aASrB"}
@@ -1,44 +0,0 @@
1
- /**
2
- * @param authToken The authentication token to send the asset from.
3
- * @param type The type of the integration to send the asset from.
4
- * @return https://docs.meshconnect.com/reference/post_api-v1-holdings-get
5
- */
6
- export declare function meshGetCryptocurrencyHoldings(authToken: string, type: string, apiKey?: string): Promise<any>;
7
- /**
8
- * @return https://docs.meshconnect.com/reference/get_api-v1-transfers-managed-integrations
9
- */
10
- export declare function meshGetTransferIntegrations(apiKey?: string): Promise<any>;
11
- /**
12
- * @param userId A unique Id representing the end user. Typically this will be a user Id from the
13
- client application. Personally identifiable information, such as an email address or phone number,
14
- should not be used. 50 characters length maximum.
15
- * @param integrationId A unique identifier representing a specific integration obtained from the list of available integrations.
16
- * @param restrictMultipleAccounts The final screen of Link allows users to “continue” back to your app or “Link another account.”
17
- If this param is present then this button will be hidden.
18
- * @param transferOptions Encapsulates transaction-related parameters, including destination addresses and the amount to transfer in fiat currency.
19
- * @return https://docs.meshconnect.com/reference/post_api-v1-linktoken
20
- */
21
- export declare function meshGetLinkToken(userId: string, integrationId?: string | null, restrictMultipleAccounts?: boolean, transferOptions?: any | null, apiKey?: string): Promise<any>;
22
- /**
23
- * @param fromAuthToken The authentication token to send the asset from.
24
- * @param fromType The type of the integration to send the asset from.
25
- * @param toAuthToken The authentication token of the target integration. Can be used alternatively to the address in the ToAddress field. If used, toType should also be provided.
26
- * @param toType The type of the target integration to send assets to. Used along with the toAuthToken alternatively to ToAddress.
27
- * @param networkId The network to send the asset over. This is generated by Mesh, it isn't a chainId or chain name.
28
- * @param symbol The symbol of the digital asset to send.
29
- * @param toAddress The target address to send the asset to.
30
- * @param amount The amount to send, in crypto.
31
- * @param amountInFiat The amount to send, in fiat currency. Can be used alternatively to Amount.
32
- * @param fiatCurrency Fiat currency that is to get corresponding converted fiat values of transfer and fee amounts. If not provided, defaults to USD.
33
- * @returns https://docs.meshconnect.com/reference/post_api-v1-transfers-managed-preview
34
- */
35
- export declare function meshPreviewTransfer(fromAuthToken: string, fromType: string, toAuthToken?: string | null, toType?: string | null, networkId?: string, symbol?: string | null, toAddress?: string | null, amount?: string | null, amountInFiat?: string | null, fiatCurrency?: string | null, apiKey?: string): Promise<any>;
36
- /**
37
- *
38
- * @param fromAuthToken The authentication token to send the asset from.
39
- * @param fromType The type of the integration to send the asset from.
40
- * @param previewId The preview ID of the transfer to execute.
41
- * @param mfaCode Multi-factor auth code that should be provided if the status of the transfer was MfaRequired.
42
- * @returns https://docs.meshconnect.com/reference/post_api-v1-transfers-managed-execute
43
- */
44
- export declare function meshExecuteTransfer(fromAuthToken: string, fromType: string, previewId: string, mfaCode?: string | null, apiKey?: string): Promise<any>;
@@ -1,109 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.meshExecuteTransfer = exports.meshPreviewTransfer = exports.meshGetLinkToken = exports.meshGetTransferIntegrations = exports.meshGetCryptocurrencyHoldings = void 0;
4
- const constants_1 = require("../common/constants");
5
- const ApiUtils_1 = require("../utils/ApiUtils");
6
- /**
7
- * @param authToken The authentication token to send the asset from.
8
- * @param type The type of the integration to send the asset from.
9
- * @return https://docs.meshconnect.com/reference/post_api-v1-holdings-get
10
- */
11
- async function meshGetCryptocurrencyHoldings(authToken, type, apiKey) {
12
- const res = await (0, ApiUtils_1.sendPostRequest)(constants_1.API_URL, 'mesh/holdings/get', { authToken, type }, apiKey);
13
- return res;
14
- }
15
- exports.meshGetCryptocurrencyHoldings = meshGetCryptocurrencyHoldings;
16
- /**
17
- * @return https://docs.meshconnect.com/reference/get_api-v1-transfers-managed-integrations
18
- */
19
- async function meshGetTransferIntegrations(apiKey) {
20
- const res = await (0, ApiUtils_1.sendGetRequest)(constants_1.API_URL, 'mesh/transfers/managed/integrations', apiKey);
21
- return res;
22
- }
23
- exports.meshGetTransferIntegrations = meshGetTransferIntegrations;
24
- /**
25
- * @param userId A unique Id representing the end user. Typically this will be a user Id from the
26
- client application. Personally identifiable information, such as an email address or phone number,
27
- should not be used. 50 characters length maximum.
28
- * @param integrationId A unique identifier representing a specific integration obtained from the list of available integrations.
29
- * @param restrictMultipleAccounts The final screen of Link allows users to “continue” back to your app or “Link another account.”
30
- If this param is present then this button will be hidden.
31
- * @param transferOptions Encapsulates transaction-related parameters, including destination addresses and the amount to transfer in fiat currency.
32
- * @return https://docs.meshconnect.com/reference/post_api-v1-linktoken
33
- */
34
- async function meshGetLinkToken(userId, integrationId, restrictMultipleAccounts, transferOptions, apiKey) {
35
- let body = { userId };
36
- if (integrationId) {
37
- body = { ...body, integrationId };
38
- }
39
- if (restrictMultipleAccounts) {
40
- body = { ...body, restrictMultipleAccounts };
41
- }
42
- if (transferOptions) {
43
- body = { ...body, transferOptions };
44
- }
45
- const res = await (0, ApiUtils_1.sendPostRequest)(constants_1.API_URL, 'mesh/linktoken', body, apiKey);
46
- return res;
47
- }
48
- exports.meshGetLinkToken = meshGetLinkToken;
49
- /**
50
- * @param fromAuthToken The authentication token to send the asset from.
51
- * @param fromType The type of the integration to send the asset from.
52
- * @param toAuthToken The authentication token of the target integration. Can be used alternatively to the address in the ToAddress field. If used, toType should also be provided.
53
- * @param toType The type of the target integration to send assets to. Used along with the toAuthToken alternatively to ToAddress.
54
- * @param networkId The network to send the asset over. This is generated by Mesh, it isn't a chainId or chain name.
55
- * @param symbol The symbol of the digital asset to send.
56
- * @param toAddress The target address to send the asset to.
57
- * @param amount The amount to send, in crypto.
58
- * @param amountInFiat The amount to send, in fiat currency. Can be used alternatively to Amount.
59
- * @param fiatCurrency Fiat currency that is to get corresponding converted fiat values of transfer and fee amounts. If not provided, defaults to USD.
60
- * @returns https://docs.meshconnect.com/reference/post_api-v1-transfers-managed-preview
61
- */
62
- async function meshPreviewTransfer(fromAuthToken, fromType, toAuthToken, toType, networkId, symbol, toAddress, amount, amountInFiat, fiatCurrency, apiKey) {
63
- let body = { fromAuthToken, fromType };
64
- if (toAuthToken) {
65
- body = { ...body, toAuthToken };
66
- }
67
- if (toType) {
68
- body = { ...body, toType };
69
- }
70
- if (networkId) {
71
- body = { ...body, networkId };
72
- }
73
- if (symbol) {
74
- body = { ...body, symbol };
75
- }
76
- if (toAddress) {
77
- body = { ...body, toAddress };
78
- }
79
- if (amount) {
80
- body = { ...body, amount };
81
- }
82
- if (amountInFiat) {
83
- body = { ...body, amountInFiat };
84
- }
85
- if (fiatCurrency) {
86
- body = { ...body, fiatCurrency };
87
- }
88
- const res = await (0, ApiUtils_1.sendPostRequest)(constants_1.API_URL, 'mesh/transfers/managed/preview', body, apiKey, { maxAttempts: 1 });
89
- return res;
90
- }
91
- exports.meshPreviewTransfer = meshPreviewTransfer;
92
- /**
93
- *
94
- * @param fromAuthToken The authentication token to send the asset from.
95
- * @param fromType The type of the integration to send the asset from.
96
- * @param previewId The preview ID of the transfer to execute.
97
- * @param mfaCode Multi-factor auth code that should be provided if the status of the transfer was MfaRequired.
98
- * @returns https://docs.meshconnect.com/reference/post_api-v1-transfers-managed-execute
99
- */
100
- async function meshExecuteTransfer(fromAuthToken, fromType, previewId, mfaCode, apiKey) {
101
- let body = { fromAuthToken, fromType, previewId };
102
- if (mfaCode) {
103
- body = { ...body, mfaCode };
104
- }
105
- const res = await (0, ApiUtils_1.sendPostRequest)(constants_1.API_URL, 'mesh/transfers/managed/execute', body, apiKey);
106
- return res;
107
- }
108
- exports.meshExecuteTransfer = meshExecuteTransfer;
109
- //# sourceMappingURL=MeshApis.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"MeshApis.js","sourceRoot":"","sources":["../../../src/apis/MeshApis.ts"],"names":[],"mappings":";;;AAAA,mDAA6C;AAC7C,gDAAmE;AAEnE;;;;GAIG;AACI,KAAK,UAAU,6BAA6B,CACjD,SAAiB,EACjB,IAAY,EACZ,MAAe;IAEf,MAAM,GAAG,GAAG,MAAM,IAAA,0BAAe,EAC/B,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