[#MutableTransactionSignatureCreator-CreateSchnorrSig]
= xref:MutableTransactionSignatureCreator.adoc[MutableTransactionSignatureCreator]::CreateSchnorrSig
:relfileprefix: ../
:mrdocs:

Create a Schnorr signature for the Taproot input&period;

== Synopsis

Declared in `&lt;script&sol;sign&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
virtual
bool
CreateSchnorrSig(
    xref:SigningProvider.adoc[SigningProvider] const& provider,
    std::vector&lt;unsigned char&gt;& sig,
    xref:XOnlyPubKey.adoc[XOnlyPubKey] const& pubkey,
    xref:uint256.adoc[uint256] const* leaf&lowbar;hash,
    xref:uint256.adoc[uint256] const* merkle&lowbar;root,
    xref:SigVersion.adoc[SigVersion] sigversion) const override;
----

== Return Value

True if the signature was created&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *provider*
| The source of keys used to sign&period;
| *sig*
| Filled with the produced Schnorr signature&period;
| *pubkey*
| The x&hyphen;only public key to sign with&period;
| *leaf&lowbar;hash*
| The tapleaf hash for a script path spend, or null&period;
| *merkle&lowbar;root*
| The Taproot merkle root, or null for a key path spend&period;
| *sigversion*
| The signature serialization version to use&period;
|===


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