[#KeyPair-SignSchnorr] = xref:KeyPair.adoc[KeyPair]::SignSchnorr :relfileprefix: ../ :mrdocs: Create a BIP‐340 Schnorr signature using this key pair. == Synopsis Declared in `<key.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- [[nodiscard]] bool SignSchnorr( xref:uint256.adoc[uint256] const& hash, std::span<unsigned char> sig, xref:uint256.adoc[uint256] const& aux) const; ---- == Return Value true if signing succeeded. [NOTE] ==== The return value https://en.cppreference.com/cpp/language/attributes/nodiscard[should not be discarded^]. ==== == Parameters [cols="1,4"] |=== | Name| Description | *hash* | The 32‐byte message hash to sign. | *sig* | Output span (64 bytes) receiving the Schnorr signature. | *aux* | Additional nonce entropy. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#