Skip to main content
Smart accounts validate off-chain signatures through ERC-1271. The SDK returns the validator and account envelopes expected by the configured account implementation. Signatures are chain-specific. Always pass the chain on which the verifier will call the smart account.

Sign an EIP-191 message

Pass raw bytes when the application already has a hex payload:

Sign EIP-712 typed data

Keep the typed-data domain’s chainId consistent with the application protocol. The separate chain argument selects the account and validator context used to package the signature.

Choose a signer set

Pass undefined to use the account’s configured owners. To sign with an enabled session key, pass that session explicitly:
The session’s signing mode must allow the payload. Disabled sessions reject both methods. Scoped typed-data signing is configured on-chain but direct scoped signature emission is not available in SDK 2.16.1.

Deployed and undeployed accounts

For an undeployed smart account, the SDK wraps the result with ERC-6492 deployment data. The verifying application must support ERC-6492 to validate that signature. Deployed accounts return the normal ERC-1271-compatible envelope.
EOA account mode does not produce packed smart-account signatures through these methods. Call the EOA’s viem signing method directly when the verifier expects an EOA signature.