ideabrowser.com — find trending startup ideas with real demand
Try itnpx skills add https://github.com/okx/onchainos-skills --skill okx-agentic-walletWallet operations: authentication, balance, token transfers, transaction history, and smart contract calls.
Every time before running any onchainos command, always follow these steps in order. Do not echo routine command output to the user; only provide a brief status update when installing, updating, or handling a failure.
Resolve latest stable version: Fetch the latest stable release tag from the GitHub API:
curl -sSL "https://api.github.com/repos/okx/onchainos-skills/releases/latest"
Extract the tag_name field (e.g., v1.0.5) into LATEST_TAG.
If the API call fails and onchainos is already installed locally, skip steps 2-3
and proceed to run the command (the user may be offline or rate-limited; a stale
binary is better than blocking). If onchainos is not installed, stop and
tell the user to check their network connection or install manually from
https://github.com/okx/onchainos-skills.
Install or update: If onchainos is not found, or if the cache at ~/.onchainos/last_check ($env:USERPROFILE\.onchainos\last_check on Windows) is older than 12 hours:
curl -sSL "https://raw.githubusercontent.com/okx/onchainos-skills/${LATEST_TAG}/install.sh" -o /tmp/onchainos-install.sh
curl -sSL "https://github.com/okx/onchainos-skills/releases/download/${LATEST_TAG}/installer-checksums.txt" -o /tmp/installer-checksums.txtInvoke-WebRequest -Uri "https://raw.githubusercontent.com/okx/onchainos-skills/${LATEST_TAG}/install.ps1" -OutFile "$env:TEMP\onchainos-install.ps1"
Invoke-WebRequest -Uri "https://github.com/okx/onchainos-skills/releases/download/${LATEST_TAG}/installer-checksums.txt" -OutFile "$env:TEMP\installer-checksums.txt"installer-checksums.txt. On mismatch, stop and warn — the installer may have been tampered with.sh /tmp/onchainos-install.sh (or & "$env:TEMP\onchainos-install.ps1" on Windows).
The installer handles version comparison internally and only downloads the binary if needed.Verify binary integrity (once per session): Run onchainos --version to get the installed
version (e.g., 1.0.5 or 2.0.0-beta.0). Construct the installed tag as v<version>.
Download checksums.txt for the installed version's tag (not necessarily LATEST_TAG):
curl -sSL "https://github.com/okx/onchainos-skills/releases/download/v<version>/checksums.txt" -o /tmp/onchainos-checksums.txt
Look up the platform target and compare the installed binary's SHA256 against the checksum.
On mismatch, reinstall (step 2) and re-verify. If still mismatched, stop and warn.
arm64->aarch64-apple-darwin, x86_64->x86_64-apple-darwin; Linux: x86_64->x86_64-unknown-linux-gnu, aarch64->aarch64-unknown-linux-gnu, i686->i686-unknown-linux-gnu, armv7l->armv7-unknown-linux-gnueabihf; Windows: AMD64->x86_64-pc-windows-msvc, x86->i686-pc-windows-msvc, ARM64->aarch64-pc-windows-msvcshasum -a 256 ~/.local/bin/onchainos; Windows: (Get-FileHash "$env:USERPROFILE\.local\bin\onchainos.exe" -Algorithm SHA256).Hash.ToLower()Check for skill version drift (once per session): If onchainos --version is newer
than this skill's metadata.version, display a one-time notice that the skill may be
outdated and suggest the user re-install skills via their platform's method. Do not block.
Do NOT auto-reinstall on command failures. Report errors and suggest
onchainos --version or manual reinstall from https://github.com/okx/onchainos-skills.
Rate limit errors. If a command hits rate limits, the shared API key may
be throttled. Suggest creating a personal key at the
OKX Developer Portal. If the
user creates a .env file, remind them to add .env to .gitignore.
onchainos wallet chainsokx-dex-marketokx-wallet-portfoliookx-dex-marketokx-dex-tokenokx-dex-signalokx-dex-trenchesokx-dex-swapokx-onchain-gatewayokx-securityokx-security--chain ResolutionIMPORTANT: --chain only accepts a numeric chain ID (e.g. 1 for Ethereum, 501 for Solana, 196 for X Layer). Text values such as sol, xlayer, eth, or any chain name/alias are NOT accepted and will cause the command to fail.
Whenever a command requires --chain, follow these steps:
chainName, showName, or alias values from onchainos wallet chains output (if available in conversation context). This is semantic matching — handle typos, abbreviations, and colloquial names (e.g. "ethereuma" → 1, "币安链" → 56). If you are not 100% confident in the match, ask the user to confirm before proceeding.realChainIndex to --chain. Never pass chain names, aliases, or user-provided text directly.onchainos wallet chains to get the full list and find the matching realChainIndex.⚠️ If no chain can be confidently matched, do NOT guess. Ask the user to clarify, and show the available chain list for reference. When displaying chain names to the user, always use human-readable names (e.g. "Ethereum", "BNB Chain"), never the internal IDs.
Example flow:
# User says: "Show my balance on Ethereum"
# Step 1: infer chain from user input → Ethereum → realChainIndex=1
# Step 2: pass realChainIndex to --chain
→ onchainos wallet balance --chain 1
Applies to:
onchainos wallet balance --chainonchainos wallet send --chainonchainos wallet contract-call --chainonchainos wallet history --chain (detail mode)onchainos wallet addresses --chain--amount / --value UnitsIMPORTANT: Always pass amounts in UI units (human-readable), never in base units (wei, lamports, etc.). The CLI handles unit conversion internally.
| User says | --amount value | ❌ Wrong |
|---|---|---|
| "Transfer 0.15 ETH" | "0.15" | "150000000000000000" (wei) |
| "Send 100 USDC" | "100" | "100000000" (6 decimals) |
| "Send 0.5 SOL" | "0.5" | "500000000" (lamports) |
Applies to:
onchainos wallet send --amountonchainos wallet contract-call --valueCLI Reference: For full parameter tables, return field schemas, and usage examples, see cli-reference.md.
Login commands (
wallet login,wallet verify) are covered in Step 2: Authentication.
| # | Command | Description | Auth Required |
|---|---|---|---|
| A3 | onchainos wallet add | Add a new wallet account | Yes |
| A4 | onchainos wallet switch <account_id> | Switch to a different wallet account | No |
| A5 | onchainos wallet status | Show current login status and active account | No |
| A6 | onchainos wallet logout | Logout and clear all stored credentials | No |
| A7 | onchainos wallet addresses [--chain <chainId>] | Show wallet addresses grouped by chain category (X Layer, EVM, Solana) | No |
| # | Command | Description | Auth Required |
|---|---|---|---|
| B1 | onchainos wallet balance | Current account overview — EVM/SOL addresses, all-chain token list and total USD value | Yes |
| B2 | onchainos wallet balance --chain <chainId> | Current account — all tokens on a specific chain | Yes |
| B3 | onchainos wallet balance --chain <chainId> --token-address <addr> | Current account — specific token by contract address (requires --chain) | Yes |
| B4 | onchainos wallet balance --all | All accounts batch assets — only use when user explicitly asks to see every account | Yes |
| B5 | onchainos wallet balance --force | Force refresh — bypass all caches, re-fetch from API | Yes |
| # | Command | Description | Auth Required |
|---|---|---|---|
| D1 | onchainos wallet send | Send native or contract tokens to an address. Supports --force to bypass confirmation prompts. | Yes |
| D2 | onchainos wallet contract-call | Call a smart contract with custom calldata. Supports --force to bypass confirmation prompts. | Yes |
⚠️ CRITICAL — Choosing the correct command: Using the wrong command may cause loss of funds. You MUST determine the user's exact intent before executing:
Intent Command Example Send native token (ETH, SOL, BNB…) wallet send --chain <chainId>"Send 0.1 ETH to 0xAbc" Send ERC-20 / SPL token (USDC, USDT…) wallet send --chain <chainId> --contract-token"Transfer 100 USDC to 0xAbc" Interact with a smart contract (approve, deposit, withdraw, custom function call…) wallet contract-call --chain <chainId>"Approve USDC for spender", "Call withdraw on contract 0xDef" If the intent is ambiguous, always ask the user to clarify before proceeding. Never guess.
| # | Mode | Command | Description | Auth Required |
|---|---|---|---|---|
| E1 | List | onchainos wallet history | Browse recent transactions with optional filters | Yes |
| E2 | Detail | onchainos wallet history --tx-hash <hash> --chain <chainId> --address <addr> | Look up a specific transaction by hash | Yes |
| User Intent | → | Command |
|---|---|---|
| "Log in" / "sign in" / "登录钱包" | Step 2 | See Step 2: Authentication |
| "Verify OTP" / "验证OTP" | Step 2 | See Step 2: Authentication |
| "Add a new wallet" / "添加钱包" | A | wallet add |
| "Switch account" / "切换账户" | A | wallet switch <account_id> |
| "Am I logged in?" / "钱包状态" | A | wallet status |
| "Show my addresses" / "我的地址" / "钱包地址" / "充值" / "充币" / "收款" / "deposit" / "receive" | A | wallet addresses |
| "Log out" / "退出登录" | A | wallet logout |
| "Show my balance" / "余额" / "我的资产" | B | wallet balance (current account) |
| "Show all accounts' balance" / "所有钱包资产" / "Show all accounts' assets" | B | wallet balance --all |
| "Refresh my wallet" / "刷新钱包" / "同步余额" | B | wallet balance --force |
| "Balance on Ethereum" / "What's on Solana?" | B | wallet balance --chain <chainId> |
| "Check token 0x3883... on Ethereum" | B | wallet balance --chain 1 --token-address <addr> |
| "Send 0.01 ETH to 0xAbc" / "转账" / "发送代币" | D | wallet send --amount "0.01" --receipt <addr> --chain 1 |
| "Transfer 100 USDC on Ethereum" | D | wallet send --amount "100" --receipt <addr> --chain 1 --contract-token <addr> |
| "Show my recent transactions" / "交易历史" | E | wallet history |
| "Check tx 0xabc..." / "tx status" | E | wallet history --tx-hash <hash> --chain <chainId> --address <addr> |
| "Approve USDC for contract" / "合约调用" | D | wallet contract-call --to <addr> --chain 1 --input-data <hex> |
| "Execute Solana program" | D | wallet contract-call --to <addr> --chain 501 --unsigned-tx <base58> |
For commands requiring auth (sections B, D, E), check login state:
onchainos wallet status. If loggedIn: true, proceed.You need to log in with your email first before adding a wallet. What is your email address? We also offer an API Key login method that doesn't require an email. If interested, visit https://web3.okx.com/onchainos/dev-docs/home/api-access-and-usage
onchainos wallet login <email> --locale <locale>.
Then display the following message verbatim (translated to the user's language):
English: "A verification code has been sent to {email}. Please check your inbox and tell me the code." Chinese: "验证码已发送到 {email},请查收邮件并告诉我验证码。" Once the user provides the code, run:
onchainos wallet verify <code>. AI should always infer--localefrom conversation context and include it:
- Chinese (简体/繁体, or user writes in Chinese) →
zh-CN- Japanese (user writes in Japanese) →
ja-JP- English or any other language →
en-US(default)If you cannot confidently determine the user's language, default to
en-US.
We also offer an API Key login method that doesn't require an email. If interested, visit https://web3.okx.com/onchainos/dev-docs/home/api-access-and-usage
wallet status result (from step 1 or re-run). If loginType is "ak" and the returned apiKey differs from the current environment variable OKX_API_KEY, show both keys to the user and ask to confirm the switch. If the user confirms, run onchainos wallet login --force. If apiKey is absent, empty, or identical, skip the confirmation and run onchainos wallet login directly.onchainos wallet balance.IMPORTANT: Never call
wallet addautomatically afterwallet loginorwallet verify. Only callwallet addwhen the user is already logged in and explicitly asks to add a new account.
See the per-section details below (A through E).
| Just completed | Display | Suggest |
|---|---|---|
| Add | Show new accountName, check balance, account amount, and indicate the currently active wallet | Deposit (recommend X Layer — gas-free) |
| Switch | Show new accountName, check balance, account amount, and indicate the currently active wallet | Deposit (recommend X Layer — gas-free), Transfer, Swap |
| Status (logged in) | Show email, account name, account amount | Deposit, Transfer, Swap |
| Status (not logged in) | Guide through login flow (Step 2) | Login |
| Logout | Confirm credentials cleared | Login again when needed |
| Addresses | Show addresses grouped by X Layer / EVM / Solana | Check balance, send tokens, swap |
onchainos wallet addressesShow all wallet addresses for the current account, grouped by chain category:
# Show all addresses
onchainos wallet addresses
# Show only Ethereum addresses
onchainos wallet addresses --chain 1
# Show only Solana address
onchainos wallet addresses --chain 501
Parameters:
| Param | Required | Description |
|---|---|---|
--chain | No | Filter by chain ID (e.g. 1 for Ethereum, 501 for Solana, 196 for XLayer). Omit to show all. |
Return fields:
| Field | Type | Description |
|---|---|---|
accountId | String | Current account ID |
accountName | String | Current account name |
xlayer | Array | X Layer addresses |
evm | Array | Other EVM chain addresses |
solana | Array | Solana addresses |
Each address entry contains: address, chainIndex, chainName.
wallet balance — Current Account OverviewShows the active account only (uses balance_single, no cache — always fetches latest data). Response includes accountCount — if accountCount > 1, hint that user can run wallet balance --all to see all accounts.
Present in this order:
No tokens+-- Wallet 1 (active) -- Balance Total $1,565.74
EVM: 0x1234...abcd SOL: 5xYZ...
X Layer (AA) · Gas-free $1,336.00
Ethereum $229.74
BNB Chain $60.00
No tokens on: Base -- Arbitrum One -- Solana -- ...
Display: Account name + ID, EVM address (evmAddress), SOL address (solAddress), total USD (totalValueUsd). If accountCount > 1, add a note: "You have N accounts. Use wallet balance --all to see all."
wallet balance --all — All Accounts BatchOnly use when user explicitly asks to see every account's assets. Uses balance_batch (60 s cache).
wallet balance --chain <chainId> (e.g. --chain 1) — Chain Detail+-- Wallet 1 -- Ethereum $229.74
ETH 0.042 $149.24
USDC 80.500 $80.50
1.5 ETH), never raw base units$1.2M)No tokens on this chain| Just completed | Suggest |
|---|---|
balance | 1. Drill into a specific chain wallet balance --chain 2. Check a specific token wallet balance --token-address 3. Swap a token 4. (if accountCount > 1) See all accounts wallet balance --all |
balance --all | 1. Drill into current account wallet balance 2. Check a specific chain wallet balance --chain |
balance --chain | 1. Full wallet overview wallet balance 2. Check a specific token wallet balance --token-address 3. Swap a token on this chain |
balance --token-address | 1. Full wallet overview wallet balance 2. Swap this token |
Present conversationally, e.g.: "Would you like to see the breakdown by chain, or swap any of these tokens?" — never expose skill names, command paths, or internal field names.
okx-dex-token to resolve contract address.onchainos wallet balance --chain <chainId> (e.g. --chain 1 for Ethereum). Confirm with user: "I'll send 0.01 ETH to 0xAbc...1234 on Ethereum. Proceed?"onchainos wallet send ...txHash. Provide block explorer link if available. If simulation fails, show executeErrorMsg and do NOT broadcast.Calls EVM contracts or Solana programs with TEE signing and auto-broadcast. Requires JWT.
Common function selectors:
approve(address,uint256) -> 0x095ea7b3transfer(address,uint256) -> 0xa9059cbbwithdraw() -> 0x3ccfd60bdeposit() -> 0xd0e30db0For EVM, help the user ABI-encode: identify function signature, encode parameters, combine 4-byte selector with encoded params.
onchainos security tx-scan to check for risks. (Use okx-security skill for tx-scan)onchainos wallet contract-call ...txHash. If simulation fails, show executeErrorMsg.Be cautious with approve calls: Warn about unlimited approvals (type(uint256).max). Suggest limited approvals when possible.
| Just completed | Suggest |
|---|---|
| Successful send | 1. Check tx status (Section E) 2. Check updated balance (Section B) |
| Failed (insufficient balance) | 1. Check balance (Section B) 2. Swap tokens to get required asset |
| Failed (simulation error) | 1. Verify recipient address 2. Check token contract address 3. Try smaller amount |
| Successful contract call | 1. Check tx status (Section E) 2. Check balance (Section B) |
| Failed contract call (simulation) | 1. Check input data encoding 2. Verify contract address 3. Check balance for gas |
| Approve succeeded | 1. Proceed with the operation that required approval (e.g., swap) |
1 command with 2 modes: list mode (browse recent transactions) and detail mode (lookup by tx hash). Requires JWT.
+-- Recent Transactions Page 1
2024-01-15 14:23 Send 0.5 ETH Ethereum Success 0xabc1...
2024-01-15 13:10 Receive 100 USDC Base Success 0xdef2...
2024-01-14 09:45 Send 50 USDC Ethereum Pending 0xghi3...
-> More transactions available. Say "next page" to load more.
cursor value from the response as --page-num in the next request to load more results+-- Transaction Detail
Hash: 0xabc123...def456
Status: Success
Time: 2024-01-15 14:23:45 UTC
Chain: Ethereum
From: 0xSender...1234
To: 0xRecipient...5678
Amount: 0.5 ETH
Gas Fee: 0.0005 ETH ($1.23)
Explorer: https://etherscan.io/tx/0xabc123...
failReason if failed| Just completed | Suggest |
|---|---|
| List mode | 1. View detail of a specific tx 2. Check balance (Section B) |
| Detail (success) | 1. Check updated balance 2. Send another tx |
| Detail (pending) | 1. Check again in a few minutes |
| Detail (failed) | 1. Check balance 2. Retry the transaction |
The contract-call command supports MEV (Maximal Extractable Value) protection via the --mev-protection flag. When enabled, the broadcast API passes isMEV: true in extraData to route the transaction through MEV-protected channels, preventing front-running, sandwich attacks, and other MEV exploitation.
⚠️ Solana MEV Protection: On Solana, enabling
--mev-protectionalso requires the--jito-unsigned-txparameter. Without it, the command will fail. This parameter provides the Jito bundle unsigned transaction data needed for Solana MEV-protected routing.
🚨 CRITICAL — NEVER substitute
--unsigned-txfor--jito-unsigned-tx
--jito-unsigned-txand--unsigned-txare completely different parameters with different data sources. If the user requests MEV protection but you do not have a valid Jito bundle transaction to pass to--jito-unsigned-tx, you MUST NOT pass the--unsigned-txvalue into--jito-unsigned-txas a substitute — doing so will result in an invalid transaction. Instead, stop immediately, inform the user that the MEV-protected transaction cannot be initiated because the required Jito bundle data is unavailable, and ask the user how they would like to proceed (e.g., proceed without MEV protection, or cancel).
| Chain | MEV Protection | Additional Requirements |
|---|---|---|
| Ethereum | Yes | — |
| BSC | Yes | — |
| Base | Yes | — |
| Solana | Yes | Must also pass --jito-unsigned-tx |
| Other chains | Not supported | — |
contract-call# EVM contract call with MEV protection (Ethereum/BSC/Base)
onchainos wallet contract-call --to 0xDef... --chain 1 --input-data 0x... --mev-protection
# Solana contract call with MEV protection (requires --jito-unsigned-tx)
onchainos wallet contract-call --to <program_id> --chain 501 --unsigned-tx <base58_tx> --mev-protection --jito-unsigned-tx <jito_base58_tx>
User: "I want to use my wallet"
1. onchainos wallet status -> check login state
2. If not logged in:
2a. onchainos wallet login <email> --locale <locale> -> sends OTP (primary)
(user provides OTP)
onchainos wallet verify <otp> -> login complete
2b. If user declines email: onchainos wallet login -> silent login (fallback)
3. (okx-wallet-portfolio) onchainos portfolio all-balances ... -> check holdings
User: "Add a new wallet and swap some tokens"
1. onchainos wallet add -> new account added (auto-switches to it)
2. (okx-dex-swap) onchainos swap quote --from ... --to ... --amount ... --chain <chainId> -> get quote
3. (okx-dex-swap) onchainos swap swap --from ... --to ... --amount ... --chain <chainId> --wallet <addr> -> get swap calldata
4. onchainos wallet contract-call --to <tx.to> --chain <chainId> --value <value_in_UI_units> --input-data <tx.data>
-> sign & broadcast via Agentic Wallet (Solana: use --unsigned-tx instead of --input-data)
User: "Swap 50 USDC for ETH on Ethereum"
1. onchainos wallet balance --chain 1 --token-address "<USDC_addr>"
-> verify USDC balance >= 50
-> confirm chain=eth, tokenContractAddress
2. (okx-dex-swap) onchainos swap quote --from <USDC_addr> --to <ETH_addr> --amount 50000000 --chain 1
3. (okx-dex-swap) onchainos swap approve --token <USDC_addr> --amount 50000000 --chain 1 -> get approve calldata
4. Execute approval:
onchainos wallet contract-call --to <token_contract_address> --chain 1 --input-data <approve_calldata>
5. (okx-dex-swap) onchainos swap swap --from <USDC_addr> --to <ETH_addr> --amount 50000000 --chain 1 --wallet <addr>
-> get swap calldata
6. Execute swap:
onchainos wallet contract-call --to <tx.to> --chain 1 --value <value_in_UI_units> --input-data <tx.data>
Data handoff: balance is UI units; swap needs minimal units -> multiply by 10^decimal (USDC = 6 decimals).
User: "Show my wallet and swap the lowest-value token"
1. onchainos wallet balance -> full overview
2. User picks token
3. (okx-dex-swap) onchainos swap quote --from <token_addr> --to ... --amount ... --chain <chainId> -> get quote
4. (okx-dex-swap) onchainos swap swap --from <token_addr> --to ... --amount ... --chain <chainId> --wallet <addr> -> get swap calldata
5. Execute swap:
onchainos wallet contract-call --to <tx.to> --chain <chainId> --value <value_in_UI_units> --input-data <tx.data>
User: "Send 0.5 ETH to 0xAbc..."
1. onchainos wallet balance --chain 1
-> verify ETH balance >= 0.5 (plus gas)
2. onchainos wallet send --amount "0.5" --receipt "0xAbc..." --chain 1
-> obtain txHash
3. onchainos wallet history --tx-hash "0xTxHash" --chain 1 --address "0xSenderAddr"
-> verify transaction status
User: "Send 100 USDC to 0xAbc... on Ethereum"
1. onchainos token search --query USDC --chain 1 -> find contract address
2. onchainos security token-scan --tokens "1:0xA0b86991..."
-> verify token is not malicious (use okx-security skill for token-scan)
3. onchainos wallet balance --chain 1 --token-address "0xA0b86991..."
-> verify balance >= 100
4. onchainos wallet send --amount "100" --receipt "0xAbc..." --chain 1 --contract-token "0xA0b86991..."
User: "Send 1 SOL from my second wallet to SolAddress..."
1. onchainos wallet status -> list accounts
2. onchainos wallet send --amount "1" --receipt "SolAddress..." --chain 501 --from "SenderSolAddr"
User: "Did my ETH transfer go through?"
1. onchainos wallet history --tx-hash "0xTxHash..." --chain 1 --address "0xSenderAddr"
-> check txStatus
2. txStatus=1 -> "Success!" | txStatus=0/3 -> "Still pending" | txStatus=2 -> "Failed: <reason>"
User: "Show me my recent transactions"
1. onchainos wallet history --limit 10 -> display list
2. User picks a transaction
3. onchainos wallet history --tx-hash "0xSelectedTx..." --chain <chainId> --address <addr>
-> full detail
User: "I just swapped tokens, what happened?"
1. onchainos wallet history --limit 5 -> find recent swap
2. Display the assetChange array to show what was swapped
User: "Approve USDC for this spender contract"
1. onchainos security tx-scan --chain 1 --from 0xWallet --to 0xToken --data 0x095ea7b3...
-> check SPENDER_ADDRESS_BLACK, approve_eoa risks (use okx-security skill for tx-scan)
2. If safe: onchainos wallet contract-call --to "0xToken" --chain 1 --input-data "0x095ea7b3..."
3. onchainos wallet history --tx-hash "0xTxHash" --chain 1 --address "0xWallet"
-> verify succeeded
User: "Call the withdraw function on contract 0xAbc"
1. Agent encodes: withdraw() -> "0x3ccfd60b"
2. onchainos wallet contract-call --to "0xAbc..." --chain 1 --input-data "0x3ccfd60b"
User: "Deposit 0.1 ETH into contract 0xDef"
1. Agent encodes: deposit() -> "0xd0e30db0"
2. onchainos wallet contract-call --to "0xDef..." --chain 1 --value "0.1" --input-data "0xd0e30db0"
wallet send) and contract interactions (wallet contract-call). Use okx-dex-swap for DEX swaps.1.5 ETH), never base units (1500000000000000000)$1.2M, $340K)0x1234...abcd). For native tokens with empty tokenContractAddress, display (native).wETH, stETH, wBTC, xOKB) AND the reported price differs >50% from the known base token price, add an inline price unverified flag and suggest running onchainos token price-info to cross-check.--amount for wallet send is in UI units — the CLI handles conversion internallyexecuteResult is false, the transaction would fail on-chain. Show executeErrorMsg and do NOT broadcast.accessToken, refreshToken, apiKey, secretKey, passphrase, sessionKey, sessionCert, teeId, encryptedSessionSk, signingKey, raw transaction data. Only show: email, accountId, accountName, isNew, addressList, txHash.accessToken is about to expire (within 60 seconds), the CLI auto-refreshes using refreshToken. If refreshToken also expires, user must log in again.~/.okxweb3/keyring.json (or $OKXWEB3_HOME/keyring.json). Wallet metadata in ~/.onchainos/wallets.json.block > warn > empty (safe). The top-level action field reflects the highest priority from riskItemDetail.type(uint256).max). Suggest limited approvals when possible.wallet verify (email login) or wallet login (API key login) succeeds, a wallet account is automatically created — never call wallet add automatically after login. wallet add is only for adding additional accounts when the user is already logged in and explicitly requests it.onchainos wallet switch with non-existent account ID will fail. Use wallet status to see available accounts.wallet switch manually.onchainos wallet login, then retryNo tokens on this chain, not an error--contract-token must exist on the specified chain.executeErrorMsg, do NOT broadcast.--chain with --tx-hash. Ask user which chain.--address with --tx-hash. Use current account's address.executeErrorMsg, do NOT broadcast.--gas-limit for higher limit.Some commands may return a confirming response instead of a success or error. This happens when the backend requires explicit user confirmation before proceeding (e.g., high-risk transactions). The CLI exits with code 2 (not 0 or 1).
{
"confirming": true,
"message": "The human-readable prompt to show the user.",
"next": "Instructions for what the agent should do after user confirms."
}
| Field | Type | Description |
|---|---|---|
confirming | bool | Always true. Indicates this is a confirmation prompt, not a success or error. |
message | String | The confirmation message to display to the user verbatim. |
next | String | Instructions describing the action the agent should take after the user confirms. Follow these instructions exactly. |
message field to the user and ask for confirmation.next field (typically re-running the same command with --force flag appended).# 1. Agent runs the command
onchainos wallet send --amount "100" --receipt "0xAbc..." --chain 1
# 2. CLI returns confirming response (exit code 2)
{
"confirming": true,
"message": "This transaction may result in significant loss. Please confirm.",
"next": "If the user confirms, re-run the same command with --force flag appended to proceed."
}
# 3. Agent shows message to user, user confirms
# 4. Agent re-runs with --force
onchainos wallet send --amount "100" --receipt "0xAbc..." --chain 1 --force