Writes an unencrypted private key and its metadata.

Synopsis

Declared in <wallet/walletdb.h>

bool
WriteKey(
    CPubKey const& vchPubKey,
    CPrivKey const& vchPrivKey,
    CKeyMetadata const& keyMeta);

Return Value

true if the record was written.

Parameters

Name

Description

vchPubKey

The public key.

vchPrivKey

The corresponding private key.

keyMeta

The key metadata to store.

Created with MrDocs