Package org.ldk.structs
Class Balance
- java.lang.Object
-
- org.ldk.structs.Balance
-
- Direct Known Subclasses:
Balance.ClaimableAwaitingConfirmations
,Balance.ClaimableOnChannelClose
,Balance.ContentiousClaimable
,Balance.CounterpartyRevokedOutputClaimable
,Balance.MaybePreimageClaimableHTLC
,Balance.MaybeTimeoutClaimableHTLC
public class Balance extends Object
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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Balance.ClaimableAwaitingConfirmations
The channel has been closed, and the given balance is ours but awaiting confirmations until we consider it spendable.static class
Balance.ClaimableOnChannelClose
The channel is not yet closed (or the commitment or closing transaction has not yet appeared in a block).static class
Balance.ContentiousClaimable
The channel has been closed, and the given balance should be ours but awaiting spending transaction confirmation.static class
Balance.CounterpartyRevokedOutputClaimable
The channel has been closed, and our counterparty broadcasted a revoked commitment transaction.static class
Balance.MaybePreimageClaimableHTLC
HTLCs which we received from our counterparty which are claimable with a preimage which we do not currently have.static class
Balance.MaybeTimeoutClaimableHTLC
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.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Balance
claimable_awaiting_confirmations(long claimable_amount_satoshis, int confirmation_height)
Utility method to constructs a new ClaimableAwaitingConfirmations-variant Balancestatic Balance
claimable_on_channel_close(long claimable_amount_satoshis)
Utility method to constructs a new ClaimableOnChannelClose-variant BalanceBalance
clone()
Creates a copy of the Balancestatic Balance
contentious_claimable(long claimable_amount_satoshis, int timeout_height)
Utility method to constructs a new ContentiousClaimable-variant Balancestatic Balance
counterparty_revoked_output_claimable(long claimable_amount_satoshis)
Utility method to constructs a new CounterpartyRevokedOutputClaimable-variant Balanceboolean
eq(Balance b)
Checks if two Balances contain equal inner contents.boolean
equals(Object o)
protected void
finalize()
static Balance
maybe_preimage_claimable_htlc(long claimable_amount_satoshis, int expiry_height)
Utility method to constructs a new MaybePreimageClaimableHTLC-variant Balancestatic Balance
maybe_timeout_claimable_htlc(long claimable_amount_satoshis, int claimable_height)
Utility method to constructs a new MaybeTimeoutClaimableHTLC-variant Balance
-
-
-
Method Detail
-
finalize
protected void finalize() throws Throwable
-
claimable_on_channel_close
public static Balance claimable_on_channel_close(long claimable_amount_satoshis)
Utility method to constructs a new ClaimableOnChannelClose-variant Balance
-
claimable_awaiting_confirmations
public static Balance claimable_awaiting_confirmations(long claimable_amount_satoshis, int confirmation_height)
Utility method to constructs a new ClaimableAwaitingConfirmations-variant Balance
-
contentious_claimable
public static Balance contentious_claimable(long claimable_amount_satoshis, int timeout_height)
Utility method to constructs a new ContentiousClaimable-variant Balance
-
maybe_timeout_claimable_htlc
public static Balance maybe_timeout_claimable_htlc(long claimable_amount_satoshis, int claimable_height)
Utility method to constructs a new MaybeTimeoutClaimableHTLC-variant Balance
-
maybe_preimage_claimable_htlc
public static Balance maybe_preimage_claimable_htlc(long claimable_amount_satoshis, int expiry_height)
Utility method to constructs a new MaybePreimageClaimableHTLC-variant Balance
-
counterparty_revoked_output_claimable
public static Balance counterparty_revoked_output_claimable(long claimable_amount_satoshis)
Utility method to constructs a new CounterpartyRevokedOutputClaimable-variant Balance
-
eq
public boolean eq(Balance b)
Checks if two Balances contain equal inner contents. This ignores pointers and is_owned flags and looks at the values in fields.
-
-