Package org.ldk.structs
Class InvoiceRequest
- java.lang.Object
-
- org.ldk.structs.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 Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.byte[]
chain()
A chain from [`Offer::chains`] that the offer is valid for.InvoiceRequest
clone()
Creates a copy of the InvoiceRequestInvoiceRequestFeatures
features()
Features pertaining to requesting an invoice.protected void
finalize()
byte[]
metadata()
An unpredictable series of bytes, typically containing information about the derivation of [`payer_id`].byte[]
payer_id()
A possibly transient pubkey used to sign the invoice request.PrintableString
payer_note()
A payer-provided note which will be seen by the recipient and reflected back in the invoice response.Option_u64Z
quantity()
The quantity of the offer's item conforming to [`Offer::is_valid_quantity`].byte[]
write()
Serialize the InvoiceRequest object into a byte array which can be read by InvoiceRequest_read
-
-
-
Method Detail
-
finalize
protected void finalize() throws Throwable
-
clone
public InvoiceRequest clone()
Creates a copy of the InvoiceRequest
-
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
-
features
public InvoiceRequestFeatures features()
Features pertaining to requesting an invoice.
-
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
-
-