Skip to main content

Safe Accounts

An approval-only account owned by a Safe has no standing auth key: every spend needs an on-chain approval from the Safe. Its identity keys are escrowed with the server, which releases them to Safe owners after re-checking membership on chain. The safe commands set up that identity and sign in as one of the owners. See the approval-only trust model for what the server can and can’t do with the escrowed keys.
safe prepare runs locally and needs no key. safe bootstrap, safe setup, and safe login need the owner’s wallet private key (the CLI prompts for it, or reads PRIVATE_KEY) and an RPC that can read the AuthRegistry. Every safe command prints JSON, whatever --output says.

Recovery Phrase

The account is derived from a BIP-39 recovery phrase, which is its only recovery path. Commands that need an existing phrase prompt for it without echo. For runs without a terminal, set PRIVACY_BOOST_MNEMONIC; the CLI accepts it with a warning, for the same reasons it warns about PRIVATE_KEY.

Setting Up an Account

1. Derive the Account

Output:
With no phrase given, prepare generates one and prints it this one time. Store it offline before you continue. To recompute the account for a phrase you already have, pass --mnemonic with no value and enter it at the prompt.

2. Create and Escrow

Either order works. Create first. Have the Safe execute AuthRegistry.createAccount(accountSalt), then one owner runs the one-time setup, which registers the keys the phrase derives and escrows them with the server:
Setup is write-once, and it refuses a phrase that derives a different account. Escrow first. One owner runs bootstrap, which registers and escrows the keys and prints the values the Safe needs for createAccount:
Until the Safe executes the call, safe login reports accountCreationRequired with the same values to every owner, so a lost session can’t orphan the account. accountExists: true means the Safe had already created it.

Signing In as an Owner

All four exit with code 0, so read status rather than the exit code. safe login does not save a session for other commands.

Next Steps