| Method | Use for |
|---|---|
personal_sign | Plain-string messages, login challenges, terms acknowledgements |
eth_signTypedData_v4 | Structured EIP-712 data, orders, permits, domain-bound consent |
verifyMessage or verifyTypedData.
Sign a string
Sign typed data
Verify a signature offchain
Use viem. Smart-account signatures are resolved automatically, no special handling required.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 suffix0x6492649264926492… indicates an undeployed account; unwrap the signature before validation.