pub struct LightningBalance {
pub usable: Amount,
pub sendable: Amount,
pub max_sendable: Amount,
pub pending: Amount,
}Expand description
Classify the lightning channel balances into different categories.
Fields§
§usable: AmountThe sum channel value that is usable.
For example, if we have an open channel with a disconnected node, then we can’t send over it; it would not be counted here.
sendable: AmountOur most accurate estimation of how much we can currently send if we made a MPP over all usable channels to an unspecified recipient.
It’s the sum of next_outbound_htlc_limit over all channels adjusted
to account for an estimate of the total fees paid to Lexe’s LSP and the
broader Lightning Network.
It’s intended to be a conservative estimate, so the user should usually be able to send this amount. A precise sendable upper bound is not computable without knowledge of the recipient because routing fees vary by path.
This value is bounded above by Self::max_sendable.
max_sendable: AmountThe maximum amount that we could possibly send in a ‘typical’ payment, i.e. a multi-hop payment to anyone who is not a direct counterparty.
This is computed as the sum of next_outbound_htlc_limit over all
usable channels, then adjusted to account for the minimum fees Lexe’s
LSP could charge us.
- It should not be possible to send more than this amount over any multi-hop payment.
- Exactly this amount may be sendable only in very specific scenarios, such as paying another Lexe user.
- Technically, it is possible to send [
sum(next_outbound_htlc_limit)] to our direct channel counterparties, but since User <-> LSP payments are a special case, we’ll handle those flows differently.
pending: AmountThe sum channel value that isn’t currently usable.
The channel may be (1) opening and await confirmation, (2) shutting down, or (3) confirmed but the peer is disconnected.
Implementations§
Trait Implementations§
Source§impl Clone for LightningBalance
impl Clone for LightningBalance
Source§fn clone(&self) -> LightningBalance
fn clone(&self) -> LightningBalance
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more