BaseSignatureChecker::CheckSchnorrSignature

Verify a BIP340 Schnorr signature for Taproot spends.

Synopsis

Declared in <script/interpreter.h>

virtual
bool
CheckSchnorrSignature(
    std::span<unsigned char const> sig,
    std::span<unsigned char const> pubkey,
    SigVersion sigversion,
    ScriptExecutionData& execdata,
    ScriptError* serror = nullptr) const;

Return Value

true if the signature is valid.

Parameters

NameDescription
sigThe 64- or 65-byte Schnorr signature.
pubkeyThe 32-byte x-only public key.
sigversionThe signature version selecting the hashing scheme.
execdataPer-input execution state used by the sighash.
serrorSet to the script error when verification fails.