Package org.ldk.structs
Class EffectiveCapacity
- java.lang.Object
-
- org.ldk.structs.EffectiveCapacity
-
- Direct Known Subclasses:
EffectiveCapacity.ExactLiquidity
,EffectiveCapacity.Infinite
,EffectiveCapacity.MaximumHTLC
,EffectiveCapacity.Total
,EffectiveCapacity.Unknown
public class EffectiveCapacity extends Object
The effective capacity of a channel for routing purposes. While this may be smaller than the actual channel capacity, amounts greater than [`Self::as_msat`] should not be routed through the channel.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
EffectiveCapacity.ExactLiquidity
The available liquidity in the channel known from being a channel counterparty, and thus a direct hop.static class
EffectiveCapacity.Infinite
A capacity sufficient to route any payment, typically used for private channels provided by an invoice.static class
EffectiveCapacity.MaximumHTLC
The maximum HTLC amount in one direction as advertised on the gossip network.static class
EffectiveCapacity.Total
The total capacity of the channel as determined by the funding transaction.static class
EffectiveCapacity.Unknown
A capacity that is unknown possibly because either the chain state is unavailable to know the total capacity or the `htlc_maximum_msat` was not advertised on the gossip network.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description long
as_msat()
Returns the effective capacity denominated in millisatoshi.EffectiveCapacity
clone()
Creates a copy of the EffectiveCapacitystatic EffectiveCapacity
exact_liquidity(long liquidity_msat)
Utility method to constructs a new ExactLiquidity-variant EffectiveCapacityprotected void
finalize()
static EffectiveCapacity
infinite()
Utility method to constructs a new Infinite-variant EffectiveCapacitystatic EffectiveCapacity
maximum_htlc(long amount_msat)
Utility method to constructs a new MaximumHTLC-variant EffectiveCapacitystatic EffectiveCapacity
total(long capacity_msat, long htlc_maximum_msat)
Utility method to constructs a new Total-variant EffectiveCapacitystatic EffectiveCapacity
unknown()
Utility method to constructs a new Unknown-variant EffectiveCapacity
-
-
-
Method Detail
-
finalize
protected void finalize() throws Throwable
-
clone
public EffectiveCapacity clone()
Creates a copy of the EffectiveCapacity
-
exact_liquidity
public static EffectiveCapacity exact_liquidity(long liquidity_msat)
Utility method to constructs a new ExactLiquidity-variant EffectiveCapacity
-
maximum_htlc
public static EffectiveCapacity maximum_htlc(long amount_msat)
Utility method to constructs a new MaximumHTLC-variant EffectiveCapacity
-
total
public static EffectiveCapacity total(long capacity_msat, long htlc_maximum_msat)
Utility method to constructs a new Total-variant EffectiveCapacity
-
infinite
public static EffectiveCapacity infinite()
Utility method to constructs a new Infinite-variant EffectiveCapacity
-
unknown
public static EffectiveCapacity unknown()
Utility method to constructs a new Unknown-variant EffectiveCapacity
-
as_msat
public long as_msat()
Returns the effective capacity denominated in millisatoshi.
-
-