Overview
Social recovery allows users to set one or multiple accounts as guardians. Guardians can recover access to the account by approving a change to the validator configuration. For example, if a user loses access to their key, guardians are able to rotate the signer to a new ECDSA key. Or if a smart account has a multisig configuration, guardians can be used to recover a signer of the multisig or change the threshold. Guardians can only update the validator configuration, they are not permitted to make any other transactions.Recovery runs over ERC-4337, so it needs a bundler. Guardians can only sign user operations — passing them to
prepareTransaction, signMessage, or signTypedData throws, since the recovery module cannot verify signatures on those paths.Recovery produces multiple account calls. Send each one as its own user operation, in the order returned — the recovery module authorizes a single call per user operation, so batching them is rejected onchain.
Initialization
To install a social recovery module during account deployment:Multiple guardians
You can also set multiple guardians for a single account, and use a custom signature threshold:signers must sign, and you need at least as many as the configured threshold.
Usage
- ECDSA Account
- Passkey Account
To recover access to the account:This prompts a signature from each guardian account and submits a transaction on their behalf to update the ownership. Existing owners not listed in
newOwners are removed.Ownership is only fully rotated once every call has landed. New owners are added before the old ones are removed, so until the final call executes both remain valid.
Nexus accounts
Nexus accounts must use Ownable V0 as their owner module for social recovery. Pass the same module address in both the account configuration and
newOwners when recovering the account. Ownable V0 does not support legible EIP-712 signing; typed data and intents remain supported through the SDK’s personal-sign fallback.