Skip to content

Commit 48fba7e

Browse files
graysonhycclaude
andauthored
docs: document wallet export-key command (#90)
Drift fix — the `wallet export-key` command shipped in 5bb9951 but README, SKILL.md, and capabilities/wallet.md weren't updated. Adds the command row to the README wallet-management table, lists it under the manual/passphrase ops in the capability doc with usage examples for each --chain option, and updates the capability index entries that enumerate wallet verbs. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 5bb9951 commit 48fba7e

3 files changed

Lines changed: 13 additions & 4 deletions

File tree

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ One skill, [`zerion`](./skills/zerion/SKILL.md), under [`./skills/zerion/`](./sk
3636
| [`analyze.md`](./skills/zerion/capabilities/analyze.md) | Portfolio, positions, history, PnL, token search, watchlist (read-only; supports x402 / MPP) |
3737
| [`trading.md`](./skills/zerion/capabilities/trading.md) | Swap, bridge, send tokens (on-chain actions; needs API key + agent token) |
3838
| [`sign.md`](./skills/zerion/capabilities/sign.md) | Off-chain signing — sign-message (EIP-191 / raw), sign-typed-data (EIP-712) |
39-
| [`wallet.md`](./skills/zerion/capabilities/wallet.md) | Wallet management — create, import, list, fund, backup, delete, sync |
39+
| [`wallet.md`](./skills/zerion/capabilities/wallet.md) | Wallet management — create, import, list, fund, backup, export-key, delete, sync |
4040
| [`agent-management.md`](./skills/zerion/capabilities/agent-management.md) | Agent tokens + policies (the autonomous-trading primitives) |
4141
| [`swap-0x.md`](./skills/zerion/capabilities/swap-0x.md) | Token swaps via 0x API v2 — AllowanceHolder, Permit2, and Gasless flows across 20+ EVM chains |
4242

@@ -138,7 +138,7 @@ The agent reaches for the `zerion` skill, which routes by task to the right nest
138138

139139
Zerion CLI splits into two surfaces, by design.
140140

141-
- **Wallet management and agent token setup are manual.** `wallet create`, `import`, `backup`, and `delete` all prompt for a passphrase. `wallet sync` emits a QR code you scan with the Zerion app. `agent create-token` mints a scoped trading credential bound to a specific wallet, and `agent create-policy` attaches the rules it has to obey — allowed chains, expiry, transfer/approval gates, contract allowlists. The sibling admin commands (`agent list-tokens`, `use-token`, `revoke-token`, `list-policies`, `show-policy`, `delete-policy`) are also gestures you make yourself. No key material moves and no spending credential widens without you in the loop. For CI and headless servers, `agent create-token` accepts `--passphrase-file <path>` (file must be mode `0600`) so token issuance can be scripted without an interactive TTY — see [`capabilities/agent-management.md`](./skills/zerion/capabilities/agent-management.md).
141+
- **Wallet management and agent token setup are manual.** `wallet create`, `import`, `backup`, `export-key`, and `delete` all prompt for a passphrase. `wallet sync` emits a QR code you scan with the Zerion app. `agent create-token` mints a scoped trading credential bound to a specific wallet, and `agent create-policy` attaches the rules it has to obey — allowed chains, expiry, transfer/approval gates, contract allowlists. The sibling admin commands (`agent list-tokens`, `use-token`, `revoke-token`, `list-policies`, `show-policy`, `delete-policy`) are also gestures you make yourself. No key material moves and no spending credential widens without you in the loop. For CI and headless servers, `agent create-token` accepts `--passphrase-file <path>` (file must be mode `0600`) so token issuance can be scripted without an interactive TTY — see [`capabilities/agent-management.md`](./skills/zerion/capabilities/agent-management.md).
142142
- **Analysis, signing, trading, and discovery are for agents.** `analyze`, `portfolio`, `positions`, `history`, `pnl`, `sign-message`, `sign-typed-data`, `swap`, `bridge`, `send`, `swap tokens`, `search`, `chains`, `wallet list`, `wallet fund`, and `watch list` emit JSON to stdout, structured errors to stderr, and skip confirmation dialogs. Once an agent token is configured, signing and trading fire immediately — the token authorizes operations on behalf of the wallet without a passphrase prompt.
143143

144144
Setup gestures (`init`, `setup skills`, `config set/unset/list`, `watch` add/remove) are one-time configuration steps you run yourself before automation takes over.
@@ -251,6 +251,7 @@ Encrypted local wallets. EVM + Solana supported. Passphrase required for all des
251251
| `zerion wallet list` | List all wallets | `zerion wallet list` |
252252
| `zerion wallet fund` | Show deposit addresses for funding | `zerion wallet fund --wallet trading-bot` |
253253
| `zerion wallet backup --wallet <name>` | Export recovery phrase | `zerion wallet backup --wallet trading-bot` |
254+
| `zerion wallet export-key --wallet <name> [--chain evm\|solana\|all] [--index N]` | Export raw private key(s) derived from mnemonic — EVM (0x hex) and/or Solana (base58 Phantom format + 32-byte ed25519 seed). Output is stderr-only. | `zerion wallet export-key --wallet trading-bot --chain evm` |
254255
| `zerion wallet delete <name>` | Permanently delete a wallet (requires passphrase) | `zerion wallet delete trading-bot` |
255256
| `zerion wallet sync --wallet <name>` | Sync wallet to Zerion app via QR code | `zerion wallet sync --wallet trading-bot` |
256257
| `zerion wallet sync --all` | Sync all wallets to Zerion app | `zerion wallet sync --all` |

skills/zerion/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ Before executing any capability below, **Read the matching file** for the full c
7474
| Wallet analysis: portfolio, positions, history, PnL, watchlist | `capabilities/analyze.md` |
7575
| On-chain trading: swap, bridge, send | `capabilities/trading.md` |
7676
| Off-chain signing: EIP-191 messages, EIP-712 typed data | `capabilities/sign.md` |
77-
| Wallet management: create, import, list, fund, backup, delete | `capabilities/wallet.md` |
77+
| Wallet management: create, import, list, fund, backup, export-key, delete | `capabilities/wallet.md` |
7878
| Agent tokens + security policies for autonomous trading | `capabilities/agent-management.md` |
7979
| 0x Swap API v2 (direct integration, Permit2/AllowanceHolder, gasless) | `capabilities/swap-0x.md` |
8080

skills/zerion/capabilities/wallet.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ Requires Node.js ≥ 20. For auth see the parent `SKILL.md` (Setup + Authenticat
1919
- "Import my wallet from a private key / mnemonic"
2020
- "Show my wallets" / "list deposit addresses"
2121
- "Back up my recovery phrase"
22+
- "Export the raw private key" / "give me the 0x hex key" / "give me the Phantom-format secret"
2223
- "Delete this wallet"
2324
- "Sync my wallet to the Zerion mobile app"
2425

@@ -43,7 +44,7 @@ A wallet imported from a single private key holds only one chain's account:
4344
| Operation | Type | Notes |
4445
|-----------|------|-------|
4546
| `wallet list`, `wallet fund` | **Agent** | Read-only. Safe to invoke autonomously. |
46-
| `wallet create`, `wallet import`, `wallet backup`, `wallet delete`, `wallet sync` | **Manual** | Require passphrase or interactive input. Humans must run these directly — agents must not call them. |
47+
| `wallet create`, `wallet import`, `wallet backup`, `wallet export-key`, `wallet delete`, `wallet sync` | **Manual** | Require passphrase or interactive input. Humans must run these directly — agents must not call them. |
4748

4849
## Read-only — agents may invoke freely
4950

@@ -70,6 +71,13 @@ zerion wallet import --name <name> --mnemonic
7071
# Export the recovery phrase (passphrase required)
7172
zerion wallet backup --wallet <name>
7273

74+
# Export raw private key(s) derived from the mnemonic (passphrase required)
75+
# Output goes to stderr only — same safety stance as `wallet backup`.
76+
zerion wallet export-key --wallet <name> # both chains, derivation index 0
77+
zerion wallet export-key --wallet <name> --chain evm # EVM only — m/44'/60'/0'/0/0, 0x hex
78+
zerion wallet export-key --wallet <name> --chain solana # Solana only — m/44'/501'/0'/0', base58 (Phantom format) + 32-byte ed25519 seed
79+
zerion wallet export-key --wallet <name> --chain evm --index 1 # different derivation index
80+
7381
# Permanently delete (passphrase + confirmation)
7482
zerion wallet delete <name>
7583

0 commit comments

Comments
 (0)