@b3dotfun/sdk 0.0.63-test.0 → 0.0.63-test.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/anyspend/react/components/AnySpendCustomExactIn.d.ts +34 -0
- package/dist/cjs/anyspend/react/components/AnySpendCustomExactIn.js +275 -0
- package/dist/cjs/anyspend/react/components/AnySpendStakeB3ExactIn.d.ts +9 -0
- package/dist/cjs/anyspend/react/components/AnySpendStakeB3ExactIn.js +288 -0
- package/dist/cjs/anyspend/react/components/AnySpendStakeUpsideExactIn.d.ts +11 -0
- package/dist/cjs/anyspend/react/components/AnySpendStakeUpsideExactIn.js +33 -0
- package/dist/cjs/anyspend/react/components/common/OrderDetails.js +10 -2
- package/dist/cjs/anyspend/react/components/common/OrderDetailsCollapsible.js +2 -3
- package/dist/cjs/anyspend/react/components/index.d.ts +5 -1
- package/dist/cjs/anyspend/react/components/index.js +11 -3
- package/dist/cjs/anyspend/react/hooks/useAnyspendFlow.d.ts +25 -3
- package/dist/cjs/anyspend/react/hooks/useAnyspendFlow.js +30 -8
- package/dist/cjs/anyspend/react/hooks/useAnyspendOrderHistory.d.ts +116 -0
- package/dist/cjs/anyspend/react/hooks/useAnyspendQuote.js +1 -1
- package/dist/cjs/anyspend/types/api.d.ts +665 -3
- package/dist/cjs/anyspend/utils/orderPayload.js +4 -0
- package/dist/cjs/global-account/react/components/B3DynamicModal.js +10 -1
- package/dist/cjs/global-account/react/components/SignInWithB3/steps/LoginStep.js +2 -2
- package/dist/cjs/global-account/react/hooks/useAuthentication.d.ts +2 -2
- package/dist/cjs/global-account/react/hooks/useAuthentication.js +7 -2
- package/dist/cjs/global-account/react/stores/useModalStore.d.ts +31 -1
- package/dist/esm/anyspend/react/components/AnySpendCustomExactIn.d.ts +34 -0
- package/dist/esm/anyspend/react/components/AnySpendCustomExactIn.js +269 -0
- package/dist/esm/anyspend/react/components/AnySpendStakeB3ExactIn.d.ts +9 -0
- package/dist/esm/anyspend/react/components/AnySpendStakeB3ExactIn.js +285 -0
- package/dist/esm/anyspend/react/components/AnySpendStakeUpsideExactIn.d.ts +11 -0
- package/dist/esm/anyspend/react/components/AnySpendStakeUpsideExactIn.js +30 -0
- package/dist/esm/anyspend/react/components/common/OrderDetails.js +10 -2
- package/dist/esm/anyspend/react/components/common/OrderDetailsCollapsible.js +2 -3
- package/dist/esm/anyspend/react/components/index.d.ts +5 -1
- package/dist/esm/anyspend/react/components/index.js +5 -1
- package/dist/esm/anyspend/react/hooks/useAnyspendFlow.d.ts +25 -3
- package/dist/esm/anyspend/react/hooks/useAnyspendFlow.js +30 -8
- package/dist/esm/anyspend/react/hooks/useAnyspendOrderHistory.d.ts +116 -0
- package/dist/esm/anyspend/react/hooks/useAnyspendQuote.js +1 -1
- package/dist/esm/anyspend/types/api.d.ts +665 -3
- package/dist/esm/anyspend/utils/orderPayload.js +4 -0
- package/dist/esm/global-account/react/components/B3DynamicModal.js +11 -2
- package/dist/esm/global-account/react/components/SignInWithB3/steps/LoginStep.js +2 -2
- package/dist/esm/global-account/react/hooks/useAuthentication.d.ts +2 -2
- package/dist/esm/global-account/react/hooks/useAuthentication.js +7 -2
- package/dist/esm/global-account/react/stores/useModalStore.d.ts +31 -1
- package/dist/types/anyspend/react/components/AnySpendCustomExactIn.d.ts +34 -0
- package/dist/types/anyspend/react/components/AnySpendStakeB3ExactIn.d.ts +9 -0
- package/dist/types/anyspend/react/components/AnySpendStakeUpsideExactIn.d.ts +11 -0
- package/dist/types/anyspend/react/components/index.d.ts +5 -1
- package/dist/types/anyspend/react/hooks/useAnyspendFlow.d.ts +25 -3
- package/dist/types/anyspend/react/hooks/useAnyspendOrderHistory.d.ts +116 -0
- package/dist/types/anyspend/types/api.d.ts +665 -3
- package/dist/types/global-account/react/hooks/useAuthentication.d.ts +2 -2
- package/dist/types/global-account/react/stores/useModalStore.d.ts +31 -1
- package/package.json +3 -3
- package/src/anyspend/react/components/AnySpendCustomExactIn.tsx +595 -0
- package/src/anyspend/react/components/AnySpendStakeB3ExactIn.tsx +522 -0
- package/src/anyspend/react/components/AnySpendStakeUpsideExactIn.tsx +73 -0
- package/src/anyspend/react/components/common/OrderDetails.tsx +10 -2
- package/src/anyspend/react/components/common/OrderDetailsCollapsible.tsx +2 -3
- package/src/anyspend/react/components/index.ts +5 -1
- package/src/anyspend/react/hooks/useAnyspendFlow.ts +38 -8
- package/src/anyspend/react/hooks/useAnyspendQuote.ts +1 -1
- package/src/anyspend/types/api.ts +669 -1
- package/src/anyspend/utils/orderPayload.ts +5 -1
- package/src/global-account/react/components/B3DynamicModal.tsx +11 -1
- package/src/global-account/react/components/SignInWithB3/steps/LoginStep.tsx +2 -2
- package/src/global-account/react/hooks/useAuthentication.ts +10 -2
- package/src/global-account/react/stores/useModalStore.ts +34 -0
|
@@ -53,6 +53,35 @@ export declare function useAnyspendOrderHistory(creatorAddress: string | undefin
|
|
|
53
53
|
relay?: Record<string, never>;
|
|
54
54
|
} | null;
|
|
55
55
|
fee?: Omit<import("../..").components["schemas"]["Fee"], "type"> | null;
|
|
56
|
+
} & {
|
|
57
|
+
type: "x402_swap";
|
|
58
|
+
payload: import("../..").components["schemas"]["X402SwapPayload"];
|
|
59
|
+
metadata: import("../..").components["schemas"]["X402SwapMetadata"];
|
|
60
|
+
}) | ({
|
|
61
|
+
id: string;
|
|
62
|
+
recipientAddress: string;
|
|
63
|
+
globalAddress: string;
|
|
64
|
+
srcChain: number;
|
|
65
|
+
dstChain: number;
|
|
66
|
+
srcTokenAddress: string;
|
|
67
|
+
dstTokenAddress: string;
|
|
68
|
+
srcAmount: string;
|
|
69
|
+
status: "scanning_deposit_transaction" | "waiting_stripe_payment" | "expired" | "sending_token_from_vault" | "relay" | "executing" | "executed" | "refunding" | "refunded" | "failure";
|
|
70
|
+
errorDetails: string | null;
|
|
71
|
+
createdAt: number;
|
|
72
|
+
expiredAt: number;
|
|
73
|
+
filledAt: number | null;
|
|
74
|
+
receivedDepositAt: number | null;
|
|
75
|
+
creatorAddress: string | null;
|
|
76
|
+
partnerId: string | null;
|
|
77
|
+
onrampMetadata: import("../..").components["schemas"]["OnrampMetadata"] | null;
|
|
78
|
+
oneClickBuyUrl: string | null;
|
|
79
|
+
stripePaymentIntentId: string | null;
|
|
80
|
+
settlement: {
|
|
81
|
+
actualDstAmount?: string;
|
|
82
|
+
relay?: Record<string, never>;
|
|
83
|
+
} | null;
|
|
84
|
+
fee?: Omit<import("../..").components["schemas"]["Fee"], "type"> | null;
|
|
56
85
|
} & {
|
|
57
86
|
type: "hype_duel";
|
|
58
87
|
payload: import("../..").components["schemas"]["HypeDuelPayload"];
|
|
@@ -111,6 +140,35 @@ export declare function useAnyspendOrderHistory(creatorAddress: string | undefin
|
|
|
111
140
|
relay?: Record<string, never>;
|
|
112
141
|
} | null;
|
|
113
142
|
fee?: Omit<import("../..").components["schemas"]["Fee"], "type"> | null;
|
|
143
|
+
} & {
|
|
144
|
+
type: "custom_exact_in";
|
|
145
|
+
payload: import("../..").components["schemas"]["CustomExactInPayload"];
|
|
146
|
+
metadata: import("../..").components["schemas"]["CustomMetadata"];
|
|
147
|
+
}) | ({
|
|
148
|
+
id: string;
|
|
149
|
+
recipientAddress: string;
|
|
150
|
+
globalAddress: string;
|
|
151
|
+
srcChain: number;
|
|
152
|
+
dstChain: number;
|
|
153
|
+
srcTokenAddress: string;
|
|
154
|
+
dstTokenAddress: string;
|
|
155
|
+
srcAmount: string;
|
|
156
|
+
status: "scanning_deposit_transaction" | "waiting_stripe_payment" | "expired" | "sending_token_from_vault" | "relay" | "executing" | "executed" | "refunding" | "refunded" | "failure";
|
|
157
|
+
errorDetails: string | null;
|
|
158
|
+
createdAt: number;
|
|
159
|
+
expiredAt: number;
|
|
160
|
+
filledAt: number | null;
|
|
161
|
+
receivedDepositAt: number | null;
|
|
162
|
+
creatorAddress: string | null;
|
|
163
|
+
partnerId: string | null;
|
|
164
|
+
onrampMetadata: import("../..").components["schemas"]["OnrampMetadata"] | null;
|
|
165
|
+
oneClickBuyUrl: string | null;
|
|
166
|
+
stripePaymentIntentId: string | null;
|
|
167
|
+
settlement: {
|
|
168
|
+
actualDstAmount?: string;
|
|
169
|
+
relay?: Record<string, never>;
|
|
170
|
+
} | null;
|
|
171
|
+
fee?: Omit<import("../..").components["schemas"]["Fee"], "type"> | null;
|
|
114
172
|
} & {
|
|
115
173
|
type: "mint_nft";
|
|
116
174
|
payload: import("../..").components["schemas"]["MintNftPayload"];
|
|
@@ -230,6 +288,35 @@ export declare function useAnyspendOrderHistory(creatorAddress: string | undefin
|
|
|
230
288
|
relay?: Record<string, never>;
|
|
231
289
|
} | null;
|
|
232
290
|
fee?: Omit<import("../..").components["schemas"]["Fee"], "type"> | null;
|
|
291
|
+
} & {
|
|
292
|
+
type: "x402_swap";
|
|
293
|
+
payload: import("../..").components["schemas"]["X402SwapPayload"];
|
|
294
|
+
metadata: import("../..").components["schemas"]["X402SwapMetadata"];
|
|
295
|
+
}) | ({
|
|
296
|
+
id: string;
|
|
297
|
+
recipientAddress: string;
|
|
298
|
+
globalAddress: string;
|
|
299
|
+
srcChain: number;
|
|
300
|
+
dstChain: number;
|
|
301
|
+
srcTokenAddress: string;
|
|
302
|
+
dstTokenAddress: string;
|
|
303
|
+
srcAmount: string;
|
|
304
|
+
status: "scanning_deposit_transaction" | "waiting_stripe_payment" | "expired" | "sending_token_from_vault" | "relay" | "executing" | "executed" | "refunding" | "refunded" | "failure";
|
|
305
|
+
errorDetails: string | null;
|
|
306
|
+
createdAt: number;
|
|
307
|
+
expiredAt: number;
|
|
308
|
+
filledAt: number | null;
|
|
309
|
+
receivedDepositAt: number | null;
|
|
310
|
+
creatorAddress: string | null;
|
|
311
|
+
partnerId: string | null;
|
|
312
|
+
onrampMetadata: import("../..").components["schemas"]["OnrampMetadata"] | null;
|
|
313
|
+
oneClickBuyUrl: string | null;
|
|
314
|
+
stripePaymentIntentId: string | null;
|
|
315
|
+
settlement: {
|
|
316
|
+
actualDstAmount?: string;
|
|
317
|
+
relay?: Record<string, never>;
|
|
318
|
+
} | null;
|
|
319
|
+
fee?: Omit<import("../..").components["schemas"]["Fee"], "type"> | null;
|
|
233
320
|
} & {
|
|
234
321
|
type: "hype_duel";
|
|
235
322
|
payload: import("../..").components["schemas"]["HypeDuelPayload"];
|
|
@@ -288,6 +375,35 @@ export declare function useAnyspendOrderHistory(creatorAddress: string | undefin
|
|
|
288
375
|
relay?: Record<string, never>;
|
|
289
376
|
} | null;
|
|
290
377
|
fee?: Omit<import("../..").components["schemas"]["Fee"], "type"> | null;
|
|
378
|
+
} & {
|
|
379
|
+
type: "custom_exact_in";
|
|
380
|
+
payload: import("../..").components["schemas"]["CustomExactInPayload"];
|
|
381
|
+
metadata: import("../..").components["schemas"]["CustomMetadata"];
|
|
382
|
+
}) | ({
|
|
383
|
+
id: string;
|
|
384
|
+
recipientAddress: string;
|
|
385
|
+
globalAddress: string;
|
|
386
|
+
srcChain: number;
|
|
387
|
+
dstChain: number;
|
|
388
|
+
srcTokenAddress: string;
|
|
389
|
+
dstTokenAddress: string;
|
|
390
|
+
srcAmount: string;
|
|
391
|
+
status: "scanning_deposit_transaction" | "waiting_stripe_payment" | "expired" | "sending_token_from_vault" | "relay" | "executing" | "executed" | "refunding" | "refunded" | "failure";
|
|
392
|
+
errorDetails: string | null;
|
|
393
|
+
createdAt: number;
|
|
394
|
+
expiredAt: number;
|
|
395
|
+
filledAt: number | null;
|
|
396
|
+
receivedDepositAt: number | null;
|
|
397
|
+
creatorAddress: string | null;
|
|
398
|
+
partnerId: string | null;
|
|
399
|
+
onrampMetadata: import("../..").components["schemas"]["OnrampMetadata"] | null;
|
|
400
|
+
oneClickBuyUrl: string | null;
|
|
401
|
+
stripePaymentIntentId: string | null;
|
|
402
|
+
settlement: {
|
|
403
|
+
actualDstAmount?: string;
|
|
404
|
+
relay?: Record<string, never>;
|
|
405
|
+
} | null;
|
|
406
|
+
fee?: Omit<import("../..").components["schemas"]["Fee"], "type"> | null;
|
|
291
407
|
} & {
|
|
292
408
|
type: "mint_nft";
|
|
293
409
|
payload: import("../..").components["schemas"]["MintNftPayload"];
|
|
@@ -11,7 +11,7 @@ export function useAnyspendQuote(req) {
|
|
|
11
11
|
req.dstChain &&
|
|
12
12
|
req.srcTokenAddress &&
|
|
13
13
|
req.dstTokenAddress &&
|
|
14
|
-
BigInt(req.type === "swap" || req.type === "hype_duel"
|
|
14
|
+
BigInt(req.type === "swap" || req.type === "hype_duel" || req.type === "x402_swap" || req.type === "custom_exact_in"
|
|
15
15
|
? req.amount
|
|
16
16
|
: req.type === "mint_nft"
|
|
17
17
|
? req.price
|