availableBalance property

BigInt availableBalance
latefinal

The amount the wallet aggregate's coin selection can fund: the total of the UTXOs BitcoinWalletAggregate.selectUTXOsForAmount may select (WalletBalances.isSpendable: available, not plugin-managed, not watch-only, not a bare multisig the wallet cannot spend alone, not held by a deferred payment recorded before holds were journaled, any number of confirmations), so a selection of up to this amount succeeds and one satoshi more fails.

Not derived from confirmedBalance, unconfirmedBalance and reservedBalance, which count every unspent UTXO (pending, plugin-managed and watch-only ones included) and are not a spendable amount (bead libspiffy-ad07). Computed once per state (the state is immutable).

Implementation

late final BigInt availableBalance = WalletBalances.spendableTotal(this);