nansen-wallet-manager
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseWallet
钱包
Auth Setup
身份验证设置
bash
undefinedbash
undefinedSave API key (non-interactive)
保存API密钥(非交互式)
nansen login --api-key <key>
nansen login --api-key <key>
Or via env var:
或通过环境变量:
NANSEN_API_KEY=<key> nansen login
NANSEN_API_KEY=<key> nansen login
Verify
验证
nansen research profiler labels --address 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 --chain ethereum
undefinednansen research profiler labels --address 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 --chain ethereum
undefinedWallet Creation (Two-Step Agent Flow)
钱包创建(两步Agent流程)
Wallet creation requires a password from the human user. The agent must NOT generate or store the password itself.
Step 1 (Agent → Human): Ask the user to provide a wallet password (minimum 12 characters).Step 2 (Agent executes): Run the create command with the password the user gave you.
bash
NANSEN_WALLET_PASSWORD="<password_from_user>" nansen wallet createAfter creation, the CLI automatically saves the password:
- OS keychain (macOS Keychain, Linux secret-tool, Windows Credential Manager) — secure, preferred
- ~/.nansen/wallets/.credentials file — insecure fallback when no keychain is available (e.g. containers, CI)
All future wallet operations retrieve the password automatically — no env var or human input needed.
If the file fallback is used, the CLI prints a warning on every operation. To migrate to secure storage later, run .
.credentialsnansen wallet secure创建钱包需要人类用户提供密码。Agent绝对不能自行生成或存储密码。
步骤1(Agent → 人类): 请求用户提供钱包密码(至少12个字符)。步骤2(Agent执行): 使用用户提供的密码运行创建命令。
bash
NANSEN_WALLET_PASSWORD="<password_from_user>" nansen wallet create创建完成后,CLI会自动保存密码:
- 系统密钥链(macOS Keychain、Linux secret-tool、Windows Credential Manager)——安全,为首选方式
- ~/.nansen/wallets/.credentials文件——当没有密钥链可用时的不安全回退方案(例如容器、CI环境)
后续所有钱包操作都会自动获取密码——无需环境变量或人工输入。
如果使用文件回退方案,CLI会在每次操作时打印警告。之后若要迁移到安全存储,运行即可。
.credentialsnansen wallet securePassword resolution order (automatic)
密码自动解析顺序
- env var (if set)
NANSEN_WALLET_PASSWORD - OS keychain (saved automatically on wallet create)
- file (insecure fallback, with warning)
~/.nansen/wallets/.credentials - Structured JSON error with instructions (if none available)
- 环境变量(若已设置)
NANSEN_WALLET_PASSWORD - 系统密钥链(创建钱包时自动保存)
- 文件(不安全回退,带警告)
~/.nansen/wallets/.credentials - 包含操作指引的结构化JSON错误(若以上都不可用)
Critical rules for agents
Agent必须遵守的关键规则
- NEVER generate a password yourself — always ask the human user
- NEVER store the password in files, memory, logs, or conversation history
- NEVER use flag — that enables interactive prompts which agents cannot handle
--human - After wallet creation, you do NOT need the password for future operations — the keychain handles it
- If you get a error, ask the user to provide their password again
PASSWORD_REQUIRED
- 绝对不要自行生成密码——务必向人类用户索要
- 绝对不要在文件、内存、日志或对话历史中存储密码
- 绝对不要使用标志——该标志启用交互式提示,Agent无法处理
--human - 钱包创建完成后,后续操作无需密码——密钥链会自动处理
- 若收到错误,请再次请求用户提供密码
PASSWORD_REQUIRED
Create
创建
bash
undefinedbash
undefinedAsk the user for a password first, then:
先向用户索要密码,然后执行:
NANSEN_WALLET_PASSWORD="<password_from_user>" nansen wallet create
NANSEN_WALLET_PASSWORD="<password_from_user>" nansen wallet create
Or with a custom name:
或使用自定义名称:
NANSEN_WALLET_PASSWORD="<password_from_user>" nansen wallet create --name trading
undefinedNANSEN_WALLET_PASSWORD="<password_from_user>" nansen wallet create --name trading
undefinedList & Show
列出与查看
bash
nansen wallet list
nansen wallet show <name>
nansen wallet default <name>bash
nansen wallet list
nansen wallet show <name>
nansen wallet default <name>Send
转账
bash
undefinedbash
undefinedSend native token (SOL, ETH) — password auto-resolved from keychain
转账原生代币(SOL、ETH)——密码从密钥链自动解析
nansen wallet send --to <addr> --amount 1.5 --chain solana
nansen wallet send --to <addr> --amount 1.5 --chain solana
Send entire balance
转账全部余额
nansen wallet send --to <addr> --chain evm --max
nansen wallet send --to <addr> --chain evm --max
Dry run (preview, no broadcast)
试运行(预览,不广播交易)
nansen wallet send --to <addr> --amount 1.0 --chain evm --dry-run
undefinednansen wallet send --to <addr> --amount 1.0 --chain evm --dry-run
undefinedExport & Delete
导出与删除
bash
undefinedbash
undefinedPassword auto-resolved from keychain
密码从密钥链自动解析
nansen wallet export <name>
nansen wallet delete <name>
undefinednansen wallet export <name>
nansen wallet delete <name>
undefinedForget Password
忘记密码
bash
undefinedbash
undefinedRemove saved password from all stores (keychain + .credentials file)
从所有存储中移除已保存的密码(密钥链 + .credentials文件)
nansen wallet forget-password
undefinednansen wallet forget-password
undefinedMigrate to Secure Storage
迁移到安全存储
bash
nansen wallet secureFor detailed migration steps (from , , or env-var-only setups), see the nansen-wallet-migration skill.
~/.nansen/.env.credentialsbash
nansen wallet secure如需详细的迁移步骤(从、或仅使用环境变量的设置迁移),请查看nansen-wallet-migration技能。
~/.nansen/.env.credentialsFlags
标志
| Flag | Purpose |
|---|---|
| Recipient address |
| Amount to send |
| |
| Send entire balance |
| Preview without broadcasting |
| Enable interactive prompts (human terminal use only — agents must NOT use this) |
| Skip encryption (keys stored in plaintext — NOT recommended) |
| 标志 | 用途 |
|---|---|
| 接收方地址 |
| 转账金额 |
| |
| 转账全部余额 |
| 预览交易,不广播 |
| 启用交互式提示(仅适用于人类终端使用——Agent绝对不能使用) |
| 跳过加密(密钥以明文存储——不推荐) |
Environment Variables
环境变量
| Var | Purpose |
|---|---|
| Wallet encryption password — only needed for initial |
| API key (also set via |
| Custom EVM RPC endpoint |
| Custom Solana RPC endpoint |
| 变量 | 用途 |
|---|---|
| 钱包加密密码——仅在初始 |
| API密钥(也可通过 |
| 自定义EVM RPC端点 |
| 自定义Solana RPC端点 |