@b3dotfun/sdk 0.0.69 → 0.0.70-alpha.1
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/index.d.ts +1 -0
- package/dist/cjs/anyspend/index.js +1 -0
- package/dist/cjs/anyspend/react/components/AnySpend.d.ts +6 -0
- package/dist/cjs/anyspend/react/components/AnySpend.js +13 -1
- package/dist/cjs/anyspend/react/components/AnySpendBondKit.d.ts +3 -1
- package/dist/cjs/anyspend/react/components/AnySpendBondKit.js +2 -2
- package/dist/cjs/anyspend/react/components/AnySpendBuySpin.d.ts +2 -1
- package/dist/cjs/anyspend/react/components/AnySpendBuySpin.js +2 -2
- package/dist/cjs/anyspend/react/components/AnySpendCustom.d.ts +1 -0
- package/dist/cjs/anyspend/react/components/AnySpendCustom.js +6 -2
- package/dist/cjs/anyspend/react/components/AnySpendCustomExactIn.d.ts +1 -0
- package/dist/cjs/anyspend/react/components/AnySpendCustomExactIn.js +3 -1
- package/dist/cjs/anyspend/react/components/AnySpendDepositUpside.d.ts +2 -1
- package/dist/cjs/anyspend/react/components/AnySpendDepositUpside.js +2 -2
- package/dist/cjs/anyspend/react/components/AnySpendNFT.d.ts +2 -1
- package/dist/cjs/anyspend/react/components/AnySpendNFT.js +2 -2
- package/dist/cjs/anyspend/react/components/AnySpendStakeB3.d.ts +2 -1
- package/dist/cjs/anyspend/react/components/AnySpendStakeB3.js +2 -2
- package/dist/cjs/anyspend/react/components/AnySpendStakeB3ExactIn.d.ts +2 -1
- package/dist/cjs/anyspend/react/components/AnySpendStakeB3ExactIn.js +2 -2
- package/dist/cjs/anyspend/react/components/AnySpendStakeUpside.d.ts +2 -1
- package/dist/cjs/anyspend/react/components/AnySpendStakeUpside.js +2 -2
- package/dist/cjs/anyspend/react/components/AnySpendStakeUpsideExactIn.d.ts +2 -1
- package/dist/cjs/anyspend/react/components/AnySpendStakeUpsideExactIn.js +2 -2
- package/dist/cjs/anyspend/react/components/AnySpendTournament.d.ts +2 -0
- package/dist/cjs/anyspend/react/components/AnySpendTournament.js +1 -1
- package/dist/cjs/anyspend/react/components/AnyspendDepositHype.d.ts +2 -1
- package/dist/cjs/anyspend/react/components/AnyspendDepositHype.js +2 -2
- package/dist/cjs/anyspend/react/components/AnyspendSignatureMint.d.ts +2 -1
- package/dist/cjs/anyspend/react/components/AnyspendSignatureMint.js +2 -2
- package/dist/cjs/anyspend/react/hooks/useAnyspendCreateOnrampOrder.js +2 -1
- package/dist/cjs/anyspend/react/hooks/useAnyspendCreateOrder.d.ts +1 -0
- package/dist/cjs/anyspend/react/hooks/useAnyspendCreateOrder.js +2 -1
- package/dist/cjs/anyspend/react/hooks/useAnyspendOrderHistory.d.ts +16 -0
- package/dist/cjs/anyspend/services/anyspend.d.ts +2 -1
- package/dist/cjs/anyspend/services/anyspend.js +2 -1
- package/dist/cjs/anyspend/types/api.d.ts +295 -0
- package/dist/cjs/anyspend/utils/validation.d.ts +67 -0
- package/dist/cjs/anyspend/utils/validation.js +157 -0
- package/dist/cjs/global-account/react/components/ProfileEditor/ProfileEditor.js +14 -4
- package/dist/cjs/global-account/react/stores/useModalStore.d.ts +4 -0
- package/dist/esm/anyspend/index.d.ts +1 -0
- package/dist/esm/anyspend/index.js +1 -0
- package/dist/esm/anyspend/react/components/AnySpend.d.ts +6 -0
- package/dist/esm/anyspend/react/components/AnySpend.js +13 -1
- package/dist/esm/anyspend/react/components/AnySpendBondKit.d.ts +3 -1
- package/dist/esm/anyspend/react/components/AnySpendBondKit.js +2 -2
- package/dist/esm/anyspend/react/components/AnySpendBuySpin.d.ts +2 -1
- package/dist/esm/anyspend/react/components/AnySpendBuySpin.js +2 -2
- package/dist/esm/anyspend/react/components/AnySpendCustom.d.ts +1 -0
- package/dist/esm/anyspend/react/components/AnySpendCustom.js +6 -2
- package/dist/esm/anyspend/react/components/AnySpendCustomExactIn.d.ts +1 -0
- package/dist/esm/anyspend/react/components/AnySpendCustomExactIn.js +3 -1
- package/dist/esm/anyspend/react/components/AnySpendDepositUpside.d.ts +2 -1
- package/dist/esm/anyspend/react/components/AnySpendDepositUpside.js +2 -2
- package/dist/esm/anyspend/react/components/AnySpendNFT.d.ts +2 -1
- package/dist/esm/anyspend/react/components/AnySpendNFT.js +2 -2
- package/dist/esm/anyspend/react/components/AnySpendStakeB3.d.ts +2 -1
- package/dist/esm/anyspend/react/components/AnySpendStakeB3.js +2 -2
- package/dist/esm/anyspend/react/components/AnySpendStakeB3ExactIn.d.ts +2 -1
- package/dist/esm/anyspend/react/components/AnySpendStakeB3ExactIn.js +2 -2
- package/dist/esm/anyspend/react/components/AnySpendStakeUpside.d.ts +2 -1
- package/dist/esm/anyspend/react/components/AnySpendStakeUpside.js +2 -2
- package/dist/esm/anyspend/react/components/AnySpendStakeUpsideExactIn.d.ts +2 -1
- package/dist/esm/anyspend/react/components/AnySpendStakeUpsideExactIn.js +2 -2
- package/dist/esm/anyspend/react/components/AnySpendTournament.d.ts +2 -0
- package/dist/esm/anyspend/react/components/AnySpendTournament.js +1 -1
- package/dist/esm/anyspend/react/components/AnyspendDepositHype.d.ts +2 -1
- package/dist/esm/anyspend/react/components/AnyspendDepositHype.js +2 -2
- package/dist/esm/anyspend/react/components/AnyspendSignatureMint.d.ts +2 -1
- package/dist/esm/anyspend/react/components/AnyspendSignatureMint.js +2 -2
- package/dist/esm/anyspend/react/hooks/useAnyspendCreateOnrampOrder.js +2 -1
- package/dist/esm/anyspend/react/hooks/useAnyspendCreateOrder.d.ts +1 -0
- package/dist/esm/anyspend/react/hooks/useAnyspendCreateOrder.js +2 -1
- package/dist/esm/anyspend/react/hooks/useAnyspendOrderHistory.d.ts +16 -0
- package/dist/esm/anyspend/services/anyspend.d.ts +2 -1
- package/dist/esm/anyspend/services/anyspend.js +2 -1
- package/dist/esm/anyspend/types/api.d.ts +295 -0
- package/dist/esm/anyspend/utils/validation.d.ts +67 -0
- package/dist/esm/anyspend/utils/validation.js +153 -0
- package/dist/esm/global-account/react/components/ProfileEditor/ProfileEditor.js +14 -4
- package/dist/esm/global-account/react/stores/useModalStore.d.ts +4 -0
- package/dist/types/anyspend/index.d.ts +1 -0
- package/dist/types/anyspend/react/components/AnySpend.d.ts +6 -0
- package/dist/types/anyspend/react/components/AnySpendBondKit.d.ts +3 -1
- package/dist/types/anyspend/react/components/AnySpendBuySpin.d.ts +2 -1
- package/dist/types/anyspend/react/components/AnySpendCustom.d.ts +1 -0
- package/dist/types/anyspend/react/components/AnySpendCustomExactIn.d.ts +1 -0
- package/dist/types/anyspend/react/components/AnySpendDepositUpside.d.ts +2 -1
- package/dist/types/anyspend/react/components/AnySpendNFT.d.ts +2 -1
- package/dist/types/anyspend/react/components/AnySpendStakeB3.d.ts +2 -1
- package/dist/types/anyspend/react/components/AnySpendStakeB3ExactIn.d.ts +2 -1
- package/dist/types/anyspend/react/components/AnySpendStakeUpside.d.ts +2 -1
- package/dist/types/anyspend/react/components/AnySpendStakeUpsideExactIn.d.ts +2 -1
- package/dist/types/anyspend/react/components/AnySpendTournament.d.ts +2 -0
- package/dist/types/anyspend/react/components/AnyspendDepositHype.d.ts +2 -1
- package/dist/types/anyspend/react/components/AnyspendSignatureMint.d.ts +2 -1
- package/dist/types/anyspend/react/hooks/useAnyspendCreateOrder.d.ts +1 -0
- package/dist/types/anyspend/react/hooks/useAnyspendOrderHistory.d.ts +16 -0
- package/dist/types/anyspend/services/anyspend.d.ts +2 -1
- package/dist/types/anyspend/types/api.d.ts +295 -0
- package/dist/types/anyspend/utils/validation.d.ts +67 -0
- package/dist/types/global-account/react/stores/useModalStore.d.ts +4 -0
- package/package.json +3 -2
- package/src/anyspend/index.ts +1 -0
- package/src/anyspend/react/components/AnySpend.tsx +23 -0
- package/src/anyspend/react/components/AnySpendBondKit.tsx +3 -1
- package/src/anyspend/react/components/AnySpendBuySpin.tsx +3 -0
- package/src/anyspend/react/components/AnySpendCustom.tsx +8 -1
- package/src/anyspend/react/components/AnySpendCustomExactIn.tsx +4 -0
- package/src/anyspend/react/components/AnySpendDepositUpside.tsx +3 -0
- package/src/anyspend/react/components/AnySpendNFT.tsx +3 -0
- package/src/anyspend/react/components/AnySpendStakeB3.tsx +3 -0
- package/src/anyspend/react/components/AnySpendStakeB3ExactIn.tsx +3 -0
- package/src/anyspend/react/components/AnySpendStakeUpside.tsx +3 -0
- package/src/anyspend/react/components/AnySpendStakeUpsideExactIn.tsx +3 -0
- package/src/anyspend/react/components/AnySpendTournament.tsx +3 -0
- package/src/anyspend/react/components/AnyspendDepositHype.tsx +3 -0
- package/src/anyspend/react/components/AnyspendSignatureMint.tsx +3 -0
- package/src/anyspend/react/hooks/useAnyspendCreateOnrampOrder.ts +2 -0
- package/src/anyspend/react/hooks/useAnyspendCreateOrder.ts +13 -1
- package/src/anyspend/services/anyspend.ts +3 -0
- package/src/anyspend/types/api.ts +295 -0
- package/src/anyspend/utils/validation.ts +209 -0
- package/src/global-account/react/components/ProfileEditor/ProfileEditor.tsx +20 -6
- package/src/global-account/react/stores/useModalStore.ts +4 -0
|
@@ -16,6 +16,7 @@ export declare function useAnyspendOrderHistory(creatorAddress: string | undefin
|
|
|
16
16
|
receivedDepositAt: number | null;
|
|
17
17
|
creatorAddress: string | null;
|
|
18
18
|
partnerId: string | null;
|
|
19
|
+
clientReferenceId?: string | null;
|
|
19
20
|
onrampMetadata: import("../..").components["schemas"]["OnrampMetadata"] | null;
|
|
20
21
|
oneClickBuyUrl: string | null;
|
|
21
22
|
stripePaymentIntentId: string | null;
|
|
@@ -45,6 +46,7 @@ export declare function useAnyspendOrderHistory(creatorAddress: string | undefin
|
|
|
45
46
|
receivedDepositAt: number | null;
|
|
46
47
|
creatorAddress: string | null;
|
|
47
48
|
partnerId: string | null;
|
|
49
|
+
clientReferenceId?: string | null;
|
|
48
50
|
onrampMetadata: import("../..").components["schemas"]["OnrampMetadata"] | null;
|
|
49
51
|
oneClickBuyUrl: string | null;
|
|
50
52
|
stripePaymentIntentId: string | null;
|
|
@@ -74,6 +76,7 @@ export declare function useAnyspendOrderHistory(creatorAddress: string | undefin
|
|
|
74
76
|
receivedDepositAt: number | null;
|
|
75
77
|
creatorAddress: string | null;
|
|
76
78
|
partnerId: string | null;
|
|
79
|
+
clientReferenceId?: string | null;
|
|
77
80
|
onrampMetadata: import("../..").components["schemas"]["OnrampMetadata"] | null;
|
|
78
81
|
oneClickBuyUrl: string | null;
|
|
79
82
|
stripePaymentIntentId: string | null;
|
|
@@ -103,6 +106,7 @@ export declare function useAnyspendOrderHistory(creatorAddress: string | undefin
|
|
|
103
106
|
receivedDepositAt: number | null;
|
|
104
107
|
creatorAddress: string | null;
|
|
105
108
|
partnerId: string | null;
|
|
109
|
+
clientReferenceId?: string | null;
|
|
106
110
|
onrampMetadata: import("../..").components["schemas"]["OnrampMetadata"] | null;
|
|
107
111
|
oneClickBuyUrl: string | null;
|
|
108
112
|
stripePaymentIntentId: string | null;
|
|
@@ -132,6 +136,7 @@ export declare function useAnyspendOrderHistory(creatorAddress: string | undefin
|
|
|
132
136
|
receivedDepositAt: number | null;
|
|
133
137
|
creatorAddress: string | null;
|
|
134
138
|
partnerId: string | null;
|
|
139
|
+
clientReferenceId?: string | null;
|
|
135
140
|
onrampMetadata: import("../..").components["schemas"]["OnrampMetadata"] | null;
|
|
136
141
|
oneClickBuyUrl: string | null;
|
|
137
142
|
stripePaymentIntentId: string | null;
|
|
@@ -161,6 +166,7 @@ export declare function useAnyspendOrderHistory(creatorAddress: string | undefin
|
|
|
161
166
|
receivedDepositAt: number | null;
|
|
162
167
|
creatorAddress: string | null;
|
|
163
168
|
partnerId: string | null;
|
|
169
|
+
clientReferenceId?: string | null;
|
|
164
170
|
onrampMetadata: import("../..").components["schemas"]["OnrampMetadata"] | null;
|
|
165
171
|
oneClickBuyUrl: string | null;
|
|
166
172
|
stripePaymentIntentId: string | null;
|
|
@@ -190,6 +196,7 @@ export declare function useAnyspendOrderHistory(creatorAddress: string | undefin
|
|
|
190
196
|
receivedDepositAt: number | null;
|
|
191
197
|
creatorAddress: string | null;
|
|
192
198
|
partnerId: string | null;
|
|
199
|
+
clientReferenceId?: string | null;
|
|
193
200
|
onrampMetadata: import("../..").components["schemas"]["OnrampMetadata"] | null;
|
|
194
201
|
oneClickBuyUrl: string | null;
|
|
195
202
|
stripePaymentIntentId: string | null;
|
|
@@ -219,6 +226,7 @@ export declare function useAnyspendOrderHistory(creatorAddress: string | undefin
|
|
|
219
226
|
receivedDepositAt: number | null;
|
|
220
227
|
creatorAddress: string | null;
|
|
221
228
|
partnerId: string | null;
|
|
229
|
+
clientReferenceId?: string | null;
|
|
222
230
|
onrampMetadata: import("../..").components["schemas"]["OnrampMetadata"] | null;
|
|
223
231
|
oneClickBuyUrl: string | null;
|
|
224
232
|
stripePaymentIntentId: string | null;
|
|
@@ -251,6 +259,7 @@ export declare function useAnyspendOrderHistory(creatorAddress: string | undefin
|
|
|
251
259
|
receivedDepositAt: number | null;
|
|
252
260
|
creatorAddress: string | null;
|
|
253
261
|
partnerId: string | null;
|
|
262
|
+
clientReferenceId?: string | null;
|
|
254
263
|
onrampMetadata: import("../..").components["schemas"]["OnrampMetadata"] | null;
|
|
255
264
|
oneClickBuyUrl: string | null;
|
|
256
265
|
stripePaymentIntentId: string | null;
|
|
@@ -280,6 +289,7 @@ export declare function useAnyspendOrderHistory(creatorAddress: string | undefin
|
|
|
280
289
|
receivedDepositAt: number | null;
|
|
281
290
|
creatorAddress: string | null;
|
|
282
291
|
partnerId: string | null;
|
|
292
|
+
clientReferenceId?: string | null;
|
|
283
293
|
onrampMetadata: import("../..").components["schemas"]["OnrampMetadata"] | null;
|
|
284
294
|
oneClickBuyUrl: string | null;
|
|
285
295
|
stripePaymentIntentId: string | null;
|
|
@@ -309,6 +319,7 @@ export declare function useAnyspendOrderHistory(creatorAddress: string | undefin
|
|
|
309
319
|
receivedDepositAt: number | null;
|
|
310
320
|
creatorAddress: string | null;
|
|
311
321
|
partnerId: string | null;
|
|
322
|
+
clientReferenceId?: string | null;
|
|
312
323
|
onrampMetadata: import("../..").components["schemas"]["OnrampMetadata"] | null;
|
|
313
324
|
oneClickBuyUrl: string | null;
|
|
314
325
|
stripePaymentIntentId: string | null;
|
|
@@ -338,6 +349,7 @@ export declare function useAnyspendOrderHistory(creatorAddress: string | undefin
|
|
|
338
349
|
receivedDepositAt: number | null;
|
|
339
350
|
creatorAddress: string | null;
|
|
340
351
|
partnerId: string | null;
|
|
352
|
+
clientReferenceId?: string | null;
|
|
341
353
|
onrampMetadata: import("../..").components["schemas"]["OnrampMetadata"] | null;
|
|
342
354
|
oneClickBuyUrl: string | null;
|
|
343
355
|
stripePaymentIntentId: string | null;
|
|
@@ -367,6 +379,7 @@ export declare function useAnyspendOrderHistory(creatorAddress: string | undefin
|
|
|
367
379
|
receivedDepositAt: number | null;
|
|
368
380
|
creatorAddress: string | null;
|
|
369
381
|
partnerId: string | null;
|
|
382
|
+
clientReferenceId?: string | null;
|
|
370
383
|
onrampMetadata: import("../..").components["schemas"]["OnrampMetadata"] | null;
|
|
371
384
|
oneClickBuyUrl: string | null;
|
|
372
385
|
stripePaymentIntentId: string | null;
|
|
@@ -396,6 +409,7 @@ export declare function useAnyspendOrderHistory(creatorAddress: string | undefin
|
|
|
396
409
|
receivedDepositAt: number | null;
|
|
397
410
|
creatorAddress: string | null;
|
|
398
411
|
partnerId: string | null;
|
|
412
|
+
clientReferenceId?: string | null;
|
|
399
413
|
onrampMetadata: import("../..").components["schemas"]["OnrampMetadata"] | null;
|
|
400
414
|
oneClickBuyUrl: string | null;
|
|
401
415
|
stripePaymentIntentId: string | null;
|
|
@@ -425,6 +439,7 @@ export declare function useAnyspendOrderHistory(creatorAddress: string | undefin
|
|
|
425
439
|
receivedDepositAt: number | null;
|
|
426
440
|
creatorAddress: string | null;
|
|
427
441
|
partnerId: string | null;
|
|
442
|
+
clientReferenceId?: string | null;
|
|
428
443
|
onrampMetadata: import("../..").components["schemas"]["OnrampMetadata"] | null;
|
|
429
444
|
oneClickBuyUrl: string | null;
|
|
430
445
|
stripePaymentIntentId: string | null;
|
|
@@ -454,6 +469,7 @@ export declare function useAnyspendOrderHistory(creatorAddress: string | undefin
|
|
|
454
469
|
receivedDepositAt: number | null;
|
|
455
470
|
creatorAddress: string | null;
|
|
456
471
|
partnerId: string | null;
|
|
472
|
+
clientReferenceId?: string | null;
|
|
457
473
|
onrampMetadata: import("../..").components["schemas"]["OnrampMetadata"] | null;
|
|
458
474
|
oneClickBuyUrl: string | null;
|
|
459
475
|
stripePaymentIntentId: string | null;
|
|
@@ -6,7 +6,7 @@ export declare const anyspendService: {
|
|
|
6
6
|
getTokenList: (chainId: number, query: string) => Promise<components["schemas"]["Token"][]>;
|
|
7
7
|
getToken: (chainId: number, tokenAddress: string) => Promise<components["schemas"]["Token"]>;
|
|
8
8
|
getQuote: (req: GetQuoteRequest) => Promise<GetQuoteResponse>;
|
|
9
|
-
createOrder: ({ recipientAddress, type, srcChain, dstChain, srcTokenAddress, dstTokenAddress, srcAmount, payload, onramp, metadata, creatorAddress, partnerId, visitorData, }: {
|
|
9
|
+
createOrder: ({ recipientAddress, type, srcChain, dstChain, srcTokenAddress, dstTokenAddress, srcAmount, payload, onramp, metadata, creatorAddress, partnerId, clientReferenceId, visitorData, }: {
|
|
10
10
|
recipientAddress: string;
|
|
11
11
|
type: string;
|
|
12
12
|
srcChain: number;
|
|
@@ -19,6 +19,7 @@ export declare const anyspendService: {
|
|
|
19
19
|
metadata: Record<string, any>;
|
|
20
20
|
creatorAddress?: string;
|
|
21
21
|
partnerId?: string;
|
|
22
|
+
clientReferenceId?: string;
|
|
22
23
|
visitorData?: VisitorData;
|
|
23
24
|
}) => Promise<{
|
|
24
25
|
success: boolean;
|
|
@@ -41,7 +41,7 @@ exports.anyspendService = {
|
|
|
41
41
|
return data;
|
|
42
42
|
},
|
|
43
43
|
// Order related
|
|
44
|
-
createOrder: async ({ recipientAddress, type, srcChain, dstChain, srcTokenAddress, dstTokenAddress, srcAmount, payload, onramp, metadata, creatorAddress, partnerId, visitorData, }) => {
|
|
44
|
+
createOrder: async ({ recipientAddress, type, srcChain, dstChain, srcTokenAddress, dstTokenAddress, srcAmount, payload, onramp, metadata, creatorAddress, partnerId, clientReferenceId, visitorData, }) => {
|
|
45
45
|
const response = await fetch(`${constants_1.ANYSPEND_MAINNET_BASE_URL}/orders`, {
|
|
46
46
|
method: "POST",
|
|
47
47
|
headers: {
|
|
@@ -62,6 +62,7 @@ exports.anyspendService = {
|
|
|
62
62
|
metadata,
|
|
63
63
|
creatorAddress,
|
|
64
64
|
partnerId,
|
|
65
|
+
...(clientReferenceId && { clientReferenceId }),
|
|
65
66
|
}),
|
|
66
67
|
});
|
|
67
68
|
const data = await response.json();
|