Package org.ldk.structs
Class RouteParameters
- java.lang.Object
-
- org.ldk.structs.RouteParameters
-
public class RouteParameters extends Object
Parameters needed to find a [`Route`]. Passed to [`find_route`] and [`build_route_from_hops`].
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description RouteParametersclone()Creates a copy of the RouteParametersbooleaneq(RouteParameters b)Checks if two RouteParameterss contain equal inner contents.booleanequals(Object o)protected voidfinalize()static RouteParametersfrom_payment_params_and_value(PaymentParameters payment_params, long final_value_msat)Constructs [`RouteParameters`] from the given [`PaymentParameters`] and a payment amount.longget_final_value_msat()The amount in msats sent on the failed payment path.Option_u64Zget_max_total_routing_fee_msat()The maximum total fees, in millisatoshi, that may accrue during route finding.PaymentParametersget_payment_params()The parameters of the failed payment path.longhash()Generates a non-cryptographic 64-bit hash of the RouteParameters.inthashCode()static RouteParametersof(PaymentParameters payment_params_arg, long final_value_msat_arg, Option_u64Z max_total_routing_fee_msat_arg)Constructs a new RouteParameters given each fieldstatic Result_RouteParametersDecodeErrorZread(byte[] ser)Read a RouteParameters from a byte array, created by RouteParameters_writevoidset_final_value_msat(long val)The amount in msats sent on the failed payment path.voidset_max_total_routing_fee_msat(Option_u64Z val)The maximum total fees, in millisatoshi, that may accrue during route finding.voidset_payment_params(PaymentParameters val)The parameters of the failed payment path.byte[]write()Serialize the RouteParameters object into a byte array which can be read by RouteParameters_read
-
-
-
Method Detail
-
finalize
protected void finalize() throws Throwable
-
get_payment_params
public PaymentParameters get_payment_params()
The parameters of the failed payment path.
-
set_payment_params
public void set_payment_params(PaymentParameters val)
The parameters of the failed payment path.
-
get_final_value_msat
public long get_final_value_msat()
The amount in msats sent on the failed payment path.
-
set_final_value_msat
public void set_final_value_msat(long val)
The amount in msats sent on the failed payment path.
-
get_max_total_routing_fee_msat
public Option_u64Z get_max_total_routing_fee_msat()
The maximum total fees, in millisatoshi, that may accrue during route finding. This limit also applies to the total fees that may arise while retrying failed payment paths. Note that values below a few sats may result in some paths being spuriously ignored.
-
set_max_total_routing_fee_msat
public void set_max_total_routing_fee_msat(Option_u64Z val)
The maximum total fees, in millisatoshi, that may accrue during route finding. This limit also applies to the total fees that may arise while retrying failed payment paths. Note that values below a few sats may result in some paths being spuriously ignored.
-
of
public static RouteParameters of(PaymentParameters payment_params_arg, long final_value_msat_arg, Option_u64Z max_total_routing_fee_msat_arg)
Constructs a new RouteParameters given each field
-
clone
public RouteParameters clone()
Creates a copy of the RouteParameters
-
hash
public long hash()
Generates a non-cryptographic 64-bit hash of the RouteParameters.
-
eq
public boolean eq(RouteParameters b)
Checks if two RouteParameterss contain equal inner contents. This ignores pointers and is_owned flags and looks at the values in fields. Two objects with NULL inner values will be considered "equal" here.
-
from_payment_params_and_value
public static RouteParameters from_payment_params_and_value(PaymentParameters payment_params, long final_value_msat)
Constructs [`RouteParameters`] from the given [`PaymentParameters`] and a payment amount. [`Self::max_total_routing_fee_msat`] defaults to 1% of the payment amount + 50 sats
-
write
public byte[] write()
Serialize the RouteParameters object into a byte array which can be read by RouteParameters_read
-
read
public static Result_RouteParametersDecodeErrorZ read(byte[] ser)
Read a RouteParameters from a byte array, created by RouteParameters_write
-
-