@b3dotfun/sdk 0.0.8-alpha.6 → 0.0.8-alpha.8

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.
@@ -0,0 +1,1566 @@
1
+ /**
2
+ * This file was auto-generated by openapi-typescript.
3
+ * Do not make direct changes to the file.
4
+ */
5
+
6
+ export interface paths {
7
+ "/chains/{chainId}/tokens": {
8
+ /**
9
+ * Get tokens for a chain
10
+ * @description Retrieves available tokens for a specific blockchain
11
+ */
12
+ get: {
13
+ parameters: {
14
+ query?: {
15
+ /**
16
+ * @description Search term to filter tokens
17
+ * @example USDC
18
+ */
19
+ term?: string;
20
+ /** @description Maximum number of tokens to return */
21
+ limit?: number;
22
+ };
23
+ path: {
24
+ /**
25
+ * @description Blockchain chain ID
26
+ * @example 1
27
+ */
28
+ chainId: number;
29
+ };
30
+ };
31
+ responses: {
32
+ /** @description Tokens retrieved successfully */
33
+ 200: {
34
+ content: {
35
+ "application/json": {
36
+ /** @example true */
37
+ success?: boolean;
38
+ /** @example Tokens retrieved successfully */
39
+ message?: string;
40
+ /** @description Array of tokens */
41
+ data?: {
42
+ /** @description Chain ID */
43
+ chainId?: number;
44
+ /** @description Token contract address */
45
+ address?: string;
46
+ /** @description Token symbol */
47
+ symbol?: string;
48
+ /** @description Token name */
49
+ name?: string;
50
+ /** @description Token decimals */
51
+ decimals?: number;
52
+ metadata?: {
53
+ /** @description Token logo URI */
54
+ logoURI?: string;
55
+ /** @description Whether token is verified */
56
+ verified?: boolean;
57
+ /** @description Whether token is native to chain */
58
+ isNative?: boolean;
59
+ };
60
+ }[];
61
+ /** @example 200 */
62
+ statusCode?: number;
63
+ };
64
+ };
65
+ };
66
+ /** @description Bad request */
67
+ 400: {
68
+ content: {
69
+ "application/json": {
70
+ /** @example false */
71
+ success?: boolean;
72
+ /** @example Bad request */
73
+ message?: string;
74
+ /** @example 400 */
75
+ statusCode?: number;
76
+ };
77
+ };
78
+ };
79
+ };
80
+ };
81
+ };
82
+ "/health-check": {
83
+ /**
84
+ * Health check
85
+ * @description Returns the health status of the AnySpend service
86
+ */
87
+ get: {
88
+ responses: {
89
+ /** @description Service is healthy */
90
+ 200: {
91
+ content: {
92
+ "application/json": {
93
+ /** @example true */
94
+ success?: boolean;
95
+ /** @example Service is healthy */
96
+ message?: string;
97
+ /** @example null */
98
+ data?: Record<string, never>;
99
+ /** @example 200 */
100
+ statusCode?: number;
101
+ };
102
+ };
103
+ };
104
+ };
105
+ };
106
+ };
107
+ "/onramp/coinbase/options": {
108
+ /**
109
+ * Get Coinbase onramp options
110
+ * @description Retrieves available Coinbase onramp configuration options.
111
+ *
112
+ */
113
+ get: {
114
+ parameters: {
115
+ query: {
116
+ /**
117
+ * @description Country code for onramp options
118
+ * @example US
119
+ */
120
+ country: string;
121
+ /**
122
+ * @description Optional subdivision (state/province) code
123
+ * @example CA
124
+ */
125
+ subdivision?: string;
126
+ /**
127
+ * @description Optional payment method filter
128
+ * @example USD
129
+ */
130
+ payment_method?: string;
131
+ /**
132
+ * @description Optional array of chain IDs to filter by
133
+ * @example [
134
+ * "1",
135
+ * "8453"
136
+ * ]
137
+ */
138
+ chainIds?: string[];
139
+ };
140
+ };
141
+ responses: {
142
+ /** @description Coinbase options retrieved successfully */
143
+ 200: {
144
+ content: {
145
+ "application/json": {
146
+ /** @example true */
147
+ success?: boolean;
148
+ /** @example Coinbase options retrieved successfully */
149
+ message?: string;
150
+ data?: {
151
+ /** @description Available payment currencies */
152
+ paymentCurrencies?: {
153
+ /**
154
+ * @description Payment currency identifier
155
+ * @example USD
156
+ */
157
+ id?: string;
158
+ /** @description Payment limits for this currency */
159
+ limits?: {
160
+ /**
161
+ * @description Payment method identifier
162
+ * @example CARD
163
+ */
164
+ id?: string;
165
+ /**
166
+ * @description Minimum payment amount
167
+ * @example 2
168
+ */
169
+ min?: string;
170
+ /**
171
+ * @description Maximum payment amount
172
+ * @example 7500
173
+ */
174
+ max?: string;
175
+ }[];
176
+ }[];
177
+ /** @description Available purchase currencies */
178
+ purchaseCurrencies?: {
179
+ /**
180
+ * @description Currency identifier (UUID)
181
+ * @example 2b92315d-eab7-5bef-84fa-089a131333f5
182
+ */
183
+ id?: string;
184
+ /**
185
+ * @description Currency full name
186
+ * @example USD Coin
187
+ */
188
+ name?: string;
189
+ /**
190
+ * @description Currency symbol
191
+ * @example USDC
192
+ */
193
+ symbol?: string;
194
+ /**
195
+ * @description Currency icon URL
196
+ * @example https://dynamic-assets.coinbase.com/3c15df5e2ac7d4abbe9499ed9335041f00c620f28e8de2f93474a9f432058742cdf4674bd43f309e69778a26969dbc009429d4bd59cc5b85b2c6c8a6dc0b57f1/asset_icons/80422be4be5aa1bb4deb72d9f0e9d0f33e05ce6b8fb7c24bb9e14e4adacdf20c.png
197
+ */
198
+ iconUrl?: string;
199
+ /** @description Available networks for this currency */
200
+ networks?: {
201
+ /**
202
+ * @description Network name
203
+ * @example ethereum
204
+ */
205
+ name?: string;
206
+ /**
207
+ * @description Network display name
208
+ * @example Ethereum
209
+ */
210
+ displayName?: string;
211
+ /**
212
+ * @description Token contract address on this network
213
+ * @example 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48
214
+ */
215
+ contractAddress?: string;
216
+ /**
217
+ * @description Chain ID for this network
218
+ * @example 1
219
+ */
220
+ chainId?: string;
221
+ /**
222
+ * @description Network display name (snake_case version)
223
+ * @example Ethereum
224
+ */
225
+ display_name?: string;
226
+ /**
227
+ * @description Token contract address (snake_case version)
228
+ * @example 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48
229
+ */
230
+ contract_address?: string;
231
+ /**
232
+ * @description Chain ID (snake_case version)
233
+ * @example 1
234
+ */
235
+ chain_id?: string;
236
+ }[];
237
+ }[];
238
+ };
239
+ /** @example 200 */
240
+ statusCode?: number;
241
+ };
242
+ };
243
+ };
244
+ /** @description Bad request */
245
+ 400: {
246
+ content: {
247
+ "application/json": {
248
+ /** @example false */
249
+ success?: boolean;
250
+ /** @example Bad request */
251
+ message?: string;
252
+ /** @example 400 */
253
+ statusCode?: number;
254
+ };
255
+ };
256
+ };
257
+ };
258
+ };
259
+ };
260
+ "/onramp/stripe/supported": {
261
+ /**
262
+ * Check Stripe support
263
+ * @description Checks if Stripe onramp and Stripe Web2 are supported based on IP address location and optional transaction amount
264
+ */
265
+ get: {
266
+ parameters: {
267
+ query: {
268
+ /**
269
+ * @description IP address to check location-based support
270
+ * @example 192.168.1.1
271
+ */
272
+ ipAddress: string;
273
+ /**
274
+ * @description Optional USD amount for transaction limit checks
275
+ * @example 100.00
276
+ */
277
+ usdAmount?: string;
278
+ };
279
+ };
280
+ responses: {
281
+ /** @description Stripe support status retrieved successfully */
282
+ 200: {
283
+ content: {
284
+ "application/json": {
285
+ /** @example true */
286
+ success?: boolean;
287
+ /** @example Stripe support status retrieved successfully */
288
+ message?: string;
289
+ data?: {
290
+ /**
291
+ * @description Whether Stripe onramp is supported for this location/amount
292
+ * @example true
293
+ */
294
+ stripeOnramp?: boolean;
295
+ /**
296
+ * @description Whether Stripe Web2 onramp is supported for this location/amount
297
+ * @example false
298
+ */
299
+ stripeWeb2?: boolean;
300
+ };
301
+ /** @example 200 */
302
+ statusCode?: number;
303
+ };
304
+ };
305
+ };
306
+ /** @description Bad request */
307
+ 400: {
308
+ content: {
309
+ "application/json": {
310
+ /** @example false */
311
+ success?: boolean;
312
+ /** @example Bad request */
313
+ message?: string;
314
+ /** @example 400 */
315
+ statusCode?: number;
316
+ };
317
+ };
318
+ };
319
+ };
320
+ };
321
+ };
322
+ "/orders": {
323
+ /**
324
+ * Get orders by creator
325
+ * @description Retrieves all orders created by a specific address
326
+ */
327
+ get: {
328
+ parameters: {
329
+ query?: {
330
+ /**
331
+ * @description Optional address of the order creator (if not provided, returns all orders)
332
+ * @example 0x58241893EF1f86C9fBd8109Cd44Ea961fDb474e1
333
+ */
334
+ creatorAddress?: string;
335
+ /**
336
+ * @description Maximum number of orders to return
337
+ * @example 20
338
+ */
339
+ limit?: string;
340
+ /**
341
+ * @description Number of orders to skip
342
+ * @example 0
343
+ */
344
+ offset?: string;
345
+ };
346
+ };
347
+ responses: {
348
+ /** @description Orders retrieved successfully */
349
+ 200: {
350
+ content: {
351
+ "application/json": {
352
+ /** @example true */
353
+ success?: boolean;
354
+ /** @example Get orders by creator successfully */
355
+ message?: string;
356
+ /** @description Array of orders */
357
+ data?: {
358
+ /**
359
+ * Format: uuid
360
+ * @description Unique order identifier
361
+ * @example 51d4889c-9733-4941-a9ed-98c0f336d188
362
+ */
363
+ id?: string;
364
+ /**
365
+ * @description Order type
366
+ * @example swap
367
+ * @enum {string}
368
+ */
369
+ type?: "swap" | "custom";
370
+ /**
371
+ * @description Address to receive tokens/NFT/etc
372
+ * @example 0x58241893ef1f86c9fbd8109cd44ea961fdb474e1
373
+ */
374
+ recipientAddress?: string;
375
+ /**
376
+ * @description Global wallet address handling the order
377
+ * @example 0xc6608544a3e16c2e94ca1b8c80c842765d0f3ee0
378
+ */
379
+ globalAddress?: string;
380
+ /**
381
+ * @description Source chain ID
382
+ * @example 8453
383
+ */
384
+ srcChain?: number;
385
+ /**
386
+ * @description Destination chain ID
387
+ * @example 8453
388
+ */
389
+ dstChain?: number;
390
+ /**
391
+ * @description Source token contract address
392
+ * @example 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913
393
+ */
394
+ srcTokenAddress?: string;
395
+ /**
396
+ * @description Destination token contract address
397
+ * @example 0x0000000000000000000000000000000000000000
398
+ */
399
+ dstTokenAddress?: string;
400
+ /**
401
+ * @description Source amount
402
+ * @example 10000000000000
403
+ */
404
+ srcAmount?: string;
405
+ /**
406
+ * @description Current order status
407
+ * @example executed
408
+ */
409
+ status?: string;
410
+ /**
411
+ * @description Error details if order failed
412
+ * @example null
413
+ */
414
+ errorDetails?: string | null;
415
+ /**
416
+ * @description Creation timestamp
417
+ * @example 1752576294028
418
+ */
419
+ createdAt?: number;
420
+ /**
421
+ * @description Expiration timestamp
422
+ * @example 1752577194028
423
+ */
424
+ expiredAt?: number;
425
+ /**
426
+ * @description Order type specific payload
427
+ * @example {
428
+ * "expectedDstAmount": "1667766525695385",
429
+ * "actualDstAmount": null
430
+ * }
431
+ */
432
+ payload?: Record<string, never>;
433
+ /**
434
+ * @description Display metadata including token information
435
+ * @example {
436
+ * "srcToken": {
437
+ * "chainId": 8453,
438
+ * "address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
439
+ * "symbol": "USDC",
440
+ * "name": "USD Coin",
441
+ * "decimals": 6,
442
+ * "metadata": {
443
+ * "logoURI": "https://polygonscan.com/token/images/usdc_32.png"
444
+ * }
445
+ * },
446
+ * "dstToken": {
447
+ * "chainId": 8453,
448
+ * "address": "0x0000000000000000000000000000000000000000",
449
+ * "symbol": "ETH",
450
+ * "name": "Ether",
451
+ * "decimals": 18,
452
+ * "metadata": {
453
+ * "logoURI": "https://assets.relay.link/icons/1/light.png"
454
+ * }
455
+ * }
456
+ * }
457
+ */
458
+ metadata?: Record<string, never>;
459
+ /**
460
+ * @description Optional creator address
461
+ * @example 0x58241893ef1f86c9fbd8109cd44ea961fdb474e1
462
+ */
463
+ creatorAddress?: string | null;
464
+ /**
465
+ * @description Optional partner identifier
466
+ * @example null
467
+ */
468
+ partnerId?: string | null;
469
+ /**
470
+ * @description Onramp configuration if used
471
+ * @example {
472
+ * "country": "SG",
473
+ * "vendor": "stripe-web2",
474
+ * "paymentMethod": "",
475
+ * "ipAddress": "103.216.223.204",
476
+ * "redirectUrl": "https://www.anyspend.com",
477
+ * "stripeAmountInCents": 500
478
+ * }
479
+ */
480
+ onrampMetadata?: Record<string, never>;
481
+ /**
482
+ * @description Quick purchase URL if available
483
+ * @example null
484
+ */
485
+ oneClickBuyUrl?: string | null;
486
+ /**
487
+ * @description Stripe payment intent ID if using Stripe
488
+ * @example null
489
+ */
490
+ stripePaymentIntentId?: string | null;
491
+ }[];
492
+ /** @example 200 */
493
+ statusCode?: number;
494
+ };
495
+ };
496
+ };
497
+ /** @description Bad request */
498
+ 400: {
499
+ content: {
500
+ "application/json": {
501
+ /** @example false */
502
+ success?: boolean;
503
+ /** @example Bad request */
504
+ message?: string;
505
+ /** @example 400 */
506
+ statusCode?: number;
507
+ };
508
+ };
509
+ };
510
+ };
511
+ };
512
+ /**
513
+ * Create a new order
514
+ * @description Creates a new order for token transactions across chains
515
+ */
516
+ post: {
517
+ requestBody: {
518
+ content: {
519
+ "application/json":
520
+ | {
521
+ /**
522
+ * @description Order type for swap
523
+ * @enum {string}
524
+ */
525
+ type: "swap";
526
+ /**
527
+ * @description Address to receive the destination tokens
528
+ * @example 0x58241893EF1f86C9fBd8109Cd44Ea961fDb474e1
529
+ */
530
+ recipientAddress: string;
531
+ /**
532
+ * @description Source chain ID
533
+ * @example 1
534
+ */
535
+ srcChain: number;
536
+ /**
537
+ * @description Destination chain ID
538
+ * @example 8453
539
+ */
540
+ dstChain: number;
541
+ /**
542
+ * @description Source token contract address
543
+ * @example 0xA0b86a33E6441E8A91DEF8f5663ACb4C9B4a1234
544
+ */
545
+ srcTokenAddress: string;
546
+ /**
547
+ * @description Destination token contract address
548
+ * @example 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913
549
+ */
550
+ dstTokenAddress: string;
551
+ /**
552
+ * @description Amount of source tokens to swap
553
+ * @example 1000000
554
+ */
555
+ srcAmount: string;
556
+ /** @description Swap-specific payload */
557
+ payload: {
558
+ /**
559
+ * @description Expected amount of destination tokens
560
+ * @example 990000
561
+ */
562
+ expectedDstAmount: string;
563
+ /**
564
+ * @description Actual received amount (null for new orders)
565
+ * @example null
566
+ */
567
+ actualDstAmount: string | null;
568
+ };
569
+ /** @description Swap metadata for display purposes */
570
+ metadata: {
571
+ /** @description Source token details */
572
+ srcToken?: {
573
+ /**
574
+ * @description Token chain ID
575
+ * @example 8453
576
+ */
577
+ chainId?: number;
578
+ /**
579
+ * @description Token contract address
580
+ * @example 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913
581
+ */
582
+ address?: string;
583
+ /**
584
+ * @description Token symbol
585
+ * @example USDC
586
+ */
587
+ symbol?: string;
588
+ /**
589
+ * @description Token name
590
+ * @example USD Coin
591
+ */
592
+ name?: string;
593
+ /**
594
+ * @description Token decimals
595
+ * @example 6
596
+ */
597
+ decimals?: number;
598
+ metadata?: {
599
+ /**
600
+ * @description Token logo URI
601
+ * @example https://polygonscan.com/token/images/usdc_32.png
602
+ */
603
+ logoURI?: string;
604
+ };
605
+ };
606
+ /** @description Destination token details */
607
+ dstToken?: {
608
+ /**
609
+ * @description Token chain ID
610
+ * @example 8453
611
+ */
612
+ chainId?: number;
613
+ /**
614
+ * @description Token contract address
615
+ * @example 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913
616
+ */
617
+ address?: string;
618
+ /**
619
+ * @description Token symbol
620
+ * @example USDC
621
+ */
622
+ symbol?: string;
623
+ /**
624
+ * @description Token name
625
+ * @example USD Coin
626
+ */
627
+ name?: string;
628
+ /**
629
+ * @description Token decimals
630
+ * @example 6
631
+ */
632
+ decimals?: number;
633
+ metadata?: {
634
+ /**
635
+ * @description Token logo URI
636
+ * @example https://coin-images.coingecko.com/coins/images/6319/large/usdc.png?1696506694
637
+ */
638
+ logoURI?: string;
639
+ };
640
+ };
641
+ };
642
+ /** @description Optional partner identifier */
643
+ partnerId?: string;
644
+ /** @description Optional onramp configuration */
645
+ onramp?: {
646
+ /**
647
+ * @description Onramp vendor
648
+ * @enum {string}
649
+ */
650
+ vendor?: "coinbase" | "stripe" | "stripe-web2";
651
+ /**
652
+ * @description Payment method for onramp
653
+ * @example
654
+ */
655
+ paymentMethod?: string;
656
+ /**
657
+ * @description Country code for the user
658
+ * @example SG
659
+ */
660
+ country?: string;
661
+ /**
662
+ * @description User's IP address
663
+ * @example 149.88.23.87
664
+ */
665
+ ipAddress?: string;
666
+ /**
667
+ * @description URL to redirect after payment
668
+ * @example https://www.anyspend.com
669
+ */
670
+ redirectUrl?: string;
671
+ };
672
+ /**
673
+ * @description Optional address of the order creator
674
+ * @example 0x58241893EF1f86C9fBd8109Cd44Ea961fDb474e1
675
+ */
676
+ creatorAddress?: string;
677
+ }
678
+ | {
679
+ /**
680
+ * @description Order type for custom execution
681
+ * @enum {string}
682
+ */
683
+ type: "custom";
684
+ /**
685
+ * @description Address to receive any tokens or execute transaction
686
+ * @example 0x58241893EF1f86C9fBd8109Cd44Ea961fDb474e1
687
+ */
688
+ recipientAddress: string;
689
+ /**
690
+ * @description Source chain ID for payment
691
+ * @example 1
692
+ */
693
+ srcChain: number;
694
+ /**
695
+ * @description Destination chain ID where custom execution will occur
696
+ * @example 8453
697
+ */
698
+ dstChain: number;
699
+ /**
700
+ * @description Payment token contract address
701
+ * @example 0xA0b86a33E6441E8A91DEF8f5663ACb4C9B4a1234
702
+ */
703
+ srcTokenAddress: string;
704
+ /**
705
+ * @description Token to be used in custom execution
706
+ * @example 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913
707
+ */
708
+ dstTokenAddress: string;
709
+ /**
710
+ * @description Payment amount
711
+ * @example 1000000
712
+ */
713
+ srcAmount: string;
714
+ /** @description Custom execution payload */
715
+ payload: {
716
+ /**
717
+ * @description Encoded transaction data
718
+ * @example 0x1234567890abcdef...
719
+ */
720
+ data: string;
721
+ /**
722
+ * @description Target contract address
723
+ * @example 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913
724
+ */
725
+ to: string;
726
+ /**
727
+ * @description Optional spender address for token approval
728
+ * @example 0x58241893EF1f86C9fBd8109Cd44Ea961fDb474e1
729
+ */
730
+ spenderAddress?: string;
731
+ /**
732
+ * @description Amount for the custom operation
733
+ * @example 1000000
734
+ */
735
+ amount: string;
736
+ };
737
+ /** @description Custom metadata for display purposes */
738
+ metadata: Record<string, never>;
739
+ /** @description Optional partner identifier */
740
+ partnerId?: string;
741
+ /** @description Optional onramp configuration */
742
+ onramp?: {
743
+ /**
744
+ * @description Onramp vendor
745
+ * @enum {string}
746
+ */
747
+ vendor?: "coinbase" | "stripe" | "stripe-web2";
748
+ /**
749
+ * @description Payment method for onramp
750
+ * @example
751
+ */
752
+ paymentMethod?: string;
753
+ /**
754
+ * @description Country code for the user
755
+ * @example SG
756
+ */
757
+ country?: string;
758
+ /**
759
+ * @description User's IP address
760
+ * @example 149.88.23.87
761
+ */
762
+ ipAddress?: string;
763
+ /**
764
+ * @description URL to redirect after payment
765
+ * @example https://www.anyspend.com
766
+ */
767
+ redirectUrl?: string;
768
+ };
769
+ /**
770
+ * @description Optional address of the order creator
771
+ * @example 0x58241893EF1f86C9fBd8109Cd44Ea961fDb474e1
772
+ */
773
+ creatorAddress?: string;
774
+ };
775
+ };
776
+ };
777
+ responses: {
778
+ /** @description Order created successfully */
779
+ 200: {
780
+ content: {
781
+ "application/json": {
782
+ /** @example true */
783
+ success?: boolean;
784
+ /** @example Created order successfully */
785
+ message?: string;
786
+ /** @description Complete order object */
787
+ data?: {
788
+ /**
789
+ * Format: uuid
790
+ * @description Unique order identifier
791
+ */
792
+ id?: string;
793
+ /**
794
+ * @description Order type
795
+ * @enum {string}
796
+ */
797
+ type?: "swap" | "custom";
798
+ /** @description Address to receive tokens/NFT/etc */
799
+ recipientAddress?: string;
800
+ /** @description Global wallet address handling the order */
801
+ globalAddress?: string;
802
+ /** @description Source chain ID */
803
+ srcChain?: number;
804
+ /** @description Destination chain ID */
805
+ dstChain?: number;
806
+ /** @description Source token contract address */
807
+ srcTokenAddress?: string;
808
+ /** @description Destination token contract address */
809
+ dstTokenAddress?: string;
810
+ /** @description Source amount */
811
+ srcAmount?: string;
812
+ /**
813
+ * @description Current order status
814
+ * @example waiting_stripe_payment
815
+ * @enum {string}
816
+ */
817
+ status?:
818
+ | "waiting_stripe_payment"
819
+ | "pending"
820
+ | "executed"
821
+ | "failed"
822
+ | "expired"
823
+ | "refunding"
824
+ | "refunded";
825
+ /** @description Error details if order failed */
826
+ errorDetails?: string | null;
827
+ /** @description Creation timestamp */
828
+ createdAt?: number;
829
+ /** @description Expiration timestamp */
830
+ expiredAt?: number;
831
+ /** @description Order type specific payload */
832
+ payload?: Record<string, never>;
833
+ /** @description Display metadata */
834
+ metadata?: Record<string, never>;
835
+ /** @description Optional creator address */
836
+ creatorAddress?: string | null;
837
+ /** @description Optional partner identifier */
838
+ partnerId?: string | null;
839
+ /** @description Onramp configuration if used */
840
+ onrampMetadata?: {
841
+ /**
842
+ * @description Country code
843
+ * @example SG
844
+ */
845
+ country?: string;
846
+ /**
847
+ * @description Onramp vendor used
848
+ * @example stripe-web2
849
+ */
850
+ vendor?: string;
851
+ /**
852
+ * @description Payment method used
853
+ * @example
854
+ */
855
+ paymentMethod?: string;
856
+ /**
857
+ * @description User's IP address
858
+ * @example 149.88.23.82
859
+ */
860
+ ipAddress?: string;
861
+ /**
862
+ * @description Redirect URL after payment
863
+ * @example https://www.anyspend.com
864
+ */
865
+ redirectUrl?: string;
866
+ /**
867
+ * @description Stripe payment amount in cents
868
+ * @example 500
869
+ */
870
+ stripeAmountInCents?: number;
871
+ } | null;
872
+ /** @description Quick purchase URL if available */
873
+ oneClickBuyUrl?: string | null;
874
+ /** @description Stripe payment intent ID if using Stripe */
875
+ stripePaymentIntentId?: string | null;
876
+ };
877
+ /** @example 200 */
878
+ statusCode?: number;
879
+ };
880
+ };
881
+ };
882
+ /** @description Bad request */
883
+ 400: {
884
+ content: {
885
+ "application/json": {
886
+ /** @example false */
887
+ success?: boolean;
888
+ /** @example Bad request */
889
+ message?: string;
890
+ /** @example 400 */
891
+ statusCode?: number;
892
+ };
893
+ };
894
+ };
895
+ };
896
+ };
897
+ };
898
+ "/orders/{orderId}": {
899
+ /**
900
+ * Get order and transactions
901
+ * @description Retrieves order details along with associated transactions
902
+ */
903
+ get: {
904
+ parameters: {
905
+ path: {
906
+ /**
907
+ * @description Unique order identifier
908
+ * @example 5392f7a7-d472-4d6b-9848-bd07117fb82d
909
+ */
910
+ orderId: string;
911
+ };
912
+ };
913
+ responses: {
914
+ /** @description Order and transactions retrieved successfully */
915
+ 200: {
916
+ content: {
917
+ "application/json": {
918
+ /** @example true */
919
+ success?: boolean;
920
+ /** @example Get order and transactions successfully */
921
+ message?: string;
922
+ data?: {
923
+ /** @description Complete order details */
924
+ order?: {
925
+ /**
926
+ * Format: uuid
927
+ * @description Unique order identifier
928
+ * @example 5392f7a7-d472-4d6b-9848-bd07117fb82d
929
+ */
930
+ id?: string;
931
+ /**
932
+ * @description Order type
933
+ * @example swap
934
+ * @enum {string}
935
+ */
936
+ type?: "swap" | "custom";
937
+ /**
938
+ * @description Address to receive tokens/NFT/etc
939
+ * @example 0xb34facb90a200251318e8841c05102366f2158cf
940
+ */
941
+ recipientAddress?: string;
942
+ /**
943
+ * @description Global wallet address handling the order
944
+ * @example 0xa640beaa78eeb64bb269f2baf8202b9a7316e123
945
+ */
946
+ globalAddress?: string;
947
+ /**
948
+ * @description Source chain ID
949
+ * @example 8453
950
+ */
951
+ srcChain?: number;
952
+ /**
953
+ * @description Destination chain ID
954
+ * @example 8453
955
+ */
956
+ dstChain?: number;
957
+ /**
958
+ * @description Source token contract address
959
+ * @example 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913
960
+ */
961
+ srcTokenAddress?: string;
962
+ /**
963
+ * @description Destination token contract address
964
+ * @example 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913
965
+ */
966
+ dstTokenAddress?: string;
967
+ /**
968
+ * @description Source amount
969
+ * @example 93354000
970
+ */
971
+ srcAmount?: string;
972
+ /**
973
+ * @description Current order status
974
+ * @example executed
975
+ */
976
+ status?: string;
977
+ /**
978
+ * @description Error details if order failed
979
+ * @example null
980
+ */
981
+ errorDetails?: string | null;
982
+ /**
983
+ * @description Creation timestamp
984
+ * @example 1752505794679
985
+ */
986
+ createdAt?: number;
987
+ /**
988
+ * @description Expiration timestamp
989
+ * @example 1752506694679
990
+ */
991
+ expiredAt?: number;
992
+ /**
993
+ * @description Order type specific payload
994
+ * @example {
995
+ * "expectedDstAmount": "99000000",
996
+ * "actualDstAmount": "93354000"
997
+ * }
998
+ */
999
+ payload?: Record<string, never>;
1000
+ /**
1001
+ * @description Display metadata including token information
1002
+ * @example {
1003
+ * "srcToken": {
1004
+ * "chainId": 8453,
1005
+ * "address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
1006
+ * "symbol": "USDC",
1007
+ * "name": "USD Coin",
1008
+ * "decimals": 6,
1009
+ * "metadata": {
1010
+ * "logoURI": "https://polygonscan.com/token/images/usdc_32.png"
1011
+ * }
1012
+ * },
1013
+ * "dstToken": {
1014
+ * "chainId": 8453,
1015
+ * "address": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
1016
+ * "symbol": "USDC",
1017
+ * "name": "USD Coin",
1018
+ * "decimals": 6,
1019
+ * "metadata": {
1020
+ * "logoURI": "https://coin-images.coingecko.com/coins/images/6319/large/usdc.png?1696506694"
1021
+ * }
1022
+ * }
1023
+ * }
1024
+ */
1025
+ metadata?: Record<string, never>;
1026
+ /**
1027
+ * @description Optional creator address
1028
+ * @example 0xb34facb90a200251318e8841c05102366f2158cf
1029
+ */
1030
+ creatorAddress?: string | null;
1031
+ /**
1032
+ * @description Optional partner identifier
1033
+ * @example null
1034
+ */
1035
+ partnerId?: string | null;
1036
+ /**
1037
+ * @description Onramp configuration if used
1038
+ * @example {
1039
+ * "country": "US",
1040
+ * "vendor": "stripe-web2",
1041
+ * "paymentMethod": "",
1042
+ * "ipAddress": "96.225.86.216",
1043
+ * "redirectUrl": "https://www.anyspend.com",
1044
+ * "stripeAmountInCents": 9900
1045
+ * }
1046
+ */
1047
+ onrampMetadata?: Record<string, never>;
1048
+ /**
1049
+ * @description Quick purchase URL if available
1050
+ * @example null
1051
+ */
1052
+ oneClickBuyUrl?: string | null;
1053
+ /**
1054
+ * @description Stripe payment intent ID if using Stripe
1055
+ * @example pi_3Rko0sJnoDg53PsP0PDLsHkR
1056
+ */
1057
+ stripePaymentIntentId?: string | null;
1058
+ };
1059
+ /**
1060
+ * @description Deposit transactions (payment from user)
1061
+ * @example [
1062
+ * {
1063
+ * "orderId": "5392f7a7-d472-4d6b-9848-bd07117fb82d",
1064
+ * "chain": 8453,
1065
+ * "from": "0xa7539e73700B1726aBA29526606442A491Ef5747",
1066
+ * "txHash": "0x60ece99a645201668d20db6775a6b3d30967433ff0750b356cdad46d3e13f9c8",
1067
+ * "amount": "93354000",
1068
+ * "createdAt": 1752505811105
1069
+ * }
1070
+ * ]
1071
+ */
1072
+ depositTxs?:
1073
+ | {
1074
+ /**
1075
+ * Format: uuid
1076
+ * @description Associated order ID
1077
+ * @example 5392f7a7-d472-4d6b-9848-bd07117fb82d
1078
+ */
1079
+ orderId?: string;
1080
+ /**
1081
+ * @description Chain where transaction occurred
1082
+ * @example 8453
1083
+ */
1084
+ chain?: number;
1085
+ /**
1086
+ * @description Sender address
1087
+ * @example 0xa7539e73700B1726aBA29526606442A491Ef5747
1088
+ */
1089
+ from?: string;
1090
+ /**
1091
+ * @description Transaction hash
1092
+ * @example 0x60ece99a645201668d20db6775a6b3d30967433ff0750b356cdad46d3e13f9c8
1093
+ */
1094
+ txHash?: string;
1095
+ /**
1096
+ * @description Transaction amount
1097
+ * @example 93354000
1098
+ */
1099
+ amount?: string;
1100
+ /**
1101
+ * @description Transaction timestamp
1102
+ * @example 1752505811105
1103
+ */
1104
+ createdAt?: number;
1105
+ }[]
1106
+ | null;
1107
+ /**
1108
+ * @description Cross-chain relay transaction
1109
+ * @example {
1110
+ * "orderId": "5392f7a7-d472-4d6b-9848-bd07117fb82d",
1111
+ * "chain": 8453,
1112
+ * "txHash": "0x9df917e14bb089f74763d1d2662761d75c97a5a068b8a9e411c3d384c9c40d19",
1113
+ * "status": "success",
1114
+ * "createdAt": 1752505817654
1115
+ * }
1116
+ */
1117
+ relayTx?: {
1118
+ /**
1119
+ * Format: uuid
1120
+ * @description Associated order ID
1121
+ * @example 5392f7a7-d472-4d6b-9848-bd07117fb82d
1122
+ */
1123
+ orderId?: string;
1124
+ /**
1125
+ * @description Chain where relay occurred
1126
+ * @example 8453
1127
+ */
1128
+ chain?: number;
1129
+ /**
1130
+ * @description Relay transaction hash
1131
+ * @example 0x9df917e14bb089f74763d1d2662761d75c97a5a068b8a9e411c3d384c9c40d19
1132
+ */
1133
+ txHash?: string;
1134
+ /**
1135
+ * @description Relay transaction status
1136
+ * @example success
1137
+ */
1138
+ status?: string;
1139
+ /**
1140
+ * @description Relay timestamp
1141
+ * @example 1752505817654
1142
+ */
1143
+ createdAt?: number;
1144
+ } | null;
1145
+ /**
1146
+ * @description Final execution transaction (NFT mint, tournament join, etc)
1147
+ * @example null
1148
+ */
1149
+ executeTx?: {
1150
+ /**
1151
+ * Format: uuid
1152
+ * @description Associated order ID
1153
+ */
1154
+ orderId?: string;
1155
+ /** @description Chain where execution occurred */
1156
+ chain?: number;
1157
+ /** @description Execution transaction hash */
1158
+ txHash?: string;
1159
+ /** @description Execution timestamp */
1160
+ createdAt?: number;
1161
+ } | null;
1162
+ /**
1163
+ * @description Refund transactions if order failed
1164
+ * @example null
1165
+ */
1166
+ refundTxs?:
1167
+ | {
1168
+ /**
1169
+ * Format: uuid
1170
+ * @description Associated order ID
1171
+ */
1172
+ orderId?: string;
1173
+ /** @description Chain where refund occurred */
1174
+ chain?: number;
1175
+ /** @description Refund transaction hash */
1176
+ txHash?: string;
1177
+ /** @description Refunded amount */
1178
+ amount?: string;
1179
+ /** @description Refund status */
1180
+ status?: string;
1181
+ /** @description Refund timestamp */
1182
+ createdAt?: number;
1183
+ }[]
1184
+ | null;
1185
+ };
1186
+ /** @example 200 */
1187
+ statusCode?: number;
1188
+ };
1189
+ };
1190
+ };
1191
+ /** @description Bad request */
1192
+ 400: {
1193
+ content: {
1194
+ "application/json": {
1195
+ /** @example false */
1196
+ success?: boolean;
1197
+ /** @example Bad request */
1198
+ message?: string;
1199
+ /** @example 400 */
1200
+ statusCode?: number;
1201
+ };
1202
+ };
1203
+ };
1204
+ /** @description Order not found */
1205
+ 404: {
1206
+ content: {
1207
+ "application/json": {
1208
+ /** @example false */
1209
+ success?: boolean;
1210
+ /** @example Order not found */
1211
+ message?: string;
1212
+ /** @example 404 */
1213
+ statusCode?: number;
1214
+ };
1215
+ };
1216
+ };
1217
+ };
1218
+ };
1219
+ };
1220
+ "/orders/quote": {
1221
+ /**
1222
+ * Get anyspend quote
1223
+ * @description Retrieves a quote for cross-chain token relay
1224
+ */
1225
+ post: {
1226
+ requestBody: {
1227
+ content: {
1228
+ "application/json":
1229
+ | {
1230
+ /**
1231
+ * @description Order type for swap
1232
+ * @enum {string}
1233
+ */
1234
+ type: "swap";
1235
+ /**
1236
+ * @description Source chain ID
1237
+ * @example 1
1238
+ */
1239
+ srcChain: number;
1240
+ /**
1241
+ * @description Destination chain ID
1242
+ * @example 8453
1243
+ */
1244
+ dstChain: number;
1245
+ /**
1246
+ * @description Source token contract address
1247
+ * @example 0x0000000000000000000000000000000000000000
1248
+ */
1249
+ srcTokenAddress: string;
1250
+ /**
1251
+ * @description Destination token contract address
1252
+ * @example 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913
1253
+ */
1254
+ dstTokenAddress: string;
1255
+ /**
1256
+ * @description Type of trade execution
1257
+ * @enum {string}
1258
+ */
1259
+ tradeType: "EXACT_INPUT" | "EXPECTED_OUTPUT" | "EXACT_OUTPUT";
1260
+ /**
1261
+ * @description Amount to quote
1262
+ * @example 1000000000000000000
1263
+ */
1264
+ amount: string;
1265
+ /**
1266
+ * @description Optional onramp vendor
1267
+ * @enum {string}
1268
+ */
1269
+ onrampVendor?: "coinbase" | "stripe" | "stripe-web2";
1270
+ }
1271
+ | {
1272
+ /**
1273
+ * @description Order type for custom execution
1274
+ * @enum {string}
1275
+ */
1276
+ type: "custom";
1277
+ /**
1278
+ * @description Source chain ID
1279
+ * @example 1
1280
+ */
1281
+ srcChain: number;
1282
+ /**
1283
+ * @description Destination chain ID
1284
+ * @example 8453
1285
+ */
1286
+ dstChain: number;
1287
+ /**
1288
+ * @description Source token contract address
1289
+ * @example 0x0000000000000000000000000000000000000000
1290
+ */
1291
+ srcTokenAddress: string;
1292
+ /**
1293
+ * @description Destination token contract address
1294
+ * @example 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913
1295
+ */
1296
+ dstTokenAddress: string;
1297
+ /** @description Custom payload for execution */
1298
+ payload: {
1299
+ /** @description Encoded transaction data */
1300
+ data: string;
1301
+ /** @description Target contract address */
1302
+ to: string;
1303
+ /** @description Optional spender address for token approval */
1304
+ spenderAddress?: string;
1305
+ /** @description Amount for the custom operation */
1306
+ amount: string;
1307
+ };
1308
+ /**
1309
+ * @description Optional onramp vendor
1310
+ * @enum {string}
1311
+ */
1312
+ onrampVendor?: "coinbase" | "stripe" | "stripe-web2";
1313
+ };
1314
+ };
1315
+ };
1316
+ responses: {
1317
+ /** @description Quote retrieved successfully */
1318
+ 200: {
1319
+ content: {
1320
+ "application/json": {
1321
+ /** @example true */
1322
+ success?: boolean;
1323
+ /** @example Get quote successfully */
1324
+ message?: string;
1325
+ data?: {
1326
+ /**
1327
+ * @description Type of operation
1328
+ * @example swap
1329
+ */
1330
+ operation?: string;
1331
+ /**
1332
+ * @description Sender address for the operation
1333
+ * @example 0x15846E6A7C839A208765a0B4754C2dd15E879990
1334
+ */
1335
+ sender?: string;
1336
+ /**
1337
+ * @description Recipient address for the operation
1338
+ * @example 0xaF1ae1B78bc767DaEBB91196Adf982E9d560AAB9
1339
+ */
1340
+ recipient?: string;
1341
+ /** @description Input currency details */
1342
+ currencyIn?: {
1343
+ currency?: {
1344
+ /** @example 1 */
1345
+ chainId?: number;
1346
+ /** @example 0x0000000000000000000000000000000000000000 */
1347
+ address?: string;
1348
+ /** @example ETH */
1349
+ symbol?: string;
1350
+ /** @example Ether */
1351
+ name?: string;
1352
+ /** @example 18 */
1353
+ decimals?: number;
1354
+ metadata?: {
1355
+ /** @example https://assets.relay.link/icons/1/light.png */
1356
+ logoURI?: string;
1357
+ /** @example true */
1358
+ verified?: boolean;
1359
+ };
1360
+ };
1361
+ /**
1362
+ * @description Raw amount
1363
+ * @example 1000000000000000000
1364
+ */
1365
+ amount?: string;
1366
+ /**
1367
+ * @description Human-readable formatted amount
1368
+ * @example 1.0
1369
+ */
1370
+ amountFormatted?: string;
1371
+ /**
1372
+ * @description USD value of the amount
1373
+ * @example 3229.715818
1374
+ */
1375
+ amountUsd?: string;
1376
+ /**
1377
+ * @description Minimum required amount
1378
+ * @example 1000000000000000000
1379
+ */
1380
+ minimumAmount?: string;
1381
+ };
1382
+ /** @description Output currency details */
1383
+ currencyOut?: {
1384
+ currency?: {
1385
+ /** @example 8453 */
1386
+ chainId?: number;
1387
+ /** @example 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913 */
1388
+ address?: string;
1389
+ /** @example USDC */
1390
+ symbol?: string;
1391
+ /** @example USD Coin */
1392
+ name?: string;
1393
+ /** @example 6 */
1394
+ decimals?: number;
1395
+ metadata?: {
1396
+ /** @example https://coin-images.coingecko.com/coins/images/6319/large/usdc.png?1696506694 */
1397
+ logoURI?: string;
1398
+ /** @example true */
1399
+ verified?: boolean;
1400
+ };
1401
+ };
1402
+ /**
1403
+ * @description Raw output amount
1404
+ * @example 3224805862
1405
+ */
1406
+ amount?: string;
1407
+ /**
1408
+ * @description Human-readable formatted output amount
1409
+ * @example 3224.805862
1410
+ */
1411
+ amountFormatted?: string;
1412
+ /**
1413
+ * @description USD value of output amount
1414
+ * @example 3224.512405
1415
+ */
1416
+ amountUsd?: string;
1417
+ /**
1418
+ * @description Minimum guaranteed output amount
1419
+ * @example 3192557803
1420
+ */
1421
+ minimumAmount?: string;
1422
+ };
1423
+ /** @description Total price impact of the trade */
1424
+ totalImpact?: {
1425
+ /**
1426
+ * @description USD impact amount
1427
+ * @example -5.203413
1428
+ */
1429
+ usd?: string;
1430
+ /**
1431
+ * @description Percentage impact
1432
+ * @example -0.16
1433
+ */
1434
+ percent?: string;
1435
+ };
1436
+ /** @description Price impact from the swap portion */
1437
+ swapImpact?: {
1438
+ /**
1439
+ * @description USD swap impact
1440
+ * @example -4.102797
1441
+ */
1442
+ usd?: string;
1443
+ /**
1444
+ * @description Percentage swap impact
1445
+ * @example -0.13
1446
+ */
1447
+ percent?: string;
1448
+ };
1449
+ /**
1450
+ * @description Exchange rate
1451
+ * @example 3224.805862
1452
+ */
1453
+ rate?: string;
1454
+ /** @description Slippage tolerance settings */
1455
+ slippageTolerance?: {
1456
+ origin?: {
1457
+ /** @example 0.000000 */
1458
+ usd?: string;
1459
+ /** @example 0 */
1460
+ value?: string;
1461
+ /** @example 0.00 */
1462
+ percent?: string;
1463
+ };
1464
+ destination?: {
1465
+ /** @example 32.245124 */
1466
+ usd?: string;
1467
+ /** @example 32248059 */
1468
+ value?: string;
1469
+ /** @example 1.00 */
1470
+ percent?: string;
1471
+ };
1472
+ };
1473
+ /**
1474
+ * @description Estimated completion time in seconds
1475
+ * @example 24
1476
+ */
1477
+ timeEstimate?: number;
1478
+ /**
1479
+ * @description User's current balance
1480
+ * @example 0
1481
+ */
1482
+ userBalance?: string;
1483
+ };
1484
+ /** @example 200 */
1485
+ statusCode?: number;
1486
+ };
1487
+ };
1488
+ };
1489
+ /** @description Bad request */
1490
+ 400: {
1491
+ content: {
1492
+ "application/json": {
1493
+ /** @example false */
1494
+ success?: boolean;
1495
+ /** @example Bad request */
1496
+ message?: string;
1497
+ /** @example 400 */
1498
+ statusCode?: number;
1499
+ };
1500
+ };
1501
+ };
1502
+ };
1503
+ };
1504
+ };
1505
+ "/stripe/clientSecret": {
1506
+ /**
1507
+ * Get Stripe client secret
1508
+ * @description Retrieves a Stripe client secret for payment processing using a payment intent ID
1509
+ */
1510
+ get: {
1511
+ parameters: {
1512
+ query: {
1513
+ /**
1514
+ * @description Stripe payment intent ID to retrieve client secret for
1515
+ * @example pi_3RlHbVJnoDg53PsP1349cXlR
1516
+ */
1517
+ paymentIntentId: string;
1518
+ };
1519
+ };
1520
+ responses: {
1521
+ /** @description Client secret retrieved successfully */
1522
+ 200: {
1523
+ content: {
1524
+ "application/json": {
1525
+ /** @example true */
1526
+ success?: boolean;
1527
+ /** @example Client secret retrieved */
1528
+ message?: string;
1529
+ /**
1530
+ * @description Stripe client secret for the payment intent
1531
+ * @example pi_3RlHbVJnoDg53PsP1349cXlR_secret_084W7pxxba11lTUHWbmeZlXi0
1532
+ */
1533
+ data?: string;
1534
+ /** @example 200 */
1535
+ statusCode?: number;
1536
+ };
1537
+ };
1538
+ };
1539
+ /** @description Bad request - PaymentIntentId is required or invalid */
1540
+ 400: {
1541
+ content: {
1542
+ "application/json": {
1543
+ /** @example false */
1544
+ success?: boolean;
1545
+ /** @example PaymentIntentId is required */
1546
+ message?: string;
1547
+ /** @example 400 */
1548
+ statusCode?: number;
1549
+ };
1550
+ };
1551
+ };
1552
+ };
1553
+ };
1554
+ };
1555
+ }
1556
+ export type webhooks = Record<string, never>;
1557
+ export interface components {
1558
+ schemas: never;
1559
+ responses: never;
1560
+ parameters: never;
1561
+ requestBodies: never;
1562
+ headers: never;
1563
+ pathItems: never;
1564
+ }
1565
+ export type $defs = Record<string, never>;
1566
+ export type operations = Record<string, never>;