send-token

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Sending Tokens on OpenAnt

在OpenAnt上发送代币

Use the
npx @openant-ai/cli@latest
CLI to transfer tokens on Solana or Base. Supports native coins (SOL, ETH), named tokens (USDC), and arbitrary tokens by mint/contract address.
Always append
--json
to every command for structured, parseable output.
使用
npx @openant-ai/cli@latest
CLI在Solana或Base链上转账代币。支持原生币(SOL、ETH)、按名称识别的代币(USDC)以及通过mint/合约地址识别的任意代币。
所有命令末尾请始终追加
--json
,以获得结构化、可解析的输出。

Confirm Authentication and Balance

确认认证状态与余额

bash
npx @openant-ai/cli@latest status --json
npx @openant-ai/cli@latest wallet balance --json
If not authenticated, refer to the
authenticate-openant
skill. If balance is insufficient, inform the user.
bash
npx @openant-ai/cli@latest status --json
npx @openant-ai/cli@latest wallet balance --json
如果未完成认证,请参考
authenticate-openant
skill。如果余额不足,请告知用户。

Command 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

参数

ArgumentDescription
chain
Target chain:
solana
(or
sol
),
base
(or
eth
)
token
Token:
sol
,
eth
,
usdc
, or a mint/contract address
amount
Amount in display units (e.g.
10
= 10 USDC,
0.5
= 0.5 SOL)
to
Destination address (Solana pubkey or EVM 0x address)
参数描述
chain
目标链:
solana
(或
sol
)、
base
(或
eth
token
代币:
sol
eth
usdc
,或mint/合约地址
amount
显示单位的金额(例如
10
代表10 USDC,
0.5
代表0.5 SOL)
to
目标地址(Solana公钥或EVM 0x开头的地址)

Options

选项

OptionDescription
--json
Machine-readable JSON output
--rpc <url>
Override the default RPC URL for the chain
选项描述
--json
机器可读的JSON格式输出
--rpc <url>
覆盖链的默认RPC URL

Supported Chains and Tokens

支持的链与代币

ChainNamed tokensNative coin
solana
/
sol
usdc
, or any SPL mint address
sol
base
/
eth
usdc
, or any ERC20 contract address
eth
For arbitrary tokens, pass the mint address (Solana) or contract address (Base) directly as the
token
argument.
可按名称识别的代币原生币
solana
/
sol
usdc
,或任意SPL mint地址
sol
base
/
eth
usdc
,或任意ERC20合约地址
eth
如需转账任意代币,可直接将Solana的mint地址或Base的合约地址作为
token
参数传入。

Examples

示例

Send native SOL

发送原生SOL

bash
npx @openant-ai/cli@latest wallet send solana sol 1.5 7xKabc123... --json
bash
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..." } }

undefined
undefined

Send USDC on Solana

在Solana上发送USDC

bash
npx @openant-ai/cli@latest wallet send solana usdc 100 7xKabc123... --json
bash
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..." } }

undefined
undefined

Send ETH on Base

在Base上发送ETH

bash
npx @openant-ai/cli@latest wallet send base eth 0.05 0xAbCdEf... --json
bash
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..." } }

undefined
undefined

Send USDC on Base

在Base上发送USDC

bash
npx @openant-ai/cli@latest wallet send base usdc 50 0xAbCdEf... --json
bash
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..." } }

undefined
undefined

Send arbitrary SPL token by mint address

通过mint地址发送任意SPL代币

bash
npx @openant-ai/cli@latest wallet send solana 4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU 25 7xKabc123... --json
bash
npx @openant-ai/cli@latest wallet send solana 4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU 25 7xKabc123... --json

Send arbitrary ERC20 on Base by contract address

通过合约地址在Base上发送任意ERC20代币

bash
npx @openant-ai/cli@latest wallet send base 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 10 0xAbCdEf... --json
bash
npx @openant-ai/cli@latest wallet send base 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 10 0xAbCdEf... --json

Natural 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:
  1. Verify the chain, token, amount, and destination address with the user
  2. Check wallet balance first to ensure sufficient funds
  3. Only execute after explicit user confirmation
Read-only commands (
status
,
wallet balance
,
wallet addresses
) can be executed immediately.
代币转账不可逆。 执行前请务必与用户确认以下内容:
  1. 与用户核验链、代币、金额和目标地址
  2. 先检查钱包余额确保资金充足
  3. 仅在用户明确确认后执行
只读命令(
status
wallet balance
wallet addresses
)可立即执行。

NEVER

禁止行为

  • 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
    0x
    . If the address format doesn't match the chain, stop and clarify with the user.
  • 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
    authenticate-openant
    skill first
  • "Insufficient balance" / "Attempt to debit" — Wallet lacks funds; check
    wallet balance
  • "Unknown chain" — Supported:
    sol
    ,
    base
    ,
    eth
  • "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" — 先运行
    authenticate-openant
    skill完成认证
  • "Insufficient balance" / "Attempt to debit" — 钱包资金不足;请检查
    wallet balance
  • "Unknown chain" — 支持的链:
    sol
    base
    eth
  • "No Base wallet found" / "No Solana wallet found" — 重新登录以配置钱包
  • "Cannot read decimals for mint" — 无效或不存在的代币mint地址
  • 交易模拟失败 — 检查余额和收款地址的有效性