[#GetScriptForDestination]
= GetScriptForDestination
:mrdocs:

Generate a Bitcoin scriptPubKey for the given CTxDestination&period; Returns a P2PKH script for a CKeyID destination, a P2SH script for a CScriptID, and an empty script for CNoDestination&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:CScript.adoc[CScript]
GetScriptForDestination(xref:CTxDestination.adoc[CTxDestination] const& dest);
----

== Return Value

The generated output script&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *dest*
| The destination to encode&period;
|===


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