@b3dotfun/sdk 0.0.7-alpha.26 → 0.0.7-alpha.28
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/react/components/common/OrderDetails.js +0 -40
- package/dist/cjs/anyspend/react/components/webview/WebviewOnrampOrderStatus.js +0 -1
- package/dist/cjs/anyspend/react/hooks/index.d.ts +0 -2
- package/dist/cjs/anyspend/react/hooks/index.js +0 -2
- package/dist/cjs/anyspend/react/hooks/useAnyspendOrderAndTransactions.d.ts +0 -70
- package/dist/cjs/anyspend/react/hooks/useAnyspendOrderHistory.d.ts +0 -70
- package/dist/cjs/anyspend/services/anyspend.d.ts +1 -39
- package/dist/cjs/anyspend/services/anyspend.js +0 -13
- package/dist/cjs/anyspend/types/index.d.ts +0 -1
- package/dist/cjs/anyspend/types/index.js +0 -1
- package/dist/cjs/anyspend/types/order.d.ts +0 -200
- package/dist/cjs/anyspend/types/order.js +1 -6
- package/dist/cjs/anyspend/types/req-res/createOrder.d.ts +0 -235
- package/dist/cjs/anyspend/types/req-res/getOrderAndTransactions.d.ts +0 -305
- package/dist/cjs/anyspend/types/req-res/getOrderHistory.d.ts +0 -235
- package/dist/cjs/anyspend/types/req-res/index.d.ts +0 -1
- package/dist/cjs/anyspend/types/req-res/index.js +0 -1
- package/dist/cjs/anyspend/utils/format.js +0 -4
- package/dist/cjs/shared/utils/formatUsername.d.ts +1 -0
- package/dist/cjs/shared/utils/formatUsername.js +8 -0
- package/dist/cjs/shared/utils/index.d.ts +3 -10
- package/dist/cjs/shared/utils/index.js +4 -23
- package/dist/cjs/shared/utils/truncateAddress.d.ts +6 -0
- package/dist/cjs/shared/utils/truncateAddress.js +16 -0
- package/dist/esm/anyspend/react/components/common/OrderDetails.js +0 -40
- package/dist/esm/anyspend/react/components/webview/WebviewOnrampOrderStatus.js +0 -1
- package/dist/esm/anyspend/react/hooks/index.d.ts +0 -2
- package/dist/esm/anyspend/react/hooks/index.js +0 -2
- package/dist/esm/anyspend/react/hooks/useAnyspendOrderAndTransactions.d.ts +0 -70
- package/dist/esm/anyspend/react/hooks/useAnyspendOrderHistory.d.ts +0 -70
- package/dist/esm/anyspend/services/anyspend.d.ts +1 -39
- package/dist/esm/anyspend/services/anyspend.js +0 -13
- package/dist/esm/anyspend/types/index.d.ts +0 -1
- package/dist/esm/anyspend/types/index.js +0 -1
- package/dist/esm/anyspend/types/order.d.ts +0 -200
- package/dist/esm/anyspend/types/order.js +1 -6
- package/dist/esm/anyspend/types/req-res/createOrder.d.ts +0 -235
- package/dist/esm/anyspend/types/req-res/getOrderAndTransactions.d.ts +0 -305
- package/dist/esm/anyspend/types/req-res/getOrderHistory.d.ts +0 -235
- package/dist/esm/anyspend/types/req-res/index.d.ts +0 -1
- package/dist/esm/anyspend/types/req-res/index.js +0 -1
- package/dist/esm/anyspend/utils/format.js +0 -4
- package/dist/esm/shared/utils/formatUsername.d.ts +1 -0
- package/dist/esm/shared/utils/formatUsername.js +5 -0
- package/dist/esm/shared/utils/index.d.ts +3 -10
- package/dist/esm/shared/utils/index.js +4 -20
- package/dist/esm/shared/utils/truncateAddress.d.ts +6 -0
- package/dist/esm/shared/utils/truncateAddress.js +12 -0
- package/dist/types/anyspend/react/hooks/index.d.ts +0 -2
- package/dist/types/anyspend/react/hooks/useAnyspendOrderAndTransactions.d.ts +0 -70
- package/dist/types/anyspend/react/hooks/useAnyspendOrderHistory.d.ts +0 -70
- package/dist/types/anyspend/services/anyspend.d.ts +1 -39
- package/dist/types/anyspend/types/index.d.ts +0 -1
- package/dist/types/anyspend/types/order.d.ts +0 -200
- package/dist/types/anyspend/types/req-res/createOrder.d.ts +0 -235
- package/dist/types/anyspend/types/req-res/getOrderAndTransactions.d.ts +0 -305
- package/dist/types/anyspend/types/req-res/getOrderHistory.d.ts +0 -235
- package/dist/types/anyspend/types/req-res/index.d.ts +0 -1
- package/dist/types/shared/utils/formatUsername.d.ts +1 -0
- package/dist/types/shared/utils/index.d.ts +3 -10
- package/dist/types/shared/utils/truncateAddress.d.ts +6 -0
- package/package.json +1 -1
- package/src/anyspend/react/components/common/OrderDetails.tsx +0 -46
- package/src/anyspend/react/components/webview/WebviewOnrampOrderStatus.tsx +0 -1
- package/src/anyspend/react/hooks/index.ts +0 -2
- package/src/anyspend/services/anyspend.ts +0 -18
- package/src/anyspend/types/index.ts +0 -1
- package/src/anyspend/types/order.ts +1 -8
- package/src/anyspend/types/req-res/index.ts +0 -1
- package/src/anyspend/utils/format.ts +0 -5
- package/src/shared/utils/formatUsername.ts +5 -0
- package/src/shared/utils/index.ts +4 -22
- package/src/shared/utils/truncateAddress.ts +11 -0
- package/dist/cjs/anyspend/react/hooks/useAnyspendSendPermitData.d.ts +0 -16
- package/dist/cjs/anyspend/react/hooks/useAnyspendSendPermitData.js +0 -39
- package/dist/cjs/anyspend/react/hooks/usePermitData.d.ts +0 -92
- package/dist/cjs/anyspend/react/hooks/usePermitData.js +0 -158
- package/dist/cjs/anyspend/types/permit.d.ts +0 -21
- package/dist/cjs/anyspend/types/permit.js +0 -11
- package/dist/cjs/anyspend/types/req-res/sendPermitData.d.ts +0 -66
- package/dist/cjs/anyspend/types/req-res/sendPermitData.js +0 -11
- package/dist/esm/anyspend/react/hooks/useAnyspendSendPermitData.d.ts +0 -16
- package/dist/esm/anyspend/react/hooks/useAnyspendSendPermitData.js +0 -36
- package/dist/esm/anyspend/react/hooks/usePermitData.d.ts +0 -92
- package/dist/esm/anyspend/react/hooks/usePermitData.js +0 -154
- package/dist/esm/anyspend/types/permit.d.ts +0 -21
- package/dist/esm/anyspend/types/permit.js +0 -8
- package/dist/esm/anyspend/types/req-res/sendPermitData.d.ts +0 -66
- package/dist/esm/anyspend/types/req-res/sendPermitData.js +0 -8
- package/dist/types/anyspend/react/hooks/useAnyspendSendPermitData.d.ts +0 -16
- package/dist/types/anyspend/react/hooks/usePermitData.d.ts +0 -92
- package/dist/types/anyspend/types/permit.d.ts +0 -21
- package/dist/types/anyspend/types/req-res/sendPermitData.d.ts +0 -66
- package/src/anyspend/react/hooks/useAnyspendSendPermitData.ts +0 -38
- package/src/anyspend/react/hooks/usePermitData.ts +0 -183
- package/src/anyspend/types/permit.ts +0 -10
- package/src/anyspend/types/req-res/sendPermitData.ts +0 -10
|
@@ -137,21 +137,6 @@ exports.OrderDetails = (0, react_4.memo)(function OrderDetails({ isMainnet, mode
|
|
|
137
137
|
const [showQRCode, setShowQRCode] = (0, react_4.useState)(false);
|
|
138
138
|
const { isLoading: txLoading, isSuccess: txSuccess } = (0, wagmi_1.useWaitForTransactionReceipt)({ hash: txHash });
|
|
139
139
|
const { switchChainAndExecute, isSwitchingOrExecuting } = (0, react_1.useChainSwitchWithAction)();
|
|
140
|
-
// const { permitData, isCheckingPermit } = usePermitData({
|
|
141
|
-
// chainId: order.srcChain,
|
|
142
|
-
// tokenAddress: order.srcTokenAddress as Hex,
|
|
143
|
-
// ownerAddress: account?.address && isAddress(account.address) ? getAddress(account.address) : undefined,
|
|
144
|
-
// amount: BigInt(order.srcAmount)
|
|
145
|
-
// });
|
|
146
|
-
// const { sendPermitData } = useAnyspendSendPermitData({
|
|
147
|
-
// onSuccess: _data => {
|
|
148
|
-
// toast.info("Sent permit data successfully");
|
|
149
|
-
// },
|
|
150
|
-
// onError: error => {
|
|
151
|
-
// console.error(error);
|
|
152
|
-
// toast.error("Failed to send permit data: " + error.message);
|
|
153
|
-
// }
|
|
154
|
-
// });
|
|
155
140
|
const { colorMode } = (0, react_2.useColorMode)();
|
|
156
141
|
const roundedUpSrcAmount = (0, react_4.useMemo)(() => {
|
|
157
142
|
// Display the full transfer amount without rounding since users need to see the exact value they're transferring.
|
|
@@ -168,31 +153,6 @@ exports.OrderDetails = (0, react_4.memo)(function OrderDetails({ isMainnet, mode
|
|
|
168
153
|
return;
|
|
169
154
|
}
|
|
170
155
|
console.log("Processing transaction on chain:", currentWalletClient.chain.id);
|
|
171
|
-
// Process transaction
|
|
172
|
-
// if (permitData?.data && account.address) {
|
|
173
|
-
// const signature = await currentWalletClient.signTypedData({
|
|
174
|
-
// domain: permitData.data.domain,
|
|
175
|
-
// types: permitData.data.types,
|
|
176
|
-
// primaryType: "Permit",
|
|
177
|
-
// message: permitData.data.messageToSign
|
|
178
|
-
// });
|
|
179
|
-
// // Split signature into v, r, s components
|
|
180
|
-
// const r = signature.slice(0, 66);
|
|
181
|
-
// const s = "0x" + signature.slice(66, 130);
|
|
182
|
-
// const v = parseInt(signature.slice(130, 132), 16);
|
|
183
|
-
// sendPermitData({
|
|
184
|
-
// isMainnet: true,
|
|
185
|
-
// orderId: order.id,
|
|
186
|
-
// permitData: {
|
|
187
|
-
// deadline: Number(permitData.data.messageToSign.deadline),
|
|
188
|
-
// ownerAddress: account.address,
|
|
189
|
-
// r,
|
|
190
|
-
// s,
|
|
191
|
-
// v
|
|
192
|
-
// }
|
|
193
|
-
// });
|
|
194
|
-
// return;
|
|
195
|
-
// }
|
|
196
156
|
const signer = currentWalletClient.account;
|
|
197
157
|
// Send transaction
|
|
198
158
|
if ((0, anyspend_1.isNativeToken)(order.srcTokenAddress)) {
|
|
@@ -16,7 +16,6 @@ function WebviewOnrampOrderStatus({ order }) {
|
|
|
16
16
|
const isPending = order.status === anyspend_1.OrderStatus.WaitingStripePayment ||
|
|
17
17
|
order.status === anyspend_1.OrderStatus.ScanningDepositTransaction ||
|
|
18
18
|
order.status === anyspend_1.OrderStatus.SendingTokenFromVault ||
|
|
19
|
-
order.status === anyspend_1.OrderStatus.ObtainToken ||
|
|
20
19
|
order.status === anyspend_1.OrderStatus.Relay;
|
|
21
20
|
const isExecuted = order.status === anyspend_1.OrderStatus.Executed;
|
|
22
21
|
const isFailed = order.status === anyspend_1.OrderStatus.Failure;
|
|
@@ -3,12 +3,10 @@ export * from "./useAnyspendCreateOrder";
|
|
|
3
3
|
export * from "./useAnyspendOrderAndTransactions";
|
|
4
4
|
export * from "./useAnyspendOrderHistory";
|
|
5
5
|
export * from "./useAnyspendQuote";
|
|
6
|
-
export * from "./useAnyspendSendPermitData";
|
|
7
6
|
export * from "./useAnyspendTokens";
|
|
8
7
|
export * from "./useCoinbaseOnrampOptions";
|
|
9
8
|
export * from "./useGeoOnrampOptions";
|
|
10
9
|
export * from "./useGetGeo";
|
|
11
|
-
export * from "./usePermitData";
|
|
12
10
|
export * from "./useSigMint";
|
|
13
11
|
export * from "./useStripeClientSecret";
|
|
14
12
|
export * from "./useStripeSupport";
|
|
@@ -19,12 +19,10 @@ __exportStar(require("./useAnyspendCreateOrder"), exports);
|
|
|
19
19
|
__exportStar(require("./useAnyspendOrderAndTransactions"), exports);
|
|
20
20
|
__exportStar(require("./useAnyspendOrderHistory"), exports);
|
|
21
21
|
__exportStar(require("./useAnyspendQuote"), exports);
|
|
22
|
-
__exportStar(require("./useAnyspendSendPermitData"), exports);
|
|
23
22
|
__exportStar(require("./useAnyspendTokens"), exports);
|
|
24
23
|
__exportStar(require("./useCoinbaseOnrampOptions"), exports);
|
|
25
24
|
__exportStar(require("./useGeoOnrampOptions"), exports);
|
|
26
25
|
__exportStar(require("./useGetGeo"), exports);
|
|
27
|
-
__exportStar(require("./usePermitData"), exports);
|
|
28
26
|
__exportStar(require("./useSigMint"), exports);
|
|
29
27
|
__exportStar(require("./useStripeClientSecret"), exports);
|
|
30
28
|
__exportStar(require("./useStripeSupport"), exports);
|
|
@@ -50,13 +50,6 @@ export declare function useAnyspendOrderAndTransactions(isMainnet: boolean, orde
|
|
|
50
50
|
partnerId: string | null;
|
|
51
51
|
oneClickBuyUrl: string | null;
|
|
52
52
|
stripePaymentIntentId: string | null;
|
|
53
|
-
permit: {
|
|
54
|
-
ownerAddress: string;
|
|
55
|
-
deadline: number;
|
|
56
|
-
v: number;
|
|
57
|
-
r: string;
|
|
58
|
-
s: string;
|
|
59
|
-
} | null;
|
|
60
53
|
payload: {
|
|
61
54
|
expectedDstAmount: string;
|
|
62
55
|
actualDstAmount: string | null;
|
|
@@ -123,13 +116,6 @@ export declare function useAnyspendOrderAndTransactions(isMainnet: boolean, orde
|
|
|
123
116
|
partnerId: string | null;
|
|
124
117
|
oneClickBuyUrl: string | null;
|
|
125
118
|
stripePaymentIntentId: string | null;
|
|
126
|
-
permit: {
|
|
127
|
-
ownerAddress: string;
|
|
128
|
-
deadline: number;
|
|
129
|
-
v: number;
|
|
130
|
-
r: string;
|
|
131
|
-
s: string;
|
|
132
|
-
} | null;
|
|
133
119
|
payload: {
|
|
134
120
|
contractAddress: string;
|
|
135
121
|
tokenId: number | null;
|
|
@@ -190,13 +176,6 @@ export declare function useAnyspendOrderAndTransactions(isMainnet: boolean, orde
|
|
|
190
176
|
partnerId: string | null;
|
|
191
177
|
oneClickBuyUrl: string | null;
|
|
192
178
|
stripePaymentIntentId: string | null;
|
|
193
|
-
permit: {
|
|
194
|
-
ownerAddress: string;
|
|
195
|
-
deadline: number;
|
|
196
|
-
v: number;
|
|
197
|
-
r: string;
|
|
198
|
-
s: string;
|
|
199
|
-
} | null;
|
|
200
179
|
payload: {
|
|
201
180
|
contractAddress: string;
|
|
202
181
|
entryPrice: string;
|
|
@@ -255,13 +234,6 @@ export declare function useAnyspendOrderAndTransactions(isMainnet: boolean, orde
|
|
|
255
234
|
partnerId: string | null;
|
|
256
235
|
oneClickBuyUrl: string | null;
|
|
257
236
|
stripePaymentIntentId: string | null;
|
|
258
|
-
permit: {
|
|
259
|
-
ownerAddress: string;
|
|
260
|
-
deadline: number;
|
|
261
|
-
v: number;
|
|
262
|
-
r: string;
|
|
263
|
-
s: string;
|
|
264
|
-
} | null;
|
|
265
237
|
payload: {
|
|
266
238
|
contractAddress: string;
|
|
267
239
|
fundAmount: string;
|
|
@@ -315,13 +287,6 @@ export declare function useAnyspendOrderAndTransactions(isMainnet: boolean, orde
|
|
|
315
287
|
partnerId: string | null;
|
|
316
288
|
oneClickBuyUrl: string | null;
|
|
317
289
|
stripePaymentIntentId: string | null;
|
|
318
|
-
permit: {
|
|
319
|
-
ownerAddress: string;
|
|
320
|
-
deadline: number;
|
|
321
|
-
v: number;
|
|
322
|
-
r: string;
|
|
323
|
-
s: string;
|
|
324
|
-
} | null;
|
|
325
290
|
payload: {
|
|
326
291
|
data: string;
|
|
327
292
|
to: string;
|
|
@@ -415,13 +380,6 @@ export declare function useAnyspendOrderAndTransactions(isMainnet: boolean, orde
|
|
|
415
380
|
partnerId: string | null;
|
|
416
381
|
oneClickBuyUrl: string | null;
|
|
417
382
|
stripePaymentIntentId: string | null;
|
|
418
|
-
permit: {
|
|
419
|
-
ownerAddress: string;
|
|
420
|
-
deadline: number;
|
|
421
|
-
v: number;
|
|
422
|
-
r: string;
|
|
423
|
-
s: string;
|
|
424
|
-
} | null;
|
|
425
383
|
payload: {
|
|
426
384
|
expectedDstAmount: string;
|
|
427
385
|
actualDstAmount: string | null;
|
|
@@ -488,13 +446,6 @@ export declare function useAnyspendOrderAndTransactions(isMainnet: boolean, orde
|
|
|
488
446
|
partnerId: string | null;
|
|
489
447
|
oneClickBuyUrl: string | null;
|
|
490
448
|
stripePaymentIntentId: string | null;
|
|
491
|
-
permit: {
|
|
492
|
-
ownerAddress: string;
|
|
493
|
-
deadline: number;
|
|
494
|
-
v: number;
|
|
495
|
-
r: string;
|
|
496
|
-
s: string;
|
|
497
|
-
} | null;
|
|
498
449
|
payload: {
|
|
499
450
|
contractAddress: string;
|
|
500
451
|
tokenId: number | null;
|
|
@@ -555,13 +506,6 @@ export declare function useAnyspendOrderAndTransactions(isMainnet: boolean, orde
|
|
|
555
506
|
partnerId: string | null;
|
|
556
507
|
oneClickBuyUrl: string | null;
|
|
557
508
|
stripePaymentIntentId: string | null;
|
|
558
|
-
permit: {
|
|
559
|
-
ownerAddress: string;
|
|
560
|
-
deadline: number;
|
|
561
|
-
v: number;
|
|
562
|
-
r: string;
|
|
563
|
-
s: string;
|
|
564
|
-
} | null;
|
|
565
509
|
payload: {
|
|
566
510
|
contractAddress: string;
|
|
567
511
|
entryPrice: string;
|
|
@@ -620,13 +564,6 @@ export declare function useAnyspendOrderAndTransactions(isMainnet: boolean, orde
|
|
|
620
564
|
partnerId: string | null;
|
|
621
565
|
oneClickBuyUrl: string | null;
|
|
622
566
|
stripePaymentIntentId: string | null;
|
|
623
|
-
permit: {
|
|
624
|
-
ownerAddress: string;
|
|
625
|
-
deadline: number;
|
|
626
|
-
v: number;
|
|
627
|
-
r: string;
|
|
628
|
-
s: string;
|
|
629
|
-
} | null;
|
|
630
567
|
payload: {
|
|
631
568
|
contractAddress: string;
|
|
632
569
|
fundAmount: string;
|
|
@@ -680,13 +617,6 @@ export declare function useAnyspendOrderAndTransactions(isMainnet: boolean, orde
|
|
|
680
617
|
partnerId: string | null;
|
|
681
618
|
oneClickBuyUrl: string | null;
|
|
682
619
|
stripePaymentIntentId: string | null;
|
|
683
|
-
permit: {
|
|
684
|
-
ownerAddress: string;
|
|
685
|
-
deadline: number;
|
|
686
|
-
v: number;
|
|
687
|
-
r: string;
|
|
688
|
-
s: string;
|
|
689
|
-
} | null;
|
|
690
620
|
payload: {
|
|
691
621
|
data: string;
|
|
692
622
|
to: string;
|
|
@@ -47,13 +47,6 @@ export declare function useAnyspendOrderHistory(isMainnet: boolean, creatorAddre
|
|
|
47
47
|
partnerId: string | null;
|
|
48
48
|
oneClickBuyUrl: string | null;
|
|
49
49
|
stripePaymentIntentId: string | null;
|
|
50
|
-
permit: {
|
|
51
|
-
ownerAddress: string;
|
|
52
|
-
deadline: number;
|
|
53
|
-
v: number;
|
|
54
|
-
r: string;
|
|
55
|
-
s: string;
|
|
56
|
-
} | null;
|
|
57
50
|
payload: {
|
|
58
51
|
expectedDstAmount: string;
|
|
59
52
|
actualDstAmount: string | null;
|
|
@@ -120,13 +113,6 @@ export declare function useAnyspendOrderHistory(isMainnet: boolean, creatorAddre
|
|
|
120
113
|
partnerId: string | null;
|
|
121
114
|
oneClickBuyUrl: string | null;
|
|
122
115
|
stripePaymentIntentId: string | null;
|
|
123
|
-
permit: {
|
|
124
|
-
ownerAddress: string;
|
|
125
|
-
deadline: number;
|
|
126
|
-
v: number;
|
|
127
|
-
r: string;
|
|
128
|
-
s: string;
|
|
129
|
-
} | null;
|
|
130
116
|
payload: {
|
|
131
117
|
contractAddress: string;
|
|
132
118
|
tokenId: number | null;
|
|
@@ -187,13 +173,6 @@ export declare function useAnyspendOrderHistory(isMainnet: boolean, creatorAddre
|
|
|
187
173
|
partnerId: string | null;
|
|
188
174
|
oneClickBuyUrl: string | null;
|
|
189
175
|
stripePaymentIntentId: string | null;
|
|
190
|
-
permit: {
|
|
191
|
-
ownerAddress: string;
|
|
192
|
-
deadline: number;
|
|
193
|
-
v: number;
|
|
194
|
-
r: string;
|
|
195
|
-
s: string;
|
|
196
|
-
} | null;
|
|
197
176
|
payload: {
|
|
198
177
|
contractAddress: string;
|
|
199
178
|
entryPrice: string;
|
|
@@ -252,13 +231,6 @@ export declare function useAnyspendOrderHistory(isMainnet: boolean, creatorAddre
|
|
|
252
231
|
partnerId: string | null;
|
|
253
232
|
oneClickBuyUrl: string | null;
|
|
254
233
|
stripePaymentIntentId: string | null;
|
|
255
|
-
permit: {
|
|
256
|
-
ownerAddress: string;
|
|
257
|
-
deadline: number;
|
|
258
|
-
v: number;
|
|
259
|
-
r: string;
|
|
260
|
-
s: string;
|
|
261
|
-
} | null;
|
|
262
234
|
payload: {
|
|
263
235
|
contractAddress: string;
|
|
264
236
|
fundAmount: string;
|
|
@@ -312,13 +284,6 @@ export declare function useAnyspendOrderHistory(isMainnet: boolean, creatorAddre
|
|
|
312
284
|
partnerId: string | null;
|
|
313
285
|
oneClickBuyUrl: string | null;
|
|
314
286
|
stripePaymentIntentId: string | null;
|
|
315
|
-
permit: {
|
|
316
|
-
ownerAddress: string;
|
|
317
|
-
deadline: number;
|
|
318
|
-
v: number;
|
|
319
|
-
r: string;
|
|
320
|
-
s: string;
|
|
321
|
-
} | null;
|
|
322
287
|
payload: {
|
|
323
288
|
data: string;
|
|
324
289
|
to: string;
|
|
@@ -376,13 +341,6 @@ export declare function useAnyspendOrderHistory(isMainnet: boolean, creatorAddre
|
|
|
376
341
|
partnerId: string | null;
|
|
377
342
|
oneClickBuyUrl: string | null;
|
|
378
343
|
stripePaymentIntentId: string | null;
|
|
379
|
-
permit: {
|
|
380
|
-
ownerAddress: string;
|
|
381
|
-
deadline: number;
|
|
382
|
-
v: number;
|
|
383
|
-
r: string;
|
|
384
|
-
s: string;
|
|
385
|
-
} | null;
|
|
386
344
|
payload: {
|
|
387
345
|
expectedDstAmount: string;
|
|
388
346
|
actualDstAmount: string | null;
|
|
@@ -449,13 +407,6 @@ export declare function useAnyspendOrderHistory(isMainnet: boolean, creatorAddre
|
|
|
449
407
|
partnerId: string | null;
|
|
450
408
|
oneClickBuyUrl: string | null;
|
|
451
409
|
stripePaymentIntentId: string | null;
|
|
452
|
-
permit: {
|
|
453
|
-
ownerAddress: string;
|
|
454
|
-
deadline: number;
|
|
455
|
-
v: number;
|
|
456
|
-
r: string;
|
|
457
|
-
s: string;
|
|
458
|
-
} | null;
|
|
459
410
|
payload: {
|
|
460
411
|
contractAddress: string;
|
|
461
412
|
tokenId: number | null;
|
|
@@ -516,13 +467,6 @@ export declare function useAnyspendOrderHistory(isMainnet: boolean, creatorAddre
|
|
|
516
467
|
partnerId: string | null;
|
|
517
468
|
oneClickBuyUrl: string | null;
|
|
518
469
|
stripePaymentIntentId: string | null;
|
|
519
|
-
permit: {
|
|
520
|
-
ownerAddress: string;
|
|
521
|
-
deadline: number;
|
|
522
|
-
v: number;
|
|
523
|
-
r: string;
|
|
524
|
-
s: string;
|
|
525
|
-
} | null;
|
|
526
470
|
payload: {
|
|
527
471
|
contractAddress: string;
|
|
528
472
|
entryPrice: string;
|
|
@@ -581,13 +525,6 @@ export declare function useAnyspendOrderHistory(isMainnet: boolean, creatorAddre
|
|
|
581
525
|
partnerId: string | null;
|
|
582
526
|
oneClickBuyUrl: string | null;
|
|
583
527
|
stripePaymentIntentId: string | null;
|
|
584
|
-
permit: {
|
|
585
|
-
ownerAddress: string;
|
|
586
|
-
deadline: number;
|
|
587
|
-
v: number;
|
|
588
|
-
r: string;
|
|
589
|
-
s: string;
|
|
590
|
-
} | null;
|
|
591
528
|
payload: {
|
|
592
529
|
contractAddress: string;
|
|
593
530
|
fundAmount: string;
|
|
@@ -641,13 +578,6 @@ export declare function useAnyspendOrderHistory(isMainnet: boolean, creatorAddre
|
|
|
641
578
|
partnerId: string | null;
|
|
642
579
|
oneClickBuyUrl: string | null;
|
|
643
580
|
stripePaymentIntentId: string | null;
|
|
644
|
-
permit: {
|
|
645
|
-
ownerAddress: string;
|
|
646
|
-
deadline: number;
|
|
647
|
-
v: number;
|
|
648
|
-
r: string;
|
|
649
|
-
s: string;
|
|
650
|
-
} | null;
|
|
651
581
|
payload: {
|
|
652
582
|
data: string;
|
|
653
583
|
to: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { OnrampOptions } from "../../anyspend/react";
|
|
2
|
-
import { GetOrderAndTxsResponse, GetQuoteRequest, GetQuoteResponse,
|
|
2
|
+
import { GetOrderAndTxsResponse, GetQuoteRequest, GetQuoteResponse, Token } from "../../anyspend/types";
|
|
3
3
|
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>;
|
|
@@ -70,13 +70,6 @@ export declare const anyspendService: {
|
|
|
70
70
|
partnerId: string | null;
|
|
71
71
|
oneClickBuyUrl: string | null;
|
|
72
72
|
stripePaymentIntentId: string | null;
|
|
73
|
-
permit: {
|
|
74
|
-
ownerAddress: string;
|
|
75
|
-
deadline: number;
|
|
76
|
-
v: number;
|
|
77
|
-
r: string;
|
|
78
|
-
s: string;
|
|
79
|
-
} | null;
|
|
80
73
|
payload: {
|
|
81
74
|
expectedDstAmount: string;
|
|
82
75
|
actualDstAmount: string | null;
|
|
@@ -143,13 +136,6 @@ export declare const anyspendService: {
|
|
|
143
136
|
partnerId: string | null;
|
|
144
137
|
oneClickBuyUrl: string | null;
|
|
145
138
|
stripePaymentIntentId: string | null;
|
|
146
|
-
permit: {
|
|
147
|
-
ownerAddress: string;
|
|
148
|
-
deadline: number;
|
|
149
|
-
v: number;
|
|
150
|
-
r: string;
|
|
151
|
-
s: string;
|
|
152
|
-
} | null;
|
|
153
139
|
payload: {
|
|
154
140
|
contractAddress: string;
|
|
155
141
|
tokenId: number | null;
|
|
@@ -210,13 +196,6 @@ export declare const anyspendService: {
|
|
|
210
196
|
partnerId: string | null;
|
|
211
197
|
oneClickBuyUrl: string | null;
|
|
212
198
|
stripePaymentIntentId: string | null;
|
|
213
|
-
permit: {
|
|
214
|
-
ownerAddress: string;
|
|
215
|
-
deadline: number;
|
|
216
|
-
v: number;
|
|
217
|
-
r: string;
|
|
218
|
-
s: string;
|
|
219
|
-
} | null;
|
|
220
199
|
payload: {
|
|
221
200
|
contractAddress: string;
|
|
222
201
|
entryPrice: string;
|
|
@@ -275,13 +254,6 @@ export declare const anyspendService: {
|
|
|
275
254
|
partnerId: string | null;
|
|
276
255
|
oneClickBuyUrl: string | null;
|
|
277
256
|
stripePaymentIntentId: string | null;
|
|
278
|
-
permit: {
|
|
279
|
-
ownerAddress: string;
|
|
280
|
-
deadline: number;
|
|
281
|
-
v: number;
|
|
282
|
-
r: string;
|
|
283
|
-
s: string;
|
|
284
|
-
} | null;
|
|
285
257
|
payload: {
|
|
286
258
|
contractAddress: string;
|
|
287
259
|
fundAmount: string;
|
|
@@ -335,13 +307,6 @@ export declare const anyspendService: {
|
|
|
335
307
|
partnerId: string | null;
|
|
336
308
|
oneClickBuyUrl: string | null;
|
|
337
309
|
stripePaymentIntentId: string | null;
|
|
338
|
-
permit: {
|
|
339
|
-
ownerAddress: string;
|
|
340
|
-
deadline: number;
|
|
341
|
-
v: number;
|
|
342
|
-
r: string;
|
|
343
|
-
s: string;
|
|
344
|
-
} | null;
|
|
345
310
|
payload: {
|
|
346
311
|
data: string;
|
|
347
312
|
to: string;
|
|
@@ -378,8 +343,5 @@ export declare const anyspendService: {
|
|
|
378
343
|
stripeOnramp: boolean;
|
|
379
344
|
stripeWeb2: boolean;
|
|
380
345
|
}>;
|
|
381
|
-
sendPermitData: ({ isMainnet, orderId, permitData }: SendPermitDataRequestBody & {
|
|
382
|
-
isMainnet: boolean;
|
|
383
|
-
}) => Promise<any>;
|
|
384
346
|
getStripeClientSecret: (isMainnet: boolean, paymentIntentId: string) => Promise<string | null>;
|
|
385
347
|
};
|
|
@@ -106,19 +106,6 @@ exports.anyspendService = {
|
|
|
106
106
|
(0, invariant_1.default)(response.status === 200, "Failed to check Stripe support");
|
|
107
107
|
return data.data;
|
|
108
108
|
},
|
|
109
|
-
sendPermitData: async ({ isMainnet, orderId, permitData }) => {
|
|
110
|
-
const response = await fetch(`${isMainnet ? constants_1.ANYSPEND_MAINNET_BASE_URL : constants_1.ANYSPEND_TESTNET_BASE_URL}/orders/send-permit`, {
|
|
111
|
-
method: "POST",
|
|
112
|
-
headers: {
|
|
113
|
-
"Content-Type": "application/json",
|
|
114
|
-
},
|
|
115
|
-
body: JSON.stringify({
|
|
116
|
-
orderId,
|
|
117
|
-
permitData,
|
|
118
|
-
}),
|
|
119
|
-
});
|
|
120
|
-
return response.json();
|
|
121
|
-
},
|
|
122
109
|
getStripeClientSecret: async (isMainnet, paymentIntentId) => {
|
|
123
110
|
const response = await fetch(`${isMainnet ? constants_1.ANYSPEND_MAINNET_BASE_URL : constants_1.ANYSPEND_TESTNET_BASE_URL}/stripe/clientSecret?paymentIntentId=${paymentIntentId}`);
|
|
124
111
|
const data = await response.json();
|
|
@@ -22,7 +22,6 @@ __exportStar(require("./metadata"), exports);
|
|
|
22
22
|
__exportStar(require("./nft"), exports);
|
|
23
23
|
__exportStar(require("./onramp"), exports);
|
|
24
24
|
__exportStar(require("./order"), exports);
|
|
25
|
-
__exportStar(require("./permit"), exports);
|
|
26
25
|
__exportStar(require("./relay"), exports);
|
|
27
26
|
__exportStar(require("./swap"), exports);
|
|
28
27
|
__exportStar(require("./token"), exports);
|