Package org.ldk.structs
Class Refund
- java.lang.Object
-
- org.ldk.structs.Refund
-
public class Refund extends Object
A `Refund` is a request to send an [`Invoice`] without a preceding [`Offer`]. Typically, after an invoice is paid, the recipient may publish a refund allowing the sender to recoup their funds. A refund may be used more generally as an \"offer for money\", such as with a bitcoin ATM. [`Invoice`]: crate::offers::invoice::Invoice [`Offer`]: crate::offers::offer::Offer
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Option_DurationZ
absolute_expiry()
Duration since the Unix epoch when an invoice should no longer be sent.long
amount_msats()
The amount to refund in msats (i.e., the minimum lightning-payable unit for [`chain`]).byte[]
chain()
A chain that the refund is valid for.Refund
clone()
Creates a copy of the RefundPrintableString
description()
A complete description of the purpose of the refund.InvoiceRequestFeatures
features()
Features pertaining to requesting an invoice.protected void
finalize()
boolean
is_expired()
Whether the refund has expired.PrintableString
issuer()
The issuer of the refund, possibly beginning with `user@domain` or `domain`.byte[]
metadata()
An unpredictable series of bytes, typically containing information about the derivation of [`payer_id`].BlindedPath[]
paths()
Paths to the sender originating from publicly reachable nodes.byte[]
payer_id()
A public node id to send to in the case where there are no [`paths`].PrintableString
payer_note()
Payer provided note to include in the invoice.Option_u64Z
quantity()
The quantity of an item that refund is for.byte[]
write()
Serialize the Refund object into a byte array which can be read by Refund_read
-
-
-
Method Detail
-
finalize
protected void finalize() throws Throwable
-
description
public PrintableString description()
A complete description of the purpose of the refund. Intended to be displayed to the user but with the caveat that it has not been verified in any way.
-
absolute_expiry
public Option_DurationZ absolute_expiry()
Duration since the Unix epoch when an invoice should no longer be sent. If `None`, the refund does not expire.
-
is_expired
public boolean is_expired()
Whether the refund has expired.
-
issuer
@Nullable public PrintableString issuer()
The issuer of the refund, 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 sender originating from publicly reachable nodes. Blinded paths provide sender privacy by obfuscating its node id.
-
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 that the refund is valid for.
-
amount_msats
public long amount_msats()
The amount to refund in msats (i.e., the minimum lightning-payable unit for [`chain`]). [`chain`]: Self::chain
-
features
public InvoiceRequestFeatures features()
Features pertaining to requesting an invoice.
-
quantity
public Option_u64Z quantity()
The quantity of an item that refund is for.
-
payer_id
public byte[] payer_id()
A public node id to send to in the case where there are no [`paths`]. Otherwise, a possibly transient pubkey. [`paths`]: Self::paths
-
payer_note
@Nullable public PrintableString payer_note()
Payer provided note to include in the invoice. 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 Refund object into a byte array which can be read by Refund_read
-
-