Skip to Content

Recipes

These examples show how a user can talk to an AI agent and what the OneKey skill should do behind the scenes.

Check Wallet State

User:

Show my wallet balance and receiving address.

Expected flow:

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

Good response shape:

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

Research Before Buying

User:

What Solana tokens are trending, and is BONK worth a closer look?

Expected flow:

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

The agent should answer with market context first. It should not start a swap unless the user asks to trade in a later turn.

Quote, Confirm, Execute

User:

Swap 1 ETH to USDC, but show me the quote before execution.

Expected flow:

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

The confirmation should show:

FieldExample
ActionSwap
RouteETH -> USDC on Ethereum
Amount1 ETH
Estimated outputFrom quote result
FeesFrom quote/build result when available
RiskAudit or simulation status
Next stepProceed? (yes/no)

Only after the user confirms:

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

Hardware-Backed Transfer

User:

Use my OneKey hardware wallet to send 50 USDC to 0x...

Expected flow:

onekey device search onekey auth login --hardware onekey auth status onekey balance --chain eth --token USDC onekey transfer --to 0x... --amount 50 --token USDC --chain eth

The transfer confirmation must mention the device confirmation step. If the device is locked, disconnected, asks for PIN/passphrase, or rejects the request, the agent should stop and report that state.

BTC Sign-Only PSBT

User:

Swap 0.01 BTC to USDC using taproot and sign only.

Expected flow:

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

The response should be a signed or preview-ready PSBT, not a broadcasted transaction hash.

Last updated on