Skip to main content
There are three ways to validate EVM signatures: using Viem’s verification helpers, manually recovering the signer, and EIP-6492 (required if the signer is a counterfactual smart account that hasn’t been deployed yet). For producing signatures, see Sign a Message and Sign Typed Data (EIP-712).

Validate with Viem

Viem provides verifyMessage (EIP-191) and verifyTypedData (EIP-712). When you pass a PublicClient, Viem automatically validates contract wallet signatures via ERC-1271. You can build the PublicClient directly from the active network with createPublicClientFromNetworkData so you don’t have to hardcode RPC URLs.

EIP-191 (message / personal_sign)

EIP-712 (typed data)

Manual validation

If you only need to compare against a known signer (no contract wallets), you can recover the address yourself.

EIP-191

EIP-712

EIP-6492 (counterfactual smart accounts)

Smart accounts (e.g. Kernel via ZeroDev) may sign before the wrapper contract is deployed. EIP-6492 wraps the signature with a deploy-and-verify payload so verifiers can check it before the account exists on chain.
Use this path if you sign with a Kernel client from @dynamic-labs-sdk/zerodevverifyMessage alone won’t recognize the wrapped payload until the account is deployed.

Server-side validation

The verification helpers above are pure functions — you can run them server-side as long as the server has an RPC URL for the relevant chain. Build the PublicClient directly with viem’s createPublicClient rather than createPublicClientFromNetworkData if the server doesn’t have a Dynamic client instance.
Last modified on May 12, 2026