@b3dotfun/sdk 0.0.5-alpha.5 → 0.0.5
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/cjs/anyspend/constants/index.js +2 -2
- package/dist/cjs/anyspend/react/components/AnySpend.js +2 -2
- package/dist/cjs/anyspend/react/components/index.d.ts +5 -7
- package/dist/cjs/anyspend/react/components/index.js +11 -15
- package/dist/cjs/anyspend/react/hooks/useAnyspendCreateOnrampOrder.d.ts +0 -1
- package/dist/cjs/anyspend/react/hooks/useAnyspendCreateOnrampOrder.js +3 -4
- package/dist/cjs/anyspend/react/hooks/useAnyspendOrderAndTransactions.d.ts +0 -10
- package/dist/cjs/anyspend/react/hooks/useAnyspendOrderHistory.d.ts +0 -10
- package/dist/cjs/anyspend/services/anyspend.d.ts +1 -7
- package/dist/cjs/anyspend/services/anyspend.js +2 -3
- package/dist/cjs/anyspend/types/order.d.ts +0 -18
- package/dist/cjs/anyspend/types/order.js +0 -1
- package/dist/cjs/anyspend/types/req-res/createOrder.d.ts +0 -50
- package/dist/cjs/anyspend/types/req-res/createOrder.js +0 -1
- package/dist/cjs/anyspend/types/req-res/getOrderAndTransactions.d.ts +0 -35
- package/dist/cjs/anyspend/types/req-res/getOrderHistory.d.ts +0 -25
- package/dist/cjs/global-account/react/hooks/useTokenFromUrl.d.ts +1 -5
- package/dist/cjs/global-account/react/hooks/useTokenFromUrl.js +13 -74
- package/dist/cjs/shared/constants/chains/supported.d.ts +3 -13
- package/dist/cjs/shared/constants/chains/supported.js +9 -15
- package/dist/esm/anyspend/constants/index.js +2 -2
- package/dist/esm/anyspend/react/components/AnySpend.js +2 -2
- package/dist/esm/anyspend/react/components/index.d.ts +5 -7
- package/dist/esm/anyspend/react/components/index.js +5 -7
- package/dist/esm/anyspend/react/hooks/useAnyspendCreateOnrampOrder.d.ts +0 -1
- package/dist/esm/anyspend/react/hooks/useAnyspendCreateOnrampOrder.js +4 -5
- package/dist/esm/anyspend/react/hooks/useAnyspendOrderAndTransactions.d.ts +0 -10
- package/dist/esm/anyspend/react/hooks/useAnyspendOrderHistory.d.ts +0 -10
- package/dist/esm/anyspend/services/anyspend.d.ts +1 -7
- package/dist/esm/anyspend/services/anyspend.js +2 -3
- package/dist/esm/anyspend/types/order.d.ts +0 -18
- package/dist/esm/anyspend/types/order.js +0 -1
- package/dist/esm/anyspend/types/req-res/createOrder.d.ts +0 -50
- package/dist/esm/anyspend/types/req-res/createOrder.js +0 -1
- package/dist/esm/anyspend/types/req-res/getOrderAndTransactions.d.ts +0 -35
- package/dist/esm/anyspend/types/req-res/getOrderHistory.d.ts +0 -25
- package/dist/esm/global-account/react/hooks/useTokenFromUrl.d.ts +1 -5
- package/dist/esm/global-account/react/hooks/useTokenFromUrl.js +13 -73
- package/dist/esm/shared/constants/chains/supported.d.ts +3 -13
- package/dist/esm/shared/constants/chains/supported.js +8 -13
- package/dist/styles/index.css +1 -1
- package/dist/types/anyspend/react/components/index.d.ts +5 -7
- package/dist/types/anyspend/react/hooks/useAnyspendCreateOnrampOrder.d.ts +0 -1
- package/dist/types/anyspend/react/hooks/useAnyspendOrderAndTransactions.d.ts +0 -10
- package/dist/types/anyspend/react/hooks/useAnyspendOrderHistory.d.ts +0 -10
- package/dist/types/anyspend/services/anyspend.d.ts +1 -7
- package/dist/types/anyspend/types/order.d.ts +0 -18
- package/dist/types/anyspend/types/req-res/createOrder.d.ts +0 -50
- package/dist/types/anyspend/types/req-res/getOrderAndTransactions.d.ts +0 -35
- package/dist/types/anyspend/types/req-res/getOrderHistory.d.ts +0 -25
- package/dist/types/global-account/react/hooks/useTokenFromUrl.d.ts +1 -5
- package/dist/types/shared/constants/chains/supported.d.ts +3 -13
- package/package.json +3 -3
- package/src/anyspend/constants/index.ts +4 -2
- package/src/anyspend/react/components/AnySpend.tsx +2 -2
- package/src/anyspend/react/components/index.ts +5 -7
- package/src/anyspend/react/hooks/useAnyspendCreateOnrampOrder.ts +4 -7
- package/src/anyspend/services/anyspend.ts +2 -5
- package/src/anyspend/types/order.ts +0 -1
- package/src/anyspend/types/req-res/createOrder.ts +0 -1
- package/src/global-account/react/hooks/useTokenFromUrl.tsx +13 -95
- package/src/shared/constants/chains/supported.ts +8 -23
- package/dist/cjs/anyspend/react/components/webview/WebviewOnrampOrderStatus.d.ts +0 -6
- package/dist/cjs/anyspend/react/components/webview/WebviewOnrampOrderStatus.js +0 -37
- package/dist/cjs/anyspend/react/components/webview/WebviewOnrampPayment.d.ts +0 -12
- package/dist/cjs/anyspend/react/components/webview/WebviewOnrampPayment.js +0 -173
- package/dist/cjs/global-account/react/hooks/useB3EnsName.d.ts +0 -9
- package/dist/cjs/global-account/react/hooks/useB3EnsName.js +0 -39
- package/dist/cjs/shared/generated/coingecko-chains.json +0 -1072
- package/dist/esm/anyspend/react/components/webview/WebviewOnrampOrderStatus.d.ts +0 -6
- package/dist/esm/anyspend/react/components/webview/WebviewOnrampOrderStatus.js +0 -31
- package/dist/esm/anyspend/react/components/webview/WebviewOnrampPayment.d.ts +0 -12
- package/dist/esm/anyspend/react/components/webview/WebviewOnrampPayment.js +0 -167
- package/dist/esm/global-account/react/hooks/useB3EnsName.d.ts +0 -9
- package/dist/esm/global-account/react/hooks/useB3EnsName.js +0 -32
- package/dist/esm/shared/generated/coingecko-chains.json +0 -1072
- package/dist/types/anyspend/react/components/webview/WebviewOnrampOrderStatus.d.ts +0 -6
- package/dist/types/anyspend/react/components/webview/WebviewOnrampPayment.d.ts +0 -12
- package/dist/types/global-account/react/hooks/useB3EnsName.d.ts +0 -9
- package/src/anyspend/README.md +0 -626
- package/src/anyspend/react/components/webview/WebviewOnrampOrderStatus.tsx +0 -120
- package/src/anyspend/react/components/webview/WebviewOnrampPayment.tsx +0 -369
- package/src/global-account/react/hooks/useB3EnsName.ts +0 -45
- package/src/shared/generated/coingecko-chains.json +0 -1072
- /package/dist/cjs/{shared/generated → generated}/chain-networks.json +0 -0
- /package/dist/esm/{shared/generated → generated}/chain-networks.json +0 -0
- /package/src/{shared/generated → generated}/chain-networks.json +0 -0
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.VENDOR_DISPLAY_NAMES = exports.PAYMENT_METHOD_ICONS = exports.STRIPE_CONFIG = exports.DEFAULT_NFT_CONTRACT = exports.NFT_CONTRACTS = exports.USDC_BASE = exports.B3_TOKEN = exports.SOLANA_TOKEN_2022_PROGRAM_ID = exports.SOLANA_ASSOCIATED_TOKEN_ACCOUNT_PROGRAM_ID = exports.RELAY_SOLANA_MAINNET_CHAIN_ID = exports.RELAY_SOL_ADDRESS = exports.RELAY_ETH_ADDRESS = exports.ANYSPEND_TESTNET_BASE_URL = exports.ANYSPEND_MAINNET_BASE_URL = void 0;
|
|
4
4
|
const chains_1 = require("viem/chains");
|
|
5
|
-
exports.ANYSPEND_MAINNET_BASE_URL = process.env.NEXT_PUBLIC_ANYSPEND_BASE_URL || "https://mainnet.
|
|
6
|
-
exports.ANYSPEND_TESTNET_BASE_URL = process.env.NEXT_PUBLIC_ANYSPEND_BASE_URL || "https://testnet.
|
|
5
|
+
exports.ANYSPEND_MAINNET_BASE_URL = process.env.NEXT_PUBLIC_ANYSPEND_BASE_URL || "https://anyspend-mainnet.up.railway.app";
|
|
6
|
+
exports.ANYSPEND_TESTNET_BASE_URL = process.env.NEXT_PUBLIC_ANYSPEND_BASE_URL || "https://anyspend-testnet.up.railway.app";
|
|
7
7
|
exports.RELAY_ETH_ADDRESS = "0x0000000000000000000000000000000000000000";
|
|
8
8
|
exports.RELAY_SOL_ADDRESS = "11111111111111111111111111111111";
|
|
9
9
|
exports.RELAY_SOLANA_MAINNET_CHAIN_ID = 792703809;
|
|
@@ -103,7 +103,7 @@ function AnySpend({ destinationTokenAddress, destinationTokenChainId, isMainnet
|
|
|
103
103
|
name: srcTokenMetadata.name || selectedSrcToken.name,
|
|
104
104
|
metadata: {
|
|
105
105
|
...selectedSrcToken.metadata,
|
|
106
|
-
logoURI: srcTokenMetadata
|
|
106
|
+
logoURI: srcTokenMetadata.logoURI || selectedSrcToken.metadata?.logoURI
|
|
107
107
|
}
|
|
108
108
|
};
|
|
109
109
|
setSelectedSrcToken(enhancedToken);
|
|
@@ -125,7 +125,7 @@ function AnySpend({ destinationTokenAddress, destinationTokenChainId, isMainnet
|
|
|
125
125
|
name: dstTokenMetadata.name || selectedDstToken.name,
|
|
126
126
|
metadata: {
|
|
127
127
|
...selectedDstToken.metadata,
|
|
128
|
-
logoURI: dstTokenMetadata
|
|
128
|
+
logoURI: dstTokenMetadata.logoURI || selectedDstToken.metadata?.logoURI
|
|
129
129
|
}
|
|
130
130
|
};
|
|
131
131
|
setSelectedDstToken(enhancedToken);
|
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
export { AnySpend } from "./AnySpend";
|
|
2
|
-
export { AnySpendBuySpin } from "./AnySpendBuySpin";
|
|
3
2
|
export { AnySpendCustom } from "./AnySpendCustom";
|
|
4
3
|
export { AnySpendNFT } from "./AnySpendNFT";
|
|
5
4
|
export { AnySpendNFTButton } from "./AnySpendNFTButton";
|
|
6
|
-
export { AnySpendStakeB3 } from "./AnySpendStakeB3";
|
|
7
5
|
export { AnySpendTournament } from "./AnySpendTournament";
|
|
8
|
-
export {
|
|
9
|
-
export {
|
|
6
|
+
export { AnySpendStakeB3 } from "./AnySpendStakeB3";
|
|
7
|
+
export { AnySpendBuySpin } from "./AnySpendBuySpin";
|
|
10
8
|
export { OrderHistoryItem } from "./common/OrderHistoryItem";
|
|
11
|
-
export {
|
|
9
|
+
export { OrderHistory } from "./common/OrderHistory";
|
|
10
|
+
export { OrderDetails } from "./common/OrderDetails";
|
|
12
11
|
export { OrderToken } from "./common/OrderToken";
|
|
13
12
|
export { OrderTokenAmount } from "./common/OrderTokenAmount";
|
|
13
|
+
export { OrderStatus } from "./common/OrderStatus";
|
|
14
14
|
export { TokenBalance } from "./common/TokenBalance";
|
|
15
|
-
export { WebviewOnrampOrderStatus } from "./webview/WebviewOnrampOrderStatus";
|
|
16
|
-
export { WebviewOnrampPayment } from "./webview/WebviewOnrampPayment";
|
|
@@ -1,37 +1,33 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.TokenBalance = exports.OrderStatus = exports.OrderTokenAmount = exports.OrderToken = exports.OrderDetails = exports.OrderHistory = exports.OrderHistoryItem = exports.AnySpendBuySpin = exports.AnySpendStakeB3 = exports.AnySpendTournament = exports.AnySpendNFTButton = exports.AnySpendNFT = exports.AnySpendCustom = exports.AnySpend = void 0;
|
|
4
4
|
// Components
|
|
5
5
|
var AnySpend_1 = require("./AnySpend");
|
|
6
6
|
Object.defineProperty(exports, "AnySpend", { enumerable: true, get: function () { return AnySpend_1.AnySpend; } });
|
|
7
|
-
var AnySpendBuySpin_1 = require("./AnySpendBuySpin");
|
|
8
|
-
Object.defineProperty(exports, "AnySpendBuySpin", { enumerable: true, get: function () { return AnySpendBuySpin_1.AnySpendBuySpin; } });
|
|
9
7
|
var AnySpendCustom_1 = require("./AnySpendCustom");
|
|
10
8
|
Object.defineProperty(exports, "AnySpendCustom", { enumerable: true, get: function () { return AnySpendCustom_1.AnySpendCustom; } });
|
|
11
9
|
var AnySpendNFT_1 = require("./AnySpendNFT");
|
|
12
10
|
Object.defineProperty(exports, "AnySpendNFT", { enumerable: true, get: function () { return AnySpendNFT_1.AnySpendNFT; } });
|
|
13
11
|
var AnySpendNFTButton_1 = require("./AnySpendNFTButton");
|
|
14
12
|
Object.defineProperty(exports, "AnySpendNFTButton", { enumerable: true, get: function () { return AnySpendNFTButton_1.AnySpendNFTButton; } });
|
|
15
|
-
var AnySpendStakeB3_1 = require("./AnySpendStakeB3");
|
|
16
|
-
Object.defineProperty(exports, "AnySpendStakeB3", { enumerable: true, get: function () { return AnySpendStakeB3_1.AnySpendStakeB3; } });
|
|
17
13
|
var AnySpendTournament_1 = require("./AnySpendTournament");
|
|
18
14
|
Object.defineProperty(exports, "AnySpendTournament", { enumerable: true, get: function () { return AnySpendTournament_1.AnySpendTournament; } });
|
|
15
|
+
var AnySpendStakeB3_1 = require("./AnySpendStakeB3");
|
|
16
|
+
Object.defineProperty(exports, "AnySpendStakeB3", { enumerable: true, get: function () { return AnySpendStakeB3_1.AnySpendStakeB3; } });
|
|
17
|
+
var AnySpendBuySpin_1 = require("./AnySpendBuySpin");
|
|
18
|
+
Object.defineProperty(exports, "AnySpendBuySpin", { enumerable: true, get: function () { return AnySpendBuySpin_1.AnySpendBuySpin; } });
|
|
19
19
|
// Common Components
|
|
20
|
-
var OrderDetails_1 = require("./common/OrderDetails");
|
|
21
|
-
Object.defineProperty(exports, "OrderDetails", { enumerable: true, get: function () { return OrderDetails_1.OrderDetails; } });
|
|
22
|
-
var OrderHistory_1 = require("./common/OrderHistory");
|
|
23
|
-
Object.defineProperty(exports, "OrderHistory", { enumerable: true, get: function () { return OrderHistory_1.OrderHistory; } });
|
|
24
20
|
var OrderHistoryItem_1 = require("./common/OrderHistoryItem");
|
|
25
21
|
Object.defineProperty(exports, "OrderHistoryItem", { enumerable: true, get: function () { return OrderHistoryItem_1.OrderHistoryItem; } });
|
|
26
|
-
var
|
|
27
|
-
Object.defineProperty(exports, "
|
|
22
|
+
var OrderHistory_1 = require("./common/OrderHistory");
|
|
23
|
+
Object.defineProperty(exports, "OrderHistory", { enumerable: true, get: function () { return OrderHistory_1.OrderHistory; } });
|
|
24
|
+
var OrderDetails_1 = require("./common/OrderDetails");
|
|
25
|
+
Object.defineProperty(exports, "OrderDetails", { enumerable: true, get: function () { return OrderDetails_1.OrderDetails; } });
|
|
28
26
|
var OrderToken_1 = require("./common/OrderToken");
|
|
29
27
|
Object.defineProperty(exports, "OrderToken", { enumerable: true, get: function () { return OrderToken_1.OrderToken; } });
|
|
30
28
|
var OrderTokenAmount_1 = require("./common/OrderTokenAmount");
|
|
31
29
|
Object.defineProperty(exports, "OrderTokenAmount", { enumerable: true, get: function () { return OrderTokenAmount_1.OrderTokenAmount; } });
|
|
30
|
+
var OrderStatus_1 = require("./common/OrderStatus");
|
|
31
|
+
Object.defineProperty(exports, "OrderStatus", { enumerable: true, get: function () { return OrderStatus_1.OrderStatus; } });
|
|
32
32
|
var TokenBalance_1 = require("./common/TokenBalance");
|
|
33
33
|
Object.defineProperty(exports, "TokenBalance", { enumerable: true, get: function () { return TokenBalance_1.TokenBalance; } });
|
|
34
|
-
var WebviewOnrampOrderStatus_1 = require("./webview/WebviewOnrampOrderStatus");
|
|
35
|
-
Object.defineProperty(exports, "WebviewOnrampOrderStatus", { enumerable: true, get: function () { return WebviewOnrampOrderStatus_1.WebviewOnrampOrderStatus; } });
|
|
36
|
-
var WebviewOnrampPayment_1 = require("./webview/WebviewOnrampPayment");
|
|
37
|
-
Object.defineProperty(exports, "WebviewOnrampPayment", { enumerable: true, get: function () { return WebviewOnrampPayment_1.WebviewOnrampPayment; } });
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useAnyspendCreateOnrampOrder = useAnyspendCreateOnrampOrder;
|
|
4
|
-
const constants_1 = require("../../../anyspend/constants");
|
|
5
4
|
const anyspend_1 = require("../../../anyspend/services/anyspend");
|
|
6
5
|
const utils_1 = require("../../../anyspend/utils");
|
|
7
6
|
const react_query_1 = require("@tanstack/react-query");
|
|
8
7
|
const react_1 = require("react");
|
|
9
8
|
const viem_1 = require("viem");
|
|
10
9
|
const chains_1 = require("viem/chains");
|
|
10
|
+
const constants_1 = require("../../../anyspend/constants");
|
|
11
11
|
/**
|
|
12
12
|
* Hook for creating onramp orders in the Anyspend protocol
|
|
13
13
|
* Specifically handles orders that involve fiat-to-crypto onramp functionality
|
|
@@ -15,7 +15,7 @@ const chains_1 = require("viem/chains");
|
|
|
15
15
|
function useAnyspendCreateOnrampOrder({ onSuccess, onError } = {}) {
|
|
16
16
|
const { mutate: createOrder, isPending } = (0, react_query_1.useMutation)({
|
|
17
17
|
mutationFn: async (params) => {
|
|
18
|
-
const { isMainnet, recipientAddress, orderType, dstChain, dstToken, srcFiatAmount, onramp, creatorAddress, expectedDstAmount, nft, tournament, payload
|
|
18
|
+
const { isMainnet, recipientAddress, orderType, dstChain, dstToken, srcFiatAmount, onramp, creatorAddress, expectedDstAmount, nft, tournament, payload } = params;
|
|
19
19
|
try {
|
|
20
20
|
// Validate Stripe onramp options
|
|
21
21
|
if (onramp.vendor === "stripe" && !onramp.ipAddress) {
|
|
@@ -57,8 +57,7 @@ function useAnyspendCreateOnrampOrder({ onSuccess, onError } = {}) {
|
|
|
57
57
|
tournament,
|
|
58
58
|
payload
|
|
59
59
|
}),
|
|
60
|
-
creatorAddress: creatorAddress ? (0, utils_1.normalizeAddress)(creatorAddress) : undefined
|
|
61
|
-
partnerId
|
|
60
|
+
creatorAddress: creatorAddress ? (0, utils_1.normalizeAddress)(creatorAddress) : undefined
|
|
62
61
|
});
|
|
63
62
|
}
|
|
64
63
|
catch (error) {
|
|
@@ -46,7 +46,6 @@ export declare function useAnyspendOrderAndTransactions(isMainnet: boolean, orde
|
|
|
46
46
|
ipAddress?: string | undefined;
|
|
47
47
|
} | null;
|
|
48
48
|
creatorAddress: string | null;
|
|
49
|
-
partnerId: string | null;
|
|
50
49
|
oneClickBuyUrl: string | null;
|
|
51
50
|
stripePaymentIntentId: string | null;
|
|
52
51
|
permit: {
|
|
@@ -118,7 +117,6 @@ export declare function useAnyspendOrderAndTransactions(isMainnet: boolean, orde
|
|
|
118
117
|
ipAddress?: string | undefined;
|
|
119
118
|
} | null;
|
|
120
119
|
creatorAddress: string | null;
|
|
121
|
-
partnerId: string | null;
|
|
122
120
|
oneClickBuyUrl: string | null;
|
|
123
121
|
stripePaymentIntentId: string | null;
|
|
124
122
|
permit: {
|
|
@@ -182,7 +180,6 @@ export declare function useAnyspendOrderAndTransactions(isMainnet: boolean, orde
|
|
|
182
180
|
ipAddress?: string | undefined;
|
|
183
181
|
} | null;
|
|
184
182
|
creatorAddress: string | null;
|
|
185
|
-
partnerId: string | null;
|
|
186
183
|
oneClickBuyUrl: string | null;
|
|
187
184
|
stripePaymentIntentId: string | null;
|
|
188
185
|
permit: {
|
|
@@ -246,7 +243,6 @@ export declare function useAnyspendOrderAndTransactions(isMainnet: boolean, orde
|
|
|
246
243
|
ipAddress?: string | undefined;
|
|
247
244
|
} | null;
|
|
248
245
|
creatorAddress: string | null;
|
|
249
|
-
partnerId: string | null;
|
|
250
246
|
oneClickBuyUrl: string | null;
|
|
251
247
|
stripePaymentIntentId: string | null;
|
|
252
248
|
permit: {
|
|
@@ -305,7 +301,6 @@ export declare function useAnyspendOrderAndTransactions(isMainnet: boolean, orde
|
|
|
305
301
|
ipAddress?: string | undefined;
|
|
306
302
|
} | null;
|
|
307
303
|
creatorAddress: string | null;
|
|
308
|
-
partnerId: string | null;
|
|
309
304
|
oneClickBuyUrl: string | null;
|
|
310
305
|
stripePaymentIntentId: string | null;
|
|
311
306
|
permit: {
|
|
@@ -404,7 +399,6 @@ export declare function useAnyspendOrderAndTransactions(isMainnet: boolean, orde
|
|
|
404
399
|
ipAddress?: string | undefined;
|
|
405
400
|
} | null;
|
|
406
401
|
creatorAddress: string | null;
|
|
407
|
-
partnerId: string | null;
|
|
408
402
|
oneClickBuyUrl: string | null;
|
|
409
403
|
stripePaymentIntentId: string | null;
|
|
410
404
|
permit: {
|
|
@@ -476,7 +470,6 @@ export declare function useAnyspendOrderAndTransactions(isMainnet: boolean, orde
|
|
|
476
470
|
ipAddress?: string | undefined;
|
|
477
471
|
} | null;
|
|
478
472
|
creatorAddress: string | null;
|
|
479
|
-
partnerId: string | null;
|
|
480
473
|
oneClickBuyUrl: string | null;
|
|
481
474
|
stripePaymentIntentId: string | null;
|
|
482
475
|
permit: {
|
|
@@ -540,7 +533,6 @@ export declare function useAnyspendOrderAndTransactions(isMainnet: boolean, orde
|
|
|
540
533
|
ipAddress?: string | undefined;
|
|
541
534
|
} | null;
|
|
542
535
|
creatorAddress: string | null;
|
|
543
|
-
partnerId: string | null;
|
|
544
536
|
oneClickBuyUrl: string | null;
|
|
545
537
|
stripePaymentIntentId: string | null;
|
|
546
538
|
permit: {
|
|
@@ -604,7 +596,6 @@ export declare function useAnyspendOrderAndTransactions(isMainnet: boolean, orde
|
|
|
604
596
|
ipAddress?: string | undefined;
|
|
605
597
|
} | null;
|
|
606
598
|
creatorAddress: string | null;
|
|
607
|
-
partnerId: string | null;
|
|
608
599
|
oneClickBuyUrl: string | null;
|
|
609
600
|
stripePaymentIntentId: string | null;
|
|
610
601
|
permit: {
|
|
@@ -663,7 +654,6 @@ export declare function useAnyspendOrderAndTransactions(isMainnet: boolean, orde
|
|
|
663
654
|
ipAddress?: string | undefined;
|
|
664
655
|
} | null;
|
|
665
656
|
creatorAddress: string | null;
|
|
666
|
-
partnerId: string | null;
|
|
667
657
|
oneClickBuyUrl: string | null;
|
|
668
658
|
stripePaymentIntentId: string | null;
|
|
669
659
|
permit: {
|
|
@@ -43,7 +43,6 @@ export declare function useAnyspendOrderHistory(isMainnet: boolean, creatorAddre
|
|
|
43
43
|
ipAddress?: string | undefined;
|
|
44
44
|
} | null;
|
|
45
45
|
creatorAddress: string | null;
|
|
46
|
-
partnerId: string | null;
|
|
47
46
|
oneClickBuyUrl: string | null;
|
|
48
47
|
stripePaymentIntentId: string | null;
|
|
49
48
|
permit: {
|
|
@@ -115,7 +114,6 @@ export declare function useAnyspendOrderHistory(isMainnet: boolean, creatorAddre
|
|
|
115
114
|
ipAddress?: string | undefined;
|
|
116
115
|
} | null;
|
|
117
116
|
creatorAddress: string | null;
|
|
118
|
-
partnerId: string | null;
|
|
119
117
|
oneClickBuyUrl: string | null;
|
|
120
118
|
stripePaymentIntentId: string | null;
|
|
121
119
|
permit: {
|
|
@@ -179,7 +177,6 @@ export declare function useAnyspendOrderHistory(isMainnet: boolean, creatorAddre
|
|
|
179
177
|
ipAddress?: string | undefined;
|
|
180
178
|
} | null;
|
|
181
179
|
creatorAddress: string | null;
|
|
182
|
-
partnerId: string | null;
|
|
183
180
|
oneClickBuyUrl: string | null;
|
|
184
181
|
stripePaymentIntentId: string | null;
|
|
185
182
|
permit: {
|
|
@@ -243,7 +240,6 @@ export declare function useAnyspendOrderHistory(isMainnet: boolean, creatorAddre
|
|
|
243
240
|
ipAddress?: string | undefined;
|
|
244
241
|
} | null;
|
|
245
242
|
creatorAddress: string | null;
|
|
246
|
-
partnerId: string | null;
|
|
247
243
|
oneClickBuyUrl: string | null;
|
|
248
244
|
stripePaymentIntentId: string | null;
|
|
249
245
|
permit: {
|
|
@@ -302,7 +298,6 @@ export declare function useAnyspendOrderHistory(isMainnet: boolean, creatorAddre
|
|
|
302
298
|
ipAddress?: string | undefined;
|
|
303
299
|
} | null;
|
|
304
300
|
creatorAddress: string | null;
|
|
305
|
-
partnerId: string | null;
|
|
306
301
|
oneClickBuyUrl: string | null;
|
|
307
302
|
stripePaymentIntentId: string | null;
|
|
308
303
|
permit: {
|
|
@@ -365,7 +360,6 @@ export declare function useAnyspendOrderHistory(isMainnet: boolean, creatorAddre
|
|
|
365
360
|
ipAddress?: string | undefined;
|
|
366
361
|
} | null;
|
|
367
362
|
creatorAddress: string | null;
|
|
368
|
-
partnerId: string | null;
|
|
369
363
|
oneClickBuyUrl: string | null;
|
|
370
364
|
stripePaymentIntentId: string | null;
|
|
371
365
|
permit: {
|
|
@@ -437,7 +431,6 @@ export declare function useAnyspendOrderHistory(isMainnet: boolean, creatorAddre
|
|
|
437
431
|
ipAddress?: string | undefined;
|
|
438
432
|
} | null;
|
|
439
433
|
creatorAddress: string | null;
|
|
440
|
-
partnerId: string | null;
|
|
441
434
|
oneClickBuyUrl: string | null;
|
|
442
435
|
stripePaymentIntentId: string | null;
|
|
443
436
|
permit: {
|
|
@@ -501,7 +494,6 @@ export declare function useAnyspendOrderHistory(isMainnet: boolean, creatorAddre
|
|
|
501
494
|
ipAddress?: string | undefined;
|
|
502
495
|
} | null;
|
|
503
496
|
creatorAddress: string | null;
|
|
504
|
-
partnerId: string | null;
|
|
505
497
|
oneClickBuyUrl: string | null;
|
|
506
498
|
stripePaymentIntentId: string | null;
|
|
507
499
|
permit: {
|
|
@@ -565,7 +557,6 @@ export declare function useAnyspendOrderHistory(isMainnet: boolean, creatorAddre
|
|
|
565
557
|
ipAddress?: string | undefined;
|
|
566
558
|
} | null;
|
|
567
559
|
creatorAddress: string | null;
|
|
568
|
-
partnerId: string | null;
|
|
569
560
|
oneClickBuyUrl: string | null;
|
|
570
561
|
stripePaymentIntentId: string | null;
|
|
571
562
|
permit: {
|
|
@@ -624,7 +615,6 @@ export declare function useAnyspendOrderHistory(isMainnet: boolean, creatorAddre
|
|
|
624
615
|
ipAddress?: string | undefined;
|
|
625
616
|
} | null;
|
|
626
617
|
creatorAddress: string | null;
|
|
627
|
-
partnerId: string | null;
|
|
628
618
|
oneClickBuyUrl: string | null;
|
|
629
619
|
stripePaymentIntentId: string | null;
|
|
630
620
|
permit: {
|
|
@@ -4,7 +4,7 @@ export declare const anyspendService: {
|
|
|
4
4
|
getTokenList: (isMainnet: boolean, chainId: number, query: string) => Promise<Token[]>;
|
|
5
5
|
getToken: (isMainnet: boolean, chainId: number, tokenAddress: string) => Promise<Token>;
|
|
6
6
|
getQuote: (isMainnet: boolean, req: GetQuoteRequest) => Promise<GetQuoteResponse>;
|
|
7
|
-
createOrder: ({ isMainnet, recipientAddress, type, srcChain, dstChain, srcTokenAddress, dstTokenAddress, srcAmount, payload, onramp, metadata, creatorAddress
|
|
7
|
+
createOrder: ({ isMainnet, recipientAddress, type, srcChain, dstChain, srcTokenAddress, dstTokenAddress, srcAmount, payload, onramp, metadata, creatorAddress }: {
|
|
8
8
|
isMainnet: boolean;
|
|
9
9
|
recipientAddress: string;
|
|
10
10
|
type: string;
|
|
@@ -17,7 +17,6 @@ export declare const anyspendService: {
|
|
|
17
17
|
onramp?: OnrampOptions;
|
|
18
18
|
metadata: Record<string, any>;
|
|
19
19
|
creatorAddress?: string;
|
|
20
|
-
partnerId?: string;
|
|
21
20
|
}) => Promise<any>;
|
|
22
21
|
getOrderAndTransactions: (isMainnet: boolean, orderId: string | undefined) => Promise<GetOrderAndTxsResponse>;
|
|
23
22
|
getOrderHistory: (isMainnet: boolean, creatorAddress: string | undefined, limit?: number, offset?: number) => Promise<{
|
|
@@ -66,7 +65,6 @@ export declare const anyspendService: {
|
|
|
66
65
|
ipAddress?: string | undefined;
|
|
67
66
|
} | null;
|
|
68
67
|
creatorAddress: string | null;
|
|
69
|
-
partnerId: string | null;
|
|
70
68
|
oneClickBuyUrl: string | null;
|
|
71
69
|
stripePaymentIntentId: string | null;
|
|
72
70
|
permit: {
|
|
@@ -138,7 +136,6 @@ export declare const anyspendService: {
|
|
|
138
136
|
ipAddress?: string | undefined;
|
|
139
137
|
} | null;
|
|
140
138
|
creatorAddress: string | null;
|
|
141
|
-
partnerId: string | null;
|
|
142
139
|
oneClickBuyUrl: string | null;
|
|
143
140
|
stripePaymentIntentId: string | null;
|
|
144
141
|
permit: {
|
|
@@ -202,7 +199,6 @@ export declare const anyspendService: {
|
|
|
202
199
|
ipAddress?: string | undefined;
|
|
203
200
|
} | null;
|
|
204
201
|
creatorAddress: string | null;
|
|
205
|
-
partnerId: string | null;
|
|
206
202
|
oneClickBuyUrl: string | null;
|
|
207
203
|
stripePaymentIntentId: string | null;
|
|
208
204
|
permit: {
|
|
@@ -266,7 +262,6 @@ export declare const anyspendService: {
|
|
|
266
262
|
ipAddress?: string | undefined;
|
|
267
263
|
} | null;
|
|
268
264
|
creatorAddress: string | null;
|
|
269
|
-
partnerId: string | null;
|
|
270
265
|
oneClickBuyUrl: string | null;
|
|
271
266
|
stripePaymentIntentId: string | null;
|
|
272
267
|
permit: {
|
|
@@ -325,7 +320,6 @@ export declare const anyspendService: {
|
|
|
325
320
|
ipAddress?: string | undefined;
|
|
326
321
|
} | null;
|
|
327
322
|
creatorAddress: string | null;
|
|
328
|
-
partnerId: string | null;
|
|
329
323
|
oneClickBuyUrl: string | null;
|
|
330
324
|
stripePaymentIntentId: string | null;
|
|
331
325
|
permit: {
|
|
@@ -43,7 +43,7 @@ exports.anyspendService = {
|
|
|
43
43
|
return data;
|
|
44
44
|
},
|
|
45
45
|
// Order related
|
|
46
|
-
createOrder: async ({ isMainnet, recipientAddress, type, srcChain, dstChain, srcTokenAddress, dstTokenAddress, srcAmount, payload, onramp, metadata, creatorAddress
|
|
46
|
+
createOrder: async ({ isMainnet, recipientAddress, type, srcChain, dstChain, srcTokenAddress, dstTokenAddress, srcAmount, payload, onramp, metadata, creatorAddress }) => {
|
|
47
47
|
const response = await fetch(`${isMainnet ? constants_1.ANYSPEND_MAINNET_BASE_URL : constants_1.ANYSPEND_TESTNET_BASE_URL}/orders`, {
|
|
48
48
|
method: "POST",
|
|
49
49
|
headers: {
|
|
@@ -60,8 +60,7 @@ exports.anyspendService = {
|
|
|
60
60
|
payload,
|
|
61
61
|
onramp,
|
|
62
62
|
metadata,
|
|
63
|
-
creatorAddress
|
|
64
|
-
partnerId
|
|
63
|
+
creatorAddress
|
|
65
64
|
})
|
|
66
65
|
});
|
|
67
66
|
const data = await response.json();
|
|
@@ -52,7 +52,6 @@ export declare const zBaseOrder: z.ZodObject<{
|
|
|
52
52
|
ipAddress?: string | undefined;
|
|
53
53
|
}>>;
|
|
54
54
|
creatorAddress: z.ZodNullable<z.ZodString>;
|
|
55
|
-
partnerId: z.ZodNullable<z.ZodString>;
|
|
56
55
|
oneClickBuyUrl: z.ZodNullable<z.ZodString>;
|
|
57
56
|
stripePaymentIntentId: z.ZodNullable<z.ZodString>;
|
|
58
57
|
permit: z.ZodNullable<z.ZodObject<{
|
|
@@ -95,7 +94,6 @@ export declare const zBaseOrder: z.ZodObject<{
|
|
|
95
94
|
ipAddress?: string | undefined;
|
|
96
95
|
} | null;
|
|
97
96
|
creatorAddress: string | null;
|
|
98
|
-
partnerId: string | null;
|
|
99
97
|
oneClickBuyUrl: string | null;
|
|
100
98
|
stripePaymentIntentId: string | null;
|
|
101
99
|
permit: {
|
|
@@ -126,7 +124,6 @@ export declare const zBaseOrder: z.ZodObject<{
|
|
|
126
124
|
ipAddress?: string | undefined;
|
|
127
125
|
} | null;
|
|
128
126
|
creatorAddress: string | null;
|
|
129
|
-
partnerId: string | null;
|
|
130
127
|
oneClickBuyUrl: string | null;
|
|
131
128
|
stripePaymentIntentId: string | null;
|
|
132
129
|
permit: {
|
|
@@ -170,7 +167,6 @@ export declare const zOrder: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
170
167
|
ipAddress?: string | undefined;
|
|
171
168
|
}>>;
|
|
172
169
|
creatorAddress: z.ZodNullable<z.ZodString>;
|
|
173
|
-
partnerId: z.ZodNullable<z.ZodString>;
|
|
174
170
|
oneClickBuyUrl: z.ZodNullable<z.ZodString>;
|
|
175
171
|
stripePaymentIntentId: z.ZodNullable<z.ZodString>;
|
|
176
172
|
permit: z.ZodNullable<z.ZodObject<{
|
|
@@ -356,7 +352,6 @@ export declare const zOrder: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
356
352
|
ipAddress?: string | undefined;
|
|
357
353
|
} | null;
|
|
358
354
|
creatorAddress: string | null;
|
|
359
|
-
partnerId: string | null;
|
|
360
355
|
oneClickBuyUrl: string | null;
|
|
361
356
|
stripePaymentIntentId: string | null;
|
|
362
357
|
permit: {
|
|
@@ -414,7 +409,6 @@ export declare const zOrder: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
414
409
|
ipAddress?: string | undefined;
|
|
415
410
|
} | null;
|
|
416
411
|
creatorAddress: string | null;
|
|
417
|
-
partnerId: string | null;
|
|
418
412
|
oneClickBuyUrl: string | null;
|
|
419
413
|
stripePaymentIntentId: string | null;
|
|
420
414
|
permit: {
|
|
@@ -461,7 +455,6 @@ export declare const zOrder: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
461
455
|
ipAddress?: string | undefined;
|
|
462
456
|
}>>;
|
|
463
457
|
creatorAddress: z.ZodNullable<z.ZodString>;
|
|
464
|
-
partnerId: z.ZodNullable<z.ZodString>;
|
|
465
458
|
oneClickBuyUrl: z.ZodNullable<z.ZodString>;
|
|
466
459
|
stripePaymentIntentId: z.ZodNullable<z.ZodString>;
|
|
467
460
|
permit: z.ZodNullable<z.ZodObject<{
|
|
@@ -731,7 +724,6 @@ export declare const zOrder: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
731
724
|
ipAddress?: string | undefined;
|
|
732
725
|
} | null;
|
|
733
726
|
creatorAddress: string | null;
|
|
734
|
-
partnerId: string | null;
|
|
735
727
|
oneClickBuyUrl: string | null;
|
|
736
728
|
stripePaymentIntentId: string | null;
|
|
737
729
|
permit: {
|
|
@@ -803,7 +795,6 @@ export declare const zOrder: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
803
795
|
ipAddress?: string | undefined;
|
|
804
796
|
} | null;
|
|
805
797
|
creatorAddress: string | null;
|
|
806
|
-
partnerId: string | null;
|
|
807
798
|
oneClickBuyUrl: string | null;
|
|
808
799
|
stripePaymentIntentId: string | null;
|
|
809
800
|
permit: {
|
|
@@ -850,7 +841,6 @@ export declare const zOrder: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
850
841
|
ipAddress?: string | undefined;
|
|
851
842
|
}>>;
|
|
852
843
|
creatorAddress: z.ZodNullable<z.ZodString>;
|
|
853
|
-
partnerId: z.ZodNullable<z.ZodString>;
|
|
854
844
|
oneClickBuyUrl: z.ZodNullable<z.ZodString>;
|
|
855
845
|
stripePaymentIntentId: z.ZodNullable<z.ZodString>;
|
|
856
846
|
permit: z.ZodNullable<z.ZodObject<{
|
|
@@ -1070,7 +1060,6 @@ export declare const zOrder: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
1070
1060
|
ipAddress?: string | undefined;
|
|
1071
1061
|
} | null;
|
|
1072
1062
|
creatorAddress: string | null;
|
|
1073
|
-
partnerId: string | null;
|
|
1074
1063
|
oneClickBuyUrl: string | null;
|
|
1075
1064
|
stripePaymentIntentId: string | null;
|
|
1076
1065
|
permit: {
|
|
@@ -1134,7 +1123,6 @@ export declare const zOrder: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
1134
1123
|
ipAddress?: string | undefined;
|
|
1135
1124
|
} | null;
|
|
1136
1125
|
creatorAddress: string | null;
|
|
1137
|
-
partnerId: string | null;
|
|
1138
1126
|
oneClickBuyUrl: string | null;
|
|
1139
1127
|
stripePaymentIntentId: string | null;
|
|
1140
1128
|
permit: {
|
|
@@ -1181,7 +1169,6 @@ export declare const zOrder: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
1181
1169
|
ipAddress?: string | undefined;
|
|
1182
1170
|
}>>;
|
|
1183
1171
|
creatorAddress: z.ZodNullable<z.ZodString>;
|
|
1184
|
-
partnerId: z.ZodNullable<z.ZodString>;
|
|
1185
1172
|
oneClickBuyUrl: z.ZodNullable<z.ZodString>;
|
|
1186
1173
|
stripePaymentIntentId: z.ZodNullable<z.ZodString>;
|
|
1187
1174
|
permit: z.ZodNullable<z.ZodObject<{
|
|
@@ -1401,7 +1388,6 @@ export declare const zOrder: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
1401
1388
|
ipAddress?: string | undefined;
|
|
1402
1389
|
} | null;
|
|
1403
1390
|
creatorAddress: string | null;
|
|
1404
|
-
partnerId: string | null;
|
|
1405
1391
|
oneClickBuyUrl: string | null;
|
|
1406
1392
|
stripePaymentIntentId: string | null;
|
|
1407
1393
|
permit: {
|
|
@@ -1465,7 +1451,6 @@ export declare const zOrder: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
1465
1451
|
ipAddress?: string | undefined;
|
|
1466
1452
|
} | null;
|
|
1467
1453
|
creatorAddress: string | null;
|
|
1468
|
-
partnerId: string | null;
|
|
1469
1454
|
oneClickBuyUrl: string | null;
|
|
1470
1455
|
stripePaymentIntentId: string | null;
|
|
1471
1456
|
permit: {
|
|
@@ -1512,7 +1497,6 @@ export declare const zOrder: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
1512
1497
|
ipAddress?: string | undefined;
|
|
1513
1498
|
}>>;
|
|
1514
1499
|
creatorAddress: z.ZodNullable<z.ZodString>;
|
|
1515
|
-
partnerId: z.ZodNullable<z.ZodString>;
|
|
1516
1500
|
oneClickBuyUrl: z.ZodNullable<z.ZodString>;
|
|
1517
1501
|
stripePaymentIntentId: z.ZodNullable<z.ZodString>;
|
|
1518
1502
|
permit: z.ZodNullable<z.ZodObject<{
|
|
@@ -1708,7 +1692,6 @@ export declare const zOrder: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
1708
1692
|
ipAddress?: string | undefined;
|
|
1709
1693
|
} | null;
|
|
1710
1694
|
creatorAddress: string | null;
|
|
1711
|
-
partnerId: string | null;
|
|
1712
1695
|
oneClickBuyUrl: string | null;
|
|
1713
1696
|
stripePaymentIntentId: string | null;
|
|
1714
1697
|
permit: {
|
|
@@ -1769,7 +1752,6 @@ export declare const zOrder: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
1769
1752
|
ipAddress?: string | undefined;
|
|
1770
1753
|
} | null;
|
|
1771
1754
|
creatorAddress: string | null;
|
|
1772
|
-
partnerId: string | null;
|
|
1773
1755
|
oneClickBuyUrl: string | null;
|
|
1774
1756
|
stripePaymentIntentId: string | null;
|
|
1775
1757
|
permit: {
|
|
@@ -52,7 +52,6 @@ exports.zBaseOrder = zod_1.z.object({
|
|
|
52
52
|
expiredAt: zod_1.z.number(),
|
|
53
53
|
onrampMetadata: onramp_1.zOnrampMetadata.nullable(),
|
|
54
54
|
creatorAddress: zod_1.z.string().nullable(),
|
|
55
|
-
partnerId: zod_1.z.string().nullable(),
|
|
56
55
|
oneClickBuyUrl: zod_1.z.string().nullable(),
|
|
57
56
|
stripePaymentIntentId: zod_1.z.string().nullable(),
|
|
58
57
|
permit: permit_1.zPermit.nullable()
|