Get Qi Wallet Balance
get_qi_balanceCheck a Qi wallet's total and spendable balance by reconstructing it from its mnemonic with the password, then querying unspent outputs. Include counterparty payment codes for send_qi receipts.
Instructions
Check the Qi balance of a wallet created with create_qi_wallet or import_qi_wallet. Unlike get_balance (QUAI), this needs the wallet's password: Qi is UTXO-based, so checking a real balance means reconstructing the wallet from its mnemonic and asking the network for its unspent outputs, not just reading a stored public address. Returns both the total and spendable balance (spendable excludes still-immature/locked outputs). Funds received via a payment code (see send_qi) are NOT included unless you pass the sender's payment code in counterpartyPaymentCodes -- those addresses are pairwise-derived between the two payment codes and can't be discovered any other way.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| network | No | Which Quai network to query: "mainnet" or "testnet" (the Orchard testnet). Defaults to mainnet. | mainnet |
| password | Yes | The wallet's password. | |
| walletName | Yes | The name of a Qi wallet previously created with create_qi_wallet or import_qi_wallet. | |
| counterpartyPaymentCodes | No | Payment codes of people who may have sent this wallet Qi via send_qi. Omit if you're only checking regular (non-payment-code) receipts. |