Class InvoiceRequest


  • public class InvoiceRequest
    extends Object
    An `InvoiceRequest` is a request for an [`Invoice`] formulated from an [`Offer`]. An offer may provide choices such as quantity, amount, chain, features, etc. An invoice request specifies these such that its recipient can send an invoice for payment. [`Invoice`]: crate::offers::invoice::Invoice [`Offer`]: crate::offers::offer::Offer
    • Method Detail

      • metadata

        public byte[] metadata()
        An unpredictable series of bytes, typically containing information about the derivation of [`payer_id`]. [`payer_id`]: Self::payer_id
      • chain

        public byte[] chain()
        A chain from [`Offer::chains`] that the offer is valid for.
      • amount_msats

        public Option_u64Z amount_msats()
        The amount to pay in msats (i.e., the minimum lightning-payable unit for [`chain`]), which must be greater than or equal to [`Offer::amount`], converted if necessary. [`chain`]: Self::chain
      • quantity

        public Option_u64Z quantity()
        The quantity of the offer's item conforming to [`Offer::is_valid_quantity`].
      • payer_id

        public byte[] payer_id()
        A possibly transient pubkey used to sign the invoice request.
      • payer_note

        @Nullable
        public PrintableString payer_note()
        A payer-provided note which will be seen by the recipient and reflected back in the invoice response. Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
      • write

        public byte[] write()
        Serialize the InvoiceRequest object into a byte array which can be read by InvoiceRequest_read