@b3dotfun/sdk 0.1.70-alpha.6 → 0.1.70-alpha.9
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@b3dotfun/sdk",
|
|
3
|
-
"version": "0.1.70-alpha.
|
|
3
|
+
"version": "0.1.70-alpha.9",
|
|
4
4
|
"source": "src/index.ts",
|
|
5
5
|
"main": "./dist/cjs/index.js",
|
|
6
6
|
"react-native": "./dist/cjs/index.native.js",
|
|
@@ -33,6 +33,26 @@
|
|
|
33
33
|
"require": "./dist/cjs/anyspend/react/index.js"
|
|
34
34
|
}
|
|
35
35
|
},
|
|
36
|
+
"./anyspend/react/components": {
|
|
37
|
+
"types": "./dist/types/anyspend/react/components/index.d.ts",
|
|
38
|
+
"import": "./dist/esm/anyspend/react/components/index.js",
|
|
39
|
+
"require": "./dist/cjs/anyspend/react/components/index.js"
|
|
40
|
+
},
|
|
41
|
+
"./anyspend/react/components/*": {
|
|
42
|
+
"types": "./dist/types/anyspend/react/components/*.d.ts",
|
|
43
|
+
"import": "./dist/esm/anyspend/react/components/*.js",
|
|
44
|
+
"require": "./dist/cjs/anyspend/react/components/*.js"
|
|
45
|
+
},
|
|
46
|
+
"./anyspend/react/hooks": {
|
|
47
|
+
"types": "./dist/types/anyspend/react/hooks/index.d.ts",
|
|
48
|
+
"import": "./dist/esm/anyspend/react/hooks/index.js",
|
|
49
|
+
"require": "./dist/cjs/anyspend/react/hooks/index.js"
|
|
50
|
+
},
|
|
51
|
+
"./anyspend/react/hooks/*": {
|
|
52
|
+
"types": "./dist/types/anyspend/react/hooks/*.d.ts",
|
|
53
|
+
"import": "./dist/esm/anyspend/react/hooks/*.js",
|
|
54
|
+
"require": "./dist/cjs/anyspend/react/hooks/*.js"
|
|
55
|
+
},
|
|
36
56
|
"./anyspend/types": {
|
|
37
57
|
"types": "./dist/types/anyspend/types/index.d.ts",
|
|
38
58
|
"import": "./dist/esm/anyspend/types/index.js",
|
|
@@ -43,15 +63,20 @@
|
|
|
43
63
|
"import": "./dist/esm/anyspend/types/*.js",
|
|
44
64
|
"require": "./dist/cjs/anyspend/types/*.js"
|
|
45
65
|
},
|
|
66
|
+
"./anyspend/utils": {
|
|
67
|
+
"types": "./dist/types/anyspend/utils/index.d.ts",
|
|
68
|
+
"import": "./dist/esm/anyspend/utils/index.js",
|
|
69
|
+
"require": "./dist/cjs/anyspend/utils/index.js"
|
|
70
|
+
},
|
|
46
71
|
"./anyspend/utils/*": {
|
|
47
72
|
"types": "./dist/types/anyspend/utils/*.d.ts",
|
|
48
73
|
"import": "./dist/esm/anyspend/utils/*.js",
|
|
49
74
|
"require": "./dist/cjs/anyspend/utils/*.js"
|
|
50
75
|
},
|
|
51
76
|
"./anyspend/constants": {
|
|
52
|
-
"types": "./dist/types/anyspend/constants.d.ts",
|
|
53
|
-
"import": "./dist/esm/anyspend/constants.js",
|
|
54
|
-
"require": "./dist/cjs/anyspend/constants.js"
|
|
77
|
+
"types": "./dist/types/anyspend/constants/index.d.ts",
|
|
78
|
+
"import": "./dist/esm/anyspend/constants/index.js",
|
|
79
|
+
"require": "./dist/cjs/anyspend/constants/index.js"
|
|
55
80
|
},
|
|
56
81
|
"./anyspend/constants/*": {
|
|
57
82
|
"types": "./dist/types/anyspend/constants/*.d.ts",
|
|
@@ -238,15 +263,10 @@
|
|
|
238
263
|
"import": "./dist/esm/shared/constants/*.js",
|
|
239
264
|
"require": "./dist/cjs/shared/constants/*.js"
|
|
240
265
|
},
|
|
241
|
-
"./shared/constants/chains
|
|
242
|
-
"types": "./dist/types/shared/constants/chains
|
|
243
|
-
"import": "./dist/esm/shared/constants/chains
|
|
244
|
-
"require": "./dist/cjs/shared/constants/chains
|
|
245
|
-
},
|
|
246
|
-
"./shared/constants/chains/supported": {
|
|
247
|
-
"types": "./dist/types/shared/constants/chains/supported.d.ts",
|
|
248
|
-
"import": "./dist/esm/shared/constants/chains/supported.js",
|
|
249
|
-
"require": "./dist/cjs/shared/constants/chains/supported.js"
|
|
266
|
+
"./shared/constants/chains/*": {
|
|
267
|
+
"types": "./dist/types/shared/constants/chains/*.d.ts",
|
|
268
|
+
"import": "./dist/esm/shared/constants/chains/*.js",
|
|
269
|
+
"require": "./dist/cjs/shared/constants/chains/*.js"
|
|
250
270
|
},
|
|
251
271
|
"./shared/thirdweb/*": {
|
|
252
272
|
"types": "./dist/types/shared/thirdweb/*.d.ts",
|
|
@@ -299,6 +319,16 @@
|
|
|
299
319
|
"types": "./dist/types/global-account/react/hooks/*.d.ts",
|
|
300
320
|
"import": "./dist/esm/global-account/react/hooks/*.js",
|
|
301
321
|
"require": "./dist/cjs/global-account/react/hooks/*.js"
|
|
322
|
+
},
|
|
323
|
+
"./global-account/react/stores": {
|
|
324
|
+
"types": "./dist/types/global-account/react/stores/index.d.ts",
|
|
325
|
+
"import": "./dist/esm/global-account/react/stores/index.js",
|
|
326
|
+
"require": "./dist/cjs/global-account/react/stores/index.js"
|
|
327
|
+
},
|
|
328
|
+
"./global-account/react/stores/*": {
|
|
329
|
+
"types": "./dist/types/global-account/react/stores/*.d.ts",
|
|
330
|
+
"import": "./dist/esm/global-account/react/stores/*.js",
|
|
331
|
+
"require": "./dist/cjs/global-account/react/stores/*.js"
|
|
302
332
|
}
|
|
303
333
|
},
|
|
304
334
|
"files": [
|
|
@@ -26,20 +26,20 @@ export function useAnyspendQuote(req: GetQuoteRequest): UseAnyspendQuoteResult {
|
|
|
26
26
|
},
|
|
27
27
|
enabled: Boolean(
|
|
28
28
|
req.srcChain &&
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
29
|
+
req.dstChain &&
|
|
30
|
+
req.srcTokenAddress &&
|
|
31
|
+
req.dstTokenAddress &&
|
|
32
|
+
BigInt(
|
|
33
|
+
req.type === "swap" || req.type === "hype_duel" || req.type === "x402_swap" || req.type === "custom_exact_in"
|
|
34
|
+
? req.amount
|
|
35
|
+
: req.type === "mint_nft"
|
|
36
|
+
? req.price
|
|
37
|
+
: req.type === "join_tournament"
|
|
36
38
|
? req.price
|
|
37
|
-
: req.type === "
|
|
38
|
-
? req.
|
|
39
|
-
: req.
|
|
40
|
-
|
|
41
|
-
: req.payload.amount,
|
|
42
|
-
) !== BigInt(0),
|
|
39
|
+
: req.type === "fund_tournament"
|
|
40
|
+
? req.fundAmount
|
|
41
|
+
: req.payload.amount,
|
|
42
|
+
) !== BigInt(0),
|
|
43
43
|
),
|
|
44
44
|
refetchInterval: 10000,
|
|
45
45
|
retry: false,
|
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
import { paths } from "./api";
|
|
2
2
|
|
|
3
|
-
export type GetOrderAndTxsResponse =
|
|
3
|
+
export type GetOrderAndTxsResponse =
|
|
4
|
+
paths["/orders/{orderId}"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
4
5
|
export type GetQuoteRequest = paths["/orders/quote"]["post"]["requestBody"]["content"]["application/json"];
|
|
5
6
|
export type GetQuoteResponse = paths["/orders/quote"]["post"]["responses"]["200"]["content"]["application/json"];
|
|
6
7
|
|
|
7
|
-
export type GetCoinbaseOnrampOptionsResponse =
|
|
8
|
+
export type GetCoinbaseOnrampOptionsResponse =
|
|
9
|
+
paths["/onramp/coinbase/options"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
8
10
|
export type GetOrderHistoryResponse = paths["/orders"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
9
|
-
export type GetTokenListResponse =
|
|
11
|
+
export type GetTokenListResponse =
|
|
12
|
+
paths["/chains/{chainId}/tokens"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
10
13
|
export type CreateOrderResponse = paths["/orders"]["post"]["responses"]["200"]["content"]["application/json"];
|
|
11
|
-
export type GetStripeSupportedResponse =
|
|
12
|
-
|
|
14
|
+
export type GetStripeSupportedResponse =
|
|
15
|
+
paths["/onramp/stripe/supported"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
16
|
+
export type GetStripeClientSecret =
|
|
17
|
+
paths["/stripe/clientSecret"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
@@ -32,8 +32,7 @@ const buttonVariants = cva(
|
|
|
32
32
|
);
|
|
33
33
|
|
|
34
34
|
export interface ButtonProps
|
|
35
|
-
extends React.ButtonHTMLAttributes<HTMLButtonElement>,
|
|
36
|
-
VariantProps<typeof buttonVariants> {
|
|
35
|
+
extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
37
36
|
asChild?: boolean;
|
|
38
37
|
}
|
|
39
38
|
|