Skip to main content
Viem is one of the most popular libraries for interacting with EVM blockchains. A WalletClient is an interface to interact with EVM accounts and provides the ability to retrieve accounts, execute transactions, sign messages, etc. We provide a helper method to allow you to create a Viem WalletClient for a given wallet account.

Usage

import { createWalletClientForWalletAccount } from '@dynamic-labs-sdk/evm/viem';

const sendTransaction = async (walletAccount, transaction) => {
  const walletClient = await createWalletClientForWalletAccount({
    walletAccount,
  });

  const result = await walletClient.sendTransaction(transaction);
  console.log('Transaction sent:', result);

  // ...
};

Viem / wagmi version compatibility

The JavaScript SDK’s EVM extension (@dynamic-labs-sdk/evm) uses viem internally. If you also use wagmi in your project, ensure your versions are compatible:
DependencyRequired rangeNotes
viem^2.45.3viem v2.45.3+
wagmi^2.14.11If using wagmi alongside the SDK
@wagmi/core^2.6.4Installed automatically with wagmi
wagmi v3.x may work (v3.1.0 has been tested), but is outside the declared peer dependency range. Full v3 support is planned for a future release. For the React SDK wagmi connector setup, see Using Wagmi.
Last modified on June 25, 2026