[#AddAndGetMultisigDestination]
= AddAndGetMultisigDestination
:mrdocs:

Build a multisig destination and add its keys and script to the keystore&period;

== Synopsis

Declared in `&lt;rpc&sol;util&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:CTxDestination.adoc[CTxDestination]
AddAndGetMultisigDestination(
    int required,
    std::vector&lt;CPubKey&gt; const& pubkeys,
    xref:OutputType.adoc[OutputType] type,
    xref:FlatSigningProvider.adoc[FlatSigningProvider]& keystore,
    xref:CScript.adoc[CScript]& script&lowbar;out);
----

== Return Value

The multisig destination address&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *required*
| Number of required signatures&period;
| *pubkeys*
| The participating public keys&period;
| *type*
| The output type to produce&period;
| *keystore*
| Signing provider that receives the generated keys and script&period;
| *script&lowbar;out*
| Set to the generated redeem&sol;witness script&period;
|===


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