Skip to main content
Smart Sessions control ERC-1271 signatures separately from transaction permissions. Set signing on createSession to choose a mode:
  • Disabled ({ mode: 'disabled' }): The session cannot sign messages or typed data.
  • Unrestricted ({ mode: 'unrestricted' }): The session can sign any message or typed data.
  • Scoped ({ mode: 'scoped', allowedContents: [...] }): The session can sign only EIP-712 typed data matching an allowed domain and primary-type schema. Plain messages and arbitrary hashes are not allowed.
If you omit signing, the SDK uses unrestricted signing with no validity window. This is identical to explicitly setting { mode: 'unrestricted' }, preserving existing session identities and behavior. Disable signing unless your session needs ERC-1271 signatures. Both unrestricted and scoped signing accept optional validAfter and validUntil dates. One window applies to the entire signing capability. With neither bound, the SDK selects the unrestricted policy. If you provide either bound, it selects the time-frame policy.
A restricted or swap-scoped session defaults to { mode: 'disabled' }. Pass signing explicitly to opt back in.

Unrestricted, time-boxed signing

This session can sign any message or typed data for one hour:

Scoped Permit2 typed data

This session allows the Permit2 PermitSingle domain and schema. Provide the human-readable EIP-712 domain, types, and primaryType; the SDK derives the domain separator and canonical type encoding.
The scope matches the exact EIP-712 domain and canonical primary-type schema. It does not constrain message values such as the token, amount, spender, or deadline. Add transaction permissions or use separate sessions when those values need different controls.
You can configure and enable scoped sessions today, but direct scoped signing through signTypedData remains unavailable until safe ERC-7739 signature emission is restored. The SDK fails fast instead of emitting an unsafe signature.