Skip to Content
Agent Wallet内测场景示例
本页目录

场景示例

当前为私有测试版。访问资格、支持的命令与钱包流程取决于 OneKey 和 CLI 版本。使用示例前,先检查已安装 CLI 的 schema。

以下示例展示请求背后的预期步骤。运行前先检查 onekey schema --list 与具体命令的 schema。示例地址和订单 ID 必须替换为经过核验的实际值;可用能力随测试版本变化。

查看钱包状态

用户:

显示我的钱包余额和收款地址。

预期流程:

onekey auth status onekey get-address onekey balance --chain eth

好的回答形态:

Active wallet: 0x... Ethereum balance: ... Receiving address: 0x... Next: I can show history, quote a swap, or prepare a transfer.

买入前先研究

用户:

Solana 上有哪些热门代币?进一步研究一下 BONK。

预期流程:

onekey token trending --chain sol onekey token search --query BONK --chain sol onekey token info --chain sol --token BONK

Agent 应先回答市场上下文。除非用户在后续明确要求交易,否则不应该直接进入 swap。

报价、确认、执行

用户:

将 1 ETH 兑换为 USDC,执行前先让我看报价。

预期流程:

onekey balance --chain eth onekey swap quote --chain eth --from ETH --to USDC --amount 1 onekey security audit --chain eth --token USDC onekey swap build --chain eth --from ETH --to USDC --amount 1

确认信息应包括:

字段示例
ActionSwap
RouteETH -> USDC on Ethereum
Amount1 ETH
Estimated output来自 quote 结果
Fees可用时来自 quote/build 结果
RiskAudit 或 simulation 状态
Next step是否继续?(是/否)

只有用户确认后才执行:

onekey swap execute --chain eth --order <orderId>

硬件钱包转账

用户:

使用我的 OneKey 硬件钱包向 0x... 发送 50 USDC。

预期流程:

onekey device search onekey auth login --hardware onekey auth status onekey balance --chain eth --token USDC

展示活动钱包、完整收款地址、链、代币、数量、预计费用和设备确认步骤。只有用户确认转账后才执行:

onekey transfer --to <verified-full-address> --amount 50 --token USDC --chain eth

转账确认必须说明设备确认步骤。如果设备锁定、断开、要求 PIN/passphrase,或拒绝请求,Agent 应停止并报告状态。

BTC Sign-Only PSBT

用户:

使用 Taproot 地址将 0.01 BTC 兑换为 USDC,只签名,不广播。

预期流程:

onekey wallet address --chain btc --address-type taproot onekey swap quote --chain btc --from BTC --to USDC --amount 0.01 onekey swap build --chain btc --from BTC --to USDC --amount 0.01

展示已准备的订单、地址类型、输入金额、预计输出和费用。即使不广播,签名也需要明确确认。只有用户确认后才执行:

onekey swap execute --chain btc --order <orderId> --from-address-type taproot --sign-only

回答应是 signed 或 preview-ready PSBT,而不是已经广播的交易哈希。

最后更新于