How to let an AI agent sign crypto safely
Trustless
SwapChan never signs, never holds keys or funds, and cannot move money. It only builds unsigned transactions and (optionally) relays bytes your wallet already signed.
The loop
Key recovery β do you have the key?
If the user cannot already sign, recover the key LOCALLY and OFFLINE. BIP39, missing words, passphrase, keystore v3, 2014-15 presale, Electrum, wallet.dat, hardware, raw keys. Only PUBLIC addresses leave the machine.
Verify
Run verify_tx on every unsigned tx. Calldata guard + simulation returns a verdict (ok / caution / danger), findings and a plain-language summary.
Human sign-off and sign locally
Default and baseline: a human reviews and signs EVERY transaction in their own wallet (hardware preferred). Autonomous / session-key signing is advanced-only with hard caveats.
Broadcast
Optional relay of already-signed bytes via broadcast_tx. Private via Flashbots Protect on Ethereum. Cannot alter a signed tx. Track with tx_status.
Verification guide (always ships with signing_guide)
- Decode calldata against the verified ABI. Unknown selector β stop.
- Right contract: allowlist / docs, verified source, not brand-new, not a lookalike.
- Right recipient: every to/receiver is the user (or the person they named).
- Right price: minOut vs an independent quote (SwapChan get_quote).
- Simulate: eth_simulateV1 / eth_call / Solana simulateTransaction; diff balances.
- Red flags: unlimited approve, permit/Permit2, setApprovalForAll, Safe DELEGATECALL, upgradeTo, ownership transfers, EIP-7702, unexpected value; Solana unknown programs; Tron AccountPermissionUpdate.
- Explain in plain language.
- Human sign-off for THIS tx, every time.
Custody options
- Recommended: the user's own wallet (MetaMask, Rabby, Phantom, TronLink) or a hardware wallet.
- Embedded / MPC (Turnkey, Privy, Lit, Coinbase CDP / AgentKit): configure per-tx human approval.
- Local keystore: developers only, unlocked by the human per tx. Never put a raw key in a prompt.
Advanced autonomous / session-key signing is not the default. If you must: scope to specific contracts and selectors, small caps, short expiry, exact-amount approvals, and still run verify_tx before every send.
Use this in your agent
Call MCP signing_guide (returns the full playbook including key recovery) or recovery_guide. Pass situation for one branch. Then verify_tx β human signs β broadcast_tx.
βHereβs my wallet, find me money. Then walk me through signing safely.β
