thirdweb@5.97.0
·
481 commits
to main
since this release
Minor Changes
-
#6956
08cff4b
Thanks @gregfromstl! - feat(bridge): Add chains endpoint to retrieve Universal Bridge supported chainsimport { Bridge } from "thirdweb"; const chains = await Bridge.chains({ client: thirdwebClient, });
Returned chains include chain information such as chainId, name, icon, and nativeCurrency details.
Patch Changes
-
#6953
736c3f8
Thanks @gregfromstl! - Adds themaxSteps
option to Buy.quote, Buy.prepare, Sell.quote, and Sell.prepare functions. This allows users to limit quotes to routes with a specific number of steps or fewer. For example:const quote = await bridge.Buy.quote({ originChainId: 1, originTokenAddress: "0x...", destinationChainId: 137, destinationTokenAddress: "0x...", amount: 1000000n, maxSteps: 2, }); const preparedQuote = await bridge.Buy.prepare({ originChainId: 1, originTokenAddress: "0x...", destinationChainId: 137, destinationTokenAddress: "0x...", amount: 1000000n, sender: "0x...", receiver: "0x...", maxSteps: 2, }); const quote = await bridge.Sell.quote({ originChainId: 1, originTokenAddress: "0x...", destinationChainId: 137, destinationTokenAddress: "0x...", amount: 1000000n, maxSteps: 3, }); const preparedQuote = await bridge.Sell.prepare({ originChainId: 1, originTokenAddress: "0x...", destinationChainId: 137, destinationTokenAddress: "0x...", amount: 1000000n, sender: "0x...", receiver: "0x...", maxSteps: 3, });
-
#6952
055e451
Thanks @gregfromstl! - +Deprecate legacy Pay functions -
#6955
6dd2b09
Thanks @gregfromstl! - Added thesortBy
option to Bridge.routesimport { Bridge } from "thirdweb"; const routes = await Bridge.routes({ originChainId: 1, originTokenAddress: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE", limit: 10, offset: 0, sortBy: "popularity", client: thirdwebClient, });
-
#6900
e9d0b6e
Thanks @MananTank! - Only attempt autoconnect once