Class Payee


  • public class Payee
    extends Object
    The recipient of a payment.
    • Method Detail

      • get_pubkey

        public byte[] get_pubkey()
        The node id of the payee.
      • set_pubkey

        public void set_pubkey​(byte[] val)
        The node id of the payee.
      • get_features

        @Nullable
        public InvoiceFeatures get_features()
        Features supported by the payee. May be set from the payee's invoice or via [`for_keysend`]. May be `None` if the invoice does not contain any features. [`for_keysend`]: Self::for_keysend Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
      • set_features

        public void set_features​(@Nullable
                                 InvoiceFeatures val)
        Features supported by the payee. May be set from the payee's invoice or via [`for_keysend`]. May be `None` if the invoice does not contain any features. [`for_keysend`]: Self::for_keysend Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
      • get_route_hints

        public RouteHint[] get_route_hints()
        Hints for routing to the payee, containing channels connecting the payee to public nodes.
      • set_route_hints

        public void set_route_hints​(RouteHint[] val)
        Hints for routing to the payee, containing channels connecting the payee to public nodes.
      • get_expiry_time

        public Option_u64Z get_expiry_time()
        Expiration of a payment to the payee, in seconds relative to the UNIX epoch.
      • set_expiry_time

        public void set_expiry_time​(Option_u64Z val)
        Expiration of a payment to the payee, in seconds relative to the UNIX epoch.
      • clone

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

        public long hash()
        Checks if two Payees contain equal inner contents.
      • eq

        public boolean eq​(Payee b)
        Checks if two Payees 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.
      • write

        public byte[] write()
        Serialize the Payee object into a byte array which can be read by Payee_read
      • read

        public static Result_PayeeDecodeErrorZ read​(byte[] ser)
        Read a Payee from a byte array, created by Payee_write
      • from_node_id

        public static Payee from_node_id​(byte[] pubkey)
        Creates a payee with the node id of the given `pubkey`.
      • for_keysend

        public static Payee for_keysend​(byte[] pubkey)
        Creates a payee with the node id of the given `pubkey` to use for keysend payments.