send-token
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSending Tokens on OpenAnt
在OpenAnt上发送代币
Use the CLI to transfer tokens on Solana or Base. Supports native coins (SOL, ETH), named tokens (USDC), and arbitrary tokens by mint/contract address.
npx @openant-ai/cli@latestAlways append to every command for structured, parseable output.
--json使用 CLI在Solana或Base链上转账代币。支持原生币(SOL、ETH)、按名称识别的代币(USDC)以及通过mint/合约地址识别的任意代币。
npx @openant-ai/cli@latest所有命令末尾请始终追加,以获得结构化、可解析的输出。
--jsonConfirm Authentication and Balance
确认认证状态与余额
bash
npx @openant-ai/cli@latest status --json
npx @openant-ai/cli@latest wallet balance --jsonIf not authenticated, refer to the skill. If balance is insufficient, inform the user.
authenticate-openantbash
npx @openant-ai/cli@latest status --json
npx @openant-ai/cli@latest wallet balance --json如果未完成认证,请参考 skill。如果余额不足,请告知用户。
authenticate-openantCommand Syntax
命令语法
bash
npx @openant-ai/cli@latest wallet send <chain> <token> <amount> <to> [--json] [--rpc <url>]bash
npx @openant-ai/cli@latest wallet send <chain> <token> <amount> <to> [--json] [--rpc <url>]Arguments
参数
| Argument | Description |
|---|---|
| Target chain: |
| Token: |
| Amount in display units (e.g. |
| Destination address (Solana pubkey or EVM 0x address) |
| 参数 | 描述 |
|---|---|
| 目标链: |
| 代币: |
| 显示单位的金额(例如 |
| 目标地址(Solana公钥或EVM 0x开头的地址) |
Options
选项
| Option | Description |
|---|---|
| Machine-readable JSON output |
| Override the default RPC URL for the chain |
| 选项 | 描述 |
|---|---|
| 机器可读的JSON格式输出 |
| 覆盖链的默认RPC URL |
Supported Chains and Tokens
支持的链与代币
| Chain | Named tokens | Native coin |
|---|---|---|
| | |
| | |
For arbitrary tokens, pass the mint address (Solana) or contract address (Base) directly as the argument.
token| 链 | 可按名称识别的代币 | 原生币 |
|---|---|---|
| | |
| | |
如需转账任意代币,可直接将Solana的mint地址或Base的合约地址作为参数传入。
tokenExamples
示例
Send native SOL
发送原生SOL
bash
npx @openant-ai/cli@latest wallet send solana sol 1.5 7xKabc123... --jsonbash
npx @openant-ai/cli@latest wallet send solana sol 1.5 7xKabc123... --json-> { "success": true, "data": { "chain": "solana", "txSignature": "5xYz..." } }
-> { "success": true, "data": { "chain": "solana", "txSignature": "5xYz..." } }
undefinedundefinedSend USDC on Solana
在Solana上发送USDC
bash
npx @openant-ai/cli@latest wallet send solana usdc 100 7xKabc123... --jsonbash
npx @openant-ai/cli@latest wallet send solana usdc 100 7xKabc123... --json-> { "success": true, "data": { "chain": "solana", "txSignature": "3aBc..." } }
-> { "success": true, "data": { "chain": "solana", "txSignature": "3aBc..." } }
undefinedundefinedSend ETH on Base
在Base上发送ETH
bash
npx @openant-ai/cli@latest wallet send base eth 0.05 0xAbCdEf... --jsonbash
npx @openant-ai/cli@latest wallet send base eth 0.05 0xAbCdEf... --json-> { "success": true, "data": { "chain": "base", "txHash": "0x1a2b..." } }
-> { "success": true, "data": { "chain": "base", "txHash": "0x1a2b..." } }
undefinedundefinedSend USDC on Base
在Base上发送USDC
bash
npx @openant-ai/cli@latest wallet send base usdc 50 0xAbCdEf... --jsonbash
npx @openant-ai/cli@latest wallet send base usdc 50 0xAbCdEf... --json-> { "success": true, "data": { "chain": "base", "txHash": "0x9f8e..." } }
-> { "success": true, "data": { "chain": "base", "txHash": "0x9f8e..." } }
undefinedundefinedSend arbitrary SPL token by mint address
通过mint地址发送任意SPL代币
bash
npx @openant-ai/cli@latest wallet send solana 4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU 25 7xKabc123... --jsonbash
npx @openant-ai/cli@latest wallet send solana 4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU 25 7xKabc123... --jsonSend arbitrary ERC20 on Base by contract address
通过合约地址在Base上发送任意ERC20代币
bash
npx @openant-ai/cli@latest wallet send base 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 10 0xAbCdEf... --jsonbash
npx @openant-ai/cli@latest wallet send base 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 10 0xAbCdEf... --jsonNatural Language Mapping
自然语言映射
When the user says something like:
- "帮我 base 上转 10 usdc 给 0xAbc..." →
wallet send base usdc 10 0xAbc... --json - "帮我 solana 上转 1.5 sol 给 7xK..." →
wallet send solana sol 1.5 7xK... --json - "Send 50 USDC to 0xDef... on Base" →
wallet send base usdc 50 0xDef... --json - "Transfer 0.1 ETH to 0x123..." →
wallet send base eth 0.1 0x123... --json - "帮我 solana 上转 10 <mint_address> 给 <recipient>" →
wallet send solana <mint_address> 10 <recipient> --json
Extract: chain, token (name or address), amount, and destination address.
当用户表述如下内容时:
- "帮我 base 上转 10 usdc 给 0xAbc..." →
wallet send base usdc 10 0xAbc... --json - "帮我 solana 上转 1.5 sol 给 7xK..." →
wallet send solana sol 1.5 7xK... --json - "Send 50 USDC to 0xDef... on Base" →
wallet send base usdc 50 0xDef... --json - "Transfer 0.1 ETH to 0x123..." →
wallet send base eth 0.1 0x123... --json - "帮我 solana 上转 10 <mint_address> 给 <recipient>" →
wallet send solana <mint_address> 10 <recipient> --json
请提取:链、代币(名称或地址)、金额和目标地址。
Autonomy
执行规则
Token transfers are irreversible. Always confirm with the user before executing:
- Verify the chain, token, amount, and destination address with the user
- Check wallet balance first to ensure sufficient funds
- Only execute after explicit user confirmation
Read-only commands (, , ) can be executed immediately.
statuswallet balancewallet addresses代币转账不可逆。 执行前请务必与用户确认以下内容:
- 与用户核验链、代币、金额和目标地址
- 先检查钱包余额确保资金充足
- 仅在用户明确确认后执行
只读命令(、、)可立即执行。
statuswallet balancewallet addressesNEVER
禁止行为
- NEVER send without the user explicitly confirming the destination address — blockchain transfers are irreversible. Show the full address and ask the user to verify it before executing.
- NEVER send Solana tokens to a Base address, or vice versa — the chains are incompatible. Solana addresses are base58 strings (32–44 chars), Base addresses start with . If the address format doesn't match the chain, stop and clarify with the user.
0x - NEVER assume the displayed balance accounts for gas — Solana transactions require a small SOL fee (~0.000005 SOL); Base transactions require ETH for gas. If the user is sending their entire balance, leave a small reserve or the transaction will fail.
- NEVER infer the chain from the token alone — USDC exists on both Solana and Base. Always confirm which chain the user intends before sending.
- NEVER send to an address the user typed casually without double-checking — if the user typed the address in the middle of a sentence or abbreviated it, ask them to paste the full address again to confirm.
- 绝对不要在用户未明确确认目标地址的情况下发送代币 — 区块链转账不可逆。执行前请展示完整地址并要求用户核验。
- 绝对不要将Solana代币发送到Base地址,反之亦然 — 两条链不兼容。Solana地址是base58编码字符串(32-44个字符),Base地址以开头。如果地址格式与链不匹配,请停止操作并向用户确认。
0x - 绝对不要假设显示余额已覆盖gas费用 — Solana交易需要少量SOL手续费(约0.000005 SOL);Base交易需要ETH支付gas。如果用户要转出全部余额,请预留少量资金否则交易会失败。
- 绝对不要仅通过代币推断链 — USDC同时存在于Solana和Base链上。发送前请务必确认用户想要使用的链。
- 绝对不要向用户随意输入的地址转账,没有二次确认的情况下不可执行 — 如果用户在句子中间输入地址或者缩写了地址,请要求用户重新粘贴完整地址进行确认。
Prerequisites
前置条件
- Must be authenticated ()
npx @openant-ai/cli@latest status --json - Wallet must have sufficient balance for the transfer plus gas/fees
- For SPL token transfers, the sender must hold the token
- 必须已完成认证()
npx @openant-ai/cli@latest status --json - 钱包必须有足够余额覆盖转账金额+gas/手续费
- 转账SPL代币时,发送方必须持有该代币
Error Handling
错误处理
- "No Turnkey credentials found" — Run skill first
authenticate-openant - "Insufficient balance" / "Attempt to debit" — Wallet lacks funds; check
wallet balance - "Unknown chain" — Supported: ,
sol,baseeth - "No Base wallet found" / "No Solana wallet found" — Re-login to provision wallets
- "Cannot read decimals for mint" — Invalid or non-existent token mint address
- Transaction simulation failed — Check balance and recipient address validity
- "No Turnkey credentials found" — 先运行skill完成认证
authenticate-openant - "Insufficient balance" / "Attempt to debit" — 钱包资金不足;请检查
wallet balance - "Unknown chain" — 支持的链:、
sol、baseeth - "No Base wallet found" / "No Solana wallet found" — 重新登录以配置钱包
- "Cannot read decimals for mint" — 无效或不存在的代币mint地址
- 交易模拟失败 — 检查余额和收款地址的有效性