Package org.ldk.structs
Class UnsignedInvoiceRequest
- java.lang.Object
-
- org.ldk.structs.UnsignedInvoiceRequest
-
public class UnsignedInvoiceRequest extends Object
A semantically valid [`InvoiceRequest`] that hasn't been signed. # Serialization This is serialized as a TLV stream, which includes TLV records from the originating message. As such, it may include unknown, odd TLV records.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Option_u64Zabsolute_expiry()Duration since the Unix epoch when an invoice should no longer be requested.Amountamount()The minimum amount required for a successful payment of a single item.Option_u64Zamount_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.byte[][]chains()The chains that may be used when paying a requested invoice (e.g., bitcoin mainnet).PrintableStringdescription()A complete description of the purpose of the payment.protected voidfinalize()InvoiceRequestFeaturesinvoice_request_features()Features pertaining to requesting an invoice.PrintableStringissuer()The issuer of the offer, possibly beginning with `user@domain` or `domain`.Option_CVec_u8ZZmetadata()Opaque bytes set by the originator.OfferFeaturesoffer_features()Features pertaining to the offer.BlindedPath[]paths()Paths to the recipient originating from publicly reachable nodes.byte[]payer_id()A possibly transient pubkey used to sign the invoice request.byte[]payer_metadata()An unpredictable series of bytes, typically containing information about the derivation of [`payer_id`].PrintableStringpayer_note()A payer-provided note which will be seen by the recipient and reflected back in the invoice response.Option_u64Zquantity()The quantity of the offer's item conforming to [`Offer::is_valid_quantity`].byte[]signing_pubkey()The public key used by the recipient to sign invoices.Quantitysupported_quantity()The quantity of items supported.TaggedHashtagged_hash()Returns the [`TaggedHash`] of the invoice to sign.byte[]write()Serialize the UnsignedInvoiceRequest object into a byte array which can be read by UnsignedInvoiceRequest_read
-
-
-
Method Detail
-
finalize
protected void finalize() throws Throwable
-
tagged_hash
public TaggedHash tagged_hash()
Returns the [`TaggedHash`] of the invoice to sign.
-
chains
public byte[][] chains()
The chains that may be used when paying a requested invoice (e.g., bitcoin mainnet). Payments must be denominated in units of the minimal lightning-payable unit (e.g., msats) for the selected chain.
-
metadata
public Option_CVec_u8ZZ metadata()
Opaque bytes set by the originator. Useful for authentication and validating fields since it is reflected in `invoice_request` messages along with all the other fields from the `offer`.
-
amount
@Nullable public Amount amount()
The minimum amount required for a successful payment of a single item. Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
-
description
public PrintableString description()
A complete description of the purpose of the payment. Intended to be displayed to the user but with the caveat that it has not been verified in any way.
-
offer_features
public OfferFeatures offer_features()
Features pertaining to the offer.
-
absolute_expiry
public Option_u64Z absolute_expiry()
Duration since the Unix epoch when an invoice should no longer be requested. If `None`, the offer does not expire.
-
issuer
@Nullable public PrintableString issuer()
The issuer of the offer, possibly beginning with `user@domain` or `domain`. Intended to be displayed to the user but with the caveat that it has not been verified in any way. Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
-
paths
public BlindedPath[] paths()
Paths to the recipient originating from publicly reachable nodes. Blinded paths provide recipient privacy by obfuscating its node id.
-
supported_quantity
public Quantity supported_quantity()
The quantity of items supported.
-
signing_pubkey
public byte[] signing_pubkey()
The public key used by the recipient to sign invoices.
-
payer_metadata
public byte[] payer_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
-
invoice_request_features
public InvoiceRequestFeatures invoice_request_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 UnsignedInvoiceRequest object into a byte array which can be read by UnsignedInvoiceRequest_read
-
-