The Bitcoin Core wallet consists of:
- An in memory keystore (in /src/keystore.cpp), which contains:
- private keys stored as
mapKeys
- a map from the CKeyID to the private key. - watchonly public keys, stored as
mapWatchKeys
- a map from the CKeyID to the public key. - scripts, stored as
mapScripts
- a map from the CScriptID to the secrialized script. - watchonly scripts, stored as
setWatch
- a set of serialized scripts.
- private keys stored as
- Additional key metadata such as key birthday, hd derivation path. See
CKeyMetadata
in /src/wallet/walletdb.h