跳至主要内容
小龙虾小龙虾AI
🤖

Nansen Wallet

Wallet management — create, list, show, export, send, delete. Use when creating wallets, checking balances, or sending tokens.

下载65
星标1
版本1.0.0
金融财务
安全通过
💬Prompt

技能说明


name: nansen-wallet description: Wallet management — create, list, show, export, send, delete. Use when creating wallets, checking balances, or sending tokens. metadata: openclaw: requires: env: - NANSEN_API_KEY - NANSEN_WALLET_PASSWORD bins: - nansen primaryEnv: NANSEN_API_KEY install: - kind: node package: nansen-cli bins: [nansen] allowed-tools: Bash

Wallet

Auth Setup

# API key (persistent — recommended)
nansen login
# Or non-interactive:
NANSEN_API_KEY=<key> nansen login

# Verify
nansen research profiler labels --address 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 --chain ethereum

Password Policy (Agents)

CRITICAL: Never hold a wallet password only in memory.

Wallets are encrypted with AES-256-GCM. A lost password means permanently locked funds — there is no recovery mechanism. Passwords must be persisted to ~/.nansen/.env so they survive session restarts.

  • Never echo or display the password in conversation history
  • Never hold a password only in session memory — always persist to ~/.nansen/.env first

Setup flow (before first wallet operation)

# 1. Ensure ~/.nansen exists
mkdir -p ~/.nansen

# 2. Check if password is already configured (env var OR file)
source ~/.nansen/.env 2>/dev/null
if [ -z "$NANSEN_WALLET_PASSWORD" ] && ! grep -q 'NANSEN_WALLET_PASSWORD' ~/.nansen/.env 2>/dev/null; then
  # 3. Generate a strong password and persist it
  NANSEN_WALLET_PASSWORD=$(openssl rand -base64 24)
  echo "export NANSEN_WALLET_PASSWORD=\"$NANSEN_WALLET_PASSWORD\"" >> ~/.nansen/.env
  chmod 600 ~/.nansen/.env
fi

Key rules:

  • Generate + persist is fine — the password lives in ~/.nansen/.env, not in agent memory
  • If ~/.nansen/.env already has a password, always use the existing one — never overwrite
  • If the file already exists but has no password, append (don't overwrite other vars)

For all wallet commands

Always source the env file before running wallet operations:

source ~/.nansen/.env && nansen wallet <command>

Create

# Source password from .env (auto-generated if needed), then create
source ~/.nansen/.env && nansen wallet create

List & Show

nansen wallet list
nansen wallet show <name>
nansen wallet default <name>

Send

# Send native token (SOL, ETH)
nansen wallet send --to <addr> --amount 1.5 --chain solana

# Send entire balance
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

Export & Delete

nansen wallet export <name>
nansen wallet delete <name>

Flags

FlagPurpose
--toRecipient address
--amountAmount to send
--chainevm or solana
--maxSend entire balance
--dry-runPreview without broadcasting

Environment Variables

VarPurpose
NANSEN_WALLET_PASSWORDRequired for agents. Wallet encryption password — auto-generated and persisted to ~/.nansen/.env on first use (see Password Policy)
NANSEN_API_KEYAPI key (also set via nansen login)
NANSEN_EVM_RPCCustom EVM RPC endpoint
NANSEN_SOLANA_RPCCustom Solana RPC endpoint

如何使用「Nansen Wallet」?

  1. 打开小龙虾AI(Web 或 iOS App)
  2. 点击上方「立即使用」按钮,或在对话框中输入任务描述
  3. 小龙虾AI 会自动匹配并调用「Nansen Wallet」技能完成任务
  4. 结果即时呈现,支持继续对话优化

相关技能