Package org.ldk.structs
Class SignedRawInvoice
- java.lang.Object
-
- org.ldk.structs.SignedRawInvoice
-
public class SignedRawInvoice extends Object
Represents a signed `RawInvoice` 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 `raw_invoice`.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description 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?).SignedRawInvoice
clone()
Creates a copy of the SignedRawInvoiceboolean
eq(SignedRawInvoice b)
Checks if two SignedRawInvoices contain equal inner contents.protected void
finalize()
static Result_SignedRawInvoiceNoneZ
from_str(String s)
Read a SignedRawInvoice object from a stringbyte[]
hash()
The hash of the `RawInvoice` that was signed.ThreeTuple<RawInvoice,byte[],InvoiceSignature>
into_parts()
Disassembles the `SignedRawInvoice` into its three parts: 1.RawInvoice
raw_invoice()
The `RawInvoice` which was signed.Result_PayeePubKeyErrorZ
recover_payee_pub_key()
Recovers the public key used for signing the invoice from the recoverable signature.InvoiceSignature
signature()
InvoiceSignature for the invoice.String
to_str()
Get the string representation of a SignedRawInvoice object
-
-
-
Method Detail
-
finalize
protected void finalize() throws Throwable
-
eq
public boolean eq(SignedRawInvoice b)
Checks if two SignedRawInvoices 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 SignedRawInvoice clone()
Creates a copy of the SignedRawInvoice
-
into_parts
public ThreeTuple<RawInvoice,byte[],InvoiceSignature> into_parts()
Disassembles the `SignedRawInvoice` into its three parts: 1. raw invoice 2. hash of the raw invoice 3. signature
-
raw_invoice
public RawInvoice raw_invoice()
The `RawInvoice` which was signed.
-
hash
public byte[] hash()
The hash of the `RawInvoice` that was signed.
-
signature
public InvoiceSignature signature()
InvoiceSignature for the invoice.
-
recover_payee_pub_key
public Result_PayeePubKeyErrorZ 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_SignedRawInvoiceNoneZ from_str(String s)
Read a SignedRawInvoice object from a string
-
to_str
public String to_str()
Get the string representation of a SignedRawInvoice object
-
-