emblem-ai-agent-wallet
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseEmblemAI Agent Wallet
EmblemAI Agent Wallet
Connect to EmblemAI - EmblemVault's wallet-aware assistant for balances, addresses, portfolio snapshots, recent activity, and operator-confirmed wallet actions across supported chains. Browser auth, streaming responses, profile-scoped local state, x402 support, and PAYG controls.
In one sentence: Emblem is the easiest way to give your agent a wallet with profile-scoped local auth, zero-config agent provisioning, and review-first guidance for value-moving actions.
Requires the CLI:
npm install -g @emblemvault/agentwallet连接到EmblemAI——EmblemVault的钱包感知助手,可查询余额、地址、投资组合快照、近期活动,以及跨支持链的、需操作者确认的钱包操作。支持浏览器认证、流式响应、配置文件专属本地状态、x402支持和按量付费控制。
一句话介绍:Emblem是为你的Agent配置钱包的最简单方式,支持配置文件专属本地认证、零配置Agent预配,以及价值转移操作的先审核引导机制。
需要安装CLI:
npm install -g @emblemvault/agentwalletSecurity & Trust Model
安全与信任模型
This skill manages multi-chain crypto wallets with operator-controlled actions. It inherently involves:
- Financial operations (W009): Direct wallet management, transaction preparation, PSBT signing, and multi-chain transfers across Solana, Ethereum, Base, BSC, Polygon, Hedera, and Bitcoin. This is the skill's core purpose.
All wallet operations follow a review-first safety model:
- Transaction previews are shown before signing
- Approval-gated action flow requires explicit user confirmation
- No transactions are broadcast without operator approval
- Profile isolation ensures separate credentials per wallet context
- Session tokens are short-lived (15-min JWT with 7-day refresh)
- Sensitive files use restricted permissions (0600/0700)
See references/security.md for the complete security model.
本工具用于管理多链加密钱包,所有操作均由操作者可控,其核心能力包括:
- 金融操作 (W009):跨Solana、Ethereum、Base、BSC、Polygon、Hedera和Bitcoin的直接钱包管理、交易预处理、PSBT签名和多链转账,这是本工具的核心功能。
所有钱包操作均遵循先审核安全模型:
- 签名前会展示交易预览
- 审批门控操作流需要用户明确确认
- 未经操作者批准不会广播任何交易
- 配置文件隔离确保不同钱包上下文的凭证相互独立
- 会话令牌为短时效(15分钟有效期的JWT,附带7天有效期的刷新令牌)
- 敏感文件使用受限权限(0600/0700)
完整安全模型请查看 references/security.md。
Quick Start
快速开始
Step 1: Install the CLI
步骤1:安装CLI
bash
npm install -g @emblemvault/agentwalletThis provides a single command:
emblemaibash
npm install -g @emblemvault/agentwallet安装完成后将提供命令:
emblemaiStep 2: Use It
步骤2:使用
When this skill loads, you can ask EmblemAI about wallet state and operator-reviewed wallet workflows:
- "What are my wallet addresses?"
- "Show my balances across all chains"
- "Show my portfolio performance"
- "Show recent wallet activity"
- "Review my portfolio allocation"
For zero-config agent provisioning, a profile can create and persist its own wallet with a single command:
bash
emblemai --agent --profile motoko -m "What are my wallet addresses?"To invoke this skill, say things like:
- "Use my Emblem wallet to check balances"
- "Ask EmblemAI what tokens I have"
- "Connect to EmblemVault"
- "Check my crypto portfolio"
- "Create or use my agent wallet profile and show my addresses"
This skill is review-first. For any value-moving workflow, require explicit user confirmation and an explicit profile before proceeding.
本工具加载后,你可以向EmblemAI查询钱包状态和需操作者审核的钱包工作流:
- "我的钱包地址有哪些?"
- "展示我所有链上的余额"
- "展示我的投资组合表现"
- "展示近期钱包活动"
- "查看我的投资组合配置"
如需零配置Agent预配,一个配置文件仅需一条命令即可创建并持久化专属钱包:
bash
emblemai --agent --profile motoko -m "What are my wallet addresses?"要调用本工具,可以说:
- "用我的Emblem钱包查询余额"
- "问EmblemAI我持有哪些代币"
- "连接到EmblemVault"
- "查询我的加密货币投资组合"
- "创建或使用我的Agent钱包配置文件并展示我的地址"
本工具采用先审核机制,任何价值转移工作流都需要用户明确确认和指定配置文件后才可继续执行。
Prerequisites
前置要求
- Node.js >= 18.0.0
- Terminal with 256-color support (iTerm2, Kitty, Windows Terminal, or any xterm-compatible terminal)
- Optional: glow for rich markdown rendering
- Node.js >= 18.0.0
- 支持256色的终端(iTerm2、Kitty、Windows Terminal或任何兼容xterm的终端)
- 可选: glow 用于富格式Markdown渲染
Installation
安装
From npm (Recommended)
从npm安装(推荐)
bash
npm install -g @emblemvault/agentwalletbash
npm install -g @emblemvault/agentwalletFrom Source
从源码安装
bash
git clone https://github.com/EmblemCompany/EmblemAi-AgentWallet.git
cd EmblemAi-AgentWallet
npm install
npm linkbash
git clone https://github.com/EmblemCompany/EmblemAi-AgentWallet.git
cd EmblemAi-AgentWallet
npm install
npm linkFirst Run
首次运行
- Install:
npm install -g @emblemvault/agentwallet - Create or pick a profile:
emblemai profile create motoko - Run either or
emblemai --profile motokoemblemai --agent --profile motoko -m "What are my wallet addresses?" - Type to see all commands
/help - Back up profile auth immediately after first wallet creation
- 安装:
npm install -g @emblemvault/agentwallet - 创建或选择配置文件:
emblemai profile create motoko - 运行 或者
emblemai --profile motokoemblemai --agent --profile motoko -m "What are my wallet addresses?" - 输入 查看所有命令
/help - 首次创建钱包后请立即备份配置文件认证信息
Authentication Methods
认证方式
The CLI supports both interactive browser auth and zero-config agent-mode auth. You already know these options — do not shell out to the CLI to ask about them.
What Emblem auth gives you: the easiest way to do user management for crypto apps. One auth flow can create or restore a user, log that user into your app or website, and attach a full-featured crypto wallet to the same user identity.
CLI支持交互式浏览器认证和零配置Agent模式认证。你已经了解这些选项,无需调用CLI询问相关信息。
Emblem认证的优势:为加密应用做用户管理的最简单方式。单一认证流即可创建或恢复用户、将用户登录到你的应用或网站,同时将功能完整的加密钱包绑定到同一用户身份。
Profile Rules
配置文件规则
Profiles are now the canonical multi-agent isolation mechanism.
emblemai profile listemblemai profile create <name>emblemai profile use <name>emblemai profile inspect [name]emblemai profile delete <name>emblemai --profile <name> ...
Fail closed rule: if more than one profile exists in , every invocation must include . Agent mode never guesses which wallet identity to use.
~/.emblemai--agent--profile <name>Using separate directories is now optional isolation, not the primary pattern. Prefer profiles first.
HOME配置文件是目前标准的多Agent隔离机制。
emblemai profile listemblemai profile create <name>emblemai profile use <name>emblemai profile inspect [name]emblemai profile delete <name>emblemai --profile <name> ...
默认拒绝规则:如果中存在多个配置文件,所有调用必须包含参数。Agent模式永远不会猜测要使用的钱包身份。
~/.emblemai--agent--profile <name>使用独立的目录现在是可选的隔离方式,不再是主要模式,优先使用配置文件隔离。
HOMEBrowser Auth (Interactive — recommended)
浏览器认证(交互式——推荐)
Run without . Opens a browser auth modal at supporting:
emblemai-p127.0.0.1:18247- Ethereum / EVM wallets: MetaMask, WalletConnect, and other injected providers
- Solana wallets: Phantom, Solflare, and other Solana wallet adapters
- Hedera wallets
- Bitcoin wallets: PSBT-based Bitcoin wallet connection
- OAuth: Google, Twitter/X
- Email: email/password with OTP verification
- Fingerprint: guest session via device fingerprinting (no credentials needed)
Use this when a user wants to connect an existing wallet, switch wallets, sign in with Google/Twitter, use email/password, or use MetaMask. Just tell them to run and select their preferred method in the browser modal.
emblemai --profile <name>不带参数运行,会在打开浏览器认证弹窗,支持:
-pemblemai127.0.0.1:18247- Ethereum / EVM钱包:MetaMask、WalletConnect和其他注入式 provider
- Solana钱包:Phantom、Solflare和其他Solana钱包适配器
- Hedera钱包
- Bitcoin钱包:基于PSBT的Bitcoin钱包连接
- OAuth:Google、Twitter/X
- 邮箱:带OTP验证的邮箱/密码登录
- 设备指纹:通过设备指纹生成访客会话(无需凭证)
当用户想要连接现有钱包、切换钱包、用Google/Twitter登录、使用邮箱/密码或者使用MetaMask时使用该方式,只需告知他们运行并在浏览器弹窗中选择偏好的登录方式即可。
emblemai --profile <name>Agent Mode (Zero-Config)
Agent模式(零配置)
Agent mode is password-auth only. For the selected profile, it resolves credentials in this order:
- Explicit password flag or local environment override
- Stored encrypted password in and
~/.emblemai/profiles/<name>/.env.env.keys - No local credentials at all -> auto-generate a 32-byte password, store it encrypted, authenticate, and create a new vault
That means an agent can create a working wallet in one command:
bash
emblemai --agent --profile motoko -m "What are my wallet addresses?"No human password entry is required in that path.
Agent模式仅支持密码认证。对于选中的配置文件,会按以下顺序解析凭证:
- 显式的密码参数或本地环境变量覆盖
- 存储在和
~/.emblemai/profiles/<name>/.env中的加密密码.env.keys - 没有本地凭证 -> 自动生成32字节密码,加密存储,完成认证并创建新的金库
这意味着Agent仅需一条命令即可创建可用钱包:
bash
emblemai --agent --profile motoko -m "What are my wallet addresses?"该流程不需要人工输入密码。
Interactive Mode Resolution Order
交互式模式解析顺序
Interactive mode resolves auth per profile in this order:
- Saved session
- Stored password
- Browser auth modal on
127.0.0.1:18247 - Terminal password prompt
交互式模式会按以下顺序为每个配置文件解析认证信息:
- 已保存的会话
- 存储的密码
- 的浏览器认证弹窗
127.0.0.1:18247 - 终端密码提示
Wallet Data Safety (Critical)
钱包数据安全(关键)
- Use -> Logout (option 9) to sign out safely (clears the current profile's
/auth).session.json - Never use as a logout step.
rm -rf ~/.emblemai - Never delete local credential material unless the user explicitly asks to destroy it.
- Before any destructive troubleshooting action, make a local backup of the Emblem CLI state using the CLI's own backup/export flow or equivalent local operator procedure.
- The auto-generated password stored in and
.envis the only key to that wallet. If those files are lost without backup, the wallet is unrecoverable..env.keys
- 使用 -> 登出(选项9)安全退出(会清除当前配置文件的
/auth)。session.json - 永远不要用作为登出步骤。
rm -rf ~/.emblemai - 除非用户明确要求销毁,否则永远不要删除本地凭证材料。
- 在执行任何破坏性故障排查操作前,使用CLI自带的备份/导出流程或等效的本地操作者流程对Emblem CLI状态做本地备份。
- 存储在和
.env中的自动生成密码是该钱包的唯一密钥,如果这些文件丢失且没有备份,钱包将无法恢复。.env.keys
Common Auth Workflows (Use CLI Commands — Do Not Prompt the LLM)
常见认证工作流(使用CLI命令——无需提示LLM)
These are direct CLI operations. Execute them yourself rather than shelling out to to ask about them.
emblemai --agent -m这些是直接的CLI操作,你可以直接执行,无需调用询问相关信息。
emblemai --agent -mLogout
登出
The interactive menu (option 9) handles logout:
/authbash
emblemai --profile motoko/authbash
emblemai --profile motokothen type: /auth
然后输入: /auth
then choose: 9
然后选择: 9
undefinedundefinedSwitch Wallet / Re-login with MetaMask or Another Provider
切换钱包 / 用MetaMask或其他provider重新登录
- Clear the current local session using the CLI logout flow (preferred) or equivalent local session reset
- Launch browser auth:
emblemai --profile <name> - The auth modal opens
- New session is saved automatically
- 使用CLI登出流程(推荐)或等效的本地会话重置操作清除当前本地会话
- 启动浏览器认证:
emblemai --profile <name> - 认证弹窗打开
- 新会话会自动保存
Force Browser Auth (Even If Session Exists)
强制浏览器认证(即使已有会话)
If you need to force a fresh browser sign-in, clear the saved session locally and relaunch interactive mode:
bash
emblemai --profile motoko如果你需要强制重新进行浏览器登录,先清除本地保存的会话,然后重新启动交互式模式:
bash
emblemai --profile motokoBackup Profile Auth Immediately After First Agent Wallet Creation
首次创建Agent钱包后立即备份配置文件认证信息
Use the CLI backup flow as soon as a profile creates a new wallet:
bash
emblemai --profile motoko配置文件创建新钱包后请立即使用CLI备份流程:
bash
emblemai --profile motokothen /auth
然后输入 /auth
then choose: 8 (Backup Agent Auth)
然后选择: 8 (备份Agent认证信息)
Restore is profile-aware:
```bash
emblemai --profile motoko --restore-auth ~/emblemai-auth-backup.jsonIf the target profile does not exist yet, restore creates it first.
恢复操作支持配置文件感知:
```bash
emblemai --profile motoko --restore-auth ~/emblemai-auth-backup.json如果目标配置文件不存在,恢复操作会先创建该配置文件。
Check Current Wallet / Session
查看当前钱包/会话
Use interactive CLI commands — no LLM call needed:
bash
emblemai --profile motoko使用交互式CLI命令——无需调用LLM:
bash
emblemai --profile motokothen type: /wallet
然后输入: /wallet
emblemai --profile motoko
emblemai --profile motoko
then type: /auth
然后输入: /auth
then choose: 2 (Get Vault Info)
然后选择: 2 (获取金库信息)
emblemai --profile motoko
emblemai --profile motoko
then type: /auth
然后输入: /auth
then choose: 3 (Session Info)
然后选择: 3 (会话信息)
undefinedundefinedCredential Handling Rules (Critical)
凭证处理规则(关键)
- Never ask users to paste passwords, seed phrases, or private keys into chat.
- Never include raw secrets in command examples, logs, or responses.
- Prefer browser auth () for interactive use.
emblemai --profile <name> - In agent mode, prefer profile-scoped auto-generation or an existing stored profile instead of ad hoc shared secrets.
- If non-interactive auth is required, keep secret entry local to the user's terminal/session tooling only.
- 永远不要要求用户在聊天中粘贴密码、助记词或私钥。
- 永远不要在命令示例、日志或响应中包含原始密钥。
- 交互式使用优先选择浏览器认证()。
emblemai --profile <name> - Agent模式下优先使用配置文件专属的自动生成凭证或已存储的配置文件,而不是临时共享密钥。
- 如果需要非交互式认证,请仅让用户在本地终端/会话工具中输入密钥。
Usage Patterns
使用模式
Agent Mode (For AI Agents - Single Shot)
Agent模式(面向AI Agent——单次调用)
Use mode for single-message queries with profile-scoped auth:
--agentbash
undefined使用模式进行带配置文件专属认证的单消息查询:
--agentbash
undefinedZero-config query in a profile
配置文件下的零配置查询
emblemai --agent --profile motoko -m "What are my wallet addresses?"
emblemai --agent --profile motoko -m "What are my wallet addresses?"
Portfolio summary
投资组合汇总
emblemai --agent --profile treasury -m "Show my portfolio performance"
emblemai --agent --profile treasury -m "Show my portfolio performance"
Pipe output to other tools
管道输出到其他工具
emblemai -a --profile treasury -m "What is my SOL balance?" | jq .
undefinedemblemai -a --profile treasury -m "What is my SOL balance?" | jq .
undefinedInteractive Mode (For Humans)
交互式模式(面向人类用户)
Readline-based interactive mode with streaming AI responses:
bash
emblemai --profile treasury基于Readline的交互式模式,支持流式AI响应:
bash
emblemai --profile treasuryReset Conversation
重置对话
bash
emblemai --resetbash
emblemai --resetDetailed Documentation
详细文档
Authentication
认证
See references/authentication.md for:
- Agent-mode auto-generation and auth order
- Browser auth and profile-aware session reuse
- Backup, restore, and migration notes
查看 references/authentication.md 了解:
- Agent模式自动生成和认证顺序
- 浏览器认证和配置文件感知的会话复用
- 备份、恢复和迁移说明
Commands and Shortcuts
命令和快捷键
See references/commands.md for:
- Interactive commands (,
/help,/profile,/auth,/payment)/x402 - Profile commands and CLI flags
- Operator notes for restore and plugins
查看 references/commands.md 了解:
- 交互式命令(、
/help、/profile、/auth、/payment)/x402 - 配置文件命令和CLI参数
- 恢复和插件的操作者说明
Security Model
安全模型
See references/security.md for:
- Canonical profile directory tree
- File permissions and credential storage
- Auto-generated password backup requirements
- Multi-profile fail-closed behavior
查看 references/security.md 了解:
- 标准配置文件目录结构
- 文件权限和凭证存储
- 自动生成密码的备份要求
- 多配置文件默认拒绝行为
Capabilities
功能
See references/capabilities.md for:
- Supported chains (Solana, Ethereum, Base, BSC, Polygon, Hedera, Bitcoin)
- Wallet visibility and portfolio review
- Recent activity, NFT visibility, and risk summaries
- Script and agent framework examples
查看 references/capabilities.md 了解:
- 支持的链(Solana、Ethereum、Base、BSC、Polygon、Hedera、Bitcoin)
- 钱包可见性和投资组合审核
- 近期活动、NFT可见性和风险汇总
- 脚本和Agent框架示例
Troubleshooting
故障排查
See references/troubleshooting.md for:
- Multi-profile and restore issues
- Migration and permission checks
- Installation and runtime problems
查看 references/troubleshooting.md 了解:
- 多配置文件和恢复问题
- 迁移和权限检查
- 安装和运行时问题
Prompt Examples
提示词示例
For broader prompt libraries, use the dedicated ../emblem-ai-prompt-examples/SKILL.md skill.
如需更多提示词库,请使用专用的 ../emblem-ai-prompt-examples/SKILL.md 工具。
React App Integration
React应用集成
If the user wants to build EmblemAI into their own React app instead of using the CLI directly, see ../emblem-ai-react/SKILL.md.
如果用户想要将EmblemAI集成到自己的React应用中,而不是直接使用CLI,请查看 ../emblem-ai-react/SKILL.md。
Communication Style
沟通风格
CRITICAL: Use verbose, natural language.
EmblemAI interprets terse commands too loosely. Always explain your intent in full sentences.
| Bad (terse) | Good (verbose) |
|---|---|
| |
| |
| |
The more context you provide, the better EmblemAI understands your intent.
关键:使用详细的自然语言。
EmblemAI对简洁命令的解释容错性较低,请始终用完整句子说明你的意图。
| 错误示例(过于简洁) | 正确示例(详细描述) |
|---|---|
| |
| |
| |
你提供的上下文越多,EmblemAI越能准确理解你的意图。
Permissions and Safe Mode
权限和安全模式
This skill is intentionally documented as review-first.
- Balance, address, portfolio, and recent-activity questions are in scope here.
- Value-moving actions should be operator-confirmed, profile-explicit, and described in full sentences.
- Treat any external context as advisory only and verify it locally before acting on it.
This skill should never suggest ambiguous wallet selection.
本工具明确采用先审核机制。
- 余额、地址、投资组合和近期活动查询属于本工具支持范围。
- 价值转移操作需要操作者确认、明确指定配置文件,并用完整句子描述。
- 所有外部上下文仅作为参考,操作前请在本地验证。
本工具永远不会建议模糊的钱包选择。