Recommended: JavaScript SDK with React Hooks
For new React apps, we recommend the JavaScript SDK with React Hooks (
@dynamic-labs-sdk/react-hooks) instead of the legacy React SDK documented here. The JS SDK comes with many benefits such as a much smaller bundle size and other optimizations. Use the React quickstart (JavaScript SDK) to get started.Check if a wallet is an Ethereum wallet
Before calling EVM-specific methods likegetWalletClient(), you must narrow the wallet type with the isEthereumWallet guard. Without it, TypeScript won’t expose EVM methods and the call will throw at runtime with no hint about what went wrong.
Read only actions/Viem Public Client
If you want to read data from the blockchain, you will want a “Public Client” (Viem terminology)Write actions/Viem Wallet Client
If you want to write data to the blockchain, you will need a “Wallet Client” (Viem terminology), or a “Signer” (Ethers terminology). Both allow you to sign transactions with the private key.Send multiple transactions atomically
If you want to send multiple transactions atomically, you can use thesendCalls method. This requires the wallet to support EIP-5792.