Understanding Balance Types
Why bridge and swap operations use different token balances, and when to use each.
You are viewing the Nexus SDK v2 docs. For the current SDK, see the v3 docs and the v2 → v3 migration guide.
- Bridge Balance
- Swap Balance
TokenBalance[] shape — a unified per-token total with a per-chain breakdown:
type TokenBalance = {
balance: string;
value: string; // USD value
chainBalances: ChainBalance[]; // per-chain breakdown
decimals: number;
logo: string;
name: string;
symbol: string;
};Bridge Balance
client.getBalancesForBridge(): Promise<TokenBalance[]>Swap Balance
client.getBalancesForSwap(): Promise<TokenBalance[]>Why two different balances?
How is this guide?