Class 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 Detail

      • 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.
      • 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?).
      • to_str

        public String to_str()
        Get the string representation of a SignedRawInvoice object