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 [`RawInvoice`].
    • 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.
      • hash

        public long hash()
        Generates a non-cryptographic 64-bit hash of the SignedRawInvoice.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • raw_invoice

        public RawInvoice raw_invoice()
        The [`RawInvoice`] which was signed.
      • signable_hash

        public byte[] signable_hash()
        The hash of the [`RawInvoice`] that was signed.
      • 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