|
1 | 1 | # thirdweb
|
2 | 2 |
|
| 3 | +## 5.97.0 |
| 4 | + |
| 5 | +### Minor Changes |
| 6 | + |
| 7 | +- [#6956](https://github.com/thirdweb-dev/js/pull/6956) [`08cff4b`](https://github.com/thirdweb-dev/js/commit/08cff4b6c2f0f7a02c0d4efae386a3bcc79de07b) Thanks [@gregfromstl](https://github.com/gregfromstl)! - feat(bridge): Add chains endpoint to retrieve Universal Bridge supported chains |
| 8 | + |
| 9 | + ```typescript |
| 10 | + import { Bridge } from "thirdweb"; |
| 11 | + |
| 12 | + const chains = await Bridge.chains({ |
| 13 | + client: thirdwebClient, |
| 14 | + }); |
| 15 | + ``` |
| 16 | + |
| 17 | + Returned chains include chain information such as chainId, name, icon, and nativeCurrency details. |
| 18 | + |
| 19 | +### Patch Changes |
| 20 | + |
| 21 | +- [#6953](https://github.com/thirdweb-dev/js/pull/6953) [`736c3f8`](https://github.com/thirdweb-dev/js/commit/736c3f8558330f55fd813fe11ca009c6f1f00f52) Thanks [@gregfromstl](https://github.com/gregfromstl)! - Adds the `maxSteps` 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: |
| 22 | + |
| 23 | + ```ts |
| 24 | + const quote = await bridge.Buy.quote({ |
| 25 | + originChainId: 1, |
| 26 | + originTokenAddress: "0x...", |
| 27 | + destinationChainId: 137, |
| 28 | + destinationTokenAddress: "0x...", |
| 29 | + amount: 1000000n, |
| 30 | + maxSteps: 2, |
| 31 | + }); |
| 32 | + |
| 33 | + const preparedQuote = await bridge.Buy.prepare({ |
| 34 | + originChainId: 1, |
| 35 | + originTokenAddress: "0x...", |
| 36 | + destinationChainId: 137, |
| 37 | + destinationTokenAddress: "0x...", |
| 38 | + amount: 1000000n, |
| 39 | + sender: "0x...", |
| 40 | + receiver: "0x...", |
| 41 | + maxSteps: 2, |
| 42 | + }); |
| 43 | + |
| 44 | + const quote = await bridge.Sell.quote({ |
| 45 | + originChainId: 1, |
| 46 | + originTokenAddress: "0x...", |
| 47 | + destinationChainId: 137, |
| 48 | + destinationTokenAddress: "0x...", |
| 49 | + amount: 1000000n, |
| 50 | + maxSteps: 3, |
| 51 | + }); |
| 52 | + |
| 53 | + const preparedQuote = await bridge.Sell.prepare({ |
| 54 | + originChainId: 1, |
| 55 | + originTokenAddress: "0x...", |
| 56 | + destinationChainId: 137, |
| 57 | + destinationTokenAddress: "0x...", |
| 58 | + amount: 1000000n, |
| 59 | + sender: "0x...", |
| 60 | + receiver: "0x...", |
| 61 | + maxSteps: 3, |
| 62 | + }); |
| 63 | + ``` |
| 64 | + |
| 65 | +- [#6952](https://github.com/thirdweb-dev/js/pull/6952) [`055e451`](https://github.com/thirdweb-dev/js/commit/055e451fd02b0336da23bd1a9994a36f99853831) Thanks [@gregfromstl](https://github.com/gregfromstl)! - +Deprecate legacy Pay functions |
| 66 | + |
| 67 | +- [#6955](https://github.com/thirdweb-dev/js/pull/6955) [`6dd2b09`](https://github.com/thirdweb-dev/js/commit/6dd2b09450e97da8a1a29200ca12ffc0c4d921e3) Thanks [@gregfromstl](https://github.com/gregfromstl)! - Added the `sortBy` option to Bridge.routes |
| 68 | + |
| 69 | + ```ts |
| 70 | + import { Bridge } from "thirdweb"; |
| 71 | + |
| 72 | + const routes = await Bridge.routes({ |
| 73 | + originChainId: 1, |
| 74 | + originTokenAddress: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE", |
| 75 | + limit: 10, |
| 76 | + offset: 0, |
| 77 | + sortBy: "popularity", |
| 78 | + client: thirdwebClient, |
| 79 | + }); |
| 80 | + ``` |
| 81 | + |
| 82 | +- [#6900](https://github.com/thirdweb-dev/js/pull/6900) [`e9d0b6e`](https://github.com/thirdweb-dev/js/commit/e9d0b6e3d282e3fef902e98bf894b00fedc8d5d6) Thanks [@MananTank](https://github.com/MananTank)! - Only attempt autoconnect once |
| 83 | + |
3 | 84 | ## 5.96.8
|
4 | 85 |
|
5 | 86 | ### Patch Changes
|
|
0 commit comments