[#wallet-LegacyDataSPKM-GetKey-0e]
= xref:wallet.adoc[wallet]::xref:wallet/LegacyDataSPKM.adoc[LegacyDataSPKM]::GetKey
:relfileprefix: ../../
:mrdocs:

`GetKey` overloads

== Synopses

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

Look up a private key by its key id&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
virtual
bool
xref:SigningProvider/GetKey.adoc[GetKey](
    xref:CKeyID.adoc[CKeyID] const& address,
    xref:CKey.adoc[CKey]& key) const;
----

[.small]#xref:SigningProvider/GetKey.adoc[_» more&period;&period;&period;_]#

Retrieves the private key for the given address into keyOut&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
virtual
bool
xref:wallet/LegacyDataSPKM/GetKey-06.adoc[GetKey](
    xref:CKeyID.adoc[CKeyID] const& address,
    xref:CKey.adoc[CKey]& keyOut) const override;
----

[.small]#xref:wallet/LegacyDataSPKM/GetKey-06.adoc[_» more&period;&period;&period;_]#

== Return Value

* True if the private key was found&period;
* true if the private key was found&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *address*
| The key id to retrieve the private key for&period;
| *key*
| Set to the matching private key on success&period;
| *keyOut*
| Filled with the found private key&period;
|===


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