Package org.ldk.structs
Class SignedRawBolt11Invoice
- java.lang.Object
-
- org.ldk.structs.SignedRawBolt11Invoice
-
public class SignedRawBolt11Invoice extends Object
Represents a signed [`RawBolt11Invoice`] with cached hash. The signature is not checked and may be invalid. # Invariants The hash has to be either from the deserialized invoice or from the serialized [`RawBolt11Invoice`].
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancheck_signature()Checks if the signature is valid for the included payee public key or if none exists if it's valid for the recovered signature (which should always be true?).SignedRawBolt11Invoiceclone()Creates a copy of the SignedRawBolt11Invoicebooleaneq(SignedRawBolt11Invoice b)Checks if two SignedRawBolt11Invoices contain equal inner contents.booleanequals(Object o)protected voidfinalize()static Result_SignedRawBolt11InvoiceBolt11ParseErrorZfrom_str(String s)Read a SignedRawBolt11Invoice object from a stringlonghash()Generates a non-cryptographic 64-bit hash of the SignedRawBolt11Invoice.inthashCode()ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZinto_parts()Disassembles the `SignedRawBolt11Invoice` into its three parts: 1.RawBolt11Invoiceraw_invoice()The [`RawBolt11Invoice`] which was signed.Result_PayeePubKeySecp256k1ErrorZrecover_payee_pub_key()Recovers the public key used for signing the invoice from the recoverable signature.byte[]signable_hash()The hash of the [`RawBolt11Invoice`] that was signed.Bolt11InvoiceSignaturesignature()Signature for the invoice.Stringto_str()Get the string representation of a SignedRawBolt11Invoice object
-
-
-
Method Detail
-
finalize
protected void finalize() throws Throwable
-
eq
public boolean eq(SignedRawBolt11Invoice b)
Checks if two SignedRawBolt11Invoices 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.
-
clone
public SignedRawBolt11Invoice clone()
Creates a copy of the SignedRawBolt11Invoice
-
hash
public long hash()
Generates a non-cryptographic 64-bit hash of the SignedRawBolt11Invoice.
-
into_parts
public ThreeTuple_RawBolt11Invoice_u832Bolt11InvoiceSignatureZ into_parts()
Disassembles the `SignedRawBolt11Invoice` into its three parts: 1. raw invoice 2. hash of the raw invoice 3. signature
-
raw_invoice
public RawBolt11Invoice raw_invoice()
The [`RawBolt11Invoice`] which was signed.
-
signable_hash
public byte[] signable_hash()
The hash of the [`RawBolt11Invoice`] that was signed.
-
signature
public Bolt11InvoiceSignature signature()
Signature for the invoice.
-
recover_payee_pub_key
public Result_PayeePubKeySecp256k1ErrorZ recover_payee_pub_key()
Recovers the public key used for signing the invoice from the recoverable signature.
-
check_signature
public boolean check_signature()
Checks if the signature is valid for the included payee public key or if none exists if it's valid for the recovered signature (which should always be true?).
-
from_str
public static Result_SignedRawBolt11InvoiceBolt11ParseErrorZ from_str(String s)
Read a SignedRawBolt11Invoice object from a string
-
to_str
public String to_str()
Get the string representation of a SignedRawBolt11Invoice object
-
-