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

Name

Description

sig

The 64‐ or 65‐byte Schnorr signature.

pubkey

The 32‐byte x‐only public key.

sigversion

The signature version selecting the hashing scheme.

execdata

Per‐input execution state used by the sighash.

serror

Set to the script error when verification fails.

Created with MrDocs