[#wallet-LegacyDataSPKM-GetPubKey-0d]
= xref:wallet.adoc[wallet]::xref:wallet/LegacyDataSPKM.adoc[LegacyDataSPKM]::GetPubKey
:relfileprefix: ../../
:mrdocs:

`GetPubKey` overloads

== Synopses

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

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


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

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

Retrieves the public key for the given address into vchPubKeyOut&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
virtual
bool
xref:wallet/LegacyDataSPKM/GetPubKey-03.adoc[GetPubKey](
    xref:CKeyID.adoc[CKeyID] const& address,
    xref:CPubKey.adoc[CPubKey]& vchPubKeyOut) const override;
----

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

== Return Value

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

== Parameters

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


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