jnsdls
released this
13 Nov 17:01
·
316 commits
to main
since this release
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