Dash Core Source Documentation (0.16.0.1)
Find detailed information regarding the Dash Core source code.
Basic key store, that keeps keys in an address->secret map. More...
#include <keystore.h>
Public Member Functions | |
bool | AddKeyPubKey (const CKey &key, const CPubKey &pubkey) override |
Add a key to the store. More... | |
bool | GetPubKey (const CKeyID &address, CPubKey &vchPubKeyOut) const override |
bool | HaveKey (const CKeyID &address) const override |
Check whether a key corresponding to a given address is present in the store. More... | |
std::set< CKeyID > | GetKeys () const override |
bool | GetKey (const CKeyID &address, CKey &keyOut) const override |
bool | AddCScript (const CScript &redeemScript) override |
Support for BIP 0013 : see https://github.com/bitcoin/bips/blob/master/bip-0013.mediawiki. More... | |
bool | HaveCScript (const CScriptID &hash) const override |
std::set< CScriptID > | GetCScripts () const override |
bool | GetCScript (const CScriptID &hash, CScript &redeemScriptOut) const override |
bool | AddWatchOnly (const CScript &dest) override |
Support for Watch-only addresses. More... | |
bool | RemoveWatchOnly (const CScript &dest) override |
bool | HaveWatchOnly (const CScript &dest) const override |
bool | HaveWatchOnly () const override |
virtual bool | GetHDChain (CHDChain &hdChainRet) const |
Public Member Functions inherited from CKeyStore | |
virtual | ~CKeyStore () |
virtual bool | AddKey (const CKey &key) |
Protected Attributes | |
KeyMap | mapKeys |
WatchKeyMap | mapWatchKeys |
ScriptMap | mapScripts |
WatchOnlySet | setWatchOnly |
CHDChain | hdChain |
Protected Attributes inherited from CKeyStore | |
CCriticalSection | cs_KeyStore |
Detailed Description
Basic key store, that keeps keys in an address->secret map.
Definition at line 56 of file keystore.h.
Member Function Documentation
◆ AddCScript()
|
overridevirtual |
Support for BIP 0013 : see https://github.com/bitcoin/bips/blob/master/bip-0013.mediawiki.
Implements CKeyStore.
Reimplemented in CWallet.
Definition at line 64 of file keystore.cpp.
References CKeyStore::cs_KeyStore, error(), LOCK, mapScripts, MAX_SCRIPT_ELEMENT_SIZE, and prevector< N, T, Size, Diff >::size().
Referenced by CWallet::AddCScript(), CWallet::LoadCScript(), MutateTxSign(), and signrawtransaction().
◆ AddKeyPubKey()
Add a key to the store.
Implements CKeyStore.
Reimplemented in CWallet, and CCryptoKeyStore.
Definition at line 30 of file keystore.cpp.
References CKeyStore::cs_KeyStore, CPubKey::GetID(), LOCK, and mapKeys.
Referenced by CCryptoKeyStore::AddKeyPubKey().
◆ AddWatchOnly()
|
overridevirtual |
Support for Watch-only addresses.
Implements CKeyStore.
Reimplemented in CWallet.
Definition at line 118 of file keystore.cpp.
References CKeyStore::cs_KeyStore, ExtractPubKey(), CPubKey::GetID(), LOCK, mapWatchKeys, and setWatchOnly.
Referenced by CWallet::AddWatchOnly(), and CWallet::LoadWatchOnly().
◆ GetCScript()
|
overridevirtual |
Implements CKeyStore.
Definition at line 90 of file keystore.cpp.
References CKeyStore::cs_KeyStore, LOCK, and mapScripts.
Referenced by dumpwallet(), and listunspent().
◆ GetCScripts()
|
overridevirtual |
Implements CKeyStore.
Definition at line 80 of file keystore.cpp.
References CKeyStore::cs_KeyStore, LOCK, and mapScripts.
Referenced by dumpwallet().
◆ GetHDChain()
|
virtual |
Reimplemented in CCryptoKeyStore.
Definition at line 150 of file keystore.cpp.
References hdChain, and CHDChain::IsNull().
◆ GetKey()
Implements CKeyStore.
Reimplemented in CWallet, and CCryptoKeyStore.
Definition at line 53 of file keystore.cpp.
References CKeyStore::cs_KeyStore, LOCK, and mapKeys.
Referenced by CCryptoKeyStore::GetKey(), and GetPubKey().
◆ GetKeys()
|
overridevirtual |
Implements CKeyStore.
Reimplemented in CCryptoKeyStore.
Definition at line 43 of file keystore.cpp.
References CKeyStore::cs_KeyStore, LOCK, and mapKeys.
Referenced by CCryptoKeyStore::GetKeys().
◆ GetPubKey()
|
overridevirtual |
Implements CKeyStore.
Reimplemented in CWallet, and CCryptoKeyStore.
Definition at line 14 of file keystore.cpp.
References CKeyStore::cs_KeyStore, GetKey(), CKey::GetPubKey(), LOCK, and mapWatchKeys.
Referenced by CCryptoKeyStore::GetPubKey().
◆ HaveCScript()
|
overridevirtual |
Implements CKeyStore.
Definition at line 74 of file keystore.cpp.
References CKeyStore::cs_KeyStore, LOCK, and mapScripts.
Referenced by CheckWalletOwnsScript(), ImportScript(), importwallet(), and ProcessImport().
◆ HaveKey()
|
overridevirtual |
Check whether a key corresponding to a given address is present in the store.
Implements CKeyStore.
Reimplemented in CWallet, and CCryptoKeyStore.
Definition at line 37 of file keystore.cpp.
References CKeyStore::cs_KeyStore, LOCK, and mapKeys.
Referenced by CCryptoKeyStore::HaveKey().
◆ HaveWatchOnly() [1/2]
|
overridevirtual |
Implements CKeyStore.
Definition at line 138 of file keystore.cpp.
References CKeyStore::cs_KeyStore, LOCK, and setWatchOnly.
Referenced by ImportScript(), and WalletModel::WalletModel().
◆ HaveWatchOnly() [2/2]
|
overridevirtual |
Implements CKeyStore.
Definition at line 144 of file keystore.cpp.
References CKeyStore::cs_KeyStore, LOCK, and setWatchOnly.
Referenced by CWallet::AddHDPubKey(), CWallet::AddKeyPubKeyWithDB(), and CWallet::RemoveWatchOnly().
◆ RemoveWatchOnly()
|
overridevirtual |
Implements CKeyStore.
Reimplemented in CWallet.
Definition at line 128 of file keystore.cpp.
References CKeyStore::cs_KeyStore, ExtractPubKey(), CPubKey::GetID(), LOCK, mapWatchKeys, and setWatchOnly.
Referenced by CWallet::RemoveWatchOnly().
Member Data Documentation
◆ hdChain
|
protected |
Definition at line 64 of file keystore.h.
Referenced by CCryptoKeyStore::EncryptHDChain(), GetHDChain(), CCryptoKeyStore::GetHDChain(), and CCryptoKeyStore::SetHDChain().
◆ mapKeys
|
protected |
Definition at line 59 of file keystore.h.
Referenced by AddKeyPubKey(), CCryptoKeyStore::EncryptKeys(), GetKey(), GetKeys(), HaveKey(), CWallet::LoadWallet(), and CCryptoKeyStore::SetCrypted().
◆ mapScripts
|
protected |
Definition at line 61 of file keystore.h.
Referenced by AddCScript(), GetCScript(), GetCScripts(), HaveCScript(), and CWallet::LoadWallet().
◆ mapWatchKeys
|
protected |
Definition at line 60 of file keystore.h.
Referenced by AddWatchOnly(), GetPubKey(), CWallet::LoadWallet(), and RemoveWatchOnly().
◆ setWatchOnly
|
protected |
Definition at line 62 of file keystore.h.
Referenced by AddWatchOnly(), HaveWatchOnly(), CWallet::LoadWallet(), and RemoveWatchOnly().
The documentation for this class was generated from the following files:
- src/keystore.h
- src/keystore.cpp