@b3dotfun/sdk 0.0.49 → 0.0.50-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.
Files changed (161) hide show
  1. package/dist/cjs/anyspend/constants/index.d.ts +1 -0
  2. package/dist/cjs/anyspend/constants/index.js +12 -2
  3. package/dist/cjs/anyspend/react/components/AnySpend.d.ts +2 -1
  4. package/dist/cjs/anyspend/react/components/AnySpend.js +18 -5
  5. package/dist/cjs/anyspend/react/components/AnySpendCustom.js +12 -3
  6. package/dist/cjs/anyspend/react/components/AnyspendDepositHype.js +11 -4
  7. package/dist/cjs/anyspend/react/components/common/CryptoPaySection.d.ts +3 -1
  8. package/dist/cjs/anyspend/react/components/common/CryptoPaySection.js +2 -2
  9. package/dist/cjs/anyspend/react/components/common/CryptoReceiveSection.d.ts +3 -1
  10. package/dist/cjs/anyspend/react/components/common/CryptoReceiveSection.js +17 -11
  11. package/dist/cjs/anyspend/react/components/common/FeeBreakDown.d.ts +12 -0
  12. package/dist/cjs/anyspend/react/components/common/FeeBreakDown.js +19 -0
  13. package/dist/cjs/anyspend/react/components/common/FeeDetailPanel.d.ts +8 -0
  14. package/dist/cjs/anyspend/react/components/common/FeeDetailPanel.js +116 -0
  15. package/dist/cjs/anyspend/react/components/common/OrderDetails.d.ts +1 -0
  16. package/dist/cjs/anyspend/react/components/common/OrderDetails.js +6 -6
  17. package/dist/cjs/anyspend/react/components/common/OrderDetailsCollapsible.d.ts +1 -0
  18. package/dist/cjs/anyspend/react/components/common/OrderDetailsCollapsible.js +3 -2
  19. package/dist/cjs/anyspend/react/components/common/OrderToken.js +1 -1
  20. package/dist/cjs/anyspend/react/components/common/OrderTokenAmount.js +1 -1
  21. package/dist/cjs/anyspend/react/components/common/OrderTokenAmountFiat.js +1 -1
  22. package/dist/cjs/anyspend/react/components/common/OrderTokenAmountNew.js +1 -1
  23. package/dist/cjs/anyspend/react/components/common/PanelOnramp.d.ts +2 -1
  24. package/dist/cjs/anyspend/react/components/common/PanelOnramp.js +36 -21
  25. package/dist/cjs/anyspend/react/components/common/PanelOnrampPayment.js +2 -1
  26. package/dist/cjs/anyspend/react/components/common/PointsDetailPanel.js +1 -2
  27. package/dist/cjs/anyspend/react/contexts/FeatureFlagsContext.js +1 -1
  28. package/dist/cjs/anyspend/react/hooks/useAnyspendFlow.d.ts +3 -1
  29. package/dist/cjs/anyspend/react/hooks/useAnyspendFlow.js +1 -0
  30. package/dist/cjs/anyspend/react/hooks/useAnyspendOrderHistory.d.ts +48 -12
  31. package/dist/cjs/anyspend/types/api.d.ts +133 -178
  32. package/dist/cjs/anyspend/utils/chain.js +4 -4
  33. package/dist/cjs/bondkit/bondkitToken.d.ts +3 -1
  34. package/dist/cjs/bondkit/bondkitToken.js +19 -0
  35. package/dist/cjs/bondkit/components/TradingView.d.ts +1 -1
  36. package/dist/cjs/bondkit/components/TradingView.js +14 -3
  37. package/dist/cjs/bondkit/components/index.d.ts +1 -1
  38. package/dist/cjs/bondkit/components/index.js +1 -1
  39. package/dist/cjs/bondkit/components/types.d.ts +1 -0
  40. package/dist/cjs/bondkit/config.d.ts +1 -0
  41. package/dist/cjs/bondkit/config.js +1 -0
  42. package/dist/cjs/bondkit/index.d.ts +1 -1
  43. package/dist/cjs/bondkit/index.js +2 -6
  44. package/dist/cjs/bondkit/types.d.ts +15 -0
  45. package/dist/cjs/global-account/react/components/B3Provider/B3Provider.d.ts +1 -1
  46. package/dist/cjs/global-account/react/components/B3Provider/B3Provider.js +1 -1
  47. package/dist/cjs/global-account/react/components/B3Provider/RelayKitProviderWrapper.js +2 -2
  48. package/dist/cjs/global-account/react/components/ui/tooltip.js +1 -1
  49. package/dist/cjs/global-account/react/hooks/useAuthentication.js +11 -0
  50. package/dist/cjs/global-account/react/hooks/useFirstEOA.d.ts +7663 -1
  51. package/dist/cjs/global-account/react/hooks/useFirstEOA.js +21 -1
  52. package/dist/cjs/shared/generated/chain-networks.json +40 -7
  53. package/dist/esm/anyspend/constants/index.d.ts +1 -0
  54. package/dist/esm/anyspend/constants/index.js +11 -1
  55. package/dist/esm/anyspend/react/components/AnySpend.d.ts +2 -1
  56. package/dist/esm/anyspend/react/components/AnySpend.js +18 -5
  57. package/dist/esm/anyspend/react/components/AnySpendCustom.js +14 -5
  58. package/dist/esm/anyspend/react/components/AnyspendDepositHype.js +11 -4
  59. package/dist/esm/anyspend/react/components/common/CryptoPaySection.d.ts +3 -1
  60. package/dist/esm/anyspend/react/components/common/CryptoPaySection.js +4 -4
  61. package/dist/esm/anyspend/react/components/common/CryptoReceiveSection.d.ts +3 -1
  62. package/dist/esm/anyspend/react/components/common/CryptoReceiveSection.js +19 -13
  63. package/dist/esm/anyspend/react/components/common/FeeBreakDown.d.ts +12 -0
  64. package/dist/esm/anyspend/react/components/common/FeeBreakDown.js +16 -0
  65. package/dist/esm/anyspend/react/components/common/FeeDetailPanel.d.ts +8 -0
  66. package/dist/esm/anyspend/react/components/common/FeeDetailPanel.js +113 -0
  67. package/dist/esm/anyspend/react/components/common/OrderDetails.d.ts +1 -0
  68. package/dist/esm/anyspend/react/components/common/OrderDetails.js +6 -6
  69. package/dist/esm/anyspend/react/components/common/OrderDetailsCollapsible.d.ts +1 -0
  70. package/dist/esm/anyspend/react/components/common/OrderDetailsCollapsible.js +4 -3
  71. package/dist/esm/anyspend/react/components/common/OrderToken.js +1 -1
  72. package/dist/esm/anyspend/react/components/common/OrderTokenAmount.js +1 -1
  73. package/dist/esm/anyspend/react/components/common/OrderTokenAmountFiat.js +1 -1
  74. package/dist/esm/anyspend/react/components/common/OrderTokenAmountNew.js +1 -1
  75. package/dist/esm/anyspend/react/components/common/PanelOnramp.d.ts +2 -1
  76. package/dist/esm/anyspend/react/components/common/PanelOnramp.js +38 -23
  77. package/dist/esm/anyspend/react/components/common/PanelOnrampPayment.js +2 -1
  78. package/dist/esm/anyspend/react/components/common/PointsDetailPanel.js +2 -3
  79. package/dist/esm/anyspend/react/contexts/FeatureFlagsContext.js +1 -1
  80. package/dist/esm/anyspend/react/hooks/useAnyspendFlow.d.ts +3 -1
  81. package/dist/esm/anyspend/react/hooks/useAnyspendFlow.js +1 -0
  82. package/dist/esm/anyspend/react/hooks/useAnyspendOrderHistory.d.ts +48 -12
  83. package/dist/esm/anyspend/types/api.d.ts +133 -178
  84. package/dist/esm/anyspend/utils/chain.js +4 -4
  85. package/dist/esm/bondkit/bondkitToken.d.ts +3 -1
  86. package/dist/esm/bondkit/bondkitToken.js +19 -0
  87. package/dist/esm/bondkit/components/TradingView.d.ts +1 -1
  88. package/dist/esm/bondkit/components/TradingView.js +14 -3
  89. package/dist/esm/bondkit/components/index.d.ts +1 -1
  90. package/dist/esm/bondkit/components/index.js +1 -1
  91. package/dist/esm/bondkit/components/types.d.ts +1 -0
  92. package/dist/esm/bondkit/config.d.ts +1 -0
  93. package/dist/esm/bondkit/config.js +1 -0
  94. package/dist/esm/bondkit/index.d.ts +1 -1
  95. package/dist/esm/bondkit/index.js +1 -1
  96. package/dist/esm/bondkit/types.d.ts +15 -0
  97. package/dist/esm/global-account/react/components/B3Provider/B3Provider.d.ts +1 -1
  98. package/dist/esm/global-account/react/components/B3Provider/B3Provider.js +1 -1
  99. package/dist/esm/global-account/react/components/B3Provider/RelayKitProviderWrapper.js +2 -2
  100. package/dist/esm/global-account/react/components/ui/tooltip.js +1 -1
  101. package/dist/esm/global-account/react/hooks/useAuthentication.js +11 -0
  102. package/dist/esm/global-account/react/hooks/useFirstEOA.d.ts +7663 -1
  103. package/dist/esm/global-account/react/hooks/useFirstEOA.js +22 -2
  104. package/dist/esm/shared/generated/chain-networks.json +40 -7
  105. package/dist/styles/index.css +1 -1
  106. package/dist/types/anyspend/constants/index.d.ts +1 -0
  107. package/dist/types/anyspend/react/components/AnySpend.d.ts +2 -1
  108. package/dist/types/anyspend/react/components/common/CryptoPaySection.d.ts +3 -1
  109. package/dist/types/anyspend/react/components/common/CryptoReceiveSection.d.ts +3 -1
  110. package/dist/types/anyspend/react/components/common/FeeBreakDown.d.ts +12 -0
  111. package/dist/types/anyspend/react/components/common/FeeDetailPanel.d.ts +8 -0
  112. package/dist/types/anyspend/react/components/common/OrderDetails.d.ts +1 -0
  113. package/dist/types/anyspend/react/components/common/OrderDetailsCollapsible.d.ts +1 -0
  114. package/dist/types/anyspend/react/components/common/PanelOnramp.d.ts +2 -1
  115. package/dist/types/anyspend/react/hooks/useAnyspendFlow.d.ts +3 -1
  116. package/dist/types/anyspend/react/hooks/useAnyspendOrderHistory.d.ts +48 -12
  117. package/dist/types/anyspend/types/api.d.ts +133 -178
  118. package/dist/types/bondkit/bondkitToken.d.ts +3 -1
  119. package/dist/types/bondkit/components/TradingView.d.ts +1 -1
  120. package/dist/types/bondkit/components/index.d.ts +1 -1
  121. package/dist/types/bondkit/components/types.d.ts +1 -0
  122. package/dist/types/bondkit/config.d.ts +1 -0
  123. package/dist/types/bondkit/index.d.ts +1 -1
  124. package/dist/types/bondkit/types.d.ts +15 -0
  125. package/dist/types/global-account/react/components/B3Provider/B3Provider.d.ts +1 -1
  126. package/dist/types/global-account/react/hooks/useFirstEOA.d.ts +7663 -1
  127. package/package.json +4 -4
  128. package/src/anyspend/constants/index.ts +12 -1
  129. package/src/anyspend/react/components/AnySpend.tsx +33 -0
  130. package/src/anyspend/react/components/AnySpendCustom.tsx +69 -7
  131. package/src/anyspend/react/components/AnyspendDepositHype.tsx +24 -0
  132. package/src/anyspend/react/components/common/CryptoPaySection.tsx +14 -2
  133. package/src/anyspend/react/components/common/CryptoReceiveSection.tsx +31 -11
  134. package/src/anyspend/react/components/common/FeeBreakDown.tsx +105 -0
  135. package/src/anyspend/react/components/common/FeeDetailPanel.tsx +334 -0
  136. package/src/anyspend/react/components/common/OrderDetails.tsx +7 -0
  137. package/src/anyspend/react/components/common/OrderDetailsCollapsible.tsx +16 -0
  138. package/src/anyspend/react/components/common/OrderToken.tsx +1 -1
  139. package/src/anyspend/react/components/common/OrderTokenAmount.tsx +1 -1
  140. package/src/anyspend/react/components/common/OrderTokenAmountFiat.tsx +1 -1
  141. package/src/anyspend/react/components/common/OrderTokenAmountNew.tsx +1 -1
  142. package/src/anyspend/react/components/common/PanelOnramp.tsx +58 -27
  143. package/src/anyspend/react/components/common/PanelOnrampPayment.tsx +18 -6
  144. package/src/anyspend/react/components/common/PointsDetailPanel.tsx +1 -13
  145. package/src/anyspend/react/contexts/FeatureFlagsContext.tsx +2 -2
  146. package/src/anyspend/react/hooks/useAnyspendFlow.ts +1 -0
  147. package/src/anyspend/types/api.ts +135 -178
  148. package/src/anyspend/utils/chain.ts +4 -4
  149. package/src/bondkit/bondkitToken.ts +24 -0
  150. package/src/bondkit/components/TradingView.tsx +15 -3
  151. package/src/bondkit/components/index.ts +1 -1
  152. package/src/bondkit/components/types.ts +1 -0
  153. package/src/bondkit/config.ts +2 -0
  154. package/src/bondkit/index.ts +1 -1
  155. package/src/bondkit/types.ts +19 -0
  156. package/src/global-account/react/components/B3Provider/B3Provider.tsx +1 -1
  157. package/src/global-account/react/components/B3Provider/RelayKitProviderWrapper.tsx +2 -2
  158. package/src/global-account/react/components/ui/tooltip.tsx +11 -9
  159. package/src/global-account/react/hooks/useAuthentication.ts +13 -1
  160. package/src/global-account/react/hooks/useFirstEOA.tsx +20 -2
  161. package/src/shared/generated/chain-networks.json +40 -7
@@ -5,12 +5,6 @@
5
5
 
6
6
  export interface paths {
7
7
  "/chains/{chainId}/tokens": {
8
- parameters: {
9
- query?: never;
10
- header?: never;
11
- path?: never;
12
- cookie?: never;
13
- };
14
8
  /**
15
9
  * Get tokens for a chain
16
10
  * @description Retrieves available tokens for a specific blockchain
@@ -26,7 +20,6 @@ export interface paths {
26
20
  /** @description Maximum number of tokens to return */
27
21
  limit?: number;
28
22
  };
29
- header?: never;
30
23
  path: {
31
24
  /**
32
25
  * @description Blockchain chain ID
@@ -34,15 +27,10 @@ export interface paths {
34
27
  */
35
28
  chainId: number;
36
29
  };
37
- cookie?: never;
38
30
  };
39
- requestBody?: never;
40
31
  responses: {
41
32
  /** @description Tokens retrieved successfully */
42
33
  200: {
43
- headers: {
44
- [name: string]: unknown;
45
- };
46
34
  content: {
47
35
  "application/json": {
48
36
  /** @example true */
@@ -73,9 +61,6 @@ export interface paths {
73
61
  };
74
62
  /** @description Bad request */
75
63
  400: {
76
- headers: {
77
- [name: string]: unknown;
78
- };
79
64
  content: {
80
65
  "application/json": {
81
66
  /** @example false */
@@ -89,21 +74,8 @@ export interface paths {
89
74
  };
90
75
  };
91
76
  };
92
- put?: never;
93
- post?: never;
94
- delete?: never;
95
- options?: never;
96
- head?: never;
97
- patch?: never;
98
- trace?: never;
99
77
  };
100
78
  "/onramp/coinbase/options": {
101
- parameters: {
102
- query?: never;
103
- header?: never;
104
- path?: never;
105
- cookie?: never;
106
- };
107
79
  /**
108
80
  * Get Coinbase onramp options
109
81
  * @description Retrieves available Coinbase onramp configuration options.
@@ -136,17 +108,10 @@ export interface paths {
136
108
  */
137
109
  chainIds?: string[];
138
110
  };
139
- header?: never;
140
- path?: never;
141
- cookie?: never;
142
111
  };
143
- requestBody?: never;
144
112
  responses: {
145
113
  /** @description Coinbase options retrieved successfully */
146
114
  200: {
147
- headers: {
148
- [name: string]: unknown;
149
- };
150
115
  content: {
151
116
  "application/json": {
152
117
  /** @example true */
@@ -249,9 +214,6 @@ export interface paths {
249
214
  };
250
215
  /** @description Bad request */
251
216
  400: {
252
- headers: {
253
- [name: string]: unknown;
254
- };
255
217
  content: {
256
218
  "application/json": {
257
219
  /** @example false */
@@ -265,21 +227,8 @@ export interface paths {
265
227
  };
266
228
  };
267
229
  };
268
- put?: never;
269
- post?: never;
270
- delete?: never;
271
- options?: never;
272
- head?: never;
273
- patch?: never;
274
- trace?: never;
275
230
  };
276
231
  "/onramp/stripe/supported": {
277
- parameters: {
278
- query?: never;
279
- header?: never;
280
- path?: never;
281
- cookie?: never;
282
- };
283
232
  /**
284
233
  * Check Stripe support
285
234
  * @description Checks if Stripe onramp and Stripe Web2 are supported based on IP address location and optional transaction amount
@@ -293,17 +242,10 @@ export interface paths {
293
242
  */
294
243
  usdAmount?: string;
295
244
  };
296
- header?: never;
297
- path?: never;
298
- cookie?: never;
299
245
  };
300
- requestBody?: never;
301
246
  responses: {
302
247
  /** @description Stripe support status retrieved successfully */
303
248
  200: {
304
- headers: {
305
- [name: string]: unknown;
306
- };
307
249
  content: {
308
250
  "application/json": {
309
251
  /** @example true */
@@ -326,9 +268,6 @@ export interface paths {
326
268
  };
327
269
  /** @description Bad request */
328
270
  400: {
329
- headers: {
330
- [name: string]: unknown;
331
- };
332
271
  content: {
333
272
  "application/json": {
334
273
  /** @example false */
@@ -342,21 +281,8 @@ export interface paths {
342
281
  };
343
282
  };
344
283
  };
345
- put?: never;
346
- post?: never;
347
- delete?: never;
348
- options?: never;
349
- head?: never;
350
- patch?: never;
351
- trace?: never;
352
284
  };
353
285
  "/orders": {
354
- parameters: {
355
- query?: never;
356
- header?: never;
357
- path?: never;
358
- cookie?: never;
359
- };
360
286
  /**
361
287
  * Get orders by creator
362
288
  * @description Retrieves all orders created by a specific address
@@ -380,17 +306,10 @@ export interface paths {
380
306
  */
381
307
  offset?: string;
382
308
  };
383
- header?: never;
384
- path?: never;
385
- cookie?: never;
386
309
  };
387
- requestBody?: never;
388
310
  responses: {
389
311
  /** @description Orders retrieved successfully */
390
312
  200: {
391
- headers: {
392
- [name: string]: unknown;
393
- };
394
313
  content: {
395
314
  "application/json": {
396
315
  /** @example true */
@@ -406,9 +325,6 @@ export interface paths {
406
325
  };
407
326
  /** @description Bad request */
408
327
  400: {
409
- headers: {
410
- [name: string]: unknown;
411
- };
412
328
  content: {
413
329
  "application/json": {
414
330
  /** @example false */
@@ -422,18 +338,11 @@ export interface paths {
422
338
  };
423
339
  };
424
340
  };
425
- put?: never;
426
341
  /**
427
342
  * Create a new order
428
343
  * @description Creates a new order for token transactions across chains
429
344
  */
430
345
  post: {
431
- parameters: {
432
- query?: never;
433
- header?: never;
434
- path?: never;
435
- cookie?: never;
436
- };
437
346
  requestBody: {
438
347
  content: {
439
348
  "application/json": components["schemas"]["OrderRequest"];
@@ -442,9 +351,6 @@ export interface paths {
442
351
  responses: {
443
352
  /** @description Order created successfully */
444
353
  200: {
445
- headers: {
446
- [name: string]: unknown;
447
- };
448
354
  content: {
449
355
  "application/json": {
450
356
  /** @example true */
@@ -459,9 +365,6 @@ export interface paths {
459
365
  };
460
366
  /** @description Bad request */
461
367
  400: {
462
- headers: {
463
- [name: string]: unknown;
464
- };
465
368
  content: {
466
369
  "application/json": {
467
370
  /** @example false */
@@ -475,27 +378,14 @@ export interface paths {
475
378
  };
476
379
  };
477
380
  };
478
- delete?: never;
479
- options?: never;
480
- head?: never;
481
- patch?: never;
482
- trace?: never;
483
381
  };
484
382
  "/orders/{orderId}": {
485
- parameters: {
486
- query?: never;
487
- header?: never;
488
- path?: never;
489
- cookie?: never;
490
- };
491
383
  /**
492
384
  * Get order and transactions
493
385
  * @description Retrieves order details along with associated transactions
494
386
  */
495
387
  get: {
496
388
  parameters: {
497
- query?: never;
498
- header?: never;
499
389
  path: {
500
390
  /**
501
391
  * @description Unique order identifier
@@ -503,15 +393,10 @@ export interface paths {
503
393
  */
504
394
  orderId: string;
505
395
  };
506
- cookie?: never;
507
396
  };
508
- requestBody?: never;
509
397
  responses: {
510
398
  /** @description Order and transactions retrieved successfully */
511
399
  200: {
512
- headers: {
513
- [name: string]: unknown;
514
- };
515
400
  content: {
516
401
  "application/json": {
517
402
  /** @example true */
@@ -563,9 +448,6 @@ export interface paths {
563
448
  };
564
449
  /** @description Bad request */
565
450
  400: {
566
- headers: {
567
- [name: string]: unknown;
568
- };
569
451
  content: {
570
452
  "application/json": {
571
453
  /** @example false */
@@ -579,9 +461,6 @@ export interface paths {
579
461
  };
580
462
  /** @description Order not found */
581
463
  404: {
582
- headers: {
583
- [name: string]: unknown;
584
- };
585
464
  content: {
586
465
  "application/json": {
587
466
  /** @example false */
@@ -595,34 +474,13 @@ export interface paths {
595
474
  };
596
475
  };
597
476
  };
598
- put?: never;
599
- post?: never;
600
- delete?: never;
601
- options?: never;
602
- head?: never;
603
- patch?: never;
604
- trace?: never;
605
477
  };
606
478
  "/orders/quote": {
607
- parameters: {
608
- query?: never;
609
- header?: never;
610
- path?: never;
611
- cookie?: never;
612
- };
613
- get?: never;
614
- put?: never;
615
479
  /**
616
480
  * Get anyspend quote
617
481
  * @description Retrieves a quote to swap, execute contract, or participate in HypeDuel
618
482
  */
619
483
  post: {
620
- parameters: {
621
- query?: never;
622
- header?: never;
623
- path?: never;
624
- cookie?: never;
625
- };
626
484
  requestBody: {
627
485
  content: {
628
486
  "application/json":
@@ -822,9 +680,6 @@ export interface paths {
822
680
  responses: {
823
681
  /** @description Quote retrieved successfully */
824
682
  200: {
825
- headers: {
826
- [name: string]: unknown;
827
- };
828
683
  content: {
829
684
  "application/json": {
830
685
  /** @example true */
@@ -995,6 +850,8 @@ export interface paths {
995
850
  * @example 1.5
996
851
  */
997
852
  pointsMultiplier?: number;
853
+ /** @description Fee structure including all applicable fees (Stripe and AnySpend) */
854
+ fee: components["schemas"]["Fee"];
998
855
  };
999
856
  /** @example 200 */
1000
857
  statusCode: number;
@@ -1003,9 +860,6 @@ export interface paths {
1003
860
  };
1004
861
  /** @description Bad request */
1005
862
  400: {
1006
- headers: {
1007
- [name: string]: unknown;
1008
- };
1009
863
  content: {
1010
864
  "application/json": {
1011
865
  /** @example false */
@@ -1019,19 +873,8 @@ export interface paths {
1019
873
  };
1020
874
  };
1021
875
  };
1022
- delete?: never;
1023
- options?: never;
1024
- head?: never;
1025
- patch?: never;
1026
- trace?: never;
1027
876
  };
1028
877
  "/stripe/clientSecret": {
1029
- parameters: {
1030
- query?: never;
1031
- header?: never;
1032
- path?: never;
1033
- cookie?: never;
1034
- };
1035
878
  /**
1036
879
  * Get Stripe client secret
1037
880
  * @description Retrieves a Stripe client secret for payment processing using a payment intent ID
@@ -1045,17 +888,10 @@ export interface paths {
1045
888
  */
1046
889
  paymentIntentId: string;
1047
890
  };
1048
- header?: never;
1049
- path?: never;
1050
- cookie?: never;
1051
891
  };
1052
- requestBody?: never;
1053
892
  responses: {
1054
893
  /** @description Client secret retrieved successfully */
1055
894
  200: {
1056
- headers: {
1057
- [name: string]: unknown;
1058
- };
1059
895
  content: {
1060
896
  "application/json": {
1061
897
  /** @example true */
@@ -1074,9 +910,6 @@ export interface paths {
1074
910
  };
1075
911
  /** @description Bad request - PaymentIntentId is required or invalid */
1076
912
  400: {
1077
- headers: {
1078
- [name: string]: unknown;
1079
- };
1080
913
  content: {
1081
914
  "application/json": {
1082
915
  /** @example false */
@@ -1090,13 +923,6 @@ export interface paths {
1090
923
  };
1091
924
  };
1092
925
  };
1093
- put?: never;
1094
- post?: never;
1095
- delete?: never;
1096
- options?: never;
1097
- head?: never;
1098
- patch?: never;
1099
- trace?: never;
1100
926
  };
1101
927
  }
1102
928
  export type webhooks = Record<string, never>;
@@ -1487,6 +1313,8 @@ export interface components {
1487
1313
  expiredAt: number;
1488
1314
  /** @description Timestamp when the order was filled/executed */
1489
1315
  filledAt: number | null;
1316
+ /** @description Timestamp when the deposit was received */
1317
+ receivedDepositAt: number | null;
1490
1318
  /**
1491
1319
  * @description Optional creator address
1492
1320
  * @example 0xb34facb90a200251318e8841c05102366f2158cf
@@ -1506,11 +1334,25 @@ export interface components {
1506
1334
  /** @description Settlement information for executed orders */
1507
1335
  settlement: {
1508
1336
  /**
1509
- * @description Actual received amount after execution
1337
+ * @description Actual received amount after execution (only for swap/hypeduel orders). Optional - only present for swap/hypeduel orders.
1510
1338
  * @example 990000
1511
1339
  */
1512
- actualDstAmount: string | null;
1340
+ actualDstAmount?: string;
1341
+ /**
1342
+ * @description Complete relay API response data. Contains transaction details, state changes, fees, and execution status. Optional - can be backfilled by querying Relay API /requests/v2 endpoint.
1343
+ * @example {
1344
+ * "status": "success",
1345
+ * "metadata": {
1346
+ * "currencyOut": {
1347
+ * "amount": "990000"
1348
+ * }
1349
+ * }
1350
+ * }
1351
+ */
1352
+ relay?: Record<string, never>;
1513
1353
  } | null;
1354
+ /** @description Fee structure for the order including Stripe and AnySpend fees */
1355
+ fee?: Omit<components["schemas"]["Fee"], "type"> | null;
1514
1356
  };
1515
1357
  SwapOrder: components["schemas"]["BaseOrder"] & {
1516
1358
  /**
@@ -2072,6 +1914,121 @@ export interface components {
2072
1914
  */
2073
1915
  formattedFeeUsd: string;
2074
1916
  };
1917
+ Fee:
1918
+ | {
1919
+ /**
1920
+ * @description Fee type identifier
1921
+ * @enum {string}
1922
+ */
1923
+ type: "standard_fee";
1924
+ /**
1925
+ * @description Fee version number
1926
+ * @example 1
1927
+ */
1928
+ feeVersion: number;
1929
+ /**
1930
+ * @description Token contract address used to check balance for whale discount (B3 token)
1931
+ * @example 0xb3b32f9f8827d4634fe7d973fa1034ec9fddb3b3
1932
+ */
1933
+ tokenToCheckBalance: string;
1934
+ /**
1935
+ * @description Recipient's B3 token balance
1936
+ * @example 302843673392800000000000
1937
+ */
1938
+ recipientBalance: string;
1939
+ /**
1940
+ * @description AnySpend base fee in basis points before discounts
1941
+ * @example 80
1942
+ */
1943
+ anyspendFeeBps: number;
1944
+ /**
1945
+ * @description Whale discount in basis points based on B3 balance
1946
+ * @example 5000
1947
+ */
1948
+ anyspendWhaleDiscountBps: number;
1949
+ /**
1950
+ * @description Partner discount in basis points
1951
+ * @example 0
1952
+ */
1953
+ anyspendPartnerDiscountBps: number;
1954
+ /**
1955
+ * @description Final fee in basis points after all discounts applied
1956
+ * @example 40
1957
+ */
1958
+ finalFeeBps: number;
1959
+ }
1960
+ | {
1961
+ /**
1962
+ * @description Fee type identifier
1963
+ * @enum {string}
1964
+ */
1965
+ type: "stripeweb2_fee";
1966
+ /**
1967
+ * @description Fee version number
1968
+ * @example 1
1969
+ */
1970
+ feeVersion: number;
1971
+ /**
1972
+ * @description Token contract address used to check balance for whale discount (B3 token)
1973
+ * @example 0xb3b32f9f8827d4634fe7d973fa1034ec9fddb3b3
1974
+ */
1975
+ tokenToCheckBalance: string;
1976
+ /**
1977
+ * @description Recipient's B3 token balance
1978
+ * @example 302843673392800000000000
1979
+ */
1980
+ recipientBalance: string;
1981
+ /**
1982
+ * @description Stripe fee percentage in basis points (5.4%)
1983
+ * @example 540
1984
+ */
1985
+ stripeFeeBps: number;
1986
+ /**
1987
+ * @description Stripe fixed fee in USD
1988
+ * @example 0.3
1989
+ */
1990
+ stripeFeeUsd: number;
1991
+ /**
1992
+ * @description AnySpend base fee in basis points before discounts
1993
+ * @example 80
1994
+ */
1995
+ anyspendFeeBps: number;
1996
+ /**
1997
+ * @description AnySpend fixed fee in USD before discounts
1998
+ * @example 0
1999
+ */
2000
+ anyspendFeeUsd: number;
2001
+ /**
2002
+ * @description Whale discount in basis points based on B3 balance
2003
+ * @example 5000
2004
+ */
2005
+ anyspendWhaleDiscountBps: number;
2006
+ /**
2007
+ * @description Partner discount in basis points
2008
+ * @example 0
2009
+ */
2010
+ anyspendPartnerDiscountBps: number;
2011
+ /**
2012
+ * @description Final combined fee percentage in basis points after all discounts
2013
+ * @example 580
2014
+ */
2015
+ finalFeeBps: number;
2016
+ /**
2017
+ * @description Final combined fixed fee in USD after all discounts
2018
+ * @example 0.3
2019
+ */
2020
+ finalFeeUsd: number;
2021
+ /**
2022
+ * @description Original amount before fees in USDC units (6 decimals)
2023
+ * @example 10000000
2024
+ */
2025
+ originalAmount: string;
2026
+ /**
2027
+ * @description Final amount after applying all fees in USDC units (6 decimals)
2028
+ * @example 9120000
2029
+ */
2030
+ finalAmount: string;
2031
+ };
2075
2032
  };
2076
2033
  responses: never;
2077
2034
  parameters: never;
@@ -126,7 +126,7 @@ export const EVM_MAINNET: Record<number, IEVMChain> = {
126
126
  ),
127
127
  pollingInterval: 1000, // 1 second for Polygon
128
128
  zapperEnum: "POLYGON_MAINNET",
129
- coingeckoName: "polygon",
129
+ coingeckoName: "polygon_pos",
130
130
  },
131
131
  [avalanche.id]: {
132
132
  id: avalanche.id,
@@ -140,7 +140,7 @@ export const EVM_MAINNET: Record<number, IEVMChain> = {
140
140
  viem: getCustomEvmChain(avalanche, "https://avalanche-c-chain-rpc.publicnode.com"),
141
141
  pollingInterval: 1000, // 1 second for Avalanche
142
142
  zapperEnum: "AVALANCHE_MAINNET",
143
- coingeckoName: "avalanche",
143
+ coingeckoName: "avax",
144
144
  },
145
145
  [bsc.id]: {
146
146
  id: bsc.id,
@@ -187,8 +187,8 @@ export const EVM_MAINNET: Record<number, IEVMChain> = {
187
187
  "https://cosmopolitan-nameless-mountain.abstract-mainnet.quiknode.pro/863853304b986b582bdacf625ce3350397c560f8/",
188
188
  ),
189
189
  pollingInterval: 3000, // 3 seconds for Abstract
190
- zapperEnum: "B3_MAINNET",
191
- coingeckoName: "b3",
190
+ zapperEnum: "ABSTRACT_MAINNET",
191
+ coingeckoName: "abstract",
192
192
  },
193
193
  };
194
194
 
@@ -17,6 +17,7 @@ import { BondkitSwapService } from "./swapService";
17
17
  import type {
18
18
  BondkitTokenInitializationConfig,
19
19
  GetTransactionHistoryOptions,
20
+ MarketCapChartResponse,
20
21
  SwapQuote,
21
22
  TokenDetails,
22
23
  TransactionResponse,
@@ -52,6 +53,7 @@ export class BondkitToken {
52
53
  private walletKey?: Hex;
53
54
  private rpcUrl: string;
54
55
  private apiEndpoint: string;
56
+ private chartApiEndpoint: string;
55
57
  private walletClientInstance: WalletClient;
56
58
  private connectedProvider?: EIP1193Provider;
57
59
  private tradingToken?: Address;
@@ -62,6 +64,7 @@ export class BondkitToken {
62
64
  this.chain = sdkConfig.chain;
63
65
  this.rpcUrl = sdkConfig.rpcUrl;
64
66
  this.apiEndpoint = sdkConfig.apiEndpoint;
67
+ this.chartApiEndpoint = sdkConfig.chartApiEndpoint;
65
68
 
66
69
  if (walletKey && !walletKey.startsWith("0x")) {
67
70
  this.walletKey = `0x${walletKey}` as Hex;
@@ -459,6 +462,27 @@ export class BondkitToken {
459
462
  }
460
463
  }
461
464
 
465
+ // --- Market Cap Chart Data --- //
466
+ public async getMarketCapChartData(): Promise<MarketCapChartResponse | undefined> {
467
+ try {
468
+ const url = new URL("/recent_marketcap", this.chartApiEndpoint);
469
+ url.searchParams.set("contractAddress", this.contractAddress);
470
+ url.searchParams.set("chainId", this.chain.id.toString());
471
+
472
+ const response = await fetch(url.toString());
473
+
474
+ if (!response.ok) {
475
+ throw new Error(`HTTP error! status: ${response.status}`);
476
+ }
477
+
478
+ const result: MarketCapChartResponse = await response.json();
479
+ return result;
480
+ } catch (e) {
481
+ console.warn("Error fetching market cap chart data:", e);
482
+ return undefined;
483
+ }
484
+ }
485
+
462
486
  // --- Write Methods --- //
463
487
  private async executeWrite(
464
488
  functionName: string,
@@ -2,6 +2,7 @@
2
2
 
3
3
  import { Loader2 } from "lucide-react";
4
4
  import { useEffect, useRef, useState } from "react";
5
+ import { getConfig } from "../config";
5
6
  import { TradingViewProps } from "./types";
6
7
  import { loadScriptFromCDN } from "./utils/cdn-loader";
7
8
  import { formatNumberSmall } from "./utils/format";
@@ -23,12 +24,16 @@ const GifLoadingOverlay = ({ className }: { className?: string }) => (
23
24
  </div>
24
25
  );
25
26
 
26
- const TradingView = ({ className, tokenAddress, tokenSymbol }: TradingViewProps) => {
27
+ const TradingView = ({ className, tokenAddress, tokenSymbol, chainId = 8453 }: TradingViewProps) => {
27
28
  // Use token info for the current trade
28
29
  const currentTrade = {
29
30
  product_id: tokenAddress && tokenSymbol ? `${tokenSymbol}-${tokenAddress}` : "BONDKIT",
30
31
  };
31
32
 
33
+ // Get chart API endpoint from config
34
+ const config = getConfig(chainId);
35
+ const chartApiUrl = `${config.chartApiEndpoint}/udf`;
36
+
32
37
  const [tradingViewDefaultInterval, setTradingViewDefaultInterval] = useState<ResolutionString>("60");
33
38
  const [tradingViewTimezone, setTradingViewTimezone] = useState<string>("");
34
39
 
@@ -153,7 +158,7 @@ const TradingView = ({ className, tokenAddress, tokenSymbol }: TradingViewProps)
153
158
  };
154
159
  };
155
160
 
156
- const datafeed = createUDFDatafeed("https://b3-udf-worker.sean-430.workers.dev/bondkit/udf");
161
+ const datafeed = createUDFDatafeed(chartApiUrl);
157
162
  // Calculate timeframe for last 2 days
158
163
  const currentTime = Math.floor(Date.now() / 1000);
159
164
  const twoDaysAgo = currentTime - 2 * 24 * 60 * 60; // 2 days in seconds
@@ -280,7 +285,14 @@ const TradingView = ({ className, tokenAddress, tokenSymbol }: TradingViewProps)
280
285
  tvWidgetRef.current = null;
281
286
  }
282
287
  };
283
- }, [librariesLoaded, currentTrade?.product_id, tradingViewDefaultInterval, tradingViewTimezone]);
288
+ }, [
289
+ librariesLoaded,
290
+ currentTrade?.product_id,
291
+ tradingViewDefaultInterval,
292
+ tradingViewTimezone,
293
+ chartApiUrl,
294
+ chainId,
295
+ ]);
284
296
 
285
297
  useEffect(() => {
286
298
  if (
@@ -1,5 +1,5 @@
1
+ export * from "./config/cdn";
1
2
  export { default as TradingView } from "./TradingView";
2
3
  export type { TradingViewProps } from "./types";
3
4
  export * from "./utils/cdn-loader";
4
5
  export * from "./utils/format";
5
- export * from "./config/cdn";