25 KiB
thirdweb
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