Class PaymentParameters


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

      • get_payee_pubkey

        public byte[] get_payee_pubkey()
        The node id of the payee.
      • set_payee_pubkey

        public void set_payee_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.
      • get_max_total_cltv_expiry_delta

        public int get_max_total_cltv_expiry_delta()
        The maximum total CLTV delta we accept for the route.
      • set_max_total_cltv_expiry_delta

        public void set_max_total_cltv_expiry_delta​(int val)
        The maximum total CLTV delta we accept for the route.
      • hash

        public long hash()
        Checks if two PaymentParameterss contain equal inner contents.
      • hashCode

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

        public boolean eq​(PaymentParameters b)
        Checks if two PaymentParameterss 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 PaymentParameters object into a byte array which can be read by PaymentParameters_read
      • from_node_id

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

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