@b3dotfun/sdk 0.0.18 → 0.0.19-alpha.1
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/README.md +29 -51
- package/dist/cjs/anyspend/react/components/AnySpend.js +21 -3
- package/dist/cjs/anyspend/react/components/AnySpendCustom.js +0 -1
- package/dist/cjs/anyspend/react/components/common/FiatPaymentMethod.js +2 -2
- package/dist/cjs/anyspend/react/components/common/PanelOnrampPayment.js +0 -1
- package/dist/cjs/anyspend/react/components/webview/WebviewOnrampPayment.js +0 -1
- package/dist/cjs/anyspend/react/hooks/useAnyspendCreateOnrampOrder.d.ts +0 -1
- package/dist/cjs/anyspend/react/hooks/useAnyspendCreateOnrampOrder.js +0 -4
- package/dist/cjs/anyspend/react/hooks/useGeoOnrampOptions.js +1 -1
- package/dist/cjs/anyspend/react/hooks/useStripeSupport.d.ts +1 -1
- package/dist/cjs/anyspend/react/hooks/useStripeSupport.js +4 -4
- package/dist/cjs/anyspend/react/providers/AnyspendProvider.d.ts +1 -2
- package/dist/cjs/anyspend/react/providers/AnyspendProvider.js +2 -3
- package/dist/cjs/anyspend/services/anyspend.d.ts +1 -1
- package/dist/cjs/anyspend/services/anyspend.js +1 -2
- package/dist/cjs/anyspend/types/api.d.ts +1 -16
- package/dist/cjs/global-account/react/components/B3Provider/B3Provider.d.ts +3 -1
- package/dist/cjs/global-account/react/components/B3Provider/B3Provider.js +2 -2
- package/dist/cjs/global-account/react/components/B3Provider/B3Provider.native.js +3 -1
- package/dist/cjs/global-account/react/components/index.d.ts +1 -0
- package/dist/cjs/global-account/react/components/index.js +4 -2
- package/dist/cjs/global-account/react/components/ui/Loading.js +1 -1
- package/dist/cjs/shared/thirdweb/generated/@tanstack/react-query.gen.d.ts +4 -4
- package/dist/cjs/shared/thirdweb/generated/@tanstack/react-query.gen.js +360 -313
- package/dist/cjs/shared/thirdweb/generated/client.gen.d.ts +2 -2
- package/dist/cjs/shared/thirdweb/generated/sdk.gen.d.ts +2 -2
- package/dist/cjs/shared/thirdweb/generated/sdk.gen.js +398 -398
- package/dist/cjs/shared/thirdweb/generated/types.gen.d.ts +135 -135
- package/dist/esm/anyspend/react/components/AnySpend.js +21 -3
- package/dist/esm/anyspend/react/components/AnySpendCustom.js +0 -1
- package/dist/esm/anyspend/react/components/common/FiatPaymentMethod.js +2 -2
- package/dist/esm/anyspend/react/components/common/PanelOnrampPayment.js +0 -1
- package/dist/esm/anyspend/react/components/webview/WebviewOnrampPayment.js +0 -1
- package/dist/esm/anyspend/react/hooks/useAnyspendCreateOnrampOrder.d.ts +0 -1
- package/dist/esm/anyspend/react/hooks/useAnyspendCreateOnrampOrder.js +0 -4
- package/dist/esm/anyspend/react/hooks/useGeoOnrampOptions.js +1 -1
- package/dist/esm/anyspend/react/hooks/useStripeSupport.d.ts +1 -1
- package/dist/esm/anyspend/react/hooks/useStripeSupport.js +4 -4
- package/dist/esm/anyspend/react/providers/AnyspendProvider.d.ts +1 -2
- package/dist/esm/anyspend/react/providers/AnyspendProvider.js +2 -3
- package/dist/esm/anyspend/services/anyspend.d.ts +1 -1
- package/dist/esm/anyspend/services/anyspend.js +1 -2
- package/dist/esm/anyspend/types/api.d.ts +1 -16
- package/dist/esm/global-account/react/components/B3Provider/B3Provider.d.ts +3 -1
- package/dist/esm/global-account/react/components/B3Provider/B3Provider.js +3 -3
- package/dist/esm/global-account/react/components/B3Provider/B3Provider.native.js +3 -1
- package/dist/esm/global-account/react/components/index.d.ts +1 -0
- package/dist/esm/global-account/react/components/index.js +1 -0
- package/dist/esm/global-account/react/components/ui/Loading.js +1 -1
- package/dist/esm/shared/thirdweb/generated/@tanstack/react-query.gen.d.ts +4 -4
- package/dist/esm/shared/thirdweb/generated/@tanstack/react-query.gen.js +363 -316
- package/dist/esm/shared/thirdweb/generated/client.gen.d.ts +2 -2
- package/dist/esm/shared/thirdweb/generated/client.gen.js +1 -1
- package/dist/esm/shared/thirdweb/generated/sdk.gen.d.ts +2 -2
- package/dist/esm/shared/thirdweb/generated/sdk.gen.js +399 -399
- package/dist/esm/shared/thirdweb/generated/types.gen.d.ts +135 -135
- package/dist/types/anyspend/react/hooks/useAnyspendCreateOnrampOrder.d.ts +0 -1
- package/dist/types/anyspend/react/hooks/useStripeSupport.d.ts +1 -1
- package/dist/types/anyspend/react/providers/AnyspendProvider.d.ts +1 -2
- package/dist/types/anyspend/services/anyspend.d.ts +1 -1
- package/dist/types/anyspend/types/api.d.ts +1 -16
- package/dist/types/global-account/react/components/B3Provider/B3Provider.d.ts +3 -1
- package/dist/types/global-account/react/components/index.d.ts +1 -0
- package/dist/types/shared/thirdweb/generated/@tanstack/react-query.gen.d.ts +4 -4
- package/dist/types/shared/thirdweb/generated/client.gen.d.ts +2 -2
- package/dist/types/shared/thirdweb/generated/sdk.gen.d.ts +2 -2
- package/dist/types/shared/thirdweb/generated/types.gen.d.ts +135 -135
- package/package.json +2 -2
- package/src/anyspend/react/components/AnySpend.tsx +25 -7
- package/src/anyspend/react/components/AnySpendCustom.tsx +0 -1
- package/src/anyspend/react/components/common/FiatPaymentMethod.tsx +2 -2
- package/src/anyspend/react/components/common/PanelOnrampPayment.tsx +0 -1
- package/src/anyspend/react/components/webview/WebviewOnrampPayment.tsx +0 -1
- package/src/anyspend/react/hooks/useAnyspendCreateOnrampOrder.ts +0 -6
- package/src/anyspend/react/hooks/useGeoOnrampOptions.ts +0 -1
- package/src/anyspend/react/hooks/useStripeSupport.ts +3 -4
- package/src/anyspend/react/providers/AnyspendProvider.tsx +5 -9
- package/src/anyspend/services/anyspend.ts +0 -2
- package/src/anyspend/types/api.ts +1 -16
- package/src/global-account/react/components/B3Provider/B3Provider.native.tsx +1 -0
- package/src/global-account/react/components/B3Provider/B3Provider.tsx +11 -5
- package/src/global-account/react/components/index.ts +1 -0
- package/src/global-account/react/components/ui/Loading.tsx +1 -1
- package/src/shared/thirdweb/generated/@tanstack/react-query.gen.ts +1886 -1220
- package/src/shared/thirdweb/generated/client.gen.ts +11 -4
- package/src/shared/thirdweb/generated/sdk.gen.ts +1083 -809
- package/src/shared/thirdweb/generated/types.gen.ts +3953 -3862
- /package/dist/cjs/{anyspend/react/providers → global-account/react/components/B3Provider}/RelayKitProviderWrapper.d.ts +0 -0
- /package/dist/cjs/{anyspend/react/providers → global-account/react/components/B3Provider}/RelayKitProviderWrapper.js +0 -0
- /package/dist/esm/{anyspend/react/providers → global-account/react/components/B3Provider}/RelayKitProviderWrapper.d.ts +0 -0
- /package/dist/esm/{anyspend/react/providers → global-account/react/components/B3Provider}/RelayKitProviderWrapper.js +0 -0
- /package/dist/types/{anyspend/react/providers → global-account/react/components/B3Provider}/RelayKitProviderWrapper.d.ts +0 -0
- /package/src/{anyspend/react/providers → global-account/react/components/B3Provider}/RelayKitProviderWrapper.tsx +0 -0
package/README.md
CHANGED
|
@@ -12,6 +12,7 @@ The SDK is organized into focused modules:
|
|
|
12
12
|
- **`others/`** - Additional features and utilities
|
|
13
13
|
|
|
14
14
|
Each module contains:
|
|
15
|
+
|
|
15
16
|
- `react/` - React components and hooks
|
|
16
17
|
- `services/` - Headless TypeScript services
|
|
17
18
|
- `types/` - TypeScript definitions
|
|
@@ -20,11 +21,11 @@ Each module contains:
|
|
|
20
21
|
|
|
21
22
|
## Platform Support
|
|
22
23
|
|
|
23
|
-
| Feature
|
|
24
|
-
|
|
|
25
|
-
| AnySpend
|
|
26
|
-
| Global Accounts
|
|
27
|
-
| Headless Services
|
|
24
|
+
| Feature | React Web | React Native |
|
|
25
|
+
| ----------------- | --------- | ------------ |
|
|
26
|
+
| AnySpend | ✅ | ❌ |
|
|
27
|
+
| Global Accounts | ✅ | ✅ |
|
|
28
|
+
| Headless Services | ✅ | ✅ |
|
|
28
29
|
|
|
29
30
|
## Installation
|
|
30
31
|
|
|
@@ -54,12 +55,7 @@ AnySpend enables cross-chain swaps, NFT minting, and other blockchain operations
|
|
|
54
55
|
import { AnySpend } from "@b3dotfun/sdk/anyspend/react";
|
|
55
56
|
|
|
56
57
|
function CrossChainSwapPage() {
|
|
57
|
-
return
|
|
58
|
-
<AnySpend
|
|
59
|
-
isMainnet={true}
|
|
60
|
-
mode="page"
|
|
61
|
-
/>
|
|
62
|
-
);
|
|
58
|
+
return <AnySpend isMainnet={true} mode="page" />;
|
|
63
59
|
}
|
|
64
60
|
```
|
|
65
61
|
|
|
@@ -78,16 +74,11 @@ function NFTMinting() {
|
|
|
78
74
|
price: "1000000000000000000", // 1 ETH in wei
|
|
79
75
|
currency: {
|
|
80
76
|
symbol: "ETH",
|
|
81
|
-
decimals: 18
|
|
82
|
-
}
|
|
77
|
+
decimals: 18,
|
|
78
|
+
},
|
|
83
79
|
};
|
|
84
80
|
|
|
85
|
-
return
|
|
86
|
-
<AnySpendNFTButton
|
|
87
|
-
nftContract={nftContract}
|
|
88
|
-
recipientAddress="0x..."
|
|
89
|
-
/>
|
|
90
|
-
);
|
|
81
|
+
return <AnySpendNFTButton nftContract={nftContract} recipientAddress="0x..." />;
|
|
91
82
|
}
|
|
92
83
|
```
|
|
93
84
|
|
|
@@ -115,15 +106,15 @@ import { anyspendService } from "@b3dotfun/sdk/anyspend/services/anyspend";
|
|
|
115
106
|
// Get available tokens for a chain
|
|
116
107
|
const tokens = await anyspendService.getTokenList(
|
|
117
108
|
true, // isMainnet
|
|
118
|
-
1,
|
|
119
|
-
"usdc" // search query
|
|
109
|
+
1, // chainId (Ethereum)
|
|
110
|
+
"usdc", // search query
|
|
120
111
|
);
|
|
121
112
|
|
|
122
113
|
// Get specific token details
|
|
123
114
|
const token = await anyspendService.getToken(
|
|
124
115
|
true, // isMainnet
|
|
125
|
-
1,
|
|
126
|
-
"0xA0b86a33E6c51c7C36c654d6C9e7b8F5d4a8b5c5" // token address
|
|
116
|
+
1, // chainId
|
|
117
|
+
"0xA0b86a33E6c51c7C36c654d6C9e7b8F5d4a8b5c5", // token address
|
|
127
118
|
);
|
|
128
119
|
```
|
|
129
120
|
|
|
@@ -141,7 +132,7 @@ const quoteRequest: GetQuoteRequest = {
|
|
|
141
132
|
dstTokenAddress: "0x...",
|
|
142
133
|
srcAmount: "1000000", // 1 USDC
|
|
143
134
|
recipientAddress: "0x...",
|
|
144
|
-
type: "swap"
|
|
135
|
+
type: "swap",
|
|
145
136
|
};
|
|
146
137
|
|
|
147
138
|
const quote = await anyspendService.getQuote(true, quoteRequest);
|
|
@@ -157,7 +148,7 @@ const order = await anyspendService.createOrder({
|
|
|
157
148
|
dstTokenAddress: "0x...",
|
|
158
149
|
srcAmount: "1000000",
|
|
159
150
|
payload: {},
|
|
160
|
-
metadata: {}
|
|
151
|
+
metadata: {},
|
|
161
152
|
});
|
|
162
153
|
```
|
|
163
154
|
|
|
@@ -169,7 +160,7 @@ import { anyspendService } from "@b3dotfun/sdk/anyspend/services/anyspend";
|
|
|
169
160
|
// Get order details and transactions
|
|
170
161
|
const orderDetails = await anyspendService.getOrderAndTransactions(
|
|
171
162
|
true, // isMainnet
|
|
172
|
-
"order-id"
|
|
163
|
+
"order-id",
|
|
173
164
|
);
|
|
174
165
|
|
|
175
166
|
// Get order history for an address
|
|
@@ -177,7 +168,7 @@ const history = await anyspendService.getOrderHistory(
|
|
|
177
168
|
true, // isMainnet
|
|
178
169
|
"0x...", // creator address
|
|
179
170
|
50, // limit
|
|
180
|
-
0
|
|
171
|
+
0, // offset
|
|
181
172
|
);
|
|
182
173
|
```
|
|
183
174
|
|
|
@@ -214,7 +205,7 @@ function App() {
|
|
|
214
205
|
<SignInWithB3
|
|
215
206
|
provider={{ strategy: "google" }}
|
|
216
207
|
partnerId="your-partner-id"
|
|
217
|
-
onLoginSuccess={
|
|
208
|
+
onLoginSuccess={globalAccount => {
|
|
218
209
|
console.log("Authenticated:", globalAccount);
|
|
219
210
|
}}
|
|
220
211
|
/>
|
|
@@ -232,7 +223,7 @@ const b3Chain = {
|
|
|
232
223
|
id: 8333,
|
|
233
224
|
name: "B3",
|
|
234
225
|
nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
|
|
235
|
-
rpc: "https://mainnet-rpc.b3.fun"
|
|
226
|
+
rpc: "https://mainnet-rpc.b3.fun",
|
|
236
227
|
};
|
|
237
228
|
|
|
238
229
|
function SessionKeyAuth() {
|
|
@@ -243,7 +234,7 @@ function SessionKeyAuth() {
|
|
|
243
234
|
chain={b3Chain}
|
|
244
235
|
partnerId="your-partner-id"
|
|
245
236
|
sessionKeyAddress="0x..." // MetaMask address
|
|
246
|
-
onLoginSuccess={
|
|
237
|
+
onLoginSuccess={globalAccount => {
|
|
247
238
|
console.log("Session key authenticated:", globalAccount);
|
|
248
239
|
}}
|
|
249
240
|
/>
|
|
@@ -266,10 +257,10 @@ function PermissionsExample() {
|
|
|
266
257
|
approvedTargets: ["0x..."], // Contract addresses
|
|
267
258
|
startDate: new Date(),
|
|
268
259
|
endDate: new Date(Date.now() + 30 * 24 * 60 * 60 * 1000), // 30 days
|
|
269
|
-
nativeTokenLimitPerTransaction: 0.0001
|
|
260
|
+
nativeTokenLimitPerTransaction: 0.0001,
|
|
270
261
|
}}
|
|
271
262
|
onSuccess={() => console.log("Permissions granted")}
|
|
272
|
-
onError={
|
|
263
|
+
onError={error => console.error("Permission error:", error)}
|
|
273
264
|
/>
|
|
274
265
|
);
|
|
275
266
|
}
|
|
@@ -283,15 +274,7 @@ import { useB3 } from "@b3dotfun/sdk/global-account/react";
|
|
|
283
274
|
function AccountStatus() {
|
|
284
275
|
const { account, isAuthenticated } = useB3();
|
|
285
276
|
|
|
286
|
-
return
|
|
287
|
-
<div>
|
|
288
|
-
{isAuthenticated ? (
|
|
289
|
-
<p>Welcome, {account?.displayName}!</p>
|
|
290
|
-
) : (
|
|
291
|
-
<p>Please sign in</p>
|
|
292
|
-
)}
|
|
293
|
-
</div>
|
|
294
|
-
);
|
|
277
|
+
return <div>{isAuthenticated ? <p>Welcome, {account?.displayName}!</p> : <p>Please sign in</p>}</div>;
|
|
295
278
|
}
|
|
296
279
|
```
|
|
297
280
|
|
|
@@ -303,11 +286,9 @@ function AccountStatus() {
|
|
|
303
286
|
import { authenticate, resetSocket } from "@b3dotfun/sdk/global-account/app";
|
|
304
287
|
|
|
305
288
|
// Authenticate with B3 Global Account
|
|
306
|
-
const authResult = await authenticate(
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
{ /* additional params */ }
|
|
310
|
-
);
|
|
289
|
+
const authResult = await authenticate("access-token", "identity-token", {
|
|
290
|
+
/* additional params */
|
|
291
|
+
});
|
|
311
292
|
|
|
312
293
|
if (authResult) {
|
|
313
294
|
console.log("Authentication successful:", authResult);
|
|
@@ -325,10 +306,7 @@ resetSocket();
|
|
|
325
306
|
import { authenticate as bsmntAuthenticate } from "@b3dotfun/sdk/global-account/bsmnt";
|
|
326
307
|
|
|
327
308
|
// Authenticate with Basement services
|
|
328
|
-
const bsmntAuth = await bsmntAuthenticate(
|
|
329
|
-
"access-token",
|
|
330
|
-
"identity-token"
|
|
331
|
-
);
|
|
309
|
+
const bsmntAuth = await bsmntAuthenticate("access-token", "identity-token");
|
|
332
310
|
```
|
|
333
311
|
|
|
334
312
|
### React Native Support
|
|
@@ -372,7 +350,7 @@ import { cn } from "@b3dotfun/sdk/shared/utils/cn";
|
|
|
372
350
|
|
|
373
351
|
// Tailwind class name utility
|
|
374
352
|
const classes = cn("base-class", "conditional-class", {
|
|
375
|
-
|
|
353
|
+
active: isActive,
|
|
376
354
|
});
|
|
377
355
|
```
|
|
378
356
|
|
|
@@ -298,6 +298,26 @@ function AnySpendInner({ destinationTokenAddress, destinationTokenChainId, isMai
|
|
|
298
298
|
(0, react_4.useEffect)(() => {
|
|
299
299
|
setRecipientAddress(recipientAddressFromProps || globalAddress);
|
|
300
300
|
}, [recipientAddressFromProps, globalAddress]);
|
|
301
|
+
// Get geo-based onramp options for fiat payments
|
|
302
|
+
const { geoData, coinbaseAvailablePaymentMethods, isStripeOnrampSupported, stripeWeb2Support } = (0, react_1.useGeoOnrampOptions)(isMainnet, srcAmountOnRamp);
|
|
303
|
+
// Helper function to map payment method to onramp vendor
|
|
304
|
+
const getOnrampVendor = (paymentMethod) => {
|
|
305
|
+
switch (paymentMethod) {
|
|
306
|
+
case FiatPaymentMethod_1.FiatPaymentMethod.COINBASE_PAY:
|
|
307
|
+
return "coinbase";
|
|
308
|
+
case FiatPaymentMethod_1.FiatPaymentMethod.STRIPE:
|
|
309
|
+
// Determine if it's stripe onramp or stripe-web2 based on support
|
|
310
|
+
if (isStripeOnrampSupported) {
|
|
311
|
+
return "stripe";
|
|
312
|
+
}
|
|
313
|
+
else if (stripeWeb2Support?.isSupport) {
|
|
314
|
+
return "stripe-web2";
|
|
315
|
+
}
|
|
316
|
+
return undefined;
|
|
317
|
+
default:
|
|
318
|
+
return undefined;
|
|
319
|
+
}
|
|
320
|
+
};
|
|
301
321
|
// Get anyspend price
|
|
302
322
|
const activeInputAmountInWei = isSrcInputDirty
|
|
303
323
|
? (0, viem_1.parseUnits)(srcAmount.replace(/,/g, ""), selectedSrcToken.decimals).toString()
|
|
@@ -321,6 +341,7 @@ function AnySpendInner({ destinationTokenAddress, destinationTokenChainId, isMai
|
|
|
321
341
|
type: "swap",
|
|
322
342
|
tradeType: "EXACT_INPUT",
|
|
323
343
|
amount: srcAmountOnrampInWei,
|
|
344
|
+
onrampVendor: getOnrampVendor(selectedFiatPaymentMethod),
|
|
324
345
|
});
|
|
325
346
|
const recipientProfile = (0, react_2.useProfile)({ address: recipientAddress });
|
|
326
347
|
const recipientName = recipientProfile.data?.name?.replace(/\.b3\.fun/g, "");
|
|
@@ -525,8 +546,6 @@ function AnySpendInner({ destinationTokenAddress, destinationTokenChainId, isMai
|
|
|
525
546
|
sonner_1.toast.error("Failed to create order: " + error.message);
|
|
526
547
|
},
|
|
527
548
|
});
|
|
528
|
-
// Get geo-based onramp options for fiat payments
|
|
529
|
-
const { geoData, coinbaseAvailablePaymentMethods, isStripeOnrampSupported, stripeWeb2Support } = (0, react_1.useGeoOnrampOptions)(isMainnet, srcAmountOnRamp);
|
|
530
549
|
// Determine button state and text
|
|
531
550
|
const btnInfo = (0, react_4.useMemo)(() => {
|
|
532
551
|
if (activeInputAmountInWei === "0")
|
|
@@ -706,7 +725,6 @@ function AnySpendInner({ destinationTokenAddress, destinationTokenChainId, isMai
|
|
|
706
725
|
vendor: vendor,
|
|
707
726
|
paymentMethod: paymentMethodString,
|
|
708
727
|
country: geoData?.country || "US",
|
|
709
|
-
ipAddress: geoData?.ip,
|
|
710
728
|
redirectUrl: window.location.origin === "https://basement.fun" ? "https://basement.fun/deposit" : window.location.origin,
|
|
711
729
|
},
|
|
712
730
|
expectedDstAmount: anyspendQuote?.data?.currencyOut?.amount?.toString() || "0",
|
|
@@ -306,7 +306,6 @@ function AnySpendCustom({ isMainnet = true, loadOrder, mode = "modal", recipient
|
|
|
306
306
|
vendor: onramp.vendor,
|
|
307
307
|
paymentMethod: onramp.paymentMethod,
|
|
308
308
|
country: geoData?.country || "US",
|
|
309
|
-
ipAddress: geoData?.ip,
|
|
310
309
|
redirectUrl: window.location.origin === "https://basement.fun"
|
|
311
310
|
? "https://basement.fun/deposit"
|
|
312
311
|
: window.location.origin,
|
|
@@ -18,8 +18,8 @@ function FiatPaymentMethodComponent({ selectedPaymentMethod, setSelectedPaymentM
|
|
|
18
18
|
const getFeeFromApi = (paymentMethod) => {
|
|
19
19
|
switch (paymentMethod) {
|
|
20
20
|
case FiatPaymentMethod.COINBASE_PAY:
|
|
21
|
-
// Coinbase doesn't provide fee info in API,
|
|
22
|
-
return
|
|
21
|
+
// Coinbase doesn't provide fee info in API, return null
|
|
22
|
+
return null;
|
|
23
23
|
case FiatPaymentMethod.STRIPE:
|
|
24
24
|
// Get fee from Stripe API response
|
|
25
25
|
if (stripeWeb2Support && "formattedFeeUsd" in stripeWeb2Support) {
|
|
@@ -79,7 +79,6 @@ function PanelOnrampPaymentInner(props) {
|
|
|
79
79
|
vendor: vendor,
|
|
80
80
|
paymentMethod: paymentMethod || "",
|
|
81
81
|
country: geoData?.country || "US",
|
|
82
|
-
ipAddress: geoData?.ip,
|
|
83
82
|
redirectUrl: window.location.origin === "https://basement.fun" ? "https://basement.fun/deposit" : window.location.origin,
|
|
84
83
|
},
|
|
85
84
|
expectedDstAmount: anyspendQuote?.data?.currencyOut?.amount?.toString() || "0",
|
|
@@ -134,7 +134,6 @@ function WebviewOnrampPaymentInner({ srcAmountOnRamp, recipientAddress, destinat
|
|
|
134
134
|
vendor: "stripe-web2",
|
|
135
135
|
paymentMethod: "",
|
|
136
136
|
country: geoData.country || "US",
|
|
137
|
-
ipAddress: geoData.ip,
|
|
138
137
|
redirectUrl: `${window.location.origin}${userId ? `?userId=${userId}` : ""}`,
|
|
139
138
|
},
|
|
140
139
|
expectedDstAmount: anyspendQuote.data?.currencyOut?.amount?.toString() || "0",
|
|
@@ -24,10 +24,6 @@ function useAnyspendCreateOnrampOrder({ onSuccess, onError } = {}) {
|
|
|
24
24
|
mutationFn: async (params) => {
|
|
25
25
|
const { isMainnet, recipientAddress, orderType, dstChain, dstToken, srcFiatAmount, onramp, creatorAddress, expectedDstAmount, nft, tournament, payload, partnerId, } = params;
|
|
26
26
|
try {
|
|
27
|
-
// Validate Stripe onramp options
|
|
28
|
-
if (onramp.vendor === "stripe" && !onramp.ipAddress) {
|
|
29
|
-
throw new Error("IP address is required for Stripe onramp");
|
|
30
|
-
}
|
|
31
27
|
// Validate required onramp fields
|
|
32
28
|
if (!onramp.vendor || !onramp.country) {
|
|
33
29
|
throw new Error("Missing required onramp fields: vendor, country");
|
|
@@ -16,7 +16,7 @@ function useGeoOnrampOptions(isMainnet, srcFiatAmount) {
|
|
|
16
16
|
// Use existing hooks
|
|
17
17
|
const { geoData, loading: isLoadingGeo, error: geoError } = (0, useGetGeo_1.useGetGeo)();
|
|
18
18
|
const { coinbaseOnrampOptions, isLoadingCoinbaseOnrampOptions, coinbaseOnrampOptionsError } = (0, useCoinbaseOnrampOptions_1.useCoinbaseOnrampOptions)(isMainnet, geoData?.country, visitorData);
|
|
19
|
-
const { isStripeOnrampSupported, stripeWeb2Support, isLoadingStripeSupport, stripeSupportError } = (0, useStripeSupport_1.useStripeSupport)(isMainnet,
|
|
19
|
+
const { isStripeOnrampSupported, stripeWeb2Support, isLoadingStripeSupport, stripeSupportError } = (0, useStripeSupport_1.useStripeSupport)(isMainnet, srcFiatAmount, visitorData);
|
|
20
20
|
// Calculate available payment methods based on the amount
|
|
21
21
|
const coinbaseAvailablePaymentMethods = (0, react_1.useMemo)(() => {
|
|
22
22
|
if (!coinbaseOnrampOptions?.paymentCurrencies?.[0]?.limits || !srcFiatAmount)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { VisitorData } from "../../../anyspend/types/fingerprint";
|
|
2
|
-
export declare function useStripeSupport(isMainnet: boolean,
|
|
2
|
+
export declare function useStripeSupport(isMainnet: boolean, usdAmount?: string, visitorData?: VisitorData, isLoadingVisitorData?: boolean): {
|
|
3
3
|
isStripeOnrampSupported: boolean;
|
|
4
4
|
stripeWeb2Support: {
|
|
5
5
|
isSupport: false;
|
|
@@ -4,11 +4,11 @@ exports.useStripeSupport = useStripeSupport;
|
|
|
4
4
|
const anyspend_1 = require("../../../anyspend/services/anyspend");
|
|
5
5
|
const react_query_1 = require("@tanstack/react-query");
|
|
6
6
|
const react_1 = require("react");
|
|
7
|
-
function useStripeSupport(isMainnet,
|
|
7
|
+
function useStripeSupport(isMainnet, usdAmount, visitorData, isLoadingVisitorData) {
|
|
8
8
|
const { data, isLoading, error, refetch } = (0, react_query_1.useQuery)({
|
|
9
|
-
queryKey: ["useStripeSupport", isMainnet,
|
|
10
|
-
queryFn: () => anyspend_1.anyspendService.checkStripeSupport(isMainnet,
|
|
11
|
-
enabled:
|
|
9
|
+
queryKey: ["useStripeSupport", isMainnet, usdAmount, visitorData?.requestId, visitorData?.visitorId],
|
|
10
|
+
queryFn: () => anyspend_1.anyspendService.checkStripeSupport(isMainnet, usdAmount, visitorData),
|
|
11
|
+
enabled: !isLoadingVisitorData,
|
|
12
12
|
});
|
|
13
13
|
return (0, react_1.useMemo)(() => ({
|
|
14
14
|
isStripeOnrampSupported: data?.stripeOnramp || false,
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from "react";
|
|
2
2
|
interface AnyspendProviderProps {
|
|
3
3
|
children: ReactNode;
|
|
4
|
-
simDuneApiKey?: string;
|
|
5
4
|
}
|
|
6
5
|
/**
|
|
7
6
|
* AnyspendProvider is a top-level provider that wraps your application to provide
|
|
@@ -25,5 +24,5 @@ interface AnyspendProviderProps {
|
|
|
25
24
|
* }
|
|
26
25
|
* ```
|
|
27
26
|
*/
|
|
28
|
-
export declare const AnyspendProvider: ({ children
|
|
27
|
+
export declare const AnyspendProvider: ({ children }: AnyspendProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
29
28
|
export {};
|
|
@@ -7,7 +7,6 @@ const react_1 = require("../../../global-account/react");
|
|
|
7
7
|
const react_query_1 = require("@tanstack/react-query");
|
|
8
8
|
const react_2 = require("react");
|
|
9
9
|
const StripeRedirectHandler_1 = require("./StripeRedirectHandler");
|
|
10
|
-
const RelayKitProviderWrapper_1 = require("./RelayKitProviderWrapper");
|
|
11
10
|
const defaultQueryClientConfig = {
|
|
12
11
|
defaultOptions: {
|
|
13
12
|
queries: {
|
|
@@ -39,8 +38,8 @@ const defaultQueryClientConfig = {
|
|
|
39
38
|
* }
|
|
40
39
|
* ```
|
|
41
40
|
*/
|
|
42
|
-
const AnyspendProvider = function AnyspendProvider({ children
|
|
41
|
+
const AnyspendProvider = function AnyspendProvider({ children }) {
|
|
43
42
|
const [queryClient] = (0, react_2.useState)(() => new react_query_1.QueryClient(defaultQueryClientConfig));
|
|
44
|
-
return ((0, jsx_runtime_1.jsx)(react_query_1.QueryClientProvider, { client: queryClient, children: (0, jsx_runtime_1.
|
|
43
|
+
return ((0, jsx_runtime_1.jsx)(react_query_1.QueryClientProvider, { client: queryClient, children: (0, jsx_runtime_1.jsxs)(react_1.TooltipProvider, { children: [(0, jsx_runtime_1.jsx)(StripeRedirectHandler_1.StripeRedirectHandler, {}), children] }) }));
|
|
45
44
|
};
|
|
46
45
|
exports.AnyspendProvider = AnyspendProvider;
|
|
@@ -30,7 +30,7 @@ export declare const anyspendService: {
|
|
|
30
30
|
getOrderAndTransactions: (isMainnet: boolean, orderId: string | undefined) => Promise<GetOrderAndTxsResponse>;
|
|
31
31
|
getOrderHistory: (isMainnet: boolean, creatorAddress: string | undefined, limit?: number, offset?: number) => Promise<GetOrderHistoryResponse>;
|
|
32
32
|
getCoinbaseOnrampOptions: (isMainnet: boolean, country: string, visitorData?: VisitorData) => Promise<GetCoinbaseOnrampOptionsResponse>;
|
|
33
|
-
checkStripeSupport: (isMainnet: boolean,
|
|
33
|
+
checkStripeSupport: (isMainnet: boolean, usdAmount?: string, visitorData?: VisitorData) => Promise<{
|
|
34
34
|
stripeOnramp: boolean;
|
|
35
35
|
stripeWeb2: components["schemas"]["StripeWeb2Support"];
|
|
36
36
|
}>;
|
|
@@ -96,9 +96,8 @@ exports.anyspendService = {
|
|
|
96
96
|
const data = await response.json();
|
|
97
97
|
return data;
|
|
98
98
|
},
|
|
99
|
-
checkStripeSupport: async (isMainnet,
|
|
99
|
+
checkStripeSupport: async (isMainnet, usdAmount, visitorData) => {
|
|
100
100
|
const params = new URLSearchParams({
|
|
101
|
-
ipAddress,
|
|
102
101
|
usdAmount: usdAmount || "",
|
|
103
102
|
});
|
|
104
103
|
const response = await fetch(`${isMainnet ? constants_1.ANYSPEND_MAINNET_BASE_URL : constants_1.ANYSPEND_TESTNET_BASE_URL}/onramp/stripe/supported?${params.toString()}`, {
|
|
@@ -238,12 +238,7 @@ export interface paths {
|
|
|
238
238
|
*/
|
|
239
239
|
get: {
|
|
240
240
|
parameters: {
|
|
241
|
-
query
|
|
242
|
-
/**
|
|
243
|
-
* @description IP address to check location-based support
|
|
244
|
-
* @example 192.168.1.1
|
|
245
|
-
*/
|
|
246
|
-
ipAddress: string;
|
|
241
|
+
query?: {
|
|
247
242
|
/**
|
|
248
243
|
* @description Optional USD amount for transaction limit checks
|
|
249
244
|
* @example 100.00
|
|
@@ -903,11 +898,6 @@ export interface components {
|
|
|
903
898
|
* @example
|
|
904
899
|
*/
|
|
905
900
|
paymentMethod?: string;
|
|
906
|
-
/**
|
|
907
|
-
* @description User's IP address
|
|
908
|
-
* @example 96.225.86.216
|
|
909
|
-
*/
|
|
910
|
-
ipAddress?: string;
|
|
911
901
|
/**
|
|
912
902
|
* @description Redirect URL after payment
|
|
913
903
|
* @example https://www.anyspend.com
|
|
@@ -936,11 +926,6 @@ export interface components {
|
|
|
936
926
|
* @example SG
|
|
937
927
|
*/
|
|
938
928
|
country?: string;
|
|
939
|
-
/**
|
|
940
|
-
* @description User's IP address
|
|
941
|
-
* @example 149.88.23.87
|
|
942
|
-
*/
|
|
943
|
-
ipAddress?: string;
|
|
944
929
|
/**
|
|
945
930
|
* @description URL to redirect after payment
|
|
946
931
|
* @example https://www.anyspend.com
|
|
@@ -6,12 +6,14 @@ export declare const wagmiConfig: import("wagmi").Config<readonly [import("viem"
|
|
|
6
6
|
/**
|
|
7
7
|
* Main B3Provider component
|
|
8
8
|
*/
|
|
9
|
-
export declare function B3Provider({ theme, children, accountOverride, environment, automaticallySetFirstEoa, }: {
|
|
9
|
+
export declare function B3Provider({ isMainnetAnySpend, theme, children, accountOverride, environment, automaticallySetFirstEoa, simDuneApiKey, }: {
|
|
10
|
+
isMainnetAnySpend?: boolean;
|
|
10
11
|
theme: "light" | "dark";
|
|
11
12
|
children: React.ReactNode;
|
|
12
13
|
accountOverride?: Account;
|
|
13
14
|
environment: B3ContextType["environment"];
|
|
14
15
|
automaticallySetFirstEoa?: boolean;
|
|
16
|
+
simDuneApiKey?: string;
|
|
15
17
|
}): import("react/jsx-runtime").JSX.Element;
|
|
16
18
|
/**
|
|
17
19
|
* Inner provider component that provides the actual B3Context
|
|
@@ -32,8 +32,8 @@ const queryClient = new react_query_1.QueryClient();
|
|
|
32
32
|
/**
|
|
33
33
|
* Main B3Provider component
|
|
34
34
|
*/
|
|
35
|
-
function B3Provider({ theme = "light", children, accountOverride, environment, automaticallySetFirstEoa, }) {
|
|
36
|
-
return ((0, jsx_runtime_1.jsx)(wagmi_1.WagmiProvider, { config: exports.wagmiConfig, children: (0, jsx_runtime_1.jsx)(react_query_1.QueryClientProvider, { client: queryClient, children: (0, jsx_runtime_1.jsx)(react_3.ThirdwebProvider, { children: (0, jsx_runtime_1.jsx)(react_1.TooltipProvider, { children: (0, jsx_runtime_1.
|
|
35
|
+
function B3Provider({ isMainnetAnySpend = true, theme = "light", children, accountOverride, environment, automaticallySetFirstEoa, simDuneApiKey, }) {
|
|
36
|
+
return ((0, jsx_runtime_1.jsx)(wagmi_1.WagmiProvider, { config: exports.wagmiConfig, children: (0, jsx_runtime_1.jsx)(react_query_1.QueryClientProvider, { client: queryClient, children: (0, jsx_runtime_1.jsx)(react_3.ThirdwebProvider, { children: (0, jsx_runtime_1.jsx)(react_1.TooltipProvider, { children: (0, jsx_runtime_1.jsx)(InnerProvider, { accountOverride: accountOverride, environment: environment, theme: theme, automaticallySetFirstEoa: !!automaticallySetFirstEoa, children: (0, jsx_runtime_1.jsxs)(react_1.RelayKitProviderWrapper, { isMainnet: isMainnetAnySpend, simDuneApiKey: simDuneApiKey, children: [children, (0, jsx_runtime_1.jsx)(StyleRoot_1.StyleRoot, { id: "b3-root" }), (0, jsx_runtime_1.jsx)(sonner_1.Toaster, { theme: theme })] }) }) }) }) }) }));
|
|
37
37
|
}
|
|
38
38
|
/**
|
|
39
39
|
* Inner provider component that provides the actual B3Context
|
|
@@ -21,7 +21,9 @@ const queryClient = new react_query_1.QueryClient();
|
|
|
21
21
|
/**
|
|
22
22
|
* Main B3Provider component
|
|
23
23
|
*/
|
|
24
|
-
function B3Provider({
|
|
24
|
+
function B3Provider({
|
|
25
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
26
|
+
isMainnetAnySpend = true, theme = "light", children, accountOverride, environment, }) {
|
|
25
27
|
return ((0, jsx_runtime_1.jsx)(react_query_1.QueryClientProvider, { client: queryClient, children: (0, jsx_runtime_1.jsx)(react_2.ThirdwebProvider, { children: (0, jsx_runtime_1.jsx)(InnerProvider, { accountOverride: accountOverride, environment: environment, theme: theme, children: children }) }) }));
|
|
26
28
|
}
|
|
27
29
|
/**
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.AnimatedLottie = exports.TransitionPanel = exports.TooltipTrigger = exports.TooltipProvider = exports.TooltipContent = exports.Tooltip = exports.TextShimmer = exports.TextLoop = exports.TabTrigger = exports.TabsTransitionWrapper = exports.TabsList = exports.TabsContent = exports.Tabs = exports.TabTriggerPrimitive = exports.TabsPrimitive = exports.TabsListPrimitive = exports.TabsContentPrimitive = exports.Skeleton = exports.ShinyButton = exports.ScrollBar = exports.ScrollArea = exports.PopoverTrigger = exports.PopoverContent = exports.Popover = exports.Loading = exports.Input = exports.GlareCardRounded = exports.GlareCard = exports.DrawerTrigger = exports.DrawerTitle = exports.DrawerPortal = exports.DrawerOverlay = exports.DrawerHeader = exports.DrawerFooter = exports.DrawerDescription = exports.DrawerContent = exports.DrawerClose = exports.Drawer = void 0;
|
|
3
|
+
exports.DialogTitle = exports.DialogPortal = exports.DialogOverlay = exports.DialogHeader = exports.DialogFooter = exports.DialogDescription = exports.DialogContent = exports.DialogClose = exports.Dialog = exports.CommandShortcut = exports.CommandSeparator = exports.CommandList = exports.CommandItem = exports.CommandInput = exports.CommandGroup = exports.CommandEmpty = exports.CommandDialog = exports.Command = exports.buttonVariants = exports.Button = exports.badgeVariants = exports.Badge = exports.WalletConnectorIcon = exports.StaggeredFadeLoader = exports.CopyToClipboard = exports.ClientOnly = exports.customButtonVariants = exports.CustomButton = exports.TransakModal = exports.MintButton = exports.AccountAssets = exports.RequestPermissionsButton = exports.RequestPermissions = exports.ManageAccount = exports.isWalletType = exports.getConnectOptionsFromStrategy = exports.LoginStepContainer = exports.SignInWithB3Privy = exports.SignInWithB3Flow = exports.SignInWithB3 = exports.WalletRow = exports.PermissionItem = exports.AuthButton = exports.StyleRoot = exports.useB3 = exports.B3Context = exports.InnerProvider = exports.B3Provider = exports.B3DynamicModal = exports.RelayKitProviderWrapper = void 0;
|
|
4
|
+
exports.AnimatedLottie = exports.TransitionPanel = exports.TooltipTrigger = exports.TooltipProvider = exports.TooltipContent = exports.Tooltip = exports.TextShimmer = exports.TextLoop = exports.TabTrigger = exports.TabsTransitionWrapper = exports.TabsList = exports.TabsContent = exports.Tabs = exports.TabTriggerPrimitive = exports.TabsPrimitive = exports.TabsListPrimitive = exports.TabsContentPrimitive = exports.Skeleton = exports.ShinyButton = exports.ScrollBar = exports.ScrollArea = exports.PopoverTrigger = exports.PopoverContent = exports.Popover = exports.Loading = exports.Input = exports.GlareCardRounded = exports.GlareCard = exports.DrawerTrigger = exports.DrawerTitle = exports.DrawerPortal = exports.DrawerOverlay = exports.DrawerHeader = exports.DrawerFooter = exports.DrawerDescription = exports.DrawerContent = exports.DrawerClose = exports.Drawer = exports.DialogTrigger = void 0;
|
|
5
5
|
// Core Components
|
|
6
|
+
var RelayKitProviderWrapper_1 = require("./B3Provider/RelayKitProviderWrapper");
|
|
7
|
+
Object.defineProperty(exports, "RelayKitProviderWrapper", { enumerable: true, get: function () { return RelayKitProviderWrapper_1.RelayKitProviderWrapper; } });
|
|
6
8
|
var B3DynamicModal_1 = require("./B3DynamicModal");
|
|
7
9
|
Object.defineProperty(exports, "B3DynamicModal", { enumerable: true, get: function () { return B3DynamicModal_1.B3DynamicModal; } });
|
|
8
10
|
var B3Provider_1 = require("./B3Provider/B3Provider");
|
|
@@ -12,7 +12,7 @@ function Loading({ className, size = "md", variant = "white" }) {
|
|
|
12
12
|
}[size];
|
|
13
13
|
const variantClass = {
|
|
14
14
|
primary: "text-b3-react-primary",
|
|
15
|
-
white: "
|
|
15
|
+
white: "opacity-50",
|
|
16
16
|
}[variant];
|
|
17
17
|
return ((0, jsx_runtime_1.jsx)("div", { className: (0, utils_1.cn)("relative", sizeClass, className), children: (0, jsx_runtime_1.jsx)(lucide_react_1.Loader2, { className: (0, utils_1.cn)("animate-spin", sizeClass, variantClass) }) }));
|
|
18
18
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { type Options } from
|
|
2
|
-
import { type UseMutationOptions, type InfiniteData } from
|
|
3
|
-
import type { GetV1WebhooksData, PostV1WebhooksData, PostV1WebhooksError, PostV1WebhooksResponse, DeleteV1WebhooksByWebhookIdData, DeleteV1WebhooksByWebhookIdError, DeleteV1WebhooksByWebhookIdResponse, PatchV1WebhooksByWebhookIdData, PatchV1WebhooksByWebhookIdError, PatchV1WebhooksByWebhookIdResponse, PostV1WebhooksTestData, PostV1WebhooksTestError, PostV1WebhooksTestResponse, GetV1EventsData, GetV1EventsError, GetV1EventsByContractAddressData, GetV1EventsByContractAddressError, GetV1EventsByContractAddressBySignatureData, GetV1EventsByContractAddressBySignatureError, GetV1TransactionsData, GetV1TransactionsError, GetV1TransactionsByContractAddressData, GetV1TransactionsByContractAddressError, GetV1TransactionsByContractAddressBySignatureData, GetV1TransactionsByContractAddressBySignatureError, GetV1TokensTransfersTransactionByTransactionHashData, GetV1TokensTransfersByContractAddressData, GetV1TokensTransfersData, GetV1TokensErc20ByOwnerAddressData, GetV1TokensErc721ByOwnerAddressData, GetV1TokensErc1155ByOwnerAddressData, GetV1TokensPriceSupportedData, GetV1TokensPriceData, GetV1TokensLookupData, GetV1ResolveByInputData, GetV1BlocksData, GetV1BlocksError, GetV1ContractsAbiByContractAddressData, GetV1ContractsMetadataByContractAddressData, PostV1DecodeByContractAddressData, PostV1DecodeByContractAddressError, PostV1DecodeByContractAddressResponse, GetV1NftsBalanceByOwnerAddressData, GetV1NftsCollectionsByContractAddressData, GetV1NftsData, GetV1NftsOwnersByContractAddressData, GetV1NftsOwnersByContractAddressByTokenIdData, GetV1NftsTransfersData, GetV1NftsTransfersTransactionByTransactionHashData, GetV1NftsTransfersByContractAddressData, GetV1NftsByContractAddressData, GetV1NftsTransfersByContractAddressByTokenIdData, GetV1NftsByContractAddressByTokenIdData, GetV1NftsMetadataRefreshByContractAddressData, GetV1NftsMetadataRefreshByContractAddressByTokenIdData, GetV1WalletsByWalletAddressTransactionsData, GetV1WalletsByWalletAddressTransactionsError } from
|
|
1
|
+
import { type Options } from "../sdk.gen";
|
|
2
|
+
import { type UseMutationOptions, type InfiniteData } from "@tanstack/react-query";
|
|
3
|
+
import type { GetV1WebhooksData, PostV1WebhooksData, PostV1WebhooksError, PostV1WebhooksResponse, DeleteV1WebhooksByWebhookIdData, DeleteV1WebhooksByWebhookIdError, DeleteV1WebhooksByWebhookIdResponse, PatchV1WebhooksByWebhookIdData, PatchV1WebhooksByWebhookIdError, PatchV1WebhooksByWebhookIdResponse, PostV1WebhooksTestData, PostV1WebhooksTestError, PostV1WebhooksTestResponse, GetV1EventsData, GetV1EventsError, GetV1EventsByContractAddressData, GetV1EventsByContractAddressError, GetV1EventsByContractAddressBySignatureData, GetV1EventsByContractAddressBySignatureError, GetV1TransactionsData, GetV1TransactionsError, GetV1TransactionsByContractAddressData, GetV1TransactionsByContractAddressError, GetV1TransactionsByContractAddressBySignatureData, GetV1TransactionsByContractAddressBySignatureError, GetV1TokensTransfersTransactionByTransactionHashData, GetV1TokensTransfersByContractAddressData, GetV1TokensTransfersData, GetV1TokensErc20ByOwnerAddressData, GetV1TokensErc721ByOwnerAddressData, GetV1TokensErc1155ByOwnerAddressData, GetV1TokensPriceSupportedData, GetV1TokensPriceData, GetV1TokensLookupData, GetV1ResolveByInputData, GetV1BlocksData, GetV1BlocksError, GetV1ContractsAbiByContractAddressData, GetV1ContractsMetadataByContractAddressData, PostV1DecodeByContractAddressData, PostV1DecodeByContractAddressError, PostV1DecodeByContractAddressResponse, GetV1NftsBalanceByOwnerAddressData, GetV1NftsCollectionsByContractAddressData, GetV1NftsData, GetV1NftsOwnersByContractAddressData, GetV1NftsOwnersByContractAddressByTokenIdData, GetV1NftsTransfersData, GetV1NftsTransfersTransactionByTransactionHashData, GetV1NftsTransfersByContractAddressData, GetV1NftsByContractAddressData, GetV1NftsTransfersByContractAddressByTokenIdData, GetV1NftsByContractAddressByTokenIdData, GetV1NftsMetadataRefreshByContractAddressData, GetV1NftsMetadataRefreshByContractAddressByTokenIdData, GetV1WalletsByWalletAddressTransactionsData, GetV1WalletsByWalletAddressTransactionsError } from "../types.gen";
|
|
4
4
|
export type QueryKey<TOptions extends Options> = [
|
|
5
|
-
Pick<TOptions,
|
|
5
|
+
Pick<TOptions, "baseUrl" | "body" | "headers" | "path" | "query"> & {
|
|
6
6
|
_id: string;
|
|
7
7
|
_infinite?: boolean;
|
|
8
8
|
}
|