[#KeyPair-SignSchnorr]
= xref:KeyPair.adoc[KeyPair]::SignSchnorr
:relfileprefix: ../
:mrdocs:

Create a BIP&hyphen;340 Schnorr signature using this key pair&period;

== Synopsis

Declared in `&lt;key&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;nodiscard&rsqb;&rsqb;
bool
SignSchnorr(
    xref:uint256.adoc[uint256] const& hash,
    std::span&lt;unsigned char&gt; sig,
    xref:uint256.adoc[uint256] const& aux) const;
----

== Return Value

true if signing succeeded&period;

[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&hyphen;byte message hash to sign&period;
| *sig*
| Output span (64 bytes) receiving the Schnorr signature&period;
| *aux*
| Additional nonce entropy&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
