pub enum Balance {
ClaimableOnChannelClose {
claimable_amount_satoshis: u64,
},
ClaimableAwaitingConfirmations {
claimable_amount_satoshis: u64,
confirmation_height: u32,
},
ContentiousClaimable {
claimable_amount_satoshis: u64,
timeout_height: u32,
},
MaybeTimeoutClaimableHTLC {
claimable_amount_satoshis: u64,
claimable_height: u32,
},
MaybePreimageClaimableHTLC {
claimable_amount_satoshis: u64,
expiry_height: u32,
},
CounterpartyRevokedOutputClaimable {
claimable_amount_satoshis: u64,
},
}
Expand description
Details about the balance(s) available for spending once the channel appears on chain.
See ChannelMonitor::get_claimable_balances
for more details on when these will or will not
be provided.
Variants
ClaimableOnChannelClose
Fields
claimable_amount_satoshis: u64
The amount available to claim, in satoshis, excluding the on-chain fees which will be required to do so.
The channel is not yet closed (or the commitment or closing transaction has not yet appeared in a block). The given balance is claimable (less on-chain fees) if the channel is force-closed now.
ClaimableAwaitingConfirmations
Fields
claimable_amount_satoshis: u64
The amount available to claim, in satoshis, possibly excluding the on-chain fees which were spent in broadcasting the transaction.
confirmation_height: u32
The height at which an Event::SpendableOutputs
event will be generated for this
amount.
The channel has been closed, and the given balance is ours but awaiting confirmations until we consider it spendable.
ContentiousClaimable
Fields
claimable_amount_satoshis: u64
The amount available to claim, in satoshis, excluding the on-chain fees which will be required to do so.
timeout_height: u32
The height at which the counterparty may be able to claim the balance if we have not done so.
The channel has been closed, and the given balance should be ours but awaiting spending transaction confirmation. If the spending transaction does not confirm in time, it is possible our counterparty can take the funds by broadcasting an HTLC timeout on-chain.
Once the spending transaction confirms, before it has reached enough confirmations to be
considered safe from chain reorganizations, the balance will instead be provided via
Balance::ClaimableAwaitingConfirmations
.
MaybeTimeoutClaimableHTLC
Fields
claimable_amount_satoshis: u64
The amount potentially available to claim, in satoshis, excluding the on-chain fees which will be required to do so.
claimable_height: u32
The height at which we will be able to claim the balance if our counterparty has not done so.
HTLCs which we sent to our counterparty which are claimable after a timeout (less on-chain fees) if the counterparty does not know the preimage for the HTLCs. These are somewhat likely to be claimed by our counterparty before we do.
MaybePreimageClaimableHTLC
Fields
claimable_amount_satoshis: u64
The amount potentially available to claim, in satoshis, excluding the on-chain fees which will be required to do so.
expiry_height: u32
The height at which our counterparty will be able to claim the balance if we have not yet received the preimage and claimed it ourselves.
HTLCs which we received from our counterparty which are claimable with a preimage which we do not currently have. This will only be claimable if we receive the preimage from the node to which we forwarded this HTLC before the timeout.
CounterpartyRevokedOutputClaimable
Fields
claimable_amount_satoshis: u64
The amount, in satoshis, of the output which we can claim.
Note that for outputs from HTLC balances this may be excluding some on-chain fees that were already spent.
The channel has been closed, and our counterparty broadcasted a revoked commitment transaction.
Thus, we’re able to claim all outputs in the commitment transaction, one of which has the following amount.
Trait Implementations
sourceimpl PartialEq<Balance> for Balance
impl PartialEq<Balance> for Balance
impl Eq for Balance
impl StructuralEq for Balance
impl StructuralPartialEq for Balance
Auto Trait Implementations
impl RefUnwindSafe for Balance
impl Send for Balance
impl Sync for Balance
impl Unpin for Balance
impl UnwindSafe for Balance
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more