[#AddAndGetDestinationForScript]
= AddAndGetDestinationForScript
:mrdocs:

Get a destination of the requested type (if possible) to the specified script&period; This function will automatically add the script (and any other necessary scripts) to the keystore&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:CTxDestination.adoc[CTxDestination]
AddAndGetDestinationForScript(
    xref:FlatSigningProvider.adoc[FlatSigningProvider]& keystore,
    xref:CScript.adoc[CScript] const& script,
    xref:OutputType.adoc[OutputType] type);
----

== Return Value

The destination of the requested type for the script&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *keystore*
| The signing provider that receives the required scripts&period;
| *script*
| The script to derive the destination for&period;
| *type*
| The requested output type&period;
|===


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