[#BaseSignatureCreator-CreateMuSig2AggregateSig] = xref:BaseSignatureCreator.adoc[BaseSignatureCreator]::CreateMuSig2AggregateSig :relfileprefix: ../ :mrdocs: Aggregate MuSig2 partial signatures into a final signature. == Synopsis Declared in `<script/sign.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- virtual bool CreateMuSig2AggregateSig( std::vector<CPubKey> const& participants, std::vector<uint8_t>& sig, xref:CPubKey.adoc[CPubKey] const& aggregate_pubkey, xref:CPubKey.adoc[CPubKey] const& script_pubkey, xref:uint256.adoc[uint256] const* leaf_hash, std::vector<std::pair<uint256, bool>> const& tweaks, xref:SigVersion.adoc[SigVersion] sigversion, xref:SignatureData.adoc[SignatureData] const& sigdata) const = 0; ---- == Return Value True if the aggregate signature was created. == Parameters [cols="1,4"] |=== | Name| Description | *participants* | The participant public keys contributing signatures. | *sig* | Filled with the produced aggregate signature. | *aggregate_pubkey* | The aggregate public key of the MuSig2 group. | *script_pubkey* | The output key the aggregate key is tweaked to. | *leaf_hash* | The tapleaf hash for a script path spend, or null. | *tweaks* | The tweaks applied to the aggregate key, with parity flags. | *sigversion* | The signature serialization version to use. | *sigdata* | Signature data providing context for the input. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#