wallet::DescriptorScriptPubKeyMan::GetKey

Retrieve the particular key if it is available. Returns nullopt if the key is not in the wallet, or if the wallet is locked.

Synopsis

Declared in <wallet/scriptpubkeyman.h>

[[requires_capability(0x7fb9552e1318), requires_capability(0x7fb94d1a14d8), requires_capability(0x7fb959e43af8), requires_capability(0x7fb97d4b7938), requires_capability(0x7fb95949cf78), requires_capability(0x7fb96668f8f8)]]
std::optional<CKey>
GetKey(CKeyID const& keyid) const;

Return Value

The private key, or nullopt if it is unavailable or the wallet is locked.

Parameters

NameDescription
keyidThe key id to retrieve.