@b3dotfun/sdk 0.0.63-test.0 → 0.0.63-test.0-alpha.0
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/AnySpendCustomExactIn.d.ts +34 -0
- package/dist/cjs/anyspend/react/components/AnySpendCustomExactIn.js +275 -0
- package/dist/cjs/anyspend/react/components/AnySpendStakeB3ExactIn.d.ts +9 -0
- package/dist/cjs/anyspend/react/components/AnySpendStakeB3ExactIn.js +288 -0
- package/dist/cjs/anyspend/react/components/AnySpendStakeUpsideExactIn.d.ts +11 -0
- package/dist/cjs/anyspend/react/components/AnySpendStakeUpsideExactIn.js +33 -0
- package/dist/cjs/anyspend/react/components/common/OrderDetails.js +10 -2
- package/dist/cjs/anyspend/react/components/common/OrderDetailsCollapsible.js +2 -3
- package/dist/cjs/anyspend/react/components/index.d.ts +5 -1
- package/dist/cjs/anyspend/react/components/index.js +11 -3
- package/dist/cjs/anyspend/react/hooks/useAnyspendFlow.d.ts +25 -3
- package/dist/cjs/anyspend/react/hooks/useAnyspendFlow.js +30 -8
- package/dist/cjs/anyspend/react/hooks/useAnyspendOrderHistory.d.ts +116 -0
- package/dist/cjs/anyspend/react/hooks/useAnyspendQuote.js +1 -1
- package/dist/cjs/anyspend/types/api.d.ts +665 -3
- package/dist/cjs/anyspend/utils/orderPayload.js +4 -0
- package/dist/cjs/global-account/react/components/B3DynamicModal.js +10 -1
- package/dist/cjs/global-account/react/components/SignInWithB3/steps/LoginStep.js +2 -2
- package/dist/cjs/global-account/react/hooks/useAuthentication.d.ts +2 -2
- package/dist/cjs/global-account/react/hooks/useAuthentication.js +7 -2
- package/dist/cjs/global-account/react/stores/useModalStore.d.ts +31 -1
- package/dist/esm/anyspend/react/components/AnySpendCustomExactIn.d.ts +34 -0
- package/dist/esm/anyspend/react/components/AnySpendCustomExactIn.js +269 -0
- package/dist/esm/anyspend/react/components/AnySpendStakeB3ExactIn.d.ts +9 -0
- package/dist/esm/anyspend/react/components/AnySpendStakeB3ExactIn.js +285 -0
- package/dist/esm/anyspend/react/components/AnySpendStakeUpsideExactIn.d.ts +11 -0
- package/dist/esm/anyspend/react/components/AnySpendStakeUpsideExactIn.js +30 -0
- package/dist/esm/anyspend/react/components/common/OrderDetails.js +10 -2
- package/dist/esm/anyspend/react/components/common/OrderDetailsCollapsible.js +2 -3
- package/dist/esm/anyspend/react/components/index.d.ts +5 -1
- package/dist/esm/anyspend/react/components/index.js +5 -1
- package/dist/esm/anyspend/react/hooks/useAnyspendFlow.d.ts +25 -3
- package/dist/esm/anyspend/react/hooks/useAnyspendFlow.js +30 -8
- package/dist/esm/anyspend/react/hooks/useAnyspendOrderHistory.d.ts +116 -0
- package/dist/esm/anyspend/react/hooks/useAnyspendQuote.js +1 -1
- package/dist/esm/anyspend/types/api.d.ts +665 -3
- package/dist/esm/anyspend/utils/orderPayload.js +4 -0
- package/dist/esm/global-account/react/components/B3DynamicModal.js +11 -2
- package/dist/esm/global-account/react/components/SignInWithB3/steps/LoginStep.js +2 -2
- package/dist/esm/global-account/react/hooks/useAuthentication.d.ts +2 -2
- package/dist/esm/global-account/react/hooks/useAuthentication.js +7 -2
- package/dist/esm/global-account/react/stores/useModalStore.d.ts +31 -1
- package/dist/types/anyspend/react/components/AnySpendCustomExactIn.d.ts +34 -0
- package/dist/types/anyspend/react/components/AnySpendStakeB3ExactIn.d.ts +9 -0
- package/dist/types/anyspend/react/components/AnySpendStakeUpsideExactIn.d.ts +11 -0
- package/dist/types/anyspend/react/components/index.d.ts +5 -1
- package/dist/types/anyspend/react/hooks/useAnyspendFlow.d.ts +25 -3
- package/dist/types/anyspend/react/hooks/useAnyspendOrderHistory.d.ts +116 -0
- package/dist/types/anyspend/types/api.d.ts +665 -3
- package/dist/types/global-account/react/hooks/useAuthentication.d.ts +2 -2
- package/dist/types/global-account/react/stores/useModalStore.d.ts +31 -1
- package/package.json +3 -3
- package/src/anyspend/react/components/AnySpendCustomExactIn.tsx +595 -0
- package/src/anyspend/react/components/AnySpendStakeB3ExactIn.tsx +522 -0
- package/src/anyspend/react/components/AnySpendStakeUpsideExactIn.tsx +73 -0
- package/src/anyspend/react/components/common/OrderDetails.tsx +10 -2
- package/src/anyspend/react/components/common/OrderDetailsCollapsible.tsx +2 -3
- package/src/anyspend/react/components/index.ts +5 -1
- package/src/anyspend/react/hooks/useAnyspendFlow.ts +38 -8
- package/src/anyspend/react/hooks/useAnyspendQuote.ts +1 -1
- package/src/anyspend/types/api.ts +669 -1
- package/src/anyspend/utils/orderPayload.ts +5 -1
- package/src/global-account/react/components/B3DynamicModal.tsx +11 -1
- package/src/global-account/react/components/SignInWithB3/steps/LoginStep.tsx +2 -2
- package/src/global-account/react/hooks/useAuthentication.ts +10 -2
- package/src/global-account/react/stores/useModalStore.ts +34 -0
|
@@ -97,6 +97,11 @@ export interface paths {
|
|
|
97
97
|
* @example USD
|
|
98
98
|
*/
|
|
99
99
|
payment_method?: string;
|
|
100
|
+
/**
|
|
101
|
+
* @description Optional purchase method filter
|
|
102
|
+
* @example USDC
|
|
103
|
+
*/
|
|
104
|
+
purchase_method?: string;
|
|
100
105
|
/**
|
|
101
106
|
* @description Optional array of chain IDs to filter by
|
|
102
107
|
* @example [
|
|
@@ -226,6 +231,108 @@ export interface paths {
|
|
|
226
231
|
};
|
|
227
232
|
};
|
|
228
233
|
};
|
|
234
|
+
"/onramp/coinbase/session-token": {
|
|
235
|
+
/**
|
|
236
|
+
* Create Coinbase session token
|
|
237
|
+
* @description Generates a Coinbase Onramp session token that can be reused when constructing buy URLs.
|
|
238
|
+
*/
|
|
239
|
+
post: {
|
|
240
|
+
requestBody: {
|
|
241
|
+
content: {
|
|
242
|
+
"application/json": components["schemas"]["CoinbaseSessionTokenRequest"];
|
|
243
|
+
};
|
|
244
|
+
};
|
|
245
|
+
responses: {
|
|
246
|
+
/** @description Session token created successfully */
|
|
247
|
+
200: {
|
|
248
|
+
content: {
|
|
249
|
+
"application/json": components["schemas"]["CoinbaseSessionTokenResponse"];
|
|
250
|
+
};
|
|
251
|
+
};
|
|
252
|
+
/** @description Bad request */
|
|
253
|
+
400: {
|
|
254
|
+
content: {
|
|
255
|
+
"application/json": {
|
|
256
|
+
/** @example false */
|
|
257
|
+
success: boolean;
|
|
258
|
+
/** @example Bad request */
|
|
259
|
+
message: string;
|
|
260
|
+
/** @example 400 */
|
|
261
|
+
statusCode: number;
|
|
262
|
+
};
|
|
263
|
+
};
|
|
264
|
+
};
|
|
265
|
+
};
|
|
266
|
+
};
|
|
267
|
+
};
|
|
268
|
+
"/onramp/coinbase/onramp-url": {
|
|
269
|
+
/**
|
|
270
|
+
* Create Coinbase onramp URL
|
|
271
|
+
* @description Creates a Coinbase Onramp buy URL and optionally returns a session token for reuse.
|
|
272
|
+
*/
|
|
273
|
+
post: {
|
|
274
|
+
requestBody: {
|
|
275
|
+
content: {
|
|
276
|
+
"application/json": components["schemas"]["CoinbaseOnrampUrlRequest"];
|
|
277
|
+
};
|
|
278
|
+
};
|
|
279
|
+
responses: {
|
|
280
|
+
/** @description Onramp URL created successfully */
|
|
281
|
+
200: {
|
|
282
|
+
content: {
|
|
283
|
+
"application/json": components["schemas"]["CoinbaseOnrampUrlResponse"];
|
|
284
|
+
};
|
|
285
|
+
};
|
|
286
|
+
/** @description Bad request */
|
|
287
|
+
400: {
|
|
288
|
+
content: {
|
|
289
|
+
"application/json": {
|
|
290
|
+
/** @example false */
|
|
291
|
+
success: boolean;
|
|
292
|
+
/** @example Bad request */
|
|
293
|
+
message: string;
|
|
294
|
+
/** @example 400 */
|
|
295
|
+
statusCode: number;
|
|
296
|
+
};
|
|
297
|
+
};
|
|
298
|
+
};
|
|
299
|
+
};
|
|
300
|
+
};
|
|
301
|
+
};
|
|
302
|
+
"/onramp/coinbase/direct-url": {
|
|
303
|
+
/**
|
|
304
|
+
* Generate direct Coinbase onramp URL
|
|
305
|
+
* @description Generates a direct Coinbase Onramp URL along with the session token backing it.
|
|
306
|
+
*/
|
|
307
|
+
post: {
|
|
308
|
+
requestBody: {
|
|
309
|
+
content: {
|
|
310
|
+
"application/json": components["schemas"]["CoinbaseDirectOnrampRequest"];
|
|
311
|
+
};
|
|
312
|
+
};
|
|
313
|
+
responses: {
|
|
314
|
+
/** @description Direct onramp URL generated successfully */
|
|
315
|
+
200: {
|
|
316
|
+
content: {
|
|
317
|
+
"application/json": components["schemas"]["CoinbaseDirectOnrampResponse"];
|
|
318
|
+
};
|
|
319
|
+
};
|
|
320
|
+
/** @description Bad request */
|
|
321
|
+
400: {
|
|
322
|
+
content: {
|
|
323
|
+
"application/json": {
|
|
324
|
+
/** @example false */
|
|
325
|
+
success: boolean;
|
|
326
|
+
/** @example Bad request */
|
|
327
|
+
message: string;
|
|
328
|
+
/** @example 400 */
|
|
329
|
+
statusCode: number;
|
|
330
|
+
};
|
|
331
|
+
};
|
|
332
|
+
};
|
|
333
|
+
};
|
|
334
|
+
};
|
|
335
|
+
};
|
|
229
336
|
"/onramp/stripe/supported": {
|
|
230
337
|
/**
|
|
231
338
|
* Check Stripe support
|
|
@@ -473,6 +580,57 @@ export interface paths {
|
|
|
473
580
|
};
|
|
474
581
|
};
|
|
475
582
|
};
|
|
583
|
+
"/orders/{orderId}/comprehensive": {
|
|
584
|
+
/**
|
|
585
|
+
* Get comprehensive order detail
|
|
586
|
+
* @description Retrieves an order with associated transactions, settlement data, and awarded points without sanitization.
|
|
587
|
+
*/
|
|
588
|
+
get: {
|
|
589
|
+
parameters: {
|
|
590
|
+
path: {
|
|
591
|
+
/**
|
|
592
|
+
* @description Unique order identifier
|
|
593
|
+
* @example 5392f7a7-d472-4d6b-9848-bd07117fb82d
|
|
594
|
+
*/
|
|
595
|
+
orderId: string;
|
|
596
|
+
};
|
|
597
|
+
};
|
|
598
|
+
responses: {
|
|
599
|
+
/** @description Comprehensive order retrieved successfully */
|
|
600
|
+
200: {
|
|
601
|
+
content: {
|
|
602
|
+
"application/json": components["schemas"]["ComprehensiveOrderResponse"];
|
|
603
|
+
};
|
|
604
|
+
};
|
|
605
|
+
/** @description Bad request */
|
|
606
|
+
400: {
|
|
607
|
+
content: {
|
|
608
|
+
"application/json": {
|
|
609
|
+
/** @example false */
|
|
610
|
+
success: boolean;
|
|
611
|
+
/** @example Bad request */
|
|
612
|
+
message: string;
|
|
613
|
+
/** @example 400 */
|
|
614
|
+
statusCode: number;
|
|
615
|
+
};
|
|
616
|
+
};
|
|
617
|
+
};
|
|
618
|
+
/** @description Order not found */
|
|
619
|
+
404: {
|
|
620
|
+
content: {
|
|
621
|
+
"application/json": {
|
|
622
|
+
/** @example false */
|
|
623
|
+
success: boolean;
|
|
624
|
+
/** @example Order not found */
|
|
625
|
+
message: string;
|
|
626
|
+
/** @example 404 */
|
|
627
|
+
statusCode: number;
|
|
628
|
+
};
|
|
629
|
+
};
|
|
630
|
+
};
|
|
631
|
+
};
|
|
632
|
+
};
|
|
633
|
+
};
|
|
476
634
|
"/orders/quote": {
|
|
477
635
|
/**
|
|
478
636
|
* Get anyspend quote
|
|
@@ -527,6 +685,47 @@ export interface paths {
|
|
|
527
685
|
* @enum {string}
|
|
528
686
|
*/
|
|
529
687
|
onrampVendor?: "coinbase" | "stripe" | "stripe-web2";
|
|
688
|
+
} | {
|
|
689
|
+
/**
|
|
690
|
+
* @description Order type for X402 swap
|
|
691
|
+
* @enum {string}
|
|
692
|
+
*/
|
|
693
|
+
type: "x402_swap";
|
|
694
|
+
/**
|
|
695
|
+
* @description Source chain ID
|
|
696
|
+
* @example 8453
|
|
697
|
+
*/
|
|
698
|
+
srcChain: number;
|
|
699
|
+
/**
|
|
700
|
+
* @description Destination chain ID
|
|
701
|
+
* @example 8453
|
|
702
|
+
*/
|
|
703
|
+
dstChain: number;
|
|
704
|
+
/**
|
|
705
|
+
* @description Source token contract address
|
|
706
|
+
* @example 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913
|
|
707
|
+
*/
|
|
708
|
+
srcTokenAddress: string;
|
|
709
|
+
/**
|
|
710
|
+
* @description Destination token contract address
|
|
711
|
+
* @example 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913
|
|
712
|
+
*/
|
|
713
|
+
dstTokenAddress: string;
|
|
714
|
+
/**
|
|
715
|
+
* @description Recipient address
|
|
716
|
+
* @example 0x55c71fca5e01cf246718748ae540473e608d0282
|
|
717
|
+
*/
|
|
718
|
+
recipientAddress?: string;
|
|
719
|
+
/**
|
|
720
|
+
* @description Amount to quote
|
|
721
|
+
* @example 1000000
|
|
722
|
+
*/
|
|
723
|
+
amount: string;
|
|
724
|
+
/**
|
|
725
|
+
* @description Optional onramp vendor
|
|
726
|
+
* @enum {string}
|
|
727
|
+
*/
|
|
728
|
+
onrampVendor?: "coinbase" | "stripe" | "stripe-web2";
|
|
530
729
|
} | {
|
|
531
730
|
/**
|
|
532
731
|
* @description Order type for custom execution
|
|
@@ -666,6 +865,47 @@ export interface paths {
|
|
|
666
865
|
* @enum {string}
|
|
667
866
|
*/
|
|
668
867
|
onrampVendor?: "coinbase" | "stripe" | "stripe-web2";
|
|
868
|
+
} | {
|
|
869
|
+
/**
|
|
870
|
+
* @description Order type for custom exact in execution
|
|
871
|
+
* @enum {string}
|
|
872
|
+
*/
|
|
873
|
+
type: "custom_exact_in";
|
|
874
|
+
/**
|
|
875
|
+
* @description Source chain ID
|
|
876
|
+
* @example 1
|
|
877
|
+
*/
|
|
878
|
+
srcChain: number;
|
|
879
|
+
/**
|
|
880
|
+
* @description Destination chain ID
|
|
881
|
+
* @example 8453
|
|
882
|
+
*/
|
|
883
|
+
dstChain: number;
|
|
884
|
+
/**
|
|
885
|
+
* @description Source token contract address
|
|
886
|
+
* @example 0x0000000000000000000000000000000000000000
|
|
887
|
+
*/
|
|
888
|
+
srcTokenAddress: string;
|
|
889
|
+
/**
|
|
890
|
+
* @description Destination token contract address
|
|
891
|
+
* @example 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913
|
|
892
|
+
*/
|
|
893
|
+
dstTokenAddress: string;
|
|
894
|
+
/**
|
|
895
|
+
* @description Recipient address
|
|
896
|
+
* @example 0x55c71fca5e01cf246718748ae540473e608d0282
|
|
897
|
+
*/
|
|
898
|
+
recipientAddress?: string;
|
|
899
|
+
/**
|
|
900
|
+
* @description Destination amount for exact in execution
|
|
901
|
+
* @example 1000000000000000000
|
|
902
|
+
*/
|
|
903
|
+
amount: string;
|
|
904
|
+
/**
|
|
905
|
+
* @description Optional onramp vendor
|
|
906
|
+
* @enum {string}
|
|
907
|
+
*/
|
|
908
|
+
onrampVendor?: "coinbase" | "stripe" | "stripe-web2";
|
|
669
909
|
};
|
|
670
910
|
};
|
|
671
911
|
};
|
|
@@ -985,7 +1225,7 @@ export interface components {
|
|
|
985
1225
|
stripeAmountInCents?: number;
|
|
986
1226
|
/**
|
|
987
1227
|
* Format: ipv4
|
|
988
|
-
* @description Optional IP address for location detection
|
|
1228
|
+
* @description Optional IP address for location detection. Required for Stripe onramp requests in production and omitted from standard order responses.
|
|
989
1229
|
* @example 192.168.1.1
|
|
990
1230
|
*/
|
|
991
1231
|
ipAddress?: string;
|
|
@@ -1026,6 +1266,196 @@ export interface components {
|
|
|
1026
1266
|
*/
|
|
1027
1267
|
redirectUrl?: string;
|
|
1028
1268
|
};
|
|
1269
|
+
/** @description Request body to create a Coinbase session token */
|
|
1270
|
+
CoinbaseSessionTokenRequest: {
|
|
1271
|
+
/**
|
|
1272
|
+
* @description Wallet address that will receive purchased assets
|
|
1273
|
+
* @example 0x58241893EF1f86C9fBd8109Cd44Ea961fDb474e1
|
|
1274
|
+
*/
|
|
1275
|
+
destinationAddress: string;
|
|
1276
|
+
/**
|
|
1277
|
+
* @description List of supported blockchain identifiers
|
|
1278
|
+
* @example [
|
|
1279
|
+
* "base"
|
|
1280
|
+
* ]
|
|
1281
|
+
*/
|
|
1282
|
+
blockchains: string[];
|
|
1283
|
+
/**
|
|
1284
|
+
* @description Optional list of asset symbols to whitelist
|
|
1285
|
+
* @example [
|
|
1286
|
+
* "USDC"
|
|
1287
|
+
* ]
|
|
1288
|
+
*/
|
|
1289
|
+
assets?: string[];
|
|
1290
|
+
};
|
|
1291
|
+
/** @description Coinbase session token result */
|
|
1292
|
+
CoinbaseSessionTokenResponseData: {
|
|
1293
|
+
/**
|
|
1294
|
+
* @description Session token identifier
|
|
1295
|
+
* @example token_123
|
|
1296
|
+
*/
|
|
1297
|
+
token: string;
|
|
1298
|
+
/**
|
|
1299
|
+
* @description Optional session channel identifier
|
|
1300
|
+
* @example channel_abc
|
|
1301
|
+
*/
|
|
1302
|
+
channelId?: string;
|
|
1303
|
+
};
|
|
1304
|
+
CoinbaseSessionTokenResponse: {
|
|
1305
|
+
/** @example true */
|
|
1306
|
+
success: boolean;
|
|
1307
|
+
/** @example Session token created successfully */
|
|
1308
|
+
message: string;
|
|
1309
|
+
data: components["schemas"]["CoinbaseSessionTokenResponseData"];
|
|
1310
|
+
/** @example 200 */
|
|
1311
|
+
statusCode: number;
|
|
1312
|
+
};
|
|
1313
|
+
/** @description Request body to create a Coinbase onramp URL */
|
|
1314
|
+
CoinbaseOnrampUrlRequest: {
|
|
1315
|
+
/**
|
|
1316
|
+
* @description Preset fiat amount for purchase
|
|
1317
|
+
* @example 100
|
|
1318
|
+
*/
|
|
1319
|
+
presetFiatAmount: string;
|
|
1320
|
+
/**
|
|
1321
|
+
* @description Fiat currency code
|
|
1322
|
+
* @example USD
|
|
1323
|
+
*/
|
|
1324
|
+
fiatCurrency: string;
|
|
1325
|
+
/**
|
|
1326
|
+
* @description Default asset to purchase
|
|
1327
|
+
* @example USDC
|
|
1328
|
+
*/
|
|
1329
|
+
defaultAsset: string;
|
|
1330
|
+
/**
|
|
1331
|
+
* @description Default payment method identifier
|
|
1332
|
+
* @example CARD
|
|
1333
|
+
*/
|
|
1334
|
+
defaultPaymentMethod: string;
|
|
1335
|
+
/**
|
|
1336
|
+
* @description Destination wallet address
|
|
1337
|
+
* @example 0x58241893EF1f86C9fBd8109Cd44Ea961fDb474e1
|
|
1338
|
+
*/
|
|
1339
|
+
destinationAddress: string;
|
|
1340
|
+
/**
|
|
1341
|
+
* @description Supported blockchains for the session
|
|
1342
|
+
* @example [
|
|
1343
|
+
* "base"
|
|
1344
|
+
* ]
|
|
1345
|
+
*/
|
|
1346
|
+
blockchains: string[];
|
|
1347
|
+
/**
|
|
1348
|
+
* @description ISO country code of the end user
|
|
1349
|
+
* @example US
|
|
1350
|
+
*/
|
|
1351
|
+
country: string;
|
|
1352
|
+
/**
|
|
1353
|
+
* @description Associated AnySpend order ID
|
|
1354
|
+
* @example 5392f7a7-d472-4d6b-9848-bd07117fb82d
|
|
1355
|
+
*/
|
|
1356
|
+
orderId: string;
|
|
1357
|
+
/**
|
|
1358
|
+
* @description Redirect URL after completing the purchase
|
|
1359
|
+
* @example https://www.anyspend.com/orders
|
|
1360
|
+
*/
|
|
1361
|
+
redirectUrl: string;
|
|
1362
|
+
/**
|
|
1363
|
+
* @description Whether to create and embed a session token automatically
|
|
1364
|
+
* @default false
|
|
1365
|
+
*/
|
|
1366
|
+
useSessionToken: boolean;
|
|
1367
|
+
};
|
|
1368
|
+
/** @description Coinbase onramp URL result */
|
|
1369
|
+
CoinbaseOnrampUrlResponseData: {
|
|
1370
|
+
/**
|
|
1371
|
+
* @description Coinbase-hosted onramp URL
|
|
1372
|
+
* @example https://pay.coinbase.com/buy/select-asset?...
|
|
1373
|
+
*/
|
|
1374
|
+
url: string;
|
|
1375
|
+
/**
|
|
1376
|
+
* @description Optional session token created alongside the URL
|
|
1377
|
+
* @example token_123
|
|
1378
|
+
*/
|
|
1379
|
+
sessionToken?: string;
|
|
1380
|
+
};
|
|
1381
|
+
CoinbaseOnrampUrlResponse: {
|
|
1382
|
+
/** @example true */
|
|
1383
|
+
success: boolean;
|
|
1384
|
+
/** @example Onramp URL created successfully */
|
|
1385
|
+
message: string;
|
|
1386
|
+
data: components["schemas"]["CoinbaseOnrampUrlResponseData"];
|
|
1387
|
+
/** @example 200 */
|
|
1388
|
+
statusCode: number;
|
|
1389
|
+
};
|
|
1390
|
+
/** @description Request body to generate a direct Coinbase onramp URL */
|
|
1391
|
+
CoinbaseDirectOnrampRequest: {
|
|
1392
|
+
/**
|
|
1393
|
+
* @description Destination wallet address
|
|
1394
|
+
* @example 0x58241893EF1f86C9fBd8109Cd44Ea961fDb474e1
|
|
1395
|
+
*/
|
|
1396
|
+
destinationAddress: string;
|
|
1397
|
+
/**
|
|
1398
|
+
* @description Supported blockchain identifiers
|
|
1399
|
+
* @example [
|
|
1400
|
+
* "base"
|
|
1401
|
+
* ]
|
|
1402
|
+
*/
|
|
1403
|
+
blockchains: string[];
|
|
1404
|
+
/**
|
|
1405
|
+
* @description Optional list of asset symbols to whitelist
|
|
1406
|
+
* @example [
|
|
1407
|
+
* "USDC"
|
|
1408
|
+
* ]
|
|
1409
|
+
*/
|
|
1410
|
+
assets?: string[];
|
|
1411
|
+
/**
|
|
1412
|
+
* @description Preset fiat amount
|
|
1413
|
+
* @example 100
|
|
1414
|
+
*/
|
|
1415
|
+
presetFiatAmount?: string;
|
|
1416
|
+
/**
|
|
1417
|
+
* @description Fiat currency code
|
|
1418
|
+
* @example USD
|
|
1419
|
+
*/
|
|
1420
|
+
fiatCurrency?: string;
|
|
1421
|
+
/**
|
|
1422
|
+
* @description Default asset to purchase
|
|
1423
|
+
* @example USDC
|
|
1424
|
+
*/
|
|
1425
|
+
defaultAsset?: string;
|
|
1426
|
+
/**
|
|
1427
|
+
* @description Default payment method identifier
|
|
1428
|
+
* @example CARD
|
|
1429
|
+
*/
|
|
1430
|
+
defaultPaymentMethod?: string;
|
|
1431
|
+
/**
|
|
1432
|
+
* @description Redirect URL after payment completion
|
|
1433
|
+
* @example https://www.anyspend.com/orders
|
|
1434
|
+
*/
|
|
1435
|
+
redirectUrl?: string;
|
|
1436
|
+
};
|
|
1437
|
+
/** @description Direct Coinbase onramp URL result */
|
|
1438
|
+
CoinbaseDirectOnrampResponseData: {
|
|
1439
|
+
/**
|
|
1440
|
+
* @description Coinbase onramp URL that can be used directly
|
|
1441
|
+
* @example https://pay.coinbase.com/buy/select-asset?...
|
|
1442
|
+
*/
|
|
1443
|
+
url: string;
|
|
1444
|
+
/**
|
|
1445
|
+
* @description Session token bound to the generated URL
|
|
1446
|
+
* @example token_123
|
|
1447
|
+
*/
|
|
1448
|
+
sessionToken: string;
|
|
1449
|
+
};
|
|
1450
|
+
CoinbaseDirectOnrampResponse: {
|
|
1451
|
+
/** @example true */
|
|
1452
|
+
success: boolean;
|
|
1453
|
+
/** @example Direct onramp URL generated successfully */
|
|
1454
|
+
message: string;
|
|
1455
|
+
data: components["schemas"]["CoinbaseDirectOnrampResponseData"];
|
|
1456
|
+
/** @example 200 */
|
|
1457
|
+
statusCode: number;
|
|
1458
|
+
};
|
|
1029
1459
|
/** @description Tournament details */
|
|
1030
1460
|
Tournament: {
|
|
1031
1461
|
/**
|
|
@@ -1119,6 +1549,14 @@ export interface components {
|
|
|
1119
1549
|
*/
|
|
1120
1550
|
expectedDstAmount: string;
|
|
1121
1551
|
};
|
|
1552
|
+
/** @description X402 swap-specific payload */
|
|
1553
|
+
X402SwapPayload: {
|
|
1554
|
+
/**
|
|
1555
|
+
* @description Expected amount of destination tokens
|
|
1556
|
+
* @example 990000
|
|
1557
|
+
*/
|
|
1558
|
+
expectedDstAmount: string;
|
|
1559
|
+
};
|
|
1122
1560
|
/** @description HypeDuel-specific payload */
|
|
1123
1561
|
HypeDuelPayload: {
|
|
1124
1562
|
/**
|
|
@@ -1150,6 +1588,43 @@ export interface components {
|
|
|
1150
1588
|
*/
|
|
1151
1589
|
amount: string;
|
|
1152
1590
|
};
|
|
1591
|
+
/** @description Custom exact in execution payload */
|
|
1592
|
+
CustomExactInPayload: {
|
|
1593
|
+
/**
|
|
1594
|
+
* @description Amount used when executing the destination function
|
|
1595
|
+
* @example 1000000000000000000
|
|
1596
|
+
*/
|
|
1597
|
+
amount: string;
|
|
1598
|
+
/**
|
|
1599
|
+
* @description Expected amount of destination tokens
|
|
1600
|
+
* @example 1000000000000000000
|
|
1601
|
+
*/
|
|
1602
|
+
expectedDstAmount: string;
|
|
1603
|
+
/** @description JSON stringified ABI that includes the destination function */
|
|
1604
|
+
functionAbi: string;
|
|
1605
|
+
/**
|
|
1606
|
+
* @description Destination function name
|
|
1607
|
+
* @example stake
|
|
1608
|
+
*/
|
|
1609
|
+
functionName: string;
|
|
1610
|
+
/** @description Destination function arguments (template variables allowed) */
|
|
1611
|
+
functionArgs: string[];
|
|
1612
|
+
/**
|
|
1613
|
+
* @description Destination contract address
|
|
1614
|
+
* @example 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913
|
|
1615
|
+
*/
|
|
1616
|
+
to: string;
|
|
1617
|
+
/**
|
|
1618
|
+
* @description Optional spender address for token approval
|
|
1619
|
+
* @example 0x58241893EF1f86C9fBd8109Cd44Ea961fDb474e1
|
|
1620
|
+
*/
|
|
1621
|
+
spenderAddress?: string;
|
|
1622
|
+
/**
|
|
1623
|
+
* @description Optional action identifier used for display purposes
|
|
1624
|
+
* @example stake B3
|
|
1625
|
+
*/
|
|
1626
|
+
action?: string;
|
|
1627
|
+
};
|
|
1153
1628
|
/** @description NFT minting payload */
|
|
1154
1629
|
MintNftPayload: {
|
|
1155
1630
|
/**
|
|
@@ -1205,6 +1680,11 @@ export interface components {
|
|
|
1205
1680
|
srcToken: components["schemas"]["Token"];
|
|
1206
1681
|
dstToken: components["schemas"]["Token"];
|
|
1207
1682
|
};
|
|
1683
|
+
/** @description X402 swap metadata for display purposes */
|
|
1684
|
+
X402SwapMetadata: {
|
|
1685
|
+
srcToken: components["schemas"]["Token"];
|
|
1686
|
+
dstToken: components["schemas"]["Token"];
|
|
1687
|
+
};
|
|
1208
1688
|
/** @description HypeDuel metadata for display purposes */
|
|
1209
1689
|
HypeDuelMetadata: {
|
|
1210
1690
|
srcToken: components["schemas"]["Token"];
|
|
@@ -1345,6 +1825,15 @@ export interface components {
|
|
|
1345
1825
|
payload: components["schemas"]["SwapPayload"];
|
|
1346
1826
|
metadata: components["schemas"]["SwapMetadata"];
|
|
1347
1827
|
};
|
|
1828
|
+
X402SwapOrder: components["schemas"]["BaseOrder"] & {
|
|
1829
|
+
/**
|
|
1830
|
+
* @description Order type
|
|
1831
|
+
* @enum {string}
|
|
1832
|
+
*/
|
|
1833
|
+
type: "x402_swap";
|
|
1834
|
+
payload: components["schemas"]["X402SwapPayload"];
|
|
1835
|
+
metadata: components["schemas"]["X402SwapMetadata"];
|
|
1836
|
+
};
|
|
1348
1837
|
HypeDuelOrder: components["schemas"]["BaseOrder"] & {
|
|
1349
1838
|
/**
|
|
1350
1839
|
* @description Order type
|
|
@@ -1363,6 +1852,15 @@ export interface components {
|
|
|
1363
1852
|
payload: components["schemas"]["CustomPayload"];
|
|
1364
1853
|
metadata: components["schemas"]["CustomMetadata"];
|
|
1365
1854
|
};
|
|
1855
|
+
CustomExactInOrder: components["schemas"]["BaseOrder"] & {
|
|
1856
|
+
/**
|
|
1857
|
+
* @description Order type
|
|
1858
|
+
* @enum {string}
|
|
1859
|
+
*/
|
|
1860
|
+
type: "custom_exact_in";
|
|
1861
|
+
payload: components["schemas"]["CustomExactInPayload"];
|
|
1862
|
+
metadata: components["schemas"]["CustomMetadata"];
|
|
1863
|
+
};
|
|
1366
1864
|
MintNftOrder: components["schemas"]["BaseOrder"] & {
|
|
1367
1865
|
/**
|
|
1368
1866
|
* @description Order type
|
|
@@ -1390,7 +1888,7 @@ export interface components {
|
|
|
1390
1888
|
payload: components["schemas"]["FundTournamentPayload"];
|
|
1391
1889
|
metadata: components["schemas"]["TournamentMetadata"];
|
|
1392
1890
|
};
|
|
1393
|
-
Order: components["schemas"]["SwapOrder"] | components["schemas"]["HypeDuelOrder"] | components["schemas"]["CustomOrder"] | components["schemas"]["MintNftOrder"] | components["schemas"]["JoinTournamentOrder"] | components["schemas"]["FundTournamentOrder"];
|
|
1891
|
+
Order: components["schemas"]["SwapOrder"] | components["schemas"]["X402SwapOrder"] | components["schemas"]["HypeDuelOrder"] | components["schemas"]["CustomOrder"] | components["schemas"]["CustomExactInOrder"] | components["schemas"]["MintNftOrder"] | components["schemas"]["JoinTournamentOrder"] | components["schemas"]["FundTournamentOrder"];
|
|
1394
1892
|
/** @description Swap order request */
|
|
1395
1893
|
SwapOrderRequest: {
|
|
1396
1894
|
/**
|
|
@@ -1439,6 +1937,54 @@ export interface components {
|
|
|
1439
1937
|
*/
|
|
1440
1938
|
creatorAddress?: string;
|
|
1441
1939
|
};
|
|
1940
|
+
/** @description X402 swap order request */
|
|
1941
|
+
X402SwapOrderRequest: {
|
|
1942
|
+
/**
|
|
1943
|
+
* @description Order type
|
|
1944
|
+
* @enum {string}
|
|
1945
|
+
*/
|
|
1946
|
+
type: "x402_swap";
|
|
1947
|
+
/**
|
|
1948
|
+
* @description Address to receive the destination tokens
|
|
1949
|
+
* @example 0x58241893EF1f86C9fBd8109Cd44Ea961fDb474e1
|
|
1950
|
+
*/
|
|
1951
|
+
recipientAddress: string;
|
|
1952
|
+
/**
|
|
1953
|
+
* @description Source chain ID
|
|
1954
|
+
* @example 8453
|
|
1955
|
+
*/
|
|
1956
|
+
srcChain: number;
|
|
1957
|
+
/**
|
|
1958
|
+
* @description Destination chain ID
|
|
1959
|
+
* @example 8453
|
|
1960
|
+
*/
|
|
1961
|
+
dstChain: number;
|
|
1962
|
+
/**
|
|
1963
|
+
* @description Source token contract address
|
|
1964
|
+
* @example 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913
|
|
1965
|
+
*/
|
|
1966
|
+
srcTokenAddress: string;
|
|
1967
|
+
/**
|
|
1968
|
+
* @description Destination token contract address
|
|
1969
|
+
* @example 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913
|
|
1970
|
+
*/
|
|
1971
|
+
dstTokenAddress: string;
|
|
1972
|
+
/**
|
|
1973
|
+
* @description Amount of source tokens to swap
|
|
1974
|
+
* @example 1000000
|
|
1975
|
+
*/
|
|
1976
|
+
srcAmount: string;
|
|
1977
|
+
payload: components["schemas"]["SwapPayload"];
|
|
1978
|
+
metadata: components["schemas"]["SwapMetadata"];
|
|
1979
|
+
/** @description Optional partner identifier */
|
|
1980
|
+
partnerId?: string;
|
|
1981
|
+
onramp?: components["schemas"]["Onramp"];
|
|
1982
|
+
/**
|
|
1983
|
+
* @description Optional address of the order creator
|
|
1984
|
+
* @example 0x58241893EF1f86C9fBd8109Cd44Ea961fDb474e1
|
|
1985
|
+
*/
|
|
1986
|
+
creatorAddress?: string;
|
|
1987
|
+
};
|
|
1442
1988
|
/** @description HypeDuel order request */
|
|
1443
1989
|
HypeDuelOrderRequest: {
|
|
1444
1990
|
/**
|
|
@@ -1535,6 +2081,54 @@ export interface components {
|
|
|
1535
2081
|
*/
|
|
1536
2082
|
creatorAddress?: string;
|
|
1537
2083
|
};
|
|
2084
|
+
/** @description Custom exact in order request */
|
|
2085
|
+
CustomExactInOrderRequest: {
|
|
2086
|
+
/**
|
|
2087
|
+
* @description Order type
|
|
2088
|
+
* @enum {string}
|
|
2089
|
+
*/
|
|
2090
|
+
type: "custom_exact_in";
|
|
2091
|
+
/**
|
|
2092
|
+
* @description Address to receive the destination tokens
|
|
2093
|
+
* @example 0x58241893EF1f86C9fBd8109Cd44Ea961fDb474e1
|
|
2094
|
+
*/
|
|
2095
|
+
recipientAddress: string;
|
|
2096
|
+
/**
|
|
2097
|
+
* @description Source chain ID for payment
|
|
2098
|
+
* @example 1
|
|
2099
|
+
*/
|
|
2100
|
+
srcChain: number;
|
|
2101
|
+
/**
|
|
2102
|
+
* @description Destination chain ID where execution will occur
|
|
2103
|
+
* @example 8453
|
|
2104
|
+
*/
|
|
2105
|
+
dstChain: number;
|
|
2106
|
+
/**
|
|
2107
|
+
* @description Payment token contract address
|
|
2108
|
+
* @example 0xA0b86a33E6441E8A91DEF8f5663ACb4C9B4a1234
|
|
2109
|
+
*/
|
|
2110
|
+
srcTokenAddress: string;
|
|
2111
|
+
/**
|
|
2112
|
+
* @description Destination token contract address
|
|
2113
|
+
* @example 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913
|
|
2114
|
+
*/
|
|
2115
|
+
dstTokenAddress: string;
|
|
2116
|
+
/**
|
|
2117
|
+
* @description Payment amount
|
|
2118
|
+
* @example 1000000
|
|
2119
|
+
*/
|
|
2120
|
+
srcAmount: string;
|
|
2121
|
+
payload: components["schemas"]["CustomExactInPayload"];
|
|
2122
|
+
metadata: components["schemas"]["CustomMetadata"];
|
|
2123
|
+
/** @description Optional partner identifier */
|
|
2124
|
+
partnerId?: string;
|
|
2125
|
+
onramp?: components["schemas"]["Onramp"];
|
|
2126
|
+
/**
|
|
2127
|
+
* @description Optional address of the order creator
|
|
2128
|
+
* @example 0x58241893EF1f86C9fBd8109Cd44Ea961fDb474e1
|
|
2129
|
+
*/
|
|
2130
|
+
creatorAddress?: string;
|
|
2131
|
+
};
|
|
1538
2132
|
/** @description Mint NFT order request */
|
|
1539
2133
|
MintNftOrderRequest: {
|
|
1540
2134
|
/**
|
|
@@ -1679,7 +2273,7 @@ export interface components {
|
|
|
1679
2273
|
*/
|
|
1680
2274
|
creatorAddress?: string;
|
|
1681
2275
|
};
|
|
1682
|
-
OrderRequest: components["schemas"]["SwapOrderRequest"] | components["schemas"]["HypeDuelOrderRequest"] | components["schemas"]["CustomOrderRequest"] | components["schemas"]["MintNftOrderRequest"] | components["schemas"]["JoinTournamentOrderRequest"] | components["schemas"]["FundTournamentOrderRequest"];
|
|
2276
|
+
OrderRequest: components["schemas"]["SwapOrderRequest"] | components["schemas"]["X402SwapOrderRequest"] | components["schemas"]["HypeDuelOrderRequest"] | components["schemas"]["CustomOrderRequest"] | components["schemas"]["CustomExactInOrderRequest"] | components["schemas"]["MintNftOrderRequest"] | components["schemas"]["JoinTournamentOrderRequest"] | components["schemas"]["FundTournamentOrderRequest"];
|
|
1683
2277
|
/** @description Deposit transaction (payment from user) */
|
|
1684
2278
|
DepositTx: {
|
|
1685
2279
|
/**
|
|
@@ -1804,6 +2398,74 @@ export interface components {
|
|
|
1804
2398
|
*/
|
|
1805
2399
|
createdAt: number;
|
|
1806
2400
|
};
|
|
2401
|
+
/** @description Points awarded for an order */
|
|
2402
|
+
OrderPointsTransaction: {
|
|
2403
|
+
/**
|
|
2404
|
+
* @description Unique identifier for the points transaction
|
|
2405
|
+
* @example points_123
|
|
2406
|
+
*/
|
|
2407
|
+
id: string;
|
|
2408
|
+
/**
|
|
2409
|
+
* @description Timestamp associated with the points event
|
|
2410
|
+
* @example 2025-07-12T19:23:45.000Z
|
|
2411
|
+
*/
|
|
2412
|
+
time: string;
|
|
2413
|
+
/**
|
|
2414
|
+
* @description Address that received the points
|
|
2415
|
+
* @example 0x58241893EF1f86C9fBd8109Cd44Ea961fDb474e1
|
|
2416
|
+
*/
|
|
2417
|
+
userAddress: string;
|
|
2418
|
+
/**
|
|
2419
|
+
* @description Associated order ID
|
|
2420
|
+
* @example 5392f7a7-d472-4d6b-9848-bd07117fb82d
|
|
2421
|
+
*/
|
|
2422
|
+
orderId: string;
|
|
2423
|
+
/**
|
|
2424
|
+
* @description USD notional used for points calculation
|
|
2425
|
+
* @example 125.75
|
|
2426
|
+
*/
|
|
2427
|
+
usdValue: number;
|
|
2428
|
+
/**
|
|
2429
|
+
* @description Order type associated with the points
|
|
2430
|
+
* @example swap
|
|
2431
|
+
*/
|
|
2432
|
+
orderType: string;
|
|
2433
|
+
/**
|
|
2434
|
+
* @description Points multiplier that was applied
|
|
2435
|
+
* @example 1.5
|
|
2436
|
+
*/
|
|
2437
|
+
multiplier: number;
|
|
2438
|
+
/**
|
|
2439
|
+
* @description Total points awarded
|
|
2440
|
+
* @example 100
|
|
2441
|
+
*/
|
|
2442
|
+
points: number;
|
|
2443
|
+
};
|
|
2444
|
+
ComprehensiveExecuteTx: components["schemas"]["ExecuteTx"] & {
|
|
2445
|
+
/**
|
|
2446
|
+
* @description Execution status reported by the system
|
|
2447
|
+
* @example success
|
|
2448
|
+
*/
|
|
2449
|
+
status: string;
|
|
2450
|
+
};
|
|
2451
|
+
/** @description Full order detail including all associated transactions and points */
|
|
2452
|
+
ComprehensiveOrderDetail: {
|
|
2453
|
+
order: components["schemas"]["Order"];
|
|
2454
|
+
depositTxs: components["schemas"]["DepositTx"][];
|
|
2455
|
+
relayTxs: components["schemas"]["RelayTx"][];
|
|
2456
|
+
executeTx: components["schemas"]["ComprehensiveExecuteTx"] | null;
|
|
2457
|
+
refundTxs: components["schemas"]["RefundTx"][];
|
|
2458
|
+
points: components["schemas"]["OrderPointsTransaction"] | null;
|
|
2459
|
+
};
|
|
2460
|
+
ComprehensiveOrderResponse: {
|
|
2461
|
+
/** @example true */
|
|
2462
|
+
success: boolean;
|
|
2463
|
+
/** @example Get comprehensive order detail successfully */
|
|
2464
|
+
message: string;
|
|
2465
|
+
data: components["schemas"]["ComprehensiveOrderDetail"];
|
|
2466
|
+
/** @example 200 */
|
|
2467
|
+
statusCode: number;
|
|
2468
|
+
};
|
|
1807
2469
|
/** @description NFT contract details */
|
|
1808
2470
|
NftContract: {
|
|
1809
2471
|
/**
|