pub struct Balance {
pub spendable: Amount,
pub needs_refresh: Amount,
pub pending_lightning_send: Amount,
pub claimable_lightning_receive: Amount,
pub pending_in_round: Amount,
pub pending_board: Amount,
pub pending_arkoor_send: Amount,
pub pending_offboard: Amount,
pub pending_exit: Amount,
}Expand description
The different balances of a Bark wallet.
spendable_sat counts the spendable VTXOs, needs_refresh_sat the ones
that have to be refreshed before they can be sent again, and every other
field what an operation in progress holds, so the fields never overlap.
See BalanceSummary for the totals to show a user.
All amounts are in sats.
Fields§
§spendable: AmountSats that are immediately spendable, either in-round or out-of-round.
needs_refresh: AmountSats in VTXOs that can no longer be sent in an arkoor payment because
they have expired or their exit depth has reached the server’s limit.
They can still be offboarded, exited or refreshed, but are not part of
spendable_sat until maintenance has refreshed them.
pending_lightning_send: AmountSats locked in an outgoing Lightning payment that has not yet settled.
claimable_lightning_receive: AmountSats in HTLC VTXOs of an incoming Lightning payment whose preimage has been revealed but which have not been swapped for spendable VTXOs yet. A payment that can still be cancelled is not counted.
pending_in_round: AmountSats locked in VTXOs forfeited for a round that has not yet completed.
pending_board: AmountSats in board transactions that are waiting for sufficient on-chain confirmations before becoming spendable.
pending_arkoor_send: AmountSats locked in an outgoing arkoor payment that has not completed yet: the whole input amount, until the send finalizes and the change comes back as spendable.
pending_offboard: AmountSats locked in an offboard whose transaction has not been broadcast yet, including any change that comes back. Once the transaction is on the network the sats belong to the on-chain wallet.
pending_exit: AmountSats held in VTXOs whose unilateral exit has committed on-chain but which
haven’t yet been drained to the onchain wallet: their state is
crate::primitives::VtxoStateInfo::Exited and their exit has not reached
crate::exit::ExitStateKind::Claimed.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Balance
impl<'de> Deserialize<'de> for Balance
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for Balance
Source§impl From<&Balance> for BalanceSummary
impl From<&Balance> for BalanceSummary
Source§impl From<Balance> for BalanceSummary
impl From<Balance> for BalanceSummary
impl StructuralPartialEq for Balance
Auto Trait Implementations§
impl Freeze for Balance
impl RefUnwindSafe for Balance
impl Send for Balance
impl Sync for Balance
impl Unpin for Balance
impl UnsafeUnpin for Balance
impl UnwindSafe for Balance
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request