pub struct BalanceDetails {
pub total_onchain_balance_sats: u64,
pub spendable_onchain_balance_sats: u64,
pub total_anchor_channels_reserve_sats: u64,
pub total_lightning_balance_sats: u64,
pub lightning_balances: Vec<LightningBalance>,
pub pending_balances_from_channel_closures: Vec<PendingSweepBalance>,
}
Expand description
Details of the known available balances returned by Node::list_balances
.
Fields§
§total_onchain_balance_sats: u64
The total balance of our on-chain wallet.
spendable_onchain_balance_sats: u64
The currently spendable balance of our on-chain wallet.
This includes any sufficiently confirmed funds, minus
total_anchor_channels_reserve_sats
.
total_anchor_channels_reserve_sats: u64
The share of our total balance that we retain as an emergency reserve to (hopefully) be able to spend the Anchor outputs when one of our channels is closed.
total_lightning_balance_sats: u64
The total balance that we would be able to claim across all our Lightning channels.
Note this excludes balances that we are unsure if we are able to claim (e.g., as we are
waiting for a preimage or for a timeout to expire). These balances will however be included
as MaybePreimageClaimableHTLC
and
MaybeTimeoutClaimableHTLC
in lightning_balances
.
lightning_balances: Vec<LightningBalance>
A detailed list of all known Lightning balances that would be claimable on channel closure.
Note that less than the listed amounts are spendable over lightning as further reserve
restrictions apply. Please refer to ChannelDetails::outbound_capacity_msat
and
ChannelDetails::next_outbound_htlc_limit_msat
as returned by Node::list_channels
for a better approximation of the spendable amounts.
pending_balances_from_channel_closures: Vec<PendingSweepBalance>
A detailed list of balances currently being swept from the Lightning to the on-chain wallet.
These are balances resulting from channel closures that may have been encumbered by a delay, but are now being claimed and useable once sufficiently confirmed on-chain.
Note that, depending on the sync status of the wallets, swept balances listed here might or
might not already be accounted for in total_onchain_balance_sats
.
Trait Implementations§
Source§impl Clone for BalanceDetails
impl Clone for BalanceDetails
Source§fn clone(&self) -> BalanceDetails
fn clone(&self) -> BalanceDetails
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreAuto Trait Implementations§
impl Freeze for BalanceDetails
impl RefUnwindSafe for BalanceDetails
impl Send for BalanceDetails
impl Sync for BalanceDetails
impl Unpin for BalanceDetails
impl UnwindSafe for BalanceDetails
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more