[#BaseSignatureCreator-CreateMuSig2PartialSig]
= xref:BaseSignatureCreator.adoc[BaseSignatureCreator]::CreateMuSig2PartialSig
:relfileprefix: ../
:mrdocs:

Create this participant&apos;s MuSig2 partial signature&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
virtual
bool
CreateMuSig2PartialSig(
    xref:SigningProvider.adoc[SigningProvider] const& provider,
    xref:uint256.adoc[uint256]& partial&lowbar;sig,
    xref:CPubKey.adoc[CPubKey] const& aggregate&lowbar;pubkey,
    xref:CPubKey.adoc[CPubKey] const& script&lowbar;pubkey,
    xref:CPubKey.adoc[CPubKey] const& part&lowbar;pubkey,
    xref:uint256.adoc[uint256] const* leaf&lowbar;hash,
    std::vector&lt;std::pair&lt;uint256, bool&gt;&gt; const& tweaks,
    xref:SigVersion.adoc[SigVersion] sigversion,
    xref:SignatureData.adoc[SignatureData] const& sigdata) const = 0;
----

== Return Value

True if the partial signature was created&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *provider*
| The source of keys and MuSig2 session state&period;
| *partial&lowbar;sig*
| Filled with the produced partial signature&period;
| *aggregate&lowbar;pubkey*
| The aggregate public key of the MuSig2 group&period;
| *script&lowbar;pubkey*
| The output key the aggregate key is tweaked to&period;
| *part&lowbar;pubkey*
| The participant public key producing the signature&period;
| *leaf&lowbar;hash*
| The tapleaf hash for a script path spend, or null&period;
| *tweaks*
| The tweaks applied to the aggregate key, with parity flags&period;
| *sigversion*
| The signature serialization version to use&period;
| *sigdata*
| Signature data providing context for the input&period;
|===


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