Releases: thirdweb-dev/js
[email protected]
Minor Changes
-
#5495
d1845f3
Thanks @kien-ngo! - Add headless components: ChainProvider, ChainIcon & ChainName -
#5529
7488102
Thanks @gregfromstl! - Adds LoyaltyCard extensions and support for ERC721 deployment.import { deployERC721Contract } from "thirdweb/deploys"; const loyaltyCardContractAddress = await deployERC721Contract({ chain: "your-chain-id", // replace with your chain ID client: yourThirdwebClient, // replace with your Thirdweb client instance account: yourAccount, // replace with your account details type: "LoyaltyCard", params: { name: "MyLoyaltyCard", symbol: "LOYAL", description: "A loyalty card NFT contract", image: "path/to/image.png", // replace with your image path defaultAdmin: "0xYourAdminAddress", // replace with your admin address royaltyRecipient: "0xYourRoyaltyRecipient", // replace with your royalty recipient address royaltyBps: 500n, // 5% royalty trustedForwarders: ["0xTrustedForwarderAddress"], // replace with your trusted forwarder addresses saleRecipient: "0xYourSaleRecipient", // replace with your sale recipient address platformFeeBps: 200n, // 2% platform fee platformFeeRecipient: "0xYourPlatformFeeRecipient", // replace with your platform fee recipient address }, });
Patch Changes
@thirdweb-dev/[email protected]
Patch Changes
- #5542
8aa454c
Thanks @arcoraven! - feat: add promptTokens and completionTokens fields to usage
[email protected]
Minor Changes
-
#5501
ac42c45
Thanks @gregfromstl! - Added new deployment utility functions to help manage infrastructure contracts and initialization:getInitializeTransaction
: Prepare initialization transaction for contract deploymentgetOrDeployInfraForPublishedContract
: Get or deploy required infrastructure for published contracts
import { getInitializeTransaction, getOrDeployInfraForPublishedContract, } from "thirdweb"; // Get initialization transaction const initTx = await getInitializeTransaction({ client, chain, account, implementationContract, deployMetadata, initializeParams: { name: "My Contract", symbol: "CNTRCT", }, }); // Get or deploy infrastructure const infra = await getOrDeployInfraForPublishedContract({ chain, client, account, contractId: "MyContract", constructorParams: params, });
[email protected]
Patch Changes
-
#5482
b5baeae
Thanks @joaquim-verges! - Expose utilities to decode errors and function data -
#5493
d9a63a6
Thanks @kien-ngo! - Fix props not getting passed to TokenIcon -
#5498
6b6f617
Thanks @ElasticBottle! - enable private key export for enclave wallets upon initial login
[email protected]
Minor Changes
-
#5388
901c3a1
Thanks @kien-ngo! - Add headless UI component: Account (Name, Image, Address, Balance) -
#5374
0e5d120
Thanks @joaquim-verges! - # Breaking changeWe are making the following changes to the NFT component to provide better performance and fine-grain control over their internal fetching logic.
Moreover, you no longer have to wrap React.Suspense around said components!Old
<NFT> <React.Suspense fallback={"Loading stuff..."}> <NFT.Media /> <NFT.Name /> <NFT.Description /> </React.Suspense> </NFT>
New
The new version comes with 2 new props:
loadingComponent
andfallbackComponent
.
Basically,loadingComponent
takes in a component and show it while the internal fetching is being done
fallbackComponent
takes in a component and show it once the data is failed to be resolved<NFTProvider contract={contract} tokenId={0n}> <NFTMedia loadingComponent={<span>Loading NFT Image</span>} fallbackComponent={<span>Failed to load NFT</span>} /> <NFTDescription loadingComponent={<span>Loading NFT Description</span>} fallbackComponent={<span>Failed to load NFT Description</span>} /> </NFT>
Patch Changes
-
#5463
f368793
Thanks @gregfromstl! - Fixes PayEmbed error state appearing on certain errors -
#5464
b5227c9
Thanks @gregfromstl! - Adds the ability to override transaction values in createNewPack
@thirdweb-dev/[email protected]
Patch Changes
- #5477
6bd9683
Thanks @arcoraven! - chore: Allow optional includeUsage (default: true)
[email protected]
Minor Changes
-
#5415
7b21f1b
Thanks @gregfromstl! - Adds steam auth -
#5415
7b21f1b
Thanks @gregfromstl! - Adds Steam as an authentication option
Patch Changes
-
#5397
895b4d1
Thanks @MananTank! - Catch localStorage getItem and setItem unhandled errors -
#5440
f01de73
Thanks @joaquim-verges! - Support erc6492 signature verification on zksync
@thirdweb-dev/[email protected]
[email protected]
Minor Changes
-
#5354
a1fc436
Thanks @joaquim-verges! - Adds EIP1193 adapters that allow conversion between Thirdweb wallets and EIP-1193 providers:EIP1193.fromProvider()
: Creates a Thirdweb wallet from any EIP-1193 compatible provider (like MetaMask, WalletConnect)EIP1193.toProvider()
: Converts a Thirdweb wallet into an EIP-1193 provider that can be used with any web3 library
Key features:
- Full EIP-1193 compliance for seamless integration
- Handles account management (connect, disconnect, chain switching)
- Supports all standard Ethereum JSON-RPC methods
- Comprehensive event system for state changes
- Type-safe interfaces with full TypeScript support
Examples:
// Convert MetaMask's provider to a Thirdweb wallet const wallet = EIP1193.fromProvider({ provider: window.ethereum, walletId: "io.metamask", }); // Use like any other Thirdweb wallet const account = await wallet.connect({ client: createThirdwebClient({ clientId: "..." }), }); // Convert a Thirdweb wallet to an EIP-1193 provider const provider = EIP1193.toProvider({ wallet, chain: ethereum, client: createThirdwebClient({ clientId: "..." }), }); // Use with any EIP-1193 compatible library const accounts = await provider.request({ method: "eth_requestAccounts", }); // Listen for events provider.on("accountsChanged", (accounts) => { console.log("Active accounts:", accounts); });
Patch Changes
-
#5335
1e7e32f
Thanks @joaquim-verges! - Added global transaction decorator, better eip712 transaction support -
#5349
46d0b4b
Thanks @joaquim-verges! - Use maxFeePerGas for Pay gas cost estimations in transaction flow -
#5366
ef56304
Thanks @gregfromstl! - Adds ox for internal utilities -
#5390
6771cfe
Thanks @ElasticBottle! - fix enclave transaction signing for transactions with 0 maxPriorityFeePerGas -
#5343
5de5418
Thanks @gregfromstl! - Adds chain ID to tracked analytics