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(0x7fbc76311568), requires_capability(0x7fbc81288388), requires_capability(0x7fbc7d5073d8), requires_capability(0x7fbc96777ac8), requires_capability(0x7fbc846b1b68), requires_capability(0x7fbc8dc01488)]]
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. |