[#wallet-ScriptPubKeyMan-GetReservedDestination]
= xref:wallet.adoc[wallet]::xref:wallet/ScriptPubKeyMan.adoc[ScriptPubKeyMan]::GetReservedDestination
:relfileprefix: ../../
:mrdocs:

Reserves a destination from the keypool and returns it, keeping the reservation index&period;

== Synopsis

Declared in `&lt;wallet&sol;scriptpubkeyman&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
virtual
xref:util/Result.adoc[util::Result&lt;CTxDestination&gt;]
GetReservedDestination(
    xref:OutputType.adoc[OutputType] const type,
    bool internal,
    int64&lowbar;t& index);
----

== Return Value

The reserved destination, or an error if none is available&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *type*
| The output type of the destination to reserve&period;
| *internal*
| Whether to reserve from the internal (change) chain&period;
| *index*
| Set to the index of the reserved keypool entry&period;
|===


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