Openclast Wallet Agent Guide
Quick start
- - Use the CLI to bootstrap:
-
openclast-wallet setup creates
wallet-config.json in the current folder.
-
openclast-wallet setup --config ./wallet-config.json initializes the wallet from that file.
- - Prefer
wallet-config.json in the project root and customize chains and limits before use. - Keep
wallet-config.json separate from openclaw.json (Openclaw config does not accept a top-level wallets key).
Approval flow (mandatory)
All send/approve/contract operations create a pending transaction that requires explicit approval.
Always:
- 1. Create the pending tx (send/erc20/contract call).
- Ask the user to approve.
- Only after approval, broadcast and confirm.
If the user asks to “just send,” still require approval unless config is explicitly set to auto mode.
Key export warning (mandatory)
Never expose private keys by default. If the user asks for export:
- - Require explicit confirmation.
- Warn that key export is dangerous and should be protected.
- Use environment gates if available (e.g.,
MOLTBOT_ALLOW_WALLET_EXPORT=1) and explicit CLI confirmation.
If export is not supported in this host, say so and offer safer alternatives.
Common tasks
Balance and tokens
- - Use the correct chainId for the chain the user mentions.
- If a chain is not configured, read-only balance may still be possible via well-known public RPCs.
Sending
- - Validate chainId and recipient.
- Respect per-tx and daily limits from config.
- Always provide a block explorer link when a tx is confirmed.
Chain name → chainId
- - Ethereum / Mainnet: INLINECODE8
- Sepolia: INLINECODE9
- Polygon: INLINECODE10
- Base: INLINECODE11
- Arbitrum One: INLINECODE12
When the user says “balance on Sepolia” or “send on Ethereum,” always map to a chainId and proceed.
Safety defaults
- - Default mode is notify/approval, not auto-send.
- Restrict unverified contracts when possible.
- Store private keys only in OS keychain (macOS) and never in config.
Config rules (apply when present)
- -
wallets.defaults.spending.mode: "notify" (default) or "auto" (sends without approval). - INLINECODE16 ,
dailyLimit, allowedChains, allowedRecipients, notifyChannels: enforced for send/ERC20/contract calls. - INLINECODE21 : where pending approvals are notified.
- INLINECODE22 : if
false, only allow verifiedTokenAddresses and verifiedContractAddresses.
Block explorer links (mandatory)
After approval and broadcast, always include a tx link. Use:
- -
/tx/<txHash> for transactions - INLINECODE27 for addresses
Base URL comes from wallets.chains.<chainId>.blockExplorerUrl when configured, otherwise fallback well-known explorers.
Agent tool expectations
If host tooling is available, prefer these tools:
- -
wallet_send, wallet_balance, wallet_txStatus, INLINECODE32 - INLINECODE33 ,
wallet_erc20_transfer, INLINECODE35
If the host provides CLI instead, use the host wallet CLI for create/address/send/approve and recover/import flows.
Files and CLI
- - Starter config: INLINECODE36
- Install skill in project: INLINECODE37
Openclast 钱包代理指南
快速开始
- openclast-wallet setup 在当前文件夹中创建 wallet-config.json。
- openclast-wallet setup --config ./wallet-config.json 从该文件初始化钱包。
- - 优先使用项目根目录下的 wallet-config.json,并在使用前自定义链和限额。
- 将 wallet-config.json 与 openclaw.json 分开存放(Openclaw 配置不接受顶层的 wallets 键)。
审批流程(必需)
所有发送/批准/合约操作都会创建一个待处理交易,需要明确批准。
始终:
- 1. 创建待处理交易(发送/ERC20/合约调用)。
- 要求用户批准。
- 仅在批准后,广播并确认。
如果用户要求直接发送,仍需批准,除非配置明确设置为自动模式。
密钥导出警告(必需)
默认情况下绝不暴露私钥。如果用户要求导出:
- - 需要明确确认。
- 警告密钥导出是危险的,应加以保护。
- 如果可用,使用环境门控(例如 MOLTBOTALLOWWALLET_EXPORT=1)和明确的 CLI 确认。
如果此主机不支持导出,请说明并提供更安全的替代方案。
常见任务
余额和代币
- - 为用户提到的链使用正确的 chainId。
- 如果链未配置,仍可能通过已知的公共 RPC 以只读方式获取余额。
发送
- - 验证 chainId 和接收方。
- 遵守配置中的每笔交易和每日限额。
- 交易确认后始终提供区块浏览器链接。
链名称 → chainId
- - 以太坊/主网:1
- Sepolia:11155111
- Polygon:137
- Base:8453
- Arbitrum One:42161
当用户说Sepolia 上的余额或在以太坊上发送时,始终映射到 chainId 并继续操作。
安全默认设置
- - 默认模式是通知/批准,而非自动发送。
- 尽可能限制未经验证的合约。
- 仅将私钥存储在操作系统密钥链(macOS)中,绝不存储在配置中。
配置规则(存在时适用)
- - wallets.defaults.spending.mode:notify(默认)或 auto(无需批准即可发送)。
- wallets.defaults.spending.limitPerTx、dailyLimit、allowedChains、allowedRecipients、notifyChannels:对发送/ERC20/合约调用强制执行。
- wallets.notify.primaryChannel:待批准通知的渠道。
- wallets.interactWithUnverifiedContracts:如果为 false,仅允许 verifiedTokenAddresses 和 verifiedContractAddresses。
区块浏览器链接(必需)
批准和广播后,始终包含交易链接。使用:
- - /tx/ 用于交易
- /address/ 用于地址
基础 URL 来自 wallets.chains..blockExplorerUrl(如果已配置),否则回退到已知的浏览器。
代理工具期望
如果主机工具可用,优先使用这些工具:
- - walletsend、walletbalance、wallettxStatus、walletapprove
- walleterc20approve、walleterc20transfer、walletcontractcall
如果主机提供 CLI,则使用主机钱包 CLI 进行创建/地址/发送/批准和恢复/导入流程。
文件和 CLI
- - 起始配置:wallet-config.json
- 在项目中安装技能:openclast-wallet install-skill