@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.
- package/dist/cjs/anyspend/constants/index.d.ts +1 -0
- package/dist/cjs/anyspend/constants/index.js +12 -2
- package/dist/cjs/anyspend/react/components/AnySpend.d.ts +2 -1
- package/dist/cjs/anyspend/react/components/AnySpend.js +18 -5
- package/dist/cjs/anyspend/react/components/AnySpendCustom.js +12 -3
- package/dist/cjs/anyspend/react/components/AnyspendDepositHype.js +11 -4
- package/dist/cjs/anyspend/react/components/common/CryptoPaySection.d.ts +3 -1
- package/dist/cjs/anyspend/react/components/common/CryptoPaySection.js +2 -2
- package/dist/cjs/anyspend/react/components/common/CryptoReceiveSection.d.ts +3 -1
- package/dist/cjs/anyspend/react/components/common/CryptoReceiveSection.js +17 -11
- package/dist/cjs/anyspend/react/components/common/FeeBreakDown.d.ts +12 -0
- package/dist/cjs/anyspend/react/components/common/FeeBreakDown.js +19 -0
- package/dist/cjs/anyspend/react/components/common/FeeDetailPanel.d.ts +8 -0
- package/dist/cjs/anyspend/react/components/common/FeeDetailPanel.js +116 -0
- package/dist/cjs/anyspend/react/components/common/OrderDetails.d.ts +1 -0
- package/dist/cjs/anyspend/react/components/common/OrderDetails.js +6 -6
- package/dist/cjs/anyspend/react/components/common/OrderDetailsCollapsible.d.ts +1 -0
- package/dist/cjs/anyspend/react/components/common/OrderDetailsCollapsible.js +3 -2
- package/dist/cjs/anyspend/react/components/common/OrderToken.js +1 -1
- package/dist/cjs/anyspend/react/components/common/OrderTokenAmount.js +1 -1
- package/dist/cjs/anyspend/react/components/common/OrderTokenAmountFiat.js +1 -1
- package/dist/cjs/anyspend/react/components/common/OrderTokenAmountNew.js +1 -1
- package/dist/cjs/anyspend/react/components/common/PanelOnramp.d.ts +2 -1
- package/dist/cjs/anyspend/react/components/common/PanelOnramp.js +36 -21
- package/dist/cjs/anyspend/react/components/common/PanelOnrampPayment.js +2 -1
- package/dist/cjs/anyspend/react/components/common/PointsDetailPanel.js +1 -2
- package/dist/cjs/anyspend/react/contexts/FeatureFlagsContext.js +1 -1
- package/dist/cjs/anyspend/react/hooks/useAnyspendFlow.d.ts +3 -1
- package/dist/cjs/anyspend/react/hooks/useAnyspendFlow.js +1 -0
- package/dist/cjs/anyspend/react/hooks/useAnyspendOrderHistory.d.ts +48 -12
- package/dist/cjs/anyspend/types/api.d.ts +133 -178
- package/dist/cjs/anyspend/utils/chain.js +4 -4
- package/dist/cjs/bondkit/bondkitToken.d.ts +3 -1
- package/dist/cjs/bondkit/bondkitToken.js +19 -0
- package/dist/cjs/bondkit/components/TradingView.d.ts +1 -1
- package/dist/cjs/bondkit/components/TradingView.js +14 -3
- package/dist/cjs/bondkit/components/index.d.ts +1 -1
- package/dist/cjs/bondkit/components/index.js +1 -1
- package/dist/cjs/bondkit/components/types.d.ts +1 -0
- package/dist/cjs/bondkit/config.d.ts +1 -0
- package/dist/cjs/bondkit/config.js +1 -0
- package/dist/cjs/bondkit/index.d.ts +1 -1
- package/dist/cjs/bondkit/index.js +2 -6
- package/dist/cjs/bondkit/types.d.ts +15 -0
- package/dist/cjs/global-account/react/components/B3Provider/B3Provider.d.ts +1 -1
- package/dist/cjs/global-account/react/components/B3Provider/B3Provider.js +1 -1
- package/dist/cjs/global-account/react/components/B3Provider/RelayKitProviderWrapper.js +2 -2
- package/dist/cjs/global-account/react/components/ui/tooltip.js +1 -1
- package/dist/cjs/global-account/react/hooks/useAuthentication.js +11 -0
- package/dist/cjs/global-account/react/hooks/useFirstEOA.d.ts +7663 -1
- package/dist/cjs/global-account/react/hooks/useFirstEOA.js +21 -1
- package/dist/cjs/shared/generated/chain-networks.json +40 -7
- package/dist/esm/anyspend/constants/index.d.ts +1 -0
- package/dist/esm/anyspend/constants/index.js +11 -1
- package/dist/esm/anyspend/react/components/AnySpend.d.ts +2 -1
- package/dist/esm/anyspend/react/components/AnySpend.js +18 -5
- package/dist/esm/anyspend/react/components/AnySpendCustom.js +14 -5
- package/dist/esm/anyspend/react/components/AnyspendDepositHype.js +11 -4
- package/dist/esm/anyspend/react/components/common/CryptoPaySection.d.ts +3 -1
- package/dist/esm/anyspend/react/components/common/CryptoPaySection.js +4 -4
- package/dist/esm/anyspend/react/components/common/CryptoReceiveSection.d.ts +3 -1
- package/dist/esm/anyspend/react/components/common/CryptoReceiveSection.js +19 -13
- package/dist/esm/anyspend/react/components/common/FeeBreakDown.d.ts +12 -0
- package/dist/esm/anyspend/react/components/common/FeeBreakDown.js +16 -0
- package/dist/esm/anyspend/react/components/common/FeeDetailPanel.d.ts +8 -0
- package/dist/esm/anyspend/react/components/common/FeeDetailPanel.js +113 -0
- package/dist/esm/anyspend/react/components/common/OrderDetails.d.ts +1 -0
- package/dist/esm/anyspend/react/components/common/OrderDetails.js +6 -6
- package/dist/esm/anyspend/react/components/common/OrderDetailsCollapsible.d.ts +1 -0
- package/dist/esm/anyspend/react/components/common/OrderDetailsCollapsible.js +4 -3
- package/dist/esm/anyspend/react/components/common/OrderToken.js +1 -1
- package/dist/esm/anyspend/react/components/common/OrderTokenAmount.js +1 -1
- package/dist/esm/anyspend/react/components/common/OrderTokenAmountFiat.js +1 -1
- package/dist/esm/anyspend/react/components/common/OrderTokenAmountNew.js +1 -1
- package/dist/esm/anyspend/react/components/common/PanelOnramp.d.ts +2 -1
- package/dist/esm/anyspend/react/components/common/PanelOnramp.js +38 -23
- package/dist/esm/anyspend/react/components/common/PanelOnrampPayment.js +2 -1
- package/dist/esm/anyspend/react/components/common/PointsDetailPanel.js +2 -3
- package/dist/esm/anyspend/react/contexts/FeatureFlagsContext.js +1 -1
- package/dist/esm/anyspend/react/hooks/useAnyspendFlow.d.ts +3 -1
- package/dist/esm/anyspend/react/hooks/useAnyspendFlow.js +1 -0
- package/dist/esm/anyspend/react/hooks/useAnyspendOrderHistory.d.ts +48 -12
- package/dist/esm/anyspend/types/api.d.ts +133 -178
- package/dist/esm/anyspend/utils/chain.js +4 -4
- package/dist/esm/bondkit/bondkitToken.d.ts +3 -1
- package/dist/esm/bondkit/bondkitToken.js +19 -0
- package/dist/esm/bondkit/components/TradingView.d.ts +1 -1
- package/dist/esm/bondkit/components/TradingView.js +14 -3
- package/dist/esm/bondkit/components/index.d.ts +1 -1
- package/dist/esm/bondkit/components/index.js +1 -1
- package/dist/esm/bondkit/components/types.d.ts +1 -0
- package/dist/esm/bondkit/config.d.ts +1 -0
- package/dist/esm/bondkit/config.js +1 -0
- package/dist/esm/bondkit/index.d.ts +1 -1
- package/dist/esm/bondkit/index.js +1 -1
- package/dist/esm/bondkit/types.d.ts +15 -0
- package/dist/esm/global-account/react/components/B3Provider/B3Provider.d.ts +1 -1
- package/dist/esm/global-account/react/components/B3Provider/B3Provider.js +1 -1
- package/dist/esm/global-account/react/components/B3Provider/RelayKitProviderWrapper.js +2 -2
- package/dist/esm/global-account/react/components/ui/tooltip.js +1 -1
- package/dist/esm/global-account/react/hooks/useAuthentication.js +11 -0
- package/dist/esm/global-account/react/hooks/useFirstEOA.d.ts +7663 -1
- package/dist/esm/global-account/react/hooks/useFirstEOA.js +22 -2
- package/dist/esm/shared/generated/chain-networks.json +40 -7
- package/dist/styles/index.css +1 -1
- package/dist/types/anyspend/constants/index.d.ts +1 -0
- package/dist/types/anyspend/react/components/AnySpend.d.ts +2 -1
- package/dist/types/anyspend/react/components/common/CryptoPaySection.d.ts +3 -1
- package/dist/types/anyspend/react/components/common/CryptoReceiveSection.d.ts +3 -1
- package/dist/types/anyspend/react/components/common/FeeBreakDown.d.ts +12 -0
- package/dist/types/anyspend/react/components/common/FeeDetailPanel.d.ts +8 -0
- package/dist/types/anyspend/react/components/common/OrderDetails.d.ts +1 -0
- package/dist/types/anyspend/react/components/common/OrderDetailsCollapsible.d.ts +1 -0
- package/dist/types/anyspend/react/components/common/PanelOnramp.d.ts +2 -1
- package/dist/types/anyspend/react/hooks/useAnyspendFlow.d.ts +3 -1
- package/dist/types/anyspend/react/hooks/useAnyspendOrderHistory.d.ts +48 -12
- package/dist/types/anyspend/types/api.d.ts +133 -178
- package/dist/types/bondkit/bondkitToken.d.ts +3 -1
- package/dist/types/bondkit/components/TradingView.d.ts +1 -1
- package/dist/types/bondkit/components/index.d.ts +1 -1
- package/dist/types/bondkit/components/types.d.ts +1 -0
- package/dist/types/bondkit/config.d.ts +1 -0
- package/dist/types/bondkit/index.d.ts +1 -1
- package/dist/types/bondkit/types.d.ts +15 -0
- package/dist/types/global-account/react/components/B3Provider/B3Provider.d.ts +1 -1
- package/dist/types/global-account/react/hooks/useFirstEOA.d.ts +7663 -1
- package/package.json +4 -4
- package/src/anyspend/constants/index.ts +12 -1
- package/src/anyspend/react/components/AnySpend.tsx +33 -0
- package/src/anyspend/react/components/AnySpendCustom.tsx +69 -7
- package/src/anyspend/react/components/AnyspendDepositHype.tsx +24 -0
- package/src/anyspend/react/components/common/CryptoPaySection.tsx +14 -2
- package/src/anyspend/react/components/common/CryptoReceiveSection.tsx +31 -11
- package/src/anyspend/react/components/common/FeeBreakDown.tsx +105 -0
- package/src/anyspend/react/components/common/FeeDetailPanel.tsx +334 -0
- package/src/anyspend/react/components/common/OrderDetails.tsx +7 -0
- package/src/anyspend/react/components/common/OrderDetailsCollapsible.tsx +16 -0
- package/src/anyspend/react/components/common/OrderToken.tsx +1 -1
- package/src/anyspend/react/components/common/OrderTokenAmount.tsx +1 -1
- package/src/anyspend/react/components/common/OrderTokenAmountFiat.tsx +1 -1
- package/src/anyspend/react/components/common/OrderTokenAmountNew.tsx +1 -1
- package/src/anyspend/react/components/common/PanelOnramp.tsx +58 -27
- package/src/anyspend/react/components/common/PanelOnrampPayment.tsx +18 -6
- package/src/anyspend/react/components/common/PointsDetailPanel.tsx +1 -13
- package/src/anyspend/react/contexts/FeatureFlagsContext.tsx +2 -2
- package/src/anyspend/react/hooks/useAnyspendFlow.ts +1 -0
- package/src/anyspend/types/api.ts +135 -178
- package/src/anyspend/utils/chain.ts +4 -4
- package/src/bondkit/bondkitToken.ts +24 -0
- package/src/bondkit/components/TradingView.tsx +15 -3
- package/src/bondkit/components/index.ts +1 -1
- package/src/bondkit/components/types.ts +1 -0
- package/src/bondkit/config.ts +2 -0
- package/src/bondkit/index.ts +1 -1
- package/src/bondkit/types.ts +19 -0
- package/src/global-account/react/components/B3Provider/B3Provider.tsx +1 -1
- package/src/global-account/react/components/B3Provider/RelayKitProviderWrapper.tsx +2 -2
- package/src/global-account/react/components/ui/tooltip.tsx +11 -9
- package/src/global-account/react/hooks/useAuthentication.ts +13 -1
- package/src/global-account/react/hooks/useFirstEOA.tsx +20 -2
- package/src/shared/generated/chain-networks.json +40 -7
|
@@ -4,12 +4,6 @@
|
|
|
4
4
|
*/
|
|
5
5
|
export interface paths {
|
|
6
6
|
"/chains/{chainId}/tokens": {
|
|
7
|
-
parameters: {
|
|
8
|
-
query?: never;
|
|
9
|
-
header?: never;
|
|
10
|
-
path?: never;
|
|
11
|
-
cookie?: never;
|
|
12
|
-
};
|
|
13
7
|
/**
|
|
14
8
|
* Get tokens for a chain
|
|
15
9
|
* @description Retrieves available tokens for a specific blockchain
|
|
@@ -25,7 +19,6 @@ export interface paths {
|
|
|
25
19
|
/** @description Maximum number of tokens to return */
|
|
26
20
|
limit?: number;
|
|
27
21
|
};
|
|
28
|
-
header?: never;
|
|
29
22
|
path: {
|
|
30
23
|
/**
|
|
31
24
|
* @description Blockchain chain ID
|
|
@@ -33,15 +26,10 @@ export interface paths {
|
|
|
33
26
|
*/
|
|
34
27
|
chainId: number;
|
|
35
28
|
};
|
|
36
|
-
cookie?: never;
|
|
37
29
|
};
|
|
38
|
-
requestBody?: never;
|
|
39
30
|
responses: {
|
|
40
31
|
/** @description Tokens retrieved successfully */
|
|
41
32
|
200: {
|
|
42
|
-
headers: {
|
|
43
|
-
[name: string]: unknown;
|
|
44
|
-
};
|
|
45
33
|
content: {
|
|
46
34
|
"application/json": {
|
|
47
35
|
/** @example true */
|
|
@@ -72,9 +60,6 @@ export interface paths {
|
|
|
72
60
|
};
|
|
73
61
|
/** @description Bad request */
|
|
74
62
|
400: {
|
|
75
|
-
headers: {
|
|
76
|
-
[name: string]: unknown;
|
|
77
|
-
};
|
|
78
63
|
content: {
|
|
79
64
|
"application/json": {
|
|
80
65
|
/** @example false */
|
|
@@ -88,21 +73,8 @@ export interface paths {
|
|
|
88
73
|
};
|
|
89
74
|
};
|
|
90
75
|
};
|
|
91
|
-
put?: never;
|
|
92
|
-
post?: never;
|
|
93
|
-
delete?: never;
|
|
94
|
-
options?: never;
|
|
95
|
-
head?: never;
|
|
96
|
-
patch?: never;
|
|
97
|
-
trace?: never;
|
|
98
76
|
};
|
|
99
77
|
"/onramp/coinbase/options": {
|
|
100
|
-
parameters: {
|
|
101
|
-
query?: never;
|
|
102
|
-
header?: never;
|
|
103
|
-
path?: never;
|
|
104
|
-
cookie?: never;
|
|
105
|
-
};
|
|
106
78
|
/**
|
|
107
79
|
* Get Coinbase onramp options
|
|
108
80
|
* @description Retrieves available Coinbase onramp configuration options.
|
|
@@ -135,17 +107,10 @@ export interface paths {
|
|
|
135
107
|
*/
|
|
136
108
|
chainIds?: string[];
|
|
137
109
|
};
|
|
138
|
-
header?: never;
|
|
139
|
-
path?: never;
|
|
140
|
-
cookie?: never;
|
|
141
110
|
};
|
|
142
|
-
requestBody?: never;
|
|
143
111
|
responses: {
|
|
144
112
|
/** @description Coinbase options retrieved successfully */
|
|
145
113
|
200: {
|
|
146
|
-
headers: {
|
|
147
|
-
[name: string]: unknown;
|
|
148
|
-
};
|
|
149
114
|
content: {
|
|
150
115
|
"application/json": {
|
|
151
116
|
/** @example true */
|
|
@@ -248,9 +213,6 @@ export interface paths {
|
|
|
248
213
|
};
|
|
249
214
|
/** @description Bad request */
|
|
250
215
|
400: {
|
|
251
|
-
headers: {
|
|
252
|
-
[name: string]: unknown;
|
|
253
|
-
};
|
|
254
216
|
content: {
|
|
255
217
|
"application/json": {
|
|
256
218
|
/** @example false */
|
|
@@ -264,21 +226,8 @@ export interface paths {
|
|
|
264
226
|
};
|
|
265
227
|
};
|
|
266
228
|
};
|
|
267
|
-
put?: never;
|
|
268
|
-
post?: never;
|
|
269
|
-
delete?: never;
|
|
270
|
-
options?: never;
|
|
271
|
-
head?: never;
|
|
272
|
-
patch?: never;
|
|
273
|
-
trace?: never;
|
|
274
229
|
};
|
|
275
230
|
"/onramp/stripe/supported": {
|
|
276
|
-
parameters: {
|
|
277
|
-
query?: never;
|
|
278
|
-
header?: never;
|
|
279
|
-
path?: never;
|
|
280
|
-
cookie?: never;
|
|
281
|
-
};
|
|
282
231
|
/**
|
|
283
232
|
* Check Stripe support
|
|
284
233
|
* @description Checks if Stripe onramp and Stripe Web2 are supported based on IP address location and optional transaction amount
|
|
@@ -292,17 +241,10 @@ export interface paths {
|
|
|
292
241
|
*/
|
|
293
242
|
usdAmount?: string;
|
|
294
243
|
};
|
|
295
|
-
header?: never;
|
|
296
|
-
path?: never;
|
|
297
|
-
cookie?: never;
|
|
298
244
|
};
|
|
299
|
-
requestBody?: never;
|
|
300
245
|
responses: {
|
|
301
246
|
/** @description Stripe support status retrieved successfully */
|
|
302
247
|
200: {
|
|
303
|
-
headers: {
|
|
304
|
-
[name: string]: unknown;
|
|
305
|
-
};
|
|
306
248
|
content: {
|
|
307
249
|
"application/json": {
|
|
308
250
|
/** @example true */
|
|
@@ -325,9 +267,6 @@ export interface paths {
|
|
|
325
267
|
};
|
|
326
268
|
/** @description Bad request */
|
|
327
269
|
400: {
|
|
328
|
-
headers: {
|
|
329
|
-
[name: string]: unknown;
|
|
330
|
-
};
|
|
331
270
|
content: {
|
|
332
271
|
"application/json": {
|
|
333
272
|
/** @example false */
|
|
@@ -341,21 +280,8 @@ export interface paths {
|
|
|
341
280
|
};
|
|
342
281
|
};
|
|
343
282
|
};
|
|
344
|
-
put?: never;
|
|
345
|
-
post?: never;
|
|
346
|
-
delete?: never;
|
|
347
|
-
options?: never;
|
|
348
|
-
head?: never;
|
|
349
|
-
patch?: never;
|
|
350
|
-
trace?: never;
|
|
351
283
|
};
|
|
352
284
|
"/orders": {
|
|
353
|
-
parameters: {
|
|
354
|
-
query?: never;
|
|
355
|
-
header?: never;
|
|
356
|
-
path?: never;
|
|
357
|
-
cookie?: never;
|
|
358
|
-
};
|
|
359
285
|
/**
|
|
360
286
|
* Get orders by creator
|
|
361
287
|
* @description Retrieves all orders created by a specific address
|
|
@@ -379,17 +305,10 @@ export interface paths {
|
|
|
379
305
|
*/
|
|
380
306
|
offset?: string;
|
|
381
307
|
};
|
|
382
|
-
header?: never;
|
|
383
|
-
path?: never;
|
|
384
|
-
cookie?: never;
|
|
385
308
|
};
|
|
386
|
-
requestBody?: never;
|
|
387
309
|
responses: {
|
|
388
310
|
/** @description Orders retrieved successfully */
|
|
389
311
|
200: {
|
|
390
|
-
headers: {
|
|
391
|
-
[name: string]: unknown;
|
|
392
|
-
};
|
|
393
312
|
content: {
|
|
394
313
|
"application/json": {
|
|
395
314
|
/** @example true */
|
|
@@ -405,9 +324,6 @@ export interface paths {
|
|
|
405
324
|
};
|
|
406
325
|
/** @description Bad request */
|
|
407
326
|
400: {
|
|
408
|
-
headers: {
|
|
409
|
-
[name: string]: unknown;
|
|
410
|
-
};
|
|
411
327
|
content: {
|
|
412
328
|
"application/json": {
|
|
413
329
|
/** @example false */
|
|
@@ -421,18 +337,11 @@ export interface paths {
|
|
|
421
337
|
};
|
|
422
338
|
};
|
|
423
339
|
};
|
|
424
|
-
put?: never;
|
|
425
340
|
/**
|
|
426
341
|
* Create a new order
|
|
427
342
|
* @description Creates a new order for token transactions across chains
|
|
428
343
|
*/
|
|
429
344
|
post: {
|
|
430
|
-
parameters: {
|
|
431
|
-
query?: never;
|
|
432
|
-
header?: never;
|
|
433
|
-
path?: never;
|
|
434
|
-
cookie?: never;
|
|
435
|
-
};
|
|
436
345
|
requestBody: {
|
|
437
346
|
content: {
|
|
438
347
|
"application/json": components["schemas"]["OrderRequest"];
|
|
@@ -441,9 +350,6 @@ export interface paths {
|
|
|
441
350
|
responses: {
|
|
442
351
|
/** @description Order created successfully */
|
|
443
352
|
200: {
|
|
444
|
-
headers: {
|
|
445
|
-
[name: string]: unknown;
|
|
446
|
-
};
|
|
447
353
|
content: {
|
|
448
354
|
"application/json": {
|
|
449
355
|
/** @example true */
|
|
@@ -458,9 +364,6 @@ export interface paths {
|
|
|
458
364
|
};
|
|
459
365
|
/** @description Bad request */
|
|
460
366
|
400: {
|
|
461
|
-
headers: {
|
|
462
|
-
[name: string]: unknown;
|
|
463
|
-
};
|
|
464
367
|
content: {
|
|
465
368
|
"application/json": {
|
|
466
369
|
/** @example false */
|
|
@@ -474,27 +377,14 @@ export interface paths {
|
|
|
474
377
|
};
|
|
475
378
|
};
|
|
476
379
|
};
|
|
477
|
-
delete?: never;
|
|
478
|
-
options?: never;
|
|
479
|
-
head?: never;
|
|
480
|
-
patch?: never;
|
|
481
|
-
trace?: never;
|
|
482
380
|
};
|
|
483
381
|
"/orders/{orderId}": {
|
|
484
|
-
parameters: {
|
|
485
|
-
query?: never;
|
|
486
|
-
header?: never;
|
|
487
|
-
path?: never;
|
|
488
|
-
cookie?: never;
|
|
489
|
-
};
|
|
490
382
|
/**
|
|
491
383
|
* Get order and transactions
|
|
492
384
|
* @description Retrieves order details along with associated transactions
|
|
493
385
|
*/
|
|
494
386
|
get: {
|
|
495
387
|
parameters: {
|
|
496
|
-
query?: never;
|
|
497
|
-
header?: never;
|
|
498
388
|
path: {
|
|
499
389
|
/**
|
|
500
390
|
* @description Unique order identifier
|
|
@@ -502,15 +392,10 @@ export interface paths {
|
|
|
502
392
|
*/
|
|
503
393
|
orderId: string;
|
|
504
394
|
};
|
|
505
|
-
cookie?: never;
|
|
506
395
|
};
|
|
507
|
-
requestBody?: never;
|
|
508
396
|
responses: {
|
|
509
397
|
/** @description Order and transactions retrieved successfully */
|
|
510
398
|
200: {
|
|
511
|
-
headers: {
|
|
512
|
-
[name: string]: unknown;
|
|
513
|
-
};
|
|
514
399
|
content: {
|
|
515
400
|
"application/json": {
|
|
516
401
|
/** @example true */
|
|
@@ -562,9 +447,6 @@ export interface paths {
|
|
|
562
447
|
};
|
|
563
448
|
/** @description Bad request */
|
|
564
449
|
400: {
|
|
565
|
-
headers: {
|
|
566
|
-
[name: string]: unknown;
|
|
567
|
-
};
|
|
568
450
|
content: {
|
|
569
451
|
"application/json": {
|
|
570
452
|
/** @example false */
|
|
@@ -578,9 +460,6 @@ export interface paths {
|
|
|
578
460
|
};
|
|
579
461
|
/** @description Order not found */
|
|
580
462
|
404: {
|
|
581
|
-
headers: {
|
|
582
|
-
[name: string]: unknown;
|
|
583
|
-
};
|
|
584
463
|
content: {
|
|
585
464
|
"application/json": {
|
|
586
465
|
/** @example false */
|
|
@@ -594,34 +473,13 @@ export interface paths {
|
|
|
594
473
|
};
|
|
595
474
|
};
|
|
596
475
|
};
|
|
597
|
-
put?: never;
|
|
598
|
-
post?: never;
|
|
599
|
-
delete?: never;
|
|
600
|
-
options?: never;
|
|
601
|
-
head?: never;
|
|
602
|
-
patch?: never;
|
|
603
|
-
trace?: never;
|
|
604
476
|
};
|
|
605
477
|
"/orders/quote": {
|
|
606
|
-
parameters: {
|
|
607
|
-
query?: never;
|
|
608
|
-
header?: never;
|
|
609
|
-
path?: never;
|
|
610
|
-
cookie?: never;
|
|
611
|
-
};
|
|
612
|
-
get?: never;
|
|
613
|
-
put?: never;
|
|
614
478
|
/**
|
|
615
479
|
* Get anyspend quote
|
|
616
480
|
* @description Retrieves a quote to swap, execute contract, or participate in HypeDuel
|
|
617
481
|
*/
|
|
618
482
|
post: {
|
|
619
|
-
parameters: {
|
|
620
|
-
query?: never;
|
|
621
|
-
header?: never;
|
|
622
|
-
path?: never;
|
|
623
|
-
cookie?: never;
|
|
624
|
-
};
|
|
625
483
|
requestBody: {
|
|
626
484
|
content: {
|
|
627
485
|
"application/json": {
|
|
@@ -815,9 +673,6 @@ export interface paths {
|
|
|
815
673
|
responses: {
|
|
816
674
|
/** @description Quote retrieved successfully */
|
|
817
675
|
200: {
|
|
818
|
-
headers: {
|
|
819
|
-
[name: string]: unknown;
|
|
820
|
-
};
|
|
821
676
|
content: {
|
|
822
677
|
"application/json": {
|
|
823
678
|
/** @example true */
|
|
@@ -988,6 +843,8 @@ export interface paths {
|
|
|
988
843
|
* @example 1.5
|
|
989
844
|
*/
|
|
990
845
|
pointsMultiplier?: number;
|
|
846
|
+
/** @description Fee structure including all applicable fees (Stripe and AnySpend) */
|
|
847
|
+
fee: components["schemas"]["Fee"];
|
|
991
848
|
};
|
|
992
849
|
/** @example 200 */
|
|
993
850
|
statusCode: number;
|
|
@@ -996,9 +853,6 @@ export interface paths {
|
|
|
996
853
|
};
|
|
997
854
|
/** @description Bad request */
|
|
998
855
|
400: {
|
|
999
|
-
headers: {
|
|
1000
|
-
[name: string]: unknown;
|
|
1001
|
-
};
|
|
1002
856
|
content: {
|
|
1003
857
|
"application/json": {
|
|
1004
858
|
/** @example false */
|
|
@@ -1012,19 +866,8 @@ export interface paths {
|
|
|
1012
866
|
};
|
|
1013
867
|
};
|
|
1014
868
|
};
|
|
1015
|
-
delete?: never;
|
|
1016
|
-
options?: never;
|
|
1017
|
-
head?: never;
|
|
1018
|
-
patch?: never;
|
|
1019
|
-
trace?: never;
|
|
1020
869
|
};
|
|
1021
870
|
"/stripe/clientSecret": {
|
|
1022
|
-
parameters: {
|
|
1023
|
-
query?: never;
|
|
1024
|
-
header?: never;
|
|
1025
|
-
path?: never;
|
|
1026
|
-
cookie?: never;
|
|
1027
|
-
};
|
|
1028
871
|
/**
|
|
1029
872
|
* Get Stripe client secret
|
|
1030
873
|
* @description Retrieves a Stripe client secret for payment processing using a payment intent ID
|
|
@@ -1038,17 +881,10 @@ export interface paths {
|
|
|
1038
881
|
*/
|
|
1039
882
|
paymentIntentId: string;
|
|
1040
883
|
};
|
|
1041
|
-
header?: never;
|
|
1042
|
-
path?: never;
|
|
1043
|
-
cookie?: never;
|
|
1044
884
|
};
|
|
1045
|
-
requestBody?: never;
|
|
1046
885
|
responses: {
|
|
1047
886
|
/** @description Client secret retrieved successfully */
|
|
1048
887
|
200: {
|
|
1049
|
-
headers: {
|
|
1050
|
-
[name: string]: unknown;
|
|
1051
|
-
};
|
|
1052
888
|
content: {
|
|
1053
889
|
"application/json": {
|
|
1054
890
|
/** @example true */
|
|
@@ -1067,9 +903,6 @@ export interface paths {
|
|
|
1067
903
|
};
|
|
1068
904
|
/** @description Bad request - PaymentIntentId is required or invalid */
|
|
1069
905
|
400: {
|
|
1070
|
-
headers: {
|
|
1071
|
-
[name: string]: unknown;
|
|
1072
|
-
};
|
|
1073
906
|
content: {
|
|
1074
907
|
"application/json": {
|
|
1075
908
|
/** @example false */
|
|
@@ -1083,13 +916,6 @@ export interface paths {
|
|
|
1083
916
|
};
|
|
1084
917
|
};
|
|
1085
918
|
};
|
|
1086
|
-
put?: never;
|
|
1087
|
-
post?: never;
|
|
1088
|
-
delete?: never;
|
|
1089
|
-
options?: never;
|
|
1090
|
-
head?: never;
|
|
1091
|
-
patch?: never;
|
|
1092
|
-
trace?: never;
|
|
1093
919
|
};
|
|
1094
920
|
}
|
|
1095
921
|
export type webhooks = Record<string, never>;
|
|
@@ -1470,6 +1296,8 @@ export interface components {
|
|
|
1470
1296
|
expiredAt: number;
|
|
1471
1297
|
/** @description Timestamp when the order was filled/executed */
|
|
1472
1298
|
filledAt: number | null;
|
|
1299
|
+
/** @description Timestamp when the deposit was received */
|
|
1300
|
+
receivedDepositAt: number | null;
|
|
1473
1301
|
/**
|
|
1474
1302
|
* @description Optional creator address
|
|
1475
1303
|
* @example 0xb34facb90a200251318e8841c05102366f2158cf
|
|
@@ -1489,11 +1317,25 @@ export interface components {
|
|
|
1489
1317
|
/** @description Settlement information for executed orders */
|
|
1490
1318
|
settlement: {
|
|
1491
1319
|
/**
|
|
1492
|
-
* @description Actual received amount after execution
|
|
1320
|
+
* @description Actual received amount after execution (only for swap/hypeduel orders). Optional - only present for swap/hypeduel orders.
|
|
1493
1321
|
* @example 990000
|
|
1494
1322
|
*/
|
|
1495
|
-
actualDstAmount
|
|
1323
|
+
actualDstAmount?: string;
|
|
1324
|
+
/**
|
|
1325
|
+
* @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.
|
|
1326
|
+
* @example {
|
|
1327
|
+
* "status": "success",
|
|
1328
|
+
* "metadata": {
|
|
1329
|
+
* "currencyOut": {
|
|
1330
|
+
* "amount": "990000"
|
|
1331
|
+
* }
|
|
1332
|
+
* }
|
|
1333
|
+
* }
|
|
1334
|
+
*/
|
|
1335
|
+
relay?: Record<string, never>;
|
|
1496
1336
|
} | null;
|
|
1337
|
+
/** @description Fee structure for the order including Stripe and AnySpend fees */
|
|
1338
|
+
fee?: Omit<components["schemas"]["Fee"], "type"> | null;
|
|
1497
1339
|
};
|
|
1498
1340
|
SwapOrder: components["schemas"]["BaseOrder"] & {
|
|
1499
1341
|
/**
|
|
@@ -2041,6 +1883,119 @@ export interface components {
|
|
|
2041
1883
|
*/
|
|
2042
1884
|
formattedFeeUsd: string;
|
|
2043
1885
|
};
|
|
1886
|
+
Fee: {
|
|
1887
|
+
/**
|
|
1888
|
+
* @description Fee type identifier
|
|
1889
|
+
* @enum {string}
|
|
1890
|
+
*/
|
|
1891
|
+
type: "standard_fee";
|
|
1892
|
+
/**
|
|
1893
|
+
* @description Fee version number
|
|
1894
|
+
* @example 1
|
|
1895
|
+
*/
|
|
1896
|
+
feeVersion: number;
|
|
1897
|
+
/**
|
|
1898
|
+
* @description Token contract address used to check balance for whale discount (B3 token)
|
|
1899
|
+
* @example 0xb3b32f9f8827d4634fe7d973fa1034ec9fddb3b3
|
|
1900
|
+
*/
|
|
1901
|
+
tokenToCheckBalance: string;
|
|
1902
|
+
/**
|
|
1903
|
+
* @description Recipient's B3 token balance
|
|
1904
|
+
* @example 302843673392800000000000
|
|
1905
|
+
*/
|
|
1906
|
+
recipientBalance: string;
|
|
1907
|
+
/**
|
|
1908
|
+
* @description AnySpend base fee in basis points before discounts
|
|
1909
|
+
* @example 80
|
|
1910
|
+
*/
|
|
1911
|
+
anyspendFeeBps: number;
|
|
1912
|
+
/**
|
|
1913
|
+
* @description Whale discount in basis points based on B3 balance
|
|
1914
|
+
* @example 5000
|
|
1915
|
+
*/
|
|
1916
|
+
anyspendWhaleDiscountBps: number;
|
|
1917
|
+
/**
|
|
1918
|
+
* @description Partner discount in basis points
|
|
1919
|
+
* @example 0
|
|
1920
|
+
*/
|
|
1921
|
+
anyspendPartnerDiscountBps: number;
|
|
1922
|
+
/**
|
|
1923
|
+
* @description Final fee in basis points after all discounts applied
|
|
1924
|
+
* @example 40
|
|
1925
|
+
*/
|
|
1926
|
+
finalFeeBps: number;
|
|
1927
|
+
} | {
|
|
1928
|
+
/**
|
|
1929
|
+
* @description Fee type identifier
|
|
1930
|
+
* @enum {string}
|
|
1931
|
+
*/
|
|
1932
|
+
type: "stripeweb2_fee";
|
|
1933
|
+
/**
|
|
1934
|
+
* @description Fee version number
|
|
1935
|
+
* @example 1
|
|
1936
|
+
*/
|
|
1937
|
+
feeVersion: number;
|
|
1938
|
+
/**
|
|
1939
|
+
* @description Token contract address used to check balance for whale discount (B3 token)
|
|
1940
|
+
* @example 0xb3b32f9f8827d4634fe7d973fa1034ec9fddb3b3
|
|
1941
|
+
*/
|
|
1942
|
+
tokenToCheckBalance: string;
|
|
1943
|
+
/**
|
|
1944
|
+
* @description Recipient's B3 token balance
|
|
1945
|
+
* @example 302843673392800000000000
|
|
1946
|
+
*/
|
|
1947
|
+
recipientBalance: string;
|
|
1948
|
+
/**
|
|
1949
|
+
* @description Stripe fee percentage in basis points (5.4%)
|
|
1950
|
+
* @example 540
|
|
1951
|
+
*/
|
|
1952
|
+
stripeFeeBps: number;
|
|
1953
|
+
/**
|
|
1954
|
+
* @description Stripe fixed fee in USD
|
|
1955
|
+
* @example 0.3
|
|
1956
|
+
*/
|
|
1957
|
+
stripeFeeUsd: number;
|
|
1958
|
+
/**
|
|
1959
|
+
* @description AnySpend base fee in basis points before discounts
|
|
1960
|
+
* @example 80
|
|
1961
|
+
*/
|
|
1962
|
+
anyspendFeeBps: number;
|
|
1963
|
+
/**
|
|
1964
|
+
* @description AnySpend fixed fee in USD before discounts
|
|
1965
|
+
* @example 0
|
|
1966
|
+
*/
|
|
1967
|
+
anyspendFeeUsd: number;
|
|
1968
|
+
/**
|
|
1969
|
+
* @description Whale discount in basis points based on B3 balance
|
|
1970
|
+
* @example 5000
|
|
1971
|
+
*/
|
|
1972
|
+
anyspendWhaleDiscountBps: number;
|
|
1973
|
+
/**
|
|
1974
|
+
* @description Partner discount in basis points
|
|
1975
|
+
* @example 0
|
|
1976
|
+
*/
|
|
1977
|
+
anyspendPartnerDiscountBps: number;
|
|
1978
|
+
/**
|
|
1979
|
+
* @description Final combined fee percentage in basis points after all discounts
|
|
1980
|
+
* @example 580
|
|
1981
|
+
*/
|
|
1982
|
+
finalFeeBps: number;
|
|
1983
|
+
/**
|
|
1984
|
+
* @description Final combined fixed fee in USD after all discounts
|
|
1985
|
+
* @example 0.3
|
|
1986
|
+
*/
|
|
1987
|
+
finalFeeUsd: number;
|
|
1988
|
+
/**
|
|
1989
|
+
* @description Original amount before fees in USDC units (6 decimals)
|
|
1990
|
+
* @example 10000000
|
|
1991
|
+
*/
|
|
1992
|
+
originalAmount: string;
|
|
1993
|
+
/**
|
|
1994
|
+
* @description Final amount after applying all fees in USDC units (6 decimals)
|
|
1995
|
+
* @example 9120000
|
|
1996
|
+
*/
|
|
1997
|
+
finalAmount: string;
|
|
1998
|
+
};
|
|
2044
1999
|
};
|
|
2045
2000
|
responses: never;
|
|
2046
2001
|
parameters: never;
|
|
@@ -83,7 +83,7 @@ export const EVM_MAINNET = {
|
|
|
83
83
|
viem: getCustomEvmChain(polygon, "https://purple-young-field.matic.quiknode.pro/ca54f365c1a4c7f970223eb8087e0fc579feba12/"),
|
|
84
84
|
pollingInterval: 1000, // 1 second for Polygon
|
|
85
85
|
zapperEnum: "POLYGON_MAINNET",
|
|
86
|
-
coingeckoName: "
|
|
86
|
+
coingeckoName: "polygon_pos",
|
|
87
87
|
},
|
|
88
88
|
[avalanche.id]: {
|
|
89
89
|
id: avalanche.id,
|
|
@@ -97,7 +97,7 @@ export const EVM_MAINNET = {
|
|
|
97
97
|
viem: getCustomEvmChain(avalanche, "https://avalanche-c-chain-rpc.publicnode.com"),
|
|
98
98
|
pollingInterval: 1000, // 1 second for Avalanche
|
|
99
99
|
zapperEnum: "AVALANCHE_MAINNET",
|
|
100
|
-
coingeckoName: "
|
|
100
|
+
coingeckoName: "avax",
|
|
101
101
|
},
|
|
102
102
|
[bsc.id]: {
|
|
103
103
|
id: bsc.id,
|
|
@@ -138,8 +138,8 @@ export const EVM_MAINNET = {
|
|
|
138
138
|
nativeToken: getEthToken(abstract.id),
|
|
139
139
|
viem: getCustomEvmChain(abstract, "https://cosmopolitan-nameless-mountain.abstract-mainnet.quiknode.pro/863853304b986b582bdacf625ce3350397c560f8/"),
|
|
140
140
|
pollingInterval: 3000, // 3 seconds for Abstract
|
|
141
|
-
zapperEnum: "
|
|
142
|
-
coingeckoName: "
|
|
141
|
+
zapperEnum: "ABSTRACT_MAINNET",
|
|
142
|
+
coingeckoName: "abstract",
|
|
143
143
|
},
|
|
144
144
|
};
|
|
145
145
|
export const EVM_TESTNET = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Address, EIP1193Provider, GetContractReturnType, Hex, PublicClient, WalletClient } from "viem";
|
|
2
2
|
import { BondkitTokenABI } from "./abis";
|
|
3
|
-
import type { BondkitTokenInitializationConfig, GetTransactionHistoryOptions, SwapQuote, TokenDetails, TransactionResponse } from "./types";
|
|
3
|
+
import type { BondkitTokenInitializationConfig, GetTransactionHistoryOptions, MarketCapChartResponse, SwapQuote, TokenDetails, TransactionResponse } from "./types";
|
|
4
4
|
import { TokenStatus } from "./types";
|
|
5
5
|
type ExecuteWriteOptions = {
|
|
6
6
|
value?: bigint;
|
|
@@ -16,6 +16,7 @@ export declare class BondkitToken {
|
|
|
16
16
|
private walletKey?;
|
|
17
17
|
private rpcUrl;
|
|
18
18
|
private apiEndpoint;
|
|
19
|
+
private chartApiEndpoint;
|
|
19
20
|
private walletClientInstance;
|
|
20
21
|
private connectedProvider?;
|
|
21
22
|
private tradingToken?;
|
|
@@ -56,6 +57,7 @@ export declare class BondkitToken {
|
|
|
56
57
|
threshold: number;
|
|
57
58
|
} | undefined>;
|
|
58
59
|
getTransactionHistory(options?: GetTransactionHistoryOptions): Promise<TransactionResponse | undefined>;
|
|
60
|
+
getMarketCapChartData(): Promise<MarketCapChartResponse | undefined>;
|
|
59
61
|
private executeWrite;
|
|
60
62
|
/** Helper method to wait for transaction confirmation with OKX wallet fallback */
|
|
61
63
|
waitForTransaction(hash: Hex): Promise<import("viem").TransactionReceipt>;
|
|
@@ -18,6 +18,7 @@ export class BondkitToken {
|
|
|
18
18
|
this.chain = sdkConfig.chain;
|
|
19
19
|
this.rpcUrl = sdkConfig.rpcUrl;
|
|
20
20
|
this.apiEndpoint = sdkConfig.apiEndpoint;
|
|
21
|
+
this.chartApiEndpoint = sdkConfig.chartApiEndpoint;
|
|
21
22
|
if (walletKey && !walletKey.startsWith("0x")) {
|
|
22
23
|
this.walletKey = `0x${walletKey}`;
|
|
23
24
|
}
|
|
@@ -386,6 +387,24 @@ export class BondkitToken {
|
|
|
386
387
|
return undefined;
|
|
387
388
|
}
|
|
388
389
|
}
|
|
390
|
+
// --- Market Cap Chart Data --- //
|
|
391
|
+
async getMarketCapChartData() {
|
|
392
|
+
try {
|
|
393
|
+
const url = new URL("/recent_marketcap", this.chartApiEndpoint);
|
|
394
|
+
url.searchParams.set("contractAddress", this.contractAddress);
|
|
395
|
+
url.searchParams.set("chainId", this.chain.id.toString());
|
|
396
|
+
const response = await fetch(url.toString());
|
|
397
|
+
if (!response.ok) {
|
|
398
|
+
throw new Error(`HTTP error! status: ${response.status}`);
|
|
399
|
+
}
|
|
400
|
+
const result = await response.json();
|
|
401
|
+
return result;
|
|
402
|
+
}
|
|
403
|
+
catch (e) {
|
|
404
|
+
console.warn("Error fetching market cap chart data:", e);
|
|
405
|
+
return undefined;
|
|
406
|
+
}
|
|
407
|
+
}
|
|
389
408
|
// --- Write Methods --- //
|
|
390
409
|
async executeWrite(functionName, args, options) {
|
|
391
410
|
if (!this.walletClientInstance.account && !this.walletKey) {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { TradingViewProps } from "./types";
|
|
2
|
-
declare const TradingView: ({ className, tokenAddress, tokenSymbol }: TradingViewProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
declare const TradingView: ({ className, tokenAddress, tokenSymbol, chainId }: TradingViewProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default TradingView;
|