thirdweb 5.96.9-nightly-2c6bd620b508ad50535b0ec44916741a8c0a6a26-20250506000341 → 5.97.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/bridge/Buy.js +55 -3
- package/dist/cjs/bridge/Buy.js.map +1 -1
- package/dist/cjs/bridge/Chains.js +65 -0
- package/dist/cjs/bridge/Chains.js.map +1 -0
- package/dist/cjs/bridge/Routes.js +20 -1
- package/dist/cjs/bridge/Routes.js.map +1 -1
- package/dist/cjs/bridge/Sell.js +55 -3
- package/dist/cjs/bridge/Sell.js.map +1 -1
- package/dist/cjs/bridge/index.js +3 -1
- package/dist/cjs/bridge/index.js.map +1 -1
- package/dist/cjs/bridge/types/Chain.js +3 -0
- package/dist/cjs/bridge/types/Chain.js.map +1 -0
- package/dist/cjs/pay/buyWithCrypto/getHistory.js +1 -0
- package/dist/cjs/pay/buyWithCrypto/getHistory.js.map +1 -1
- package/dist/cjs/pay/buyWithCrypto/getQuote.js +1 -0
- package/dist/cjs/pay/buyWithCrypto/getQuote.js.map +1 -1
- package/dist/cjs/pay/buyWithCrypto/getStatus.js +1 -0
- package/dist/cjs/pay/buyWithCrypto/getStatus.js.map +1 -1
- package/dist/cjs/pay/buyWithCrypto/getTransfer.js +1 -0
- package/dist/cjs/pay/buyWithCrypto/getTransfer.js.map +1 -1
- package/dist/cjs/pay/buyWithFiat/getHistory.js +1 -0
- package/dist/cjs/pay/buyWithFiat/getHistory.js.map +1 -1
- package/dist/cjs/pay/buyWithFiat/getPostOnRampQuote.js +1 -0
- package/dist/cjs/pay/buyWithFiat/getPostOnRampQuote.js.map +1 -1
- package/dist/cjs/pay/buyWithFiat/getQuote.js.map +1 -1
- package/dist/cjs/pay/buyWithFiat/getStatus.js +1 -0
- package/dist/cjs/pay/buyWithFiat/getStatus.js.map +1 -1
- package/dist/cjs/pay/buyWithFiat/isSwapRequiredPostOnramp.js +1 -0
- package/dist/cjs/pay/buyWithFiat/isSwapRequiredPostOnramp.js.map +1 -1
- package/dist/cjs/react/core/hooks/pay/useBuyWithCryptoHistory.js +1 -0
- package/dist/cjs/react/core/hooks/pay/useBuyWithCryptoHistory.js.map +1 -1
- package/dist/cjs/react/core/hooks/pay/useBuyWithCryptoQuote.js +1 -0
- package/dist/cjs/react/core/hooks/pay/useBuyWithCryptoQuote.js.map +1 -1
- package/dist/cjs/react/core/hooks/pay/useBuyWithCryptoStatus.js +1 -0
- package/dist/cjs/react/core/hooks/pay/useBuyWithCryptoStatus.js.map +1 -1
- package/dist/cjs/react/core/hooks/pay/useBuyWithFiatHistory.js +1 -0
- package/dist/cjs/react/core/hooks/pay/useBuyWithFiatHistory.js.map +1 -1
- package/dist/cjs/react/core/hooks/pay/useBuyWithFiatQuote.js +1 -0
- package/dist/cjs/react/core/hooks/pay/useBuyWithFiatQuote.js.map +1 -1
- package/dist/cjs/react/core/hooks/pay/useBuyWithFiatStatus.js +1 -0
- package/dist/cjs/react/core/hooks/pay/useBuyWithFiatStatus.js.map +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/version.js.map +1 -1
- package/dist/esm/bridge/Buy.js +55 -3
- package/dist/esm/bridge/Buy.js.map +1 -1
- package/dist/esm/bridge/Chains.js +62 -0
- package/dist/esm/bridge/Chains.js.map +1 -0
- package/dist/esm/bridge/Routes.js +20 -1
- package/dist/esm/bridge/Routes.js.map +1 -1
- package/dist/esm/bridge/Sell.js +55 -3
- package/dist/esm/bridge/Sell.js.map +1 -1
- package/dist/esm/bridge/index.js +1 -0
- package/dist/esm/bridge/index.js.map +1 -1
- package/dist/esm/bridge/types/Chain.js +2 -0
- package/dist/esm/bridge/types/Chain.js.map +1 -0
- package/dist/esm/pay/buyWithCrypto/getHistory.js +1 -0
- package/dist/esm/pay/buyWithCrypto/getHistory.js.map +1 -1
- package/dist/esm/pay/buyWithCrypto/getQuote.js +1 -0
- package/dist/esm/pay/buyWithCrypto/getQuote.js.map +1 -1
- package/dist/esm/pay/buyWithCrypto/getStatus.js +1 -0
- package/dist/esm/pay/buyWithCrypto/getStatus.js.map +1 -1
- package/dist/esm/pay/buyWithCrypto/getTransfer.js +1 -0
- package/dist/esm/pay/buyWithCrypto/getTransfer.js.map +1 -1
- package/dist/esm/pay/buyWithFiat/getHistory.js +1 -0
- package/dist/esm/pay/buyWithFiat/getHistory.js.map +1 -1
- package/dist/esm/pay/buyWithFiat/getPostOnRampQuote.js +1 -0
- package/dist/esm/pay/buyWithFiat/getPostOnRampQuote.js.map +1 -1
- package/dist/esm/pay/buyWithFiat/getQuote.js.map +1 -1
- package/dist/esm/pay/buyWithFiat/getStatus.js +1 -0
- package/dist/esm/pay/buyWithFiat/getStatus.js.map +1 -1
- package/dist/esm/pay/buyWithFiat/isSwapRequiredPostOnramp.js +1 -0
- package/dist/esm/pay/buyWithFiat/isSwapRequiredPostOnramp.js.map +1 -1
- package/dist/esm/react/core/hooks/pay/useBuyWithCryptoHistory.js +1 -0
- package/dist/esm/react/core/hooks/pay/useBuyWithCryptoHistory.js.map +1 -1
- package/dist/esm/react/core/hooks/pay/useBuyWithCryptoQuote.js +1 -0
- package/dist/esm/react/core/hooks/pay/useBuyWithCryptoQuote.js.map +1 -1
- package/dist/esm/react/core/hooks/pay/useBuyWithCryptoStatus.js +1 -0
- package/dist/esm/react/core/hooks/pay/useBuyWithCryptoStatus.js.map +1 -1
- package/dist/esm/react/core/hooks/pay/useBuyWithFiatHistory.js +1 -0
- package/dist/esm/react/core/hooks/pay/useBuyWithFiatHistory.js.map +1 -1
- package/dist/esm/react/core/hooks/pay/useBuyWithFiatQuote.js +1 -0
- package/dist/esm/react/core/hooks/pay/useBuyWithFiatQuote.js.map +1 -1
- package/dist/esm/react/core/hooks/pay/useBuyWithFiatStatus.js +1 -0
- package/dist/esm/react/core/hooks/pay/useBuyWithFiatStatus.js.map +1 -1
- package/dist/esm/version.js +1 -1
- package/dist/esm/version.js.map +1 -1
- package/dist/types/bridge/Buy.d.ts +49 -0
- package/dist/types/bridge/Buy.d.ts.map +1 -1
- package/dist/types/bridge/Chains.d.ts +57 -0
- package/dist/types/bridge/Chains.d.ts.map +1 -0
- package/dist/types/bridge/Routes.d.ts +17 -0
- package/dist/types/bridge/Routes.d.ts.map +1 -1
- package/dist/types/bridge/Sell.d.ts +49 -0
- package/dist/types/bridge/Sell.d.ts.map +1 -1
- package/dist/types/bridge/index.d.ts +2 -0
- package/dist/types/bridge/index.d.ts.map +1 -1
- package/dist/types/bridge/types/Chain.d.ts +36 -0
- package/dist/types/bridge/types/Chain.d.ts.map +1 -0
- package/dist/types/pay/buyWithCrypto/getHistory.d.ts +1 -0
- package/dist/types/pay/buyWithCrypto/getHistory.d.ts.map +1 -1
- package/dist/types/pay/buyWithCrypto/getQuote.d.ts +1 -0
- package/dist/types/pay/buyWithCrypto/getQuote.d.ts.map +1 -1
- package/dist/types/pay/buyWithCrypto/getStatus.d.ts +1 -0
- package/dist/types/pay/buyWithCrypto/getStatus.d.ts.map +1 -1
- package/dist/types/pay/buyWithCrypto/getTransfer.d.ts +1 -0
- package/dist/types/pay/buyWithCrypto/getTransfer.d.ts.map +1 -1
- package/dist/types/pay/buyWithFiat/getHistory.d.ts +2 -0
- package/dist/types/pay/buyWithFiat/getHistory.d.ts.map +1 -1
- package/dist/types/pay/buyWithFiat/getPostOnRampQuote.d.ts +1 -0
- package/dist/types/pay/buyWithFiat/getPostOnRampQuote.d.ts.map +1 -1
- package/dist/types/pay/buyWithFiat/getQuote.d.ts +2 -0
- package/dist/types/pay/buyWithFiat/getQuote.d.ts.map +1 -1
- package/dist/types/pay/buyWithFiat/getStatus.d.ts +2 -0
- package/dist/types/pay/buyWithFiat/getStatus.d.ts.map +1 -1
- package/dist/types/pay/buyWithFiat/isSwapRequiredPostOnramp.d.ts +1 -0
- package/dist/types/pay/buyWithFiat/isSwapRequiredPostOnramp.d.ts.map +1 -1
- package/dist/types/react/core/hooks/pay/useBuyWithCryptoHistory.d.ts +1 -0
- package/dist/types/react/core/hooks/pay/useBuyWithCryptoHistory.d.ts.map +1 -1
- package/dist/types/react/core/hooks/pay/useBuyWithCryptoQuote.d.ts +1 -0
- package/dist/types/react/core/hooks/pay/useBuyWithCryptoQuote.d.ts.map +1 -1
- package/dist/types/react/core/hooks/pay/useBuyWithCryptoStatus.d.ts +1 -0
- package/dist/types/react/core/hooks/pay/useBuyWithCryptoStatus.d.ts.map +1 -1
- package/dist/types/react/core/hooks/pay/useBuyWithFiatHistory.d.ts +1 -0
- package/dist/types/react/core/hooks/pay/useBuyWithFiatHistory.d.ts.map +1 -1
- package/dist/types/react/core/hooks/pay/useBuyWithFiatQuote.d.ts +1 -0
- package/dist/types/react/core/hooks/pay/useBuyWithFiatQuote.d.ts.map +1 -1
- package/dist/types/react/core/hooks/pay/useBuyWithFiatStatus.d.ts +1 -0
- package/dist/types/react/core/hooks/pay/useBuyWithFiatStatus.d.ts.map +1 -1
- package/dist/types/version.d.ts +1 -1
- package/dist/types/version.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/bridge/Buy.test.ts +36 -0
- package/src/bridge/Buy.ts +57 -1
- package/src/bridge/Chains.test.ts +28 -0
- package/src/bridge/Chains.ts +75 -0
- package/src/bridge/Routes.ts +21 -0
- package/src/bridge/Sell.test.ts +36 -0
- package/src/bridge/Sell.ts +57 -1
- package/src/bridge/index.ts +2 -0
- package/src/bridge/types/Chain.ts +40 -0
- package/src/pay/buyWithCrypto/getHistory.ts +1 -0
- package/src/pay/buyWithCrypto/getQuote.ts +1 -0
- package/src/pay/buyWithCrypto/getStatus.ts +1 -0
- package/src/pay/buyWithCrypto/getTransfer.ts +1 -0
- package/src/pay/buyWithFiat/getHistory.ts +2 -0
- package/src/pay/buyWithFiat/getPostOnRampQuote.ts +1 -0
- package/src/pay/buyWithFiat/getQuote.ts +2 -0
- package/src/pay/buyWithFiat/getStatus.ts +2 -0
- package/src/pay/buyWithFiat/isSwapRequiredPostOnramp.ts +1 -0
- package/src/react/core/hooks/pay/useBuyWithCryptoHistory.ts +1 -0
- package/src/react/core/hooks/pay/useBuyWithCryptoQuote.ts +1 -0
- package/src/react/core/hooks/pay/useBuyWithCryptoStatus.ts +1 -0
- package/src/react/core/hooks/pay/useBuyWithFiatHistory.ts +1 -0
- package/src/react/core/hooks/pay/useBuyWithFiatQuote.ts +1 -0
- package/src/react/core/hooks/pay/useBuyWithFiatStatus.ts +1 -0
- package/src/version.ts +1 -1
package/src/bridge/Sell.ts
CHANGED
@@ -2,6 +2,7 @@ import type { Address as ox__Address } from "ox";
|
|
2
2
|
import { defineChain } from "../chains/utils.js";
|
3
3
|
import type { ThirdwebClient } from "../client/client.js";
|
4
4
|
import { getClientFetch } from "../utils/fetch.js";
|
5
|
+
import { stringify } from "../utils/json.js";
|
5
6
|
import { UNIVERSAL_BRIDGE_URL } from "./constants.js";
|
6
7
|
import type { PreparedQuote, Quote } from "./types/Quote.js";
|
7
8
|
|
@@ -70,12 +71,27 @@ import type { PreparedQuote, Quote } from "./types/Quote.js";
|
|
70
71
|
*
|
71
72
|
* You can access this functions input and output types with `Sell.quote.Options` and `Sell.quote.Result`, respectively.
|
72
73
|
*
|
74
|
+
* To limit quotes to routes that have a certain number of steps involved, use the `maxSteps` option.
|
75
|
+
*
|
76
|
+
* ```ts
|
77
|
+
* const quote = await Bridge.Sell.quote({
|
78
|
+
* originChainId: 1,
|
79
|
+
* originTokenAddress: NATIVE_TOKEN_ADDRESS,
|
80
|
+
* destinationChainId: 10,
|
81
|
+
* destinationTokenAddress: NATIVE_TOKEN_ADDRESS,
|
82
|
+
* amount: toWei("0.01"),
|
83
|
+
* maxSteps: 2, // Will only return a quote for routes with 2 or fewer steps
|
84
|
+
* client: thirdwebClient,
|
85
|
+
* });
|
86
|
+
* ```
|
87
|
+
*
|
73
88
|
* @param options - The options for the quote.
|
74
89
|
* @param options.originChainId - The chain ID of the origin token.
|
75
90
|
* @param options.originTokenAddress - The address of the origin token.
|
76
91
|
* @param options.destinationChainId - The chain ID of the destination token.
|
77
92
|
* @param options.destinationTokenAddress - The address of the destination token.
|
78
93
|
* @param options.amount - The amount of the origin token to sell.
|
94
|
+
* @param [options.maxSteps] - Limit the number of total steps in the route.
|
79
95
|
* @param options.client - Your thirdweb client.
|
80
96
|
*
|
81
97
|
* @returns A promise that resolves to a non-finalized quote for the requested sell.
|
@@ -92,6 +108,7 @@ export async function quote(options: quote.Options): Promise<quote.Result> {
|
|
92
108
|
destinationTokenAddress,
|
93
109
|
amount,
|
94
110
|
client,
|
111
|
+
maxSteps,
|
95
112
|
} = options;
|
96
113
|
|
97
114
|
const clientFetch = getClientFetch(client);
|
@@ -101,6 +118,9 @@ export async function quote(options: quote.Options): Promise<quote.Result> {
|
|
101
118
|
url.searchParams.set("destinationChainId", destinationChainId.toString());
|
102
119
|
url.searchParams.set("destinationTokenAddress", destinationTokenAddress);
|
103
120
|
url.searchParams.set("sellAmountWei", amount.toString());
|
121
|
+
if (typeof maxSteps !== "undefined") {
|
122
|
+
url.searchParams.set("maxSteps", maxSteps.toString());
|
123
|
+
}
|
104
124
|
|
105
125
|
const response = await clientFetch(url.toString());
|
106
126
|
if (!response.ok) {
|
@@ -136,6 +156,7 @@ export declare namespace quote {
|
|
136
156
|
destinationTokenAddress: ox__Address.Address;
|
137
157
|
amount: bigint;
|
138
158
|
client: ThirdwebClient;
|
159
|
+
maxSteps?: number;
|
139
160
|
};
|
140
161
|
|
141
162
|
type Result = Quote & {
|
@@ -238,6 +259,37 @@ export declare namespace quote {
|
|
238
259
|
*
|
239
260
|
* You can access this functions input and output types with `Sell.prepare.Options` and `Sell.prepare.Result`, respectively.
|
240
261
|
*
|
262
|
+
* You can include arbitrary data to be included on any webhooks and status responses with the `purchaseData` option.
|
263
|
+
*
|
264
|
+
* ```ts
|
265
|
+
* const quote = await Bridge.Sell.prepare({
|
266
|
+
* originChainId: 1,
|
267
|
+
* originTokenAddress: NATIVE_TOKEN_ADDRESS,
|
268
|
+
* destinationChainId: 10,
|
269
|
+
* destinationTokenAddress: NATIVE_TOKEN_ADDRESS,
|
270
|
+
* amount: toWei("0.01"),
|
271
|
+
* purchaseData: {
|
272
|
+
* size: "large",
|
273
|
+
* shippingAddress: "123 Main St, New York, NY 10001",
|
274
|
+
* },
|
275
|
+
* client: thirdwebClient,
|
276
|
+
* });
|
277
|
+
* ```
|
278
|
+
*
|
279
|
+
* To limit quotes to routes that have a certain number of steps involved, use the `maxSteps` option.
|
280
|
+
*
|
281
|
+
* ```ts
|
282
|
+
* const quote = await Bridge.Sell.prepare({
|
283
|
+
* originChainId: 1,
|
284
|
+
* originTokenAddress: NATIVE_TOKEN_ADDRESS,
|
285
|
+
* destinationChainId: 10,
|
286
|
+
* destinationTokenAddress: NATIVE_TOKEN_ADDRESS,
|
287
|
+
* amount: toWei("0.01"),
|
288
|
+
* maxSteps: 2, // Will only return a quote for routes with 2 or fewer steps
|
289
|
+
* client: thirdwebClient,
|
290
|
+
* });
|
291
|
+
* ```
|
292
|
+
*
|
241
293
|
* @param options - The options for the quote.
|
242
294
|
* @param options.originChainId - The chain ID of the origin token.
|
243
295
|
* @param options.originTokenAddress - The address of the origin token.
|
@@ -247,6 +299,7 @@ export declare namespace quote {
|
|
247
299
|
* @param options.sender - The address of the sender.
|
248
300
|
* @param options.receiver - The address of the recipient.
|
249
301
|
* @param options.purchaseData - Arbitrary data to be passed to the purchase function and included with any webhooks or status calls.
|
302
|
+
* @param [options.maxSteps] - Limit the number of total steps in the route.
|
250
303
|
* @param options.client - Your thirdweb client.
|
251
304
|
*
|
252
305
|
* @returns A promise that resolves to a finalized quote and transactions for the requested sell.
|
@@ -268,6 +321,7 @@ export async function prepare(
|
|
268
321
|
receiver,
|
269
322
|
client,
|
270
323
|
purchaseData,
|
324
|
+
maxSteps,
|
271
325
|
} = options;
|
272
326
|
|
273
327
|
const clientFetch = getClientFetch(client);
|
@@ -278,7 +332,7 @@ export async function prepare(
|
|
278
332
|
headers: {
|
279
333
|
"Content-Type": "application/json",
|
280
334
|
},
|
281
|
-
body:
|
335
|
+
body: stringify({
|
282
336
|
sellAmountWei: amount.toString(),
|
283
337
|
originChainId: originChainId.toString(),
|
284
338
|
originTokenAddress,
|
@@ -287,6 +341,7 @@ export async function prepare(
|
|
287
341
|
sender,
|
288
342
|
receiver,
|
289
343
|
purchaseData,
|
344
|
+
maxSteps,
|
290
345
|
}),
|
291
346
|
});
|
292
347
|
if (!response.ok) {
|
@@ -335,6 +390,7 @@ export declare namespace prepare {
|
|
335
390
|
receiver: ox__Address.Address;
|
336
391
|
client: ThirdwebClient;
|
337
392
|
purchaseData?: unknown;
|
393
|
+
maxSteps?: number;
|
338
394
|
};
|
339
395
|
|
340
396
|
type Result = PreparedQuote & {
|
package/src/bridge/index.ts
CHANGED
@@ -2,7 +2,9 @@ export * as Buy from "./Buy.js";
|
|
2
2
|
export * as Sell from "./Sell.js";
|
3
3
|
export { status } from "./Status.js";
|
4
4
|
export { routes } from "./Routes.js";
|
5
|
+
export { chains } from "./Chains.js";
|
5
6
|
|
6
7
|
export type { Status } from "./types/Status.js";
|
7
8
|
export type { Route } from "./types/Route.js";
|
8
9
|
export type { Quote, PreparedQuote } from "./types/Quote.js";
|
10
|
+
export type { Chain } from "./types/Chain.js";
|
@@ -0,0 +1,40 @@
|
|
1
|
+
/**
|
2
|
+
* Represents a blockchain chain in the Universal Bridge.
|
3
|
+
* @public
|
4
|
+
*/
|
5
|
+
export interface Chain {
|
6
|
+
/**
|
7
|
+
* The chain ID of the chain.
|
8
|
+
*/
|
9
|
+
chainId: number;
|
10
|
+
|
11
|
+
/**
|
12
|
+
* The name of the chain.
|
13
|
+
*/
|
14
|
+
name: string;
|
15
|
+
|
16
|
+
/**
|
17
|
+
* The URL of the chain's icon.
|
18
|
+
*/
|
19
|
+
icon: string;
|
20
|
+
|
21
|
+
/**
|
22
|
+
* Information about the native currency of the chain.
|
23
|
+
*/
|
24
|
+
nativeCurrency: {
|
25
|
+
/**
|
26
|
+
* The name of the native currency.
|
27
|
+
*/
|
28
|
+
name: string;
|
29
|
+
|
30
|
+
/**
|
31
|
+
* The symbol of the native currency.
|
32
|
+
*/
|
33
|
+
symbol: string;
|
34
|
+
|
35
|
+
/**
|
36
|
+
* The number of decimals used by the native currency.
|
37
|
+
*/
|
38
|
+
decimals: number;
|
39
|
+
};
|
40
|
+
}
|
@@ -61,6 +61,7 @@ export type BuyWithCryptoHistoryData = {
|
|
61
61
|
* const status = await getBuyWithCryptoHistory(params)
|
62
62
|
* ```
|
63
63
|
* @returns Object of type [`BuyWithCryptoHistoryData`](https://portal.thirdweb.com/references/typescript/v5/BuyWithCryptoHistoryData)
|
64
|
+
* @deprecated
|
64
65
|
* @buyCrypto
|
65
66
|
*/
|
66
67
|
export async function getBuyWithCryptoHistory(
|
@@ -123,6 +123,7 @@ export type ValidBuyWithCryptoStatus = Exclude<
|
|
123
123
|
* }});
|
124
124
|
* ```
|
125
125
|
* @returns Object of type [`BuyWithCryptoStatus`](https://portal.thirdweb.com/references/typescript/v5/BuyWithCryptoStatus)
|
126
|
+
* @deprecated
|
126
127
|
* @buyCrypto
|
127
128
|
*/
|
128
129
|
export async function getBuyWithCryptoStatus(
|
@@ -5,6 +5,7 @@ import type { BuyWithFiatStatus } from "./getStatus.js";
|
|
5
5
|
|
6
6
|
/**
|
7
7
|
* The parameters for [`getBuyWithFiatHistory`](https://portal.thirdweb.com/references/typescript/v5/getBuyWithFiatHistory) function
|
8
|
+
* @deprecated
|
8
9
|
* @buyCrypto
|
9
10
|
*/
|
10
11
|
export type BuyWithFiatHistoryParams = {
|
@@ -60,6 +61,7 @@ export type BuyWithFiatHistoryData = {
|
|
60
61
|
* })
|
61
62
|
* ```
|
62
63
|
* @returns Object of type [`BuyWithFiatHistoryData`](https://portal.thirdweb.com/references/typescript/v5/BuyWithFiatHistoryData)
|
64
|
+
* @deprecated
|
63
65
|
* @buyCrypto
|
64
66
|
*/
|
65
67
|
export async function getBuyWithFiatHistory(
|
@@ -6,6 +6,7 @@ import type { FiatProvider, PayTokenInfo } from "../utils/commonTypes.js";
|
|
6
6
|
import { getPayBuyWithFiatQuoteEndpoint } from "../utils/definitions.js";
|
7
7
|
/**
|
8
8
|
* Parameters for [`getBuyWithFiatQuote`](https://portal.thirdweb.com/references/typescript/v5/getBuyWithFiatQuote) function
|
9
|
+
* @deprecated
|
9
10
|
* @buyCrypto
|
10
11
|
*/
|
11
12
|
export type GetBuyWithFiatQuoteParams = {
|
@@ -102,6 +103,7 @@ export type GetBuyWithFiatQuoteParams = {
|
|
102
103
|
* - The on-ramp and destination token information.
|
103
104
|
* - Processing fees
|
104
105
|
*
|
106
|
+
* @deprecated
|
105
107
|
* @buyCrypto
|
106
108
|
*/
|
107
109
|
export type BuyWithFiatQuote = {
|
@@ -8,6 +8,7 @@ import { getPayBuyWithFiatStatusEndpoint } from "../utils/definitions.js";
|
|
8
8
|
|
9
9
|
/**
|
10
10
|
* Parameters for the [`getBuyWithFiatStatus`](https://portal.thirdweb.com/references/typescript/v5/getBuyWithFiatStatus) function
|
11
|
+
* @deprecated
|
11
12
|
* @buyCrypto
|
12
13
|
*/
|
13
14
|
export type GetBuyWithFiatStatusParams = {
|
@@ -172,6 +173,7 @@ export type BuyWithFiatStatus =
|
|
172
173
|
* // when the fiatStatus.status is "ON_RAMP_TRANSFER_COMPLETED" - the process is complete
|
173
174
|
* // when the fiatStatus.status is "CRYPTO_SWAP_REQUIRED" - start the swap process
|
174
175
|
* ```
|
176
|
+
* @deprecated
|
175
177
|
* @buyCrypto
|
176
178
|
*/
|
177
179
|
export async function getBuyWithFiatStatus(
|
@@ -12,6 +12,7 @@ import type { BuyWithFiatQuote } from "./getQuote.js";
|
|
12
12
|
*
|
13
13
|
* @param buyWithFiatQuote - The quote of type [`BuyWithFiatQuote`](https://portal.thirdweb.com/references/typescript/v5/BuyWithFiatQuote) returned
|
14
14
|
* by the [`getBuyWithFiatQuote`](https://portal.thirdweb.com/references/typescript/v5/getBuyWithFiatQuote) function.
|
15
|
+
* @deprecated
|
15
16
|
* @buyCrypto
|
16
17
|
*/
|
17
18
|
export function isSwapRequiredPostOnramp(
|
package/src/version.ts
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export const version = "5.
|
1
|
+
export const version = "5.97.0";
|