wallet::CWallet::GetExtKey

Reconstruct the extended private key for an HD xpub. Returns nullopt when no descriptor has the private key, or the wallet is locked.

Synopsis

Declared in <wallet/wallet.h>

std::optional<CExtKey>
GetExtKey(CExtPubKey const& xpub) const;

Return Value

The extended private key, or nullopt if unavailable.

Parameters

NameDescription
xpubThe extended public key to reconstruct the private key for.