BalanceResponse class

Balance query response, computed from the read model.

confirmedBalance, unconfirmedBalance and totalBalance are the spendable balance: the wallet's payment UTXOs (status available, not plugin-managed, i.e. no plugin metadata naming a pluginId), any number of confirmations. Pending and spent UTXOs are left out; reserved UTXOs, a deferred payment's held inputs included, are left out and reported in reservedBalance (bead libspiffy-a5h8); UTXOs at watch addresses, which the wallet holds no key for, are left out and reported in watchOnlyBalance (bead libspiffy-87a2); bare multisig UTXOs the wallet cannot spend alone are left out (bead libspiffy-0k8). totalBalance is ReadModelStorage.getBalance.

The UTXOs are those WalletState.availableBalance counts on the wallet aggregate (spv-understanding.md, "Balances"; the inputs of a deferred payment recorded before holds were journaled leave the read side when the wallet manager reconciles it at spawn); the confirmed/unconfirmed split here is by block height, which since bead libspiffy-jc3h is the split every layer makes (WalletBalances.bucketOf): a merkle proof on our active chain confirms at depth one, and no threshold of confirmations exists anywhere.

Inheritance

Constructors

BalanceResponse({required String walletId, String? requestId, required BigInt confirmedBalance, required BigInt unconfirmedBalance, required BigInt totalBalance, BigInt? pendingBalance, BigInt? watchOnlyBalance, BigInt? reservedBalance})

Properties

confirmedBalance → BigInt
Payment UTXOs with a block height (greater than zero): mined, however few confirmations they have.
final
eventTimestamp → DateTime
When the event was made.
finalinherited
failure → String?
Never: a failure to answer arrives as an ErrorEvent.
no setteroverride
hashCode → int
The hash code for this object.
no setterinherited
pendingBalance → BigInt
Value of the wallet's unspent UTXOs that are not spendable yet: the network is not known to hold the transaction that pays them, or it held it and a reorganization took the proof away. The wallet's own money, and not part of totalBalance — the same treatment as watchOnlyBalance and reservedBalance, which are also the wallet's and also unspendable (bead libspiffy-z84j).
final
requestId → String?
The CoordinatorRequest.requestId of the request this answers; null when no request caused it.
final
reservedBalance → BigInt
Value of the wallet's reserved UTXOs: its own funds, committed and so not spendable right now, and not part of totalBalance — the same treatment as watchOnlyBalance, which is the wallet's and unspendable for a different reason (bead libspiffy-a5h8).
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
totalBalance → BigInt
confirmedBalance + unconfirmedBalance.
final
unconfirmedBalance → BigInt
Payment UTXOs with no block height (not known to be mined).
final
walletId → String
Optional wallet ID for filtering events by wallet
final
watchOnlyBalance → BigInt
Value of the wallet's unspent UTXOs at watch addresses: credited to the wallet but not spendable by it, and not part of totalBalance.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited