Skip to content

@armada/sdk / index / TokenBalance

Interface: TokenBalance

Defined in: src/sync/balances.ts:71

Per-token aggregated balance. tokenHash is the canonical 32-byte hash (no 0x); tokenAddress is its registered ERC-20 address, present for every registered token and undefined only for a hash absent from the SDK's token registry (see withTokenAddresses). computeBalances leaves tokenAddress unset — the aggregation is pure over hashes; the address is attached at a layer that holds the registry.

Properties

tokenHash

readonly tokenHash: string

Defined in: src/sync/balances.ts:72


tokenAddress?

readonly optional tokenAddress?: `0x${string}`

Defined in: src/sync/balances.ts:73


spendable

readonly spendable: bigint

Defined in: src/sync/balances.ts:74


pending

readonly pending: bigint

Defined in: src/sync/balances.ts:75


pendingSpent?

readonly optional pendingSpent?: bigint

Defined in: src/sync/balances.ts:82

Value of otherwise-spendable notes with an optimistic in-flight spend (a submitted, unconfirmed transaction). Kept OUT of spendable so a note is never offered for selection while a spend of it is already in flight, and surfaced here until the spend's Nullified event confirms (or the mark is cleared/expires). Present only when non-zero; treat absent as 0n.