Skip to main content

Overview

Use getWalletClient to create a Viem WalletClient for your server wallet. This allows you to interact with EVM chains using Viem’s familiar API for signing messages, transactions, and typed data.

Prerequisites

  • A Dynamic server wallet (see Server Wallets Setup)
  • @dynamic-labs-wallet/node-evm installed
  • An authenticated DynamicEvmWalletClient instance

Usage

Basic example

With external server key shares

If you’re storing key shares externally, pass them when creating the wallet client:

With password protection

For password-protected wallets:

Using Viem chain objects

You can pass a Viem Chain object directly instead of chainId and rpcUrl:

Custom chain configuration

For custom or unsupported chains, use chainId and rpcUrl:
When providing chainId, you must also provide rpcUrl. The chain will be automatically configured with default ETH currency settings.

Common operations

Sign a message

Sign typed data

Send a transaction

Parameters

If no chain configuration is provided, the wallet client defaults to Ethereum mainnet.

Return value

Returns a Viem WalletClient<Transport, Chain, Account> instance with the following properties:
  • account - The wallet account adapter
  • chain - The configured chain
  • transport - HTTP transport for RPC calls
The wallet client supports all standard Viem wallet client methods including signMessage, signTypedData, sendTransaction, and more.
Last modified on March 12, 2026