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 classEffectiveCapacity.ExactLiquidityThe available liquidity in the channel known from being a channel counterparty, and thus a direct hop.static classEffectiveCapacity.InfiniteA capacity sufficient to route any payment, typically used for private channels provided by an invoice.static classEffectiveCapacity.MaximumHTLCThe maximum HTLC amount in one direction as advertised on the gossip network.static classEffectiveCapacity.TotalThe total capacity of the channel as determined by the funding transaction.static classEffectiveCapacity.UnknownA 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 longas_msat()Returns the effective capacity denominated in millisatoshi.EffectiveCapacityclone()Creates a copy of the EffectiveCapacitystatic EffectiveCapacityexact_liquidity(long liquidity_msat)Utility method to constructs a new ExactLiquidity-variant EffectiveCapacityprotected voidfinalize()static EffectiveCapacityinfinite()Utility method to constructs a new Infinite-variant EffectiveCapacitystatic EffectiveCapacitymaximum_htlc(long amount_msat)Utility method to constructs a new MaximumHTLC-variant EffectiveCapacitystatic EffectiveCapacitytotal(long capacity_msat, Option_u64Z htlc_maximum_msat)Utility method to constructs a new Total-variant EffectiveCapacitystatic EffectiveCapacityunknown()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, Option_u64Z 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.
-
-