Skip to main content
Two signing methods are supported. Signatures are produced by the user’s smart account. They are ERC-1271 compatible and verifiable off-chain with viem’s verifyMessage or verifyTypedData.

Sign a string

With the raw provider:

Sign typed data

Verify a signature offchain

Use viem. Smart-account signatures are resolved automatically, no special handling required.
For typed data, use verifyTypedData.

Counterfactual signatures

Before a smart account is deployed on a given chain, signatures are wrapped per ERC-6492. The wrapping is transparent: verifiers that support 6492, including viem, accept both wrapped and unwrapped signatures. If you write your own verifier, look up “ERC-6492 magic byte”. The suffix 0x6492649264926492… indicates an undeployed account; unwrap the signature before validation.