Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: GitHub Action <[email protected]>
46 KiB
thirdweb
5.19.1
Patch Changes
- #3005
0006e54Thanks @joaquim-verges! - - useSendTransaction now switches chain if needed- Fix chain switching with in-app smart accounts
- Fix tx simulation for pay modal
5.19.0
Minor Changes
-
#2995
523cd1eThanks @gregfromstl! - Adds shortenAddress util -
#2997
cf7b6fcThanks @joaquim-verges! - addedcreateWalletAdapterhelper for interop with diff libraries
Patch Changes
- #3000
0ab1407Thanks @MananTank! - Fix WalletImage fallback icon
5.18.1
Patch Changes
5.18.0
Minor Changes
-
#2985
55081d8Thanks @jnsdls! - ### "Credit Card" payment method added in thirdweb Pay for Fiat on-rampPayEmbedcomponent added to embed thirdweb Pay UI<PayEmbed client={client} style={{ width: "360px", }} />thirdweb Pay UI customization available in
PayEmbedandConnectButtonpayOptionsprop inPayEmbedandConnectButton > detailsModalallows you custimize :- Enable/Disable payment methods
- Set default amount for Buy token
- Set Buy token/chain to be selected by default
- Set Source token/chain to be selected by default for Crypto payment method
- Disable editing for Buy token/chain/amount and Source token/chain
<ConnectButton client={client} detailsModal={{ payOptions: yourOptions, }} /> <PayEmbed client={client} detailsModal={{ payOptions: yourOptions, }} />Fiat on-ramp functions and hooks added
getBuyWithFiatQuote,useBuyWithFiatQuoteto get a quote for buying crypto with fiat currencygetBuyWithFiatStatus,useBuyWithFiatStatusto get status of "Buy with fiat" transactiongetBuyWithFiatHistory,useBuyWithFiatHistoryto get "Buy with fiat" transaction historygetPostOnRampQuote,usePostOnRampQuoteto get quote for swapping on-ramp token to destination token after doing on-ramp- Add
getBuyHistoryanduseBuyHistoryto get both "Buy with Fiat" and "Buy with Crypto" transaction history in a single list
5.17.0
Minor Changes
-
#2931
24c1670Thanks @joaquim-verges! - NewsmartAccountprop forinAppWallet()You can now convert an inAppWallet to a smart account simply by passing the
smartAccountprop.const wallet = inAppWallet({ smartAccount: { chain: sepolia, sponsorGas: true, }, }); await wallet.connect({ client, strategy: "google", });Note: beware that when toggling this flag on and off, you will get a different address (admin EOA vs smart account).
Patch Changes
-
#2959
3377fc9Thanks @MananTank! - Fix custom details button not opening the details modal inConnectButton -
#2955
fd1bd7eThanks @kien-ngo! - Add resolve method for Arweave URIs -
#2950
d4808fdThanks @gregfromstl! - Export getUserPhoneNumber and getAuthenticatedUser in-app wallet functions -
#2972
b1ca05eThanks @gregfromstl! - Fix issue with nonce set to 0 on toSerializableTransaction -
#2966
4de8802Thanks @gregfromstl! - Fixes issue with contract compilation in hardhat -
#2962
5b6b241Thanks @gregfromstl! - Makes multiple bugfixes on the deployPublishedContract code path- Contracts with no constructor can now deploy as abi inputs defaults to
[]when encoding the parameters - Properly finds contract versions when specified
- Defaults to standard deployment if no deployType is specified
- Contracts with no constructor can now deploy as abi inputs defaults to
-
#2965
ae10776Thanks @kien-ngo! - Add Arweave URI support to -
#2969
d660b6cThanks @gregfromstl! - Fixes deterministic deploys of contracts with no constructor -
#2958
02a0ca9Thanks @gregfromstl! - Fixes inconsistent block numbers when fetching events.getContractEventswill now properly handleblockRangeinteraction withfromBlockandtoBlockgiven they are both inclusive (i.e. it will only return logs for the number of blocks specified inblockRange).
5.16.1
Patch Changes
-
#2936
a692154Thanks @MananTank! - Fix OTP input entered by by clicking on “from messages” option in iOS safari -
#2934
bdb919fThanks @gregfromstl! - Updates the CLIcreatecommand to use the v5 templates for Next.js and ViteOther templates will be updated in the future from within their existing repositories
Removes React Native starters from the CLI menu Removes JS template support from the CLI
-
#2941
795a59eThanks @gregfromstl! - Can now optionally specifyblockRangeongetContractEventsin combination withtoBlockandfromBlock.Usage
Specify a
blockRange, defaultingtoBlockto the current block number.await getContractEvents({ contract: myContract, blockRange: 123456n, events: [preparedEvent, preparedEvent2], });Specify a block range with
toBlock.await getContractEvents({ contract: myContract, toBlock: endBlock, blockRange: 123456n, events: [preparedEvent, preparedEvent2], });Specify a block range starting from
fromBlock(great for pagination).await getContractEvents({ contract: myContract, fromBlock: lastBlockFetched, blockRange: 123456n, events: [preparedEvent, preparedEvent2], }); -
#2945
b64c8e7Thanks @gregfromstl! - Removes deprecated template options from the CLI, specifically PWA Vite, Express, and React -
#2951
49d4494Thanks @gregfromstl! - Increase gas on MarketplaceV3 writes -
#2948
44680c6Thanks @gregfromstl! - Adds extraGas override to transactions. Useful when gas estimates are faulty or to ensure a transaction goes through.Usage
const transaction = prepareTransaction({ to: "0x1234567890123456789012345678901234567890", chain: ethereum, client: thirdwebClient, value: toWei("1.0"), gasPrice: 30n, extraGas: 50_000n, }); -
#2932
86105c9Thanks @gregfromstl! - TransactionButton throws error on reverted transaction -
#2946
ec149f3Thanks @gregfromstl! - Read RPC url from viem chain in viem chain adapter -
#2928
cea736cThanks @gregfromstl! - Filters invalid listings and auctions from marketplace -
#2949
0e19911Thanks @kien-ngo! - Docs update: fix typos and add code snippet -
#2944
82e8911Thanks @joaquim-verges! - Show auth provider icon in connect UI when connected to in app wallet -
#2933
8e0a3ceThanks @MananTank! - ### Integrate Pay Modal with TransactionButtonBy default, the Pay Modal is integrated with the
TransactionButtoncomponent. If the user performs a transaction and does not have enough funds to execute it and if thirdweb pay is available for that blockchain, the Pay Modal will be displayed to allow user to buy the required amount of tokensA new prop
payModalis added to theTransactionButtoncomponent customize the Pay Modal UI or disable it entirelyExample: Disable Pay Modal
<TransactionButton payModal={false}> Example 1 </TransactionButton>Example: Customize Pay Modal UI
<TransactionButton payModal={{ theme: "light", }} > Example 2 </TransactionButton>Disable Pay Modal for certain configurations in
useSendTransactionhookIf
useSendTransactionhook is passedgasless: trueconfiguration or if current active wallet is a smart wallet withsponsorGas: trueconfiguration - the Pay Modal will be disabled -
#2929
9f817cfThanks @joaquim-verges! - Tweaked connected modal UI layout
5.16.0
Minor Changes
-
#2917
5b0c37aThanks @joaquim-verges! - Factory address is now optional inaccountAbstractionandsmartWalletoptions.- Defaults to a global permissionless factory deployed on all chains.
- Also enables switching chains for smart wallets, as long as the factory is deployed
-
#2915
664082eThanks @joaquim-verges! - NewprepareDeterministicDeployTransactionextension for deploying published contracts with the same address on multiple chains -
#2921
d77b6f6Thanks @gregfromstl! - Adds the 'use client' directive to all client-only components -
#2919
47de345Thanks @jnsdls! - Add support for several additional wallets
Patch Changes
-
#2914
24a3ee4Thanks @joaquim-verges! - Fix legacy transactions with in-app wallets -
#2913
5525a0eThanks @gregfromstl! - Filter invalid auctions in getAllAuctions -
#2911
35acbcdThanks @gregfromstl! - Updates mintWithSignature return types to properly parse
5.15.0
Minor Changes
-
#2875
7882b22Thanks @joaquim-verges! - Support for Coinbase Smart Wallet -
#2898
88886acThanks @gregfromstl! - Adds overrides to extension functions
Patch Changes
-
#2906
75e66b1Thanks @joaquim-verges! - Fix signTypedData external verification for smart accounts -
#2897
f916d7aThanks @gregfromstl! - Fixes TransactionButton loading state layout shift -
#2905
9a031bbThanks @joaquim-verges! - Bump timeout for userOps receipts to 2mins -
#2899
e6fce1fThanks @gregfromstl! - Fixes useContractEvents duplicating events
5.14.0
Minor Changes
- #2869
fa4bd43Thanks @gregfromstl! - Adds the disabled prop to TransactionButton component
Patch Changes
-
#2881
7f4caf0Thanks @kien-ngo! - Fix nonce value for ethers5 adapter -
#2874
d2aead4Thanks @kien-ngo! - Docs: update incorrect code snippet for viem adapter -
#2882
bfdfc23Thanks @gregfromstl! - Better error message for failed smart wallet connections -
#2879
597900bThanks @MananTank! - - Add onConnect prop onAutoConnectcomponent- Call the
onConnectcallback passed toConnectButtonandConnectEmbedwhen wallet is auto-connected
- Call the
-
#2866
62c799dThanks @MananTank! - Fix exception on passing chain with unknown chainId to ConnectButton -
#2872
99298b3Thanks @joaquim-verges! - Add optionaliconinChainOptionswhen defining a chain -
#2867
674fcc7Thanks @gregfromstl! - Fixes single phase drop compatibility across erc20, erc721, and erc1155 contracts -
#2883
48e6427Thanks @gregfromstl! - Improve docs for verifySignature -
#2870
8ae8e6aThanks @gregfromstl! - Fix TransactionButton layout shift while loading
5.13.0
Minor Changes
- #2853
56c139cThanks @joaquim-verges! - Add account abstraction options touseConnectand handle smart wallet autoconnection outside of UI components
Patch Changes
-
#2859
03d8d6cThanks @jnsdls! - addgaslessprop to<TransactionButton /> -
#2861
5b83353Thanks @kumaryash90! - Export airdrop extensions -
#2857
77c2a8aThanks @kien-ngo! - Docs: update incorrect code snippets, fix typos
5.12.0
Minor Changes
-
#2841
2ae9a13Thanks @kumaryash90! - SDK V5 extension for new Airdrop contract.
Patch Changes
-
#2848
41be954Thanks @jnsdls! - addcelochains to knownop stackchains -
#2850
aa0b8c4Thanks @MananTank! - Fix "All wallets" UI in Connect- Remove duplicated entry for "inApp"
- Remove wallets specified by developer
5.11.0
Minor Changes
-
#2679
560d8adThanks @ElasticBottle! - Add support for connecting in-app wallet using phone numberUsage in TypeScript
import { createThirdwebClient, createWallet } from "thirdweb"; import { preAuthenticate } from "thirdweb/wallets/in-app"; const client = createThirdwebClient({ clientId: "..." }); const phoneNumber = '+123456789'; // Send OTP to given phone number async function sendOTP() { await preAuthenticate({ strategy: "phone", phoneNumber, client, }); } async function connect() { // create a in-app wallet instance const wallet = createWallet('inApp'); // if the OTP is correct, the wallet will be connected else an error will be thrown const account = await wallet.connect({ client, strategy: "phone"; phoneNumber, verificationCode: '...' // Pass the OTP entered by the user }); console.log('connected to', account); }Usage in React
import { createThirdwebClient } from "thirdweb"; import { preAuthenticate } from "thirdweb/wallets/in-app"; import { useConnect } from "thirdweb/react"; const client = createThirdwebClient({ clientId: "..." }); function Component() { const { connect } = useConnect(); const [phoneNumber, setPhoneNumber] = useState(''); // get phone number from user const [otp, setOtp] = useState(''); // get OTP from user // Send OTP to given phone number async function sendOTP() { await preAuthenticate({ strategy: "phone", phoneNumber, client, }); } async function connect() { // create a in-app wallet instance const wallet = createWallet('inApp'); // if the OTP is correct, the wallet will be connected else an error will be thrown await wallet.connect({ client, strategy: "phone"; phoneNumber, verificationCode: otp }); // set the wallet as active connect(wallet) } // render UI to get OTP and phone number from user return <div> ... </div> } -
#2818
948f155Thanks @jnsdls! - Gasless transactions in Typescriptimport { sendTransaction } from "thirdweb"; const result = sendTransaction({ transaction, account, gasless: { provider: "engine", relayerUrl: "https://...", relayerForwarderAddress: "0x...", }, });Gasless transactions in React
import { useSendTransaction } from "thirdweb/react"; const { mutate } = useSendTransaction({ gasless: { provider: "engine", relayerUrl: "https://...", relayerForwarderAddress: "0x...", }, }); // Call mutate with the transaction object mutate(transaction);
Patch Changes
-
#2842
d7e6671Thanks @joaquim-verges! - fix: handle signature minting with price and currency -
#2839
3be61ddThanks @MananTank! - Enable Buy Modal by default with useSendTransaction hook -
#2768
cfff7e8Thanks @MananTank! - Fix custom chain not being used
5.10.1
Patch Changes
5.10.0
Minor Changes
Patch Changes
-
#2834
be85410Thanks @joaquim-verges! - fix: erc1155 sigmint with additional supply -
#2831
38f3b2eThanks @MananTank! - Fix In-App + Smart wallet Connection issue
5.9.0
Minor Changes
-
#2793
4dbcbd1Thanks @jnsdls! - thirdweb/reactAdd a new optional
authprop to<ConnectButton />to allow specifying a SIWE auth flow after users connect their wallets.<ConnectButton client={client} auth={{ isLoggedIn: async (address) => { // check if the user is logged in by calling your server, etc. // then return a boolean value return true || false; }, getLoginPayload: async ({ address, chainId }) => { // send the address (and optional chainId) to your server to generate the login payload for the user to sign // you can use the `generatePayload` function from `thirdweb/auth` to generate the payload // once you have retrieved the payload return it from this function return; // <the login payload here> }, doLogin: async (loginParams) => { // send the login params to your server where you can validate them using the `verifyPayload` function // from `thirdweb/auth` // you can then set a cookie or return a token to save in local storage, etc // `isLoggedIn` will automatically get called again after this function resolves }, doLogout: async () => { // do anything you need to do such as clearing cookies, etc when the user should be logged out // `isLoggedIn` will automatically get called again after this function resolves }, }} />
Patch Changes
5.8.0
Minor Changes
-
#2806
94e354aThanks @jnsdls! - ImplementOffersin the Marketplace extensions, available viathirdweb/extensions/marketplace. -
#2814
bebcf46Thanks @jnsdls! - Add support for updating metadata for ERC1155 contracts -
#2811
1b2bfc8Thanks @joaquim-verges! - Added ERC1155 and ERC20 signature mint extensions
Patch Changes
- #2815
381b669Thanks @joaquim-verges! - Fix query invalidation when using react hooks
5.7.0
Minor Changes
-
#2803
a54c745Thanks @jnsdls! - Added new extensions for "English Auctions" inthirdweb/extensions/marketplacemodule:bidInAuctioncancelAuctionbuyoutAuctioncollectAuctionPayoutcollectAuctionTokensexecuteSale
-
#2767
300e4c8Thanks @MananTank! - Open "Pay Modal" UI when sending transaction using theuseSendTransactionhook if the user does not have enough funds to execute the transaction to prompt the user to buy tokensuseSendTransactionnow takes an optionalconfigoption to customize the "Pay Modal" UIconst sendTransaction = useSendTransaction({ payModal: { locale: "en_US", theme: "light", }, });You may also explicitly disable the "Pay Modal" UI by setting the
payModaloption tofalseconst sendTransaction = useSendTransaction({ payModal: false, }); -
#2788
f5abbe8Thanks @joaquim-verges! - AddeddeployPublishedContract
Patch Changes
-
#2795
7c17892Thanks @joaquim-verges! - Fix claiming drops with prices and no allowlists -
#2799
37bd0e4Thanks @jnsdls! - fixnpx thirdwebon windows whenthirdwebis installed locally
5.6.0
Minor Changes
-
#2760
8197b3cThanks @gregfromstl! - Adds serializeTransaction and updates sign return object to include yParity -
#2766
65e4ddcThanks @joaquim-verges! - Added ERC721 extensions:- claimTo with allowlist support
- lazyMint
- setClaimConditions
-
#2771
df338f5Thanks @jnsdls! - Added ERC20 extensions:- claimTo with allowlist support
- setClaimConditions
-
#2757
9d46fceThanks @jnsdls! - add extensions for contract roles in thethirdweb/extensions/permissionsnamespace
Patch Changes
- #2761
a18fc8eThanks @MananTank! - Connect UI context code cleanup
5.5.0
Minor Changes
-
#2752
39c6fbcThanks @jnsdls! - addconcatHexutility function -
#2744
db05717Thanks @joaquim-verges! - Added 1155 extensions:claimTowith allowlist supportlazyMintsetClaimConditions
-
#2749
eb919edThanks @jnsdls! - - storage:uploadnow returns a singleuriwhen a single file is passed to thefilesarray.- extensions: added suport for
royalty,platformFeeandprimarySaleextensions
- extensions: added suport for
Patch Changes
-
#2748
007770cThanks @MananTank! - - Show ENS name and avatar in ConnectButton's Details Modal- Add wallet ID alias
"embedded"for"inApp"to avoid breaking change
createWallet("embedded"); // supported but deprecated createWallet("inApp"); // recommended - Add wallet ID alias
-
#2759
07f98a5Thanks @MananTank! - - Improved Swap UI in ConnectButton Details Modal- Prevent Modal from closing when clicking on "Switch Network" in the Swap UI
- Fix wrong network name shown in Transaction History
-
#2756
e6b5d9cThanks @jnsdls! - improveresolveSchemereliability and handle cases wheregetNFTfor ERC1155 was breaking on missingtotalSupplymethod -
#2678
9453f74Thanks @kumaryash90! - Custom gas settings for any evm deployments
5.4.2
Patch Changes
- #2579
d836889Thanks @ElasticBottle! - ExportresolvePromisedValuefromthirdweb/utils
5.4.1
Patch Changes
- #2741
900e7d0Thanks @MananTank! - Remove duplicated entry for MetaMask in MM browser
5.4.0
Minor Changes
-
#2736
3847617Thanks @gregfromstl! - Adds fromGwei unit converter -
#2735
d9cd6f5Thanks @jnsdls! - added extension support for: Marketplace, ERC1155, ERC721 -
#2711
14cecc9Thanks @joaquim-verges! - ExportuseSendBatchTransaction()for smart accounts
Patch Changes
-
#2731
1d4fdd6Thanks @jnsdls! - exportChainMetadatatype fromthirdweb/chains -
#2712
02583f8Thanks @jnsdls! - fixwatchBlockNumberpolling when fully unsubscribing and later re-subscribing
5.3.1
Patch Changes
5.3.0
Minor Changes
- #2697
c2eba49Thanks @joaquim-verges! - DeprecateembeddedWalletin favor ofinAppWallet(same functionality)
Patch Changes
-
#2689
740a675Thanks @jnsdls! - ---Marketplace Extensions
Added initial support for the Marketplace extensions, available via the
thirdweb/extensions/marketplacemodule.Direct Listings
Write
createListing
Read
totalListingsgetListinggetAllListingsgetAllValidListings
Events
buyerApprovedForListingEventcancelledListingEventcurrencyApprovedForListingEventnewListingEventnewSaleEventupdatedListingEvent
English Auctions
Write
createAuction
Read
totalAuctionsgetAuctiongetAllAuctionsgetAllValidAuctions
Events
auctionClosedEventcancelledAuctionEventnewAuctionEventnewBidEvent
Types
DirectListingEnglishAuction
ERC721 Extensions
- Added
isERC721to thethirdweb/extensions/erc721module.
ERC1155 Extensions
- Added
isERC1155to thethirdweb/extensions/erc1155module.
-
#2700
f709f13Thanks @jnsdls! - ENS: add support forresolveName(),resolveAvatar()andresolveText() -
#2686
a2423caThanks @MananTank! - AddmodalSizeprop onConnectEmbedto allow"wide"modal size. -
#2684
4504a8dThanks @MananTank! - Fix sourcemap warnings in CRA -
#2677
0e479e2Thanks @farhanW3! - added 50k overhead to userOp gas estimations
5.2.0
Minor Changes
-
#2667
44d9630Thanks @joaquim-verges! - API update for ethers5 and ethers5 adapters:- Now all adapter functions take a singular object
- ethers5: fixed adapted signer not containing a provider by default
- ethers5: added support for sign typed data
-
#2674
97a31f5Thanks @joaquim-verges! - AdduseSendAndConfirmTransactionhook
Patch Changes
-
#2666
127c476Thanks @gregfromstl! - fix getAddresses for accounts converted to viem -
#2637
367576cThanks @MananTank! - - Always start a new session when callingwallet.connectfor WalletConnect- Fix JSDoc for
useConnectedWallets - Add
accountsChangedevent back toWallet wallet.disconnectmethod cleanups
- Fix JSDoc for
5.1.1
Patch Changes
-
#2636
c508751Thanks @joaquim-verges! - Optimie encode by caching asyncParams -
#2662
e4d243eThanks @jnsdls! - fixsendTransactionwithinviemAdapter.walletClient.toViem()
5.1.0
Minor Changes
- #2602
3aaad1eThanks @gregfromstl! - Adds generateAccount function for generating a random local account
Patch Changes
-
#2525
7234e6bThanks @gregfromstl! - Better private-key account support -
#2626
e806393Thanks @jnsdls! - fix wallet connect uri parsing -
#2632
d89f009Thanks @MananTank! - Various Improvements for wallet connection- change
accountsChangedevent toaccountChangedevent and emit newAccountobject instead of creating it in the connection manager - WalletConnect connection improvements
- change
-
#2610
213f313Thanks @dependabot! - build(deps): bump viem from 2.9.5 to 2.9.6 -
#2606
0394eb2Thanks @joaquim-verges! - Add ERC4337 extensions -
#2631
1c29556Thanks @joaquim-verges! - Get userOp prices from bundler
5.0.3
Patch Changes
-
#2595
dd1141fThanks @MananTank! - Do not subscribe tosession_request_sentevent when usingwalletConnectbecause that is already handled when connecting with official Modal -
#2591
6d63920Thanks @MananTank! - AddwalletConnect, fix WC connection issues -
#2588
eba8f1cThanks @joaquim-verges! - Fix 721/1155 claimTo
5.0.2
Patch Changes
-
#2585
052892bThanks @MananTank! - Fix wallet not opened on WC sessions request event on page reload on mobile -
#2587
6063f40Thanks @jnsdls! - [CLI] - fix execution on windows and when prettier is not installed
5.0.1
Patch Changes
-
#2572
701cd88Thanks @jnsdls! - point CLI backwards compatibility @latest instead of @beta -
#2576
04961f0Thanks @joaquim-verges! - Change getWalletBalance prop from account to address
5.0.0
Major Changes
-
#2356
01fd523Thanks @jnsdls! - Initial release of v5 of the thirdweb SDK.For more information please refer to the documentation and the migration guide.
Patch Changes
- #2566
c63d9eaThanks @kumaryash90! - Verification status in progress