Class Path


  • public class Path
    extends Object
    A path in a [`Route`] to the payment recipient. Must always be at least length one. If no [`Path::blinded_tail`] is present, then [`Path::hops`] length may be up to 19.
    • Method Detail

      • get_hops

        public RouteHop[] get_hops()
        The list of unblinded hops in this [`Path`]. Must be at least length one.
      • set_hops

        public void set_hops​(RouteHop[] val)
        The list of unblinded hops in this [`Path`]. Must be at least length one.
      • get_blinded_tail

        @Nullable
        public BlindedTail get_blinded_tail()
        The blinded path at which this path terminates, if we're sending to one, and its metadata. Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
      • set_blinded_tail

        public void set_blinded_tail​(@Nullable
                                     BlindedTail val)
        The blinded path at which this path terminates, if we're sending to one, and its metadata. Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
      • of

        public static Path of​(RouteHop[] hops_arg,
                              BlindedTail blinded_tail_arg)
        Constructs a new Path given each field
      • clone

        public Path clone()
        Creates a copy of the Path
        Overrides:
        clone in class Object
      • hash

        public long hash()
        Generates a non-cryptographic 64-bit hash of the Path.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • eq

        public boolean eq​(Path b)
        Checks if two Paths 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.
      • fee_msat

        public long fee_msat()
        Gets the fees for a given path, excluding any excess paid to the recipient.
      • final_value_msat

        public long final_value_msat()
        Gets the total amount paid on this [`Path`], excluding the fees.
      • final_cltv_expiry_delta

        public Option_u32Z final_cltv_expiry_delta()
        Gets the final hop's CLTV expiry delta.