Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.arc.io/llms.txt

Use this file to discover all available pages before exploring further.

Check how much USDC is in your Unified Balance in total and on each source blockchain.

Prerequisites

Before you begin, ensure that you’ve: These are required so any example below runs with a valid kit and adapter.

Check balances

Query balances with the same adapters you use for deposits.
TypeScript
import { AppKit } from "@circle-fin/app-kit";
import { createViemAdapterFromPrivateKey } from "@circle-fin/adapter-viem-v2";
import { createSolanaAdapterFromPrivateKey } from "@circle-fin/adapter-solana";

// One App Kit instance; Unified Balance calls go under kit.unifiedBalance.
const kit = new AppKit();

// One Viem (or Ethers) adapter covers every supported EVM chain for this wallet.
const evmAdapter = createViemAdapterFromPrivateKey({
  privateKey: process.env.EVM_PRIVATE_KEY as string,
});

// Solana needs its own adapter.
const solanaAdapter = createSolanaAdapterFromPrivateKey({
  privateKey: process.env.SOLANA_PRIVATE_KEY as string,
});

// sources: one entry per signing ecosystem. networkType must match your environment.
const balances = await kit.unifiedBalance.getBalances({
  sources: [{ adapter: evmAdapter }, { adapter: solanaAdapter }],
  networkType: "testnet",
  includePending: true,
});

// Log confirmed and pending totals plus per-depositor, per-chain breakdown.
console.dir(balances, { depth: null });

Example response

The following is a representative payload for the call above. It includes overall confirmed and pending totals, then one entry per depositor, each with per-chain balances.
JSON
{
  "token": "USDC",
  "totalConfirmedBalance": "141.707020",
  "totalPendingBalance": "10.250000",
  "breakdown": [
    {
      "depositor": "0x1a5F...f3a",
      "totalConfirmed": "126.757055",
      "totalPending": "10.250000",
      "breakdown": [
        {
          "chain": "Ethereum_Sepolia",
          "confirmedBalance": "11.998900",
          "pendingBalance": "10.250000",
          "pendingTransactions": [
            {
              "transactionHash": "0x3a9c2f...e41",
              "amount": "10.250000",
              "blockTimestamp": "2025-04-01T12:00:00.000Z"
            }
          ]
        },
        {
          "chain": "Base_Sepolia",
          "confirmedBalance": "23.545722",
          "pendingBalance": "0.000000",
          "pendingTransactions": []
        },
        {
          "chain": "Avalanche_Fuji",
          "confirmedBalance": "19.468595",
          "pendingBalance": "0.000000",
          "pendingTransactions": []
        },
        {
          "chain": "Arc_Testnet",
          "confirmedBalance": "21.282893",
          "pendingBalance": "0.000000",
          "pendingTransactions": []
        }
      ]
    },
    {
      "depositor": "4Nd1...TyXz",
      "totalConfirmed": "14.949965",
      "totalPending": "0.000000",
      "breakdown": [
        {
          "chain": "Solana_Devnet",
          "confirmedBalance": "14.949965",
          "pendingBalance": "0.000000",
          "pendingTransactions": []
        }
      ]
    }
  ]
}