Skip to main content

Read balances

Each token includes a display balance and its accounting breakdown:
  • amount is the wallet-facing balance: spendable + pending_change.
  • spendable is backed by unspent, unreserved notes and is the value to use when deciding whether a new transfer, withdrawal, or execute can be prepared.
  • pending_change is the user’s expected private output from unresolved spends, usually change. It does not include another user’s pending transfer or an unconfirmed deposit.
Private spends consume whole notes and mint change. While a spend is in flight, the consumed inputs are reserved and disappear from spendable, but their expected owned outputs remain in pending_change. A wallet rendering amount therefore does not show the temporary input-note dip. If the spend fails or an atomic execute reverts, the input reservation is released and the full amount returns to spendable. The guarantee applies when sync_status is current. When it is syncing, the service has failed closed while its optimistic index catches up. It never adds optimistic-only notes or pending outputs. It may still use an already observed output as negative evidence that an older canonical claim was consumed, so the returned amount is a conservative lower bound rather than an overstatement. Show a syncing state until reads return to current. Filter by token:

Read transactions

Transaction status

deposit(), transfer(), and withdraw() return a TransactionHandle with txId, status, txHash, and wait(). status is the backend processing state. The wait result also includes confirmationStatus, the user-facing lifecycle state. Public lifecycle states:
  • pending: preparing, proving, or waiting for an on-chain hash.
  • relayed: submitted on chain, but private effects are not observed yet.
  • confirmed: receipt or indexed evidence has observed the transaction effects, and those effects are visible to API reads.
  • processed: durable state persistence has completed.
  • failed: terminal failure.
By default, wait() resolves at user-facing confirmation (confirmed, processed, or failed). It does not wait for durable canonical processing unless you ask for it.
The API now reports usability as usable: true once every private output the transaction creates is a spendable, owner-attributed note. It replaces funds_usable, which was only ever true for deposit owners and transfer recipients — never for a transfer’s sender holding the change note, and never for a withdrawal. The SDK’s fundsUsable is not yet wired to it and currently falls back to status === "processed", so it reads false during the confirmed window. Wait on processed rather than branching on it.
Wait for durable canonical processing when a backend reliability check needs finality:
finalized is an alias for backend processed, which is reached at the configured canonical boundary. If you already have a transaction ID, poll directly:
Polling throws TimeoutError if the timeout elapses before the selected wait target. See Error handling.

Backend reads

Use admin reads for backend dashboards and support tooling, and the user client for signed actions.
Call admin.users.register(payload) from your backend when a browser or server client registers. See Custody models for how the admin client is wired.