Signing¶
Brownie Safe can sign with a local Brownie account, Frame, or a Trezor. On the hosted Safe Queue Service, an owner or a delegate can sign a proposal. Additional confirmations must come from Safe owners. The Safe API key authenticates the HTTP requests. The transaction signature authorizes the proposal or confirmation.
Local accounts¶
This is the default signing method when post_transaction needs a signature. Import a private key or encrypted keystore into Brownie. See Brownie account management.
uv run --locked brownie accounts new ape
# Or import an existing keystore
uv run --locked brownie accounts import ape keystore.json
Pass the name of an imported account or a Brownie LocalAccount instance. Brownie prompts for the keystore password. Omit the signer argument to choose an account interactively.
Frame¶
Connect Frame, select the Safe signer, and approve the connection and signature prompts.
Brownie Safe reads the first account Frame exposes at http://127.0.0.1:1248 and requests an eth_signTypedData_v4 signature. Use a signer that supports this method.
Trezor¶
Install the Trezor extra from the checkout:
Connect your Trezor and verify the signing request on the device.
Brownie Safe uses EIP-712 signing for a Model T with firmware 2.4.3 or later. Its other signing path uses an eth_sign signature. Pass force_eth_sign=True to select that path explicitly, or use_passphrase=True to request a passphrase.
All three methods return the signature and add it to safe_tx if that signer is new. Use the signed transaction with safe.post_transaction(safe_tx) for a new proposal. For an existing proposal, submit the signature with safe.post_signature(safe_tx, signature).