Find the private key for the given key id from the wallet's descriptors, if available Returns nullopt when no descriptor has the key or if the wallet is locked.

Synopsis

Declared in <wallet/wallet.h>

std::optional<CKey>
GetKey(CKeyID const& keyid) const;

Return Value

The private key, or nullopt if unavailable.

Parameters

Name

Description

keyid

The key id to look up.

Created with MrDocs