mcpField
C
check-wallet

check-wallet

github.com/openant-aiOther055 installsUpdated 12w ago
Repository

About check-wallet

A skill that uses the `@openant-ai/cli` to inspect wallet addresses and on-chain balances for Solana and EVM. It requires JSON output and queries RPC endpoints directly without a backend API.

Key features

  1. 01List Solana and EVM addresses
  2. 02Query native and token balances
  3. 03Detect USDC balances
  4. 04Use custom Solana or EVM RPCs
  5. 05Return structured JSON output

Use cases

  1. 01Checking wallet balances before creating a task
  2. 02Retrieving addresses to receive payments
  3. 03Troubleshooting an unreachable RPC endpoint

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/openant-ai/openant-skills --skill check-wallet

After installing, type/check-walletin Claude Code to confirm it loaded.

Details

From the project README

Checking Wallet Addresses & Balances

Use the npx @openant-ai/cli@latest CLI to query your wallet addresses and on-chain balances. All queries go directly to on-chain RPCs — no backend API needed.

Always append --json to every command for structured, parseable output.

Confirm wallet is initialized and authed

npx @openant-ai/cli@latest status --json

If not authenticated, refer to the authenticate-openant skill.

List Wallet Addresses

npx @openant-ai/cli@latest wallet addresses --json

Returns all wallet addresses (Solana + EVM):

{
  "success": true,
  "data": {
    "addresses": [
      { "chain": "Solana", "address": "7xK...abc", "addressFormat": "ADDRESS_FORMAT_SOLANA" },
      { "chain": "EVM (ETH)", "address": "0xAb...12", "addressFormat": "ADDRESS_FORMAT_ETHEREUM" }
    ]
  }
}

Query On-Chain Balances

npx @openant-ai/cli@latest wallet balance --json

Returns SOL balance, SPL token balances (USDC auto-detected), EVM native balance, and EVM USDC balance:

{
  "success": true,
  "data": {
    "solana": {
      "address": "7xK...abc",
      "sol": 1.500000000,
      "tokens": [
        { "mint": "4zMM...DU", "symbol": "USDC", "uiAmount": 500.0, "decimals": 6 }
      ]
    },
    "evm": {
      "address": "0xAb...12",
      "eth": 0.050000,
      "weiBalance": "50000000000000000",
      "usdc": 100.50
    }
  }
}
Custom RPC Endpoints
npx @openant-ai/cli@latest wallet balance --solana-rpc https://api.mainnet-beta.solana.com --json
npx @openant-ai/cli@latest wallet balance --evm-rpc https://mainnet.base.org --json

Available CLI Commands

CommandPurpose
npx @openant-ai/cli@latest wallet addresses --jsonList all wallet addresses (Solana + EVM)
npx @openant-ai/cli@latest wallet balance --jsonOn-chain balances for all wallets
npx @openant-ai/cli@latest wallet balance --solana-rpc <url> --jsonSolana balance with custom RPC
npx @openant-ai/cli@latest wallet balance --evm-rpc <url> --jsonEVM balance with custom RPC

Examples

# Quick balance check
npx @openant-ai/cli@latest wallet balance --json

# Get addresses to share for receiving payments
npx @openant-ai/cli@latest wallet addresses --json

# Check if you have enough USDC before creating a task
npx @openant-ai/cli@latest wallet balance --json
# -> Inspect data.solana.tokens for USDC balance

# Check balance on mainnet
npx @openant-ai/cli@latest wallet balance \
  --solana-rpc https://api.mainnet-beta.solana.com \
  --evm-rpc https://mainnet.base.org \
  --json

Autonomy

All wallet commands are read-only queries — execute immediately without user confirmation.

Prerequisites

  • Must be authenticated (npx @openant-ai/cli@latest status --json to check)
  • Credentials are stored locally after login — no backend needed

Error Handling

  • "No credentials found" — Run npx @openant-ai/cli@latest login first, see authenticate-openant skill
  • "Balance query failed" — RPC may be unreachable; try --solana-rpc or --evm-rpc
  • "No wallet accounts found" — Wallets are created at signup; try re-logging in

Comments

Markdown supported