Class 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 Detail

      • 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.
      • of

        public static Route of​(RouteHop[][] paths_arg)
        Constructs a new Route given each field
      • clone

        public Route clone()
        Creates a copy of the Route
        Overrides:
        clone in class Object
      • 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