Cashu-TS - v3.3.0
    Preparing search index...

    Function schnorrVerifyMessage

    • Verifies a Schnorr signature on a message.

      Parameters

      • signature: string

        The Schnorr signature (hex-encoded).

      • message: string

        The message to verify.

      • pubkey: string

        The Cashu P2PK public key (hex-encoded, X-only or with 02/03 prefix).

      • throws: boolean = false

        True: throws on error, False: swallows errors and returns false.

      Returns boolean

      True if the signature is valid, false otherwise.

      This function swallows Schnorr verification errors (eg invalid signature / pubkey format) and treats them as false. If you want to throw such errors, use the throws param.

      If throws param is true and error is encountered.