Package org.ldk.structs
Class Route
- java.lang.Object
-
- org.ldk.structs.Route
-
public class Route extends Object
A route directs a payment from the sender (us) to the recipient. If the recipient supports MPP, it can take multiple paths. Each path is composed of one or more hops through the network.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Routeclone()Creates a copy of the Routeprotected voidfinalize()static Routeof(RouteHop[][] paths_arg)Constructs a new Route given each fieldstatic Result_RouteDecodeErrorZread(byte[] ser)Read a Route from a byte array, created by Route_writevoidset_paths(RouteHop[][] val)The list of routes taken for a single (potentially-)multi-part payment.byte[]write()Serialize the Route object into a byte array which can be read by Route_read
-
-
-
Method Detail
-
finalize
protected void finalize() throws Throwable
-
set_paths
public void set_paths(RouteHop[][] val)
The list of routes taken for a single (potentially-)multi-part payment. The pubkey of the last RouteHop in each path must be the same. Each entry represents a list of hops, NOT INCLUDING our own, where the last hop is the destination. Thus, this must always be at least length one. While the maximum length of any given path is variable, keeping the length of any path to less than 20 should currently ensure it is viable.
-
write
public byte[] write()
Serialize the Route object into a byte array which can be read by Route_read
-
read
public static Result_RouteDecodeErrorZ read(byte[] ser)
Read a Route from a byte array, created by Route_write
-
-