Retrieve the particular key if it is available. Returns nullopt if the key is not in the wallet, or if the wallet is locked.
Declared in <wallet/scriptpubkeyman.h>
[[requires_capability(0x7f94fd519208), requires_capability(0x7f95058b93a8), requires_capability(0x7f94f1e44168), requires_capability(0x7f9505cb2e88), requires_capability(0x7f94f23e4688), requires_capability(0x7f94fd840dc8)]]
std::optional<CKey>
GetKey(CKeyID const& keyid) const;
The private key, or nullopt if it is unavailable or the wallet is locked.
| Name | Description |
|---|---|
| keyid | The key id to retrieve. |