Skip to main content
Arkade allows you to easily check your wallet balances, both onchain and offchain. The balance information is structured to provide detailed insights into your funds.
const balance = await wallet.getBalance()
// total is spendable in settlement
console.log('Total :', balance.total)
// available is spendable in offchain transactions
console.log('Available :', balance.available)

Balance Object Structure

The balance object contains detailed information about both onchain and offchain funds:
{
  boarding: {
    confirmed: 50000,   // confirmed on-chain balance in sats
    unconfirmed: 50000, // unconfirmed on-chain balance in sats
    total: 100000;      // total on-chain balance (confirmed + unconfirmed) in sats
  };
  settled: 20000;         
  preconfirmed: 0;
  available: 20000;     // settled + preconfirmed
  recoverable: 0;       // subdust and (swept=true & unspent=true)
  total: 20000;         // total off-chain balance in sats
}

Managing Coins

Getting Virtual UTXOs

Virtual UTXOs (VTXOs) are offchain constructs that allow for virtual transactions within Arkade. You can retrieve all your VTXOs with a simple call:
// Get virtual UTXOs (off-chain)
const vtxos = await wallet.getVtxos()
console.log('Number of VTXOs:', vtxos.length)

// Log important information about each VTXO
vtxos.forEach((vtxo, index) => {
  console.log(`VTXO #${index + 1}:`);
  console.log(`  ID: ${vtxo.txid}:${vtxo.vout}`);
  console.log(`  Amount: ${vtxo.value} sats`);
  console.log(`  Batch ID: ${vtxo.virtualStatus.batchTxID}`);
  console.log(`  Status: ${vtxo.virtualStatus.state}`); // "preconfirmed" | "settled" | "swept" | "spent";
});

Getting Boarding UTXOs

Boarding UTXOs are onchain UTXOs that have been sent to a boarding address but haven’t yet been converted to VTXOs:
// Get boarding UTXOs
const boardingUtxos = await wallet.getBoardingUtxos()
console.log('Number of boarding UTXOs:', boardingUtxos.length)

// Log important information about each boarding UTXO
boardingUtxos.forEach((utxo, index) => {
  console.log(`Boarding UTXO #${index + 1}:`);
  console.log(`  TXID: ${utxo.txid}`);
  console.log(`  Output Index: ${utxo.vout}`);
  console.log(`  Amount: ${utxo.value} sats`);
  console.log(`  Status: ${utxo.status.confirmed ? 'Confirmed' : 'Unconfirmed'}`);
});

Next Steps

Now that you understand how to work with balances and coins in Arkade, you can explore more advanced topics:
  • Detecting Payments - Learn how to monitor and detect incoming payments
  • Payment History - Retrieve and work with transaction history
  • Ramps - Understand how to move funds in and out of Arkade

I