Cashu-TS - v4.7.2
    Preparing search index...

    Function schnorrVerifyDigest

    • Verifies a Schnorr signature on a message digest.

      Parameters

      • signature: string

        The Schnorr signature (hex-encoded).

      • digest: DigestInput

        The SHA-256 digest to verify (hex string or Uint8Array).

      • pubkey: string

        The 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.