Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: GitHub Action <[email protected]>
74 KiB
thirdweb
5.29.0
Minor Changes
-
#3273
7afd2daThanks @gregfromstl! - Adds options refetchInterval and retry params to useReadContract -
#3231
dbf74aaThanks @joaquim-verges! - TransactionButton react native implementation -
#3271
3a1fd98Thanks @joaquim-verges! - Align inAppWallet secret sharing implementation with web and previous RN SDK -
#3229
e7b9b9fThanks @MananTank! - AdduseWalletDetailsModalhook to open Wallet Details Modal without using<ConnectButton />componentimport { createThirdwebClient } from "thirdweb"; import { useWalletDetailsModal } from "thirdweb/react"; const client = createThirdwebClient({ clientId: "<your_client_id>", }); function Example() { const { open } = useWalletDetailsModal(); function handleClick() { open({ client, theme: "light" }); } return <button onClick={handleClick}> Show Wallet Details </button>; }
Patch Changes
-
#3278
5698b0cThanks @0xFirekeeper! - [v4 & v5] zkCandy Sepolia AA Support -
#3263
f2004b5Thanks @gregfromstl! - Add potential error message for eip155 failure -
#3266
e763aceThanks @joaquim-verges! - Fix sign typed data with inAppWallet when the domain contains a salt param -
#3264
3948f43Thanks @MananTank! - - Remove the feature that sets another connected wallet as active when disconnecting the current active wallet.- Do not save personal wallet as a separate wallet in connected wallets list.
-
#3256
923a5ecThanks @gregfromstl! - Automatic retries on watchContractEvents -
#3280
7dec4d0Thanks @MananTank! - Fix in-app wallet sending another verification code on window focus when using ConnectEmbed.Fix the underlying issue of
useAutoConnectrunning again on window focus.Add
refetchOnWindowFocus: falseon few moreuseQueryinstances to avoid unnecessary refetches -
#3235
824a631Thanks @gregfromstl! - Adds EIP-5792 hook exports to thirdweb/react -
#3241
37ec4caThanks @jnsdls! - fix ipfsresolveSchemebug for v1 ipfs schemes -
#3240
d488223Thanks @MananTank! - Fix custom theme not used in ConnectEmbed loading screen -
#3251
ce45a79Thanks @MananTank! - Allow selecting fiat currency in Pay UI
5.28.0
Minor Changes
-
#3198
ca31a6cThanks @gregfromstl! - Exports toSerializableTransaction to convert preparedTransaction into a fully serializable transaction. Exports estimateGasCost to estimate the gas cost of a transaction in ether and wei. Exports getGasPrice to get the currect gas price for a chain.toSerializableTransactionimport { prepareTransaction, toSerializableTransaction } from "thirdweb"; const transaction = await prepareTransaction({ transaction: { to: "0x...", value: 100, }, }); const serializableTransaction = await toSerializableTransaction({ transaction, }); account.sendTransaction(serializableTransaction);estimateGasCostimport { estimateGasCost } from "thirdweb"; const gasCost = await estimateGasCost({ transaction });getGasPriceimport { getGasPrice } from "thirdweb"; const gasPrice = await getGasPrice({ client, chain });
Patch Changes
-
#3207
e7443edThanks @MananTank! - Fixes #3204 - Account methods not properly updated when account is changed in wallet -
#3226
58d14c9Thanks @joaquim-verges! - Add option to choose the contract type for erc1155/generateMintSignature -
#3227
043f0daThanks @joaquim-verges! - Better gas estimation for opBNB mainnet & testnet -
#3201
0328bc8Thanks @joaquim-verges! - Fallback to default metadata on failure to fetch erc20 metadata
5.27.0
Minor Changes
-
#3181
a346111Thanks @gregfromstl! - Adds headless functions for creating and managing a WalletConnect session with a connected walletcreateWalletConnectClientimport { createWalletConnectClient } from "thirdweb/wallets/wallet-connect"; createWalletConnectClient({ client: client, wallet: wallet, onConnect: (session: any) => { alert("Connected"); }, onDisconnect: (session: any) => { alert("Disconnected"); }, });createWalletConnectSessionimport { createWalletConnectSession } from "thirdweb/wallets/wallet-connect"; createWalletConnectSession({ walletConnectClient: wcClient, uri: "wc:...", });getWalletConnectSessionsimport { getWalletConnectSession, type WalletConnectSession, } from "thirdweb/wallets/wallet-connect"; const sessions: WalletConnectSession[] = await getWalletConnectSessions();disconnectWalletConnectClientimport { disconnectWalletConnectClient } from "thirdweb/wallets/wallet-connect"; disconnectWalletConnectClient({ session, walletConnectClient: wcClient }); -
#3105
51e7adaThanks @joaquim-verges! - First party support for zkSync native account abstractionYou can now use smart accounts on zkSync and zkSync sepolia without any extra setup.
const wallet = smartWallet({ chain: zkSync, sponsorGas: true, }); const smartAccount = await wallet.connect({ client, personalAccount, }); // now your can perform transactions normally, gas will be sponsored sendTransaction({ transaction, account: smartAccount }); -
#3105
51e7adaThanks @joaquim-verges! - ZkSync transaction support
Patch Changes
- #3195
3f66945Thanks @gregfromstl! - FixestimateGastype resolution
5.26.0
Minor Changes
-
#3161
b569eb4Thanks @gregfromstl! - Adds waitForBundle function to await a sendCalls bundle's complete confirmation.Usage
import { waitForBundle } from "thirdweb/wallets/eip5792"; const result = await waitForBundle({ client, chain, wallet, bundleId: "0x123...", }); -
#3161
b569eb4Thanks @gregfromstl! - Adds EIP-5792 react hooksuseSendCallsuseSendCallswill automatically revalidate all reads from contracts that are interacted with.import { useSendCalls } from "thirdweb/react"; const sendTx1 = approve({ contract: USDT_CONTRACT, amount: 100, spender: "0x33d9B8BEfE81027E2C859EDc84F5636cbb202Ed6", }); const sendTx2 = approve({ contract: USDT_CONTRACT, amount: 100, spender: "0x2a4f24F935Eb178e3e7BA9B53A5Ee6d8407C0709", }); const { mutate: sendCalls, data: bundleId } = useSendCalls({ client }); await sendCalls({ wallet, client, calls: [sendTx1, sendTx2], });Await the bundle's full confirmation:
const { mutate: sendCalls, data: bundleId } = useSendCalls({ client, waitForResult: true, }); await sendCalls({ wallet, client, calls: [sendTx1, sendTx2], });Sponsor transactions with a paymaster:
const { mutate: sendCalls, data: bundleId } = useSendCalls(); await sendCalls({ client, calls: [sendTx1, sendTx2], capabilities: { paymasterService: { url: `https://${CHAIN.id}.bundler.thirdweb.com/${client.clientId}`, }, }, });useCapabilitiesimport { useCapabilities } from "thirdweb/react"; const { data: capabilities, isLoading } = useCapabilities();useCallsStatusimport { useCallsStatus } from "thirdweb/react"; const { data: status, isLoading } = useCallsStatus({ bundleId, client });
Patch Changes
-
#3178
3dca028Thanks @joaquim-verges! - Fix gas estimation in transaction button -
#3187
874747bThanks @joaquim-verges! - Upgrade to latest coinbase wallet sdk -
#3186
123275bThanks @gregfromstl! - Catch any errors thrown while polling block numbers
5.25.1
Patch Changes
- #3169
f8cad77Thanks @joaquim-verges! - Mark coinbase mobile wallet as optional dep
5.25.0
Minor Changes
-
#3140
fc1b658Thanks @gregfromstl! - Show in-app wallet users an option to export their private key. Enabled by default.Usage
To hide the private key export:
import { inAppWallet } from "thirdweb/wallets"; const wallet = inAppWallet({ hidePrivateKeyExport: true, }); -
#3154
99d11bbThanks @gregfromstl! - Adds the ability to copy the wallet connect connection link as an alternative to scanning the QR code -
#3150
9c417d9Thanks @gregfromstl! - Adds onDisconnect callback to connect buttonUsage
<ConnectButton client={THIRDWEB_CLIENT} onDisconnect={() => console.log("disconnect")} theme={theme === "light" ? "light" : "dark"} />
Patch Changes
-
#3162
b9b185bThanks @joaquim-verges! - Add support for CB wallet in react native -
#3151
8b606b5Thanks @joaquim-verges! - Better handling for multiple accounts connected -
#3144
c1d3a5aThanks @joaquim-verges! - Fix resolveScheme for native apps -
#3153
3b03cd0Thanks @gregfromstl! - Improve the copy on the pending connection QR code screen in the connect modal
5.24.0
Minor Changes
-
#2943
2774d1fThanks @MananTank! - AddeduseConnectModalhook.Add
useConnectModalhook that allows you to open the Connect UI in a Modal to prompt the user to connect wallet.import { createThirdwebClient } from "thirdweb"; import { useConnectModal } from "thirdweb/react"; const client = createThirdwebClient({ clientId: "<your_client_id>", }); function Example() { const { connect, isConnecting } = useConnectModal(); async function handleConnect() { const wallet = await connect({ client }); // opens the connect modal console.log("connected to", wallet); } return <button onClick={handleConnect}> Connect </button>; } -
#3127
5031e44Thanks @gregfromstl! - Adds contract extensions for delayed reveal NFTs -
#3118
546d2dbThanks @gregfromstl! - Adds React Native to the thirdweb create CLI -
#3126
764bce2Thanks @joaquim-verges! - WalletConnect in React Native + useAutoConnect hookSupport WalletConnect compatible wallets in React Native
You can now connect any of the 300+ WalletConnect compatible mobile wallets from react native.
import { useConnect } from "thirdweb/react"; import { createWallet } from "thirdweb/wallets"; const { connect, isConnecting } = useConnect(); const connectMetamask = async () => { await connect(async () => { const wallet = createWallet("io.metamask"); await wallet.connect({ client, chain, }); return wallet; }); };Exposed
useAutoConnecthookYou can now use a hook to trigger autoconnecting to the last connected wallet
import { useAutoConnect } from "thirdweb/react"; const { data: autoConnected, isLoading } = useAutoConnect({ client, accountAbstraction, wallets, onConnect, timeout, }); -
#3125
c3a92bfThanks @gregfromstl! - AddeduseWalletBalance()hookAdds the
useWalletBalancehook. The hook will default to the native token balance if notokenAddressis provided.Usage
import { useWalletBalance } from "thirdweb/react"; const { data, isLoading, isError } = useWalletBalance({ chain: walletChain, tokenAddress: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", address: activeAccount?.address, client, });
Patch Changes
-
#3143
b72daa4Thanks @joaquim-verges! - Expose useWalletBalance in react native -
#3136
8b3e1e2Thanks @MananTank! - Prefer native wallet app link in android as well for WalletConnect session -
#3139
4eda306Thanks @gregfromstl! - Converts chainId hex to number for proper signTypedData type -
#3104
d021f4eThanks @MananTank! - Fix WalletConnect connection and show Retry option on connection failure/rejection
5.23.0
Minor Changes
-
#3103
a2275c4Thanks @gregfromstl! - Addsunstyledprop toTransactionButtonto remove default styles<TransactionButton transaction={() => {}} onSuccess={handleSuccess} onError={handleError} unstyled className="bg-white text-black rounded-md p-4 flex items-center justify-center" > Confirm Transaction </TransactionButton> -
#3083
5994685Thanks @MananTank! - Add support for deep-linking to Metamask app instead of using WalletConnect on mobile devices when using Connect UI (ConnectButton/ConnectEmbed) components.<ConnectButton client={client} wallets={[ createWallet("io.metamask", { preferDeepLink: true, }), ]} /> -
#3064
f55fa4cThanks @joaquim-verges! - In-app wallet support for react native
Patch Changes
-
#3085
a22eb5cThanks @MananTank! - FixonConnectprop called twice when connecting inApp wallet using Social login -
#3071
da63eabThanks @gregfromstl! - Fully clear in-app wallet user data when disconnecting -
#3063
f49f8caThanks @jnsdls! - ethers6 adapter: allow optional account to be passed tocontract.toEthersthat will automatically hook up the contract with a signer instead of provider -
#3079
f8e0a50Thanks @MananTank! - Fix PayEmbed not passing theme to ConnectButton -
#3107
57f7cd5Thanks @MananTank! - - Fix spacing issues in UI components- Revert color changes in UI components
-
#3067
b46173fThanks @gregfromstl! - Fix TransactionButton styles when overriding with custom styles -
#3080
7abbe03Thanks @MananTank! - Improved OTP input using input-otp library -
#3110
49aa6e4Thanks @joaquim-verges! - Phone number sign in for React Native -
#3082
9c9969eThanks @MananTank! - Add switch account button inConnectButtondetails button for MetaMask injected provider
5.22.1
Patch Changes
-
#3059
5a40c6aThanks @jnsdls! - fix losing state when looking at transactions during pay -
#3058
1698c40Thanks @gregfromstl! - Fixes MediaRenderer flashing its failed state while loading
5.22.0
Minor Changes
-
#3001
726618bThanks @gregfromstl! - Adds basic EIP-5792 support for wallets with functionsgetCapabilities,sendCalls,showCallsStatus,getCallsStatus.Example Usage
getCapabilitiesReturns the capabilities of the wallet according to EIP-5792.
import { getCapabilities } from "thirdweb/wallets/eip5792"; const capabilities = await getCapabilities({ wallet });sendCallsSends the given calls to the wallet for execution, and attempts to fallback to normal execution if the wallet does not support EIP-5792.
import { sendCalls } from "thirdweb/wallets/eip5792"; const transfer1 = transfer({ contract: USDC_CONTRACT, amount: 5000, to: "0x33d9B8BEfE81027E2C859EDc84F5636cbb202Ed6", }); const transfer2 = transfer({ contract: USDT_CONTRACT, amount: 1000, to: "0x33d9B8BEfE81027E2C859EDc84F5636cbb202Ed6", }); const bundleId = await sendCalls({ wallet, client, calls: [transfer1, transfer2], });showCallsStatusRequests the wallet to show the status of a given bundle ID.
import { showCallsStatus } from "thirdweb/wallets/eip5792"; await showCallsStatus({ wallet, bundleId });getCallsStatusReturns the status of the given bundle ID and the transaction receipts if completed.
import { getCallsStatus } from "thirdweb/wallets/eip5792"; const status = await getCallsStatus({ wallet, bundleId });
Patch Changes
-
#3048
cfe60d2Thanks @kien-ngo! - Improve error message forresolveAbiFromBytecode -
#3040
ce45475Thanks @gregfromstl! - Fixes caching issue when usingdefineChain -
#3037
f006429Thanks @joaquim-verges! - Updates for react native compatibility
5.21.0
Minor Changes
-
#3034
99fa2daThanks @gregfromstl! - Adds the ability to set a custom logo for the social login modalimport { inAppWallet } from "thirdweb/wallets"; const wallet = inAppWallet({ metadata: { image: { src: "https://example.com/logo.png", alt: "My logo", width: 100, height: 100, }, }, });
Patch Changes
5.20.0
Minor Changes
-
#2912
9caa9d7Thanks @joaquim-verges! - Updated Connect Modal UI + Passkey support- Passkey is now an auth option for
inAppWallet - Connect UI component UI refresh
const wallet = inAppWallet(); const hasPasskey = await hasStoredPasskey(client); await wallet.connect({ client, strategy: "passkey", type: hasPasskey ? "sign-in" : "sign-up", }); - Passkey is now an auth option for
-
#3018
5083464Thanks @gregfromstl! - Adds support for Core wallet extension
Patch Changes
-
#3024
eb29adfThanks @kien-ngo! - Add BSC mainnet and testnet -
#3004
145ff48Thanks @gregfromstl! - Updates shortenAddress to accept a string -
#3027
c08a5f2Thanks @gregfromstl! - Fixes chain metadata overrides
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