Dash Core  0.12.2.1
P2P Digital Currency
CBasicKeyStore Class Reference

#include <keystore.h>

+ Inheritance diagram for CBasicKeyStore:

Public Member Functions

bool AddKeyPubKey (const CKey &key, const CPubKey &pubkey)
 Add a key to the store. More...
 
bool GetPubKey (const CKeyID &address, CPubKey &vchPubKeyOut) const
 
bool HaveKey (const CKeyID &address) const
 Check whether a key corresponding to a given address is present in the store. More...
 
void GetKeys (std::set< CKeyID > &setAddress) const
 
bool GetKey (const CKeyID &address, CKey &keyOut) const
 
virtual bool AddCScript (const CScript &redeemScript)
 Support for BIP 0013 : see https://github.com/bitcoin/bips/blob/master/bip-0013.mediawiki. More...
 
virtual bool HaveCScript (const CScriptID &hash) const
 
virtual bool GetCScript (const CScriptID &hash, CScript &redeemScriptOut) const
 
virtual bool AddWatchOnly (const CScript &dest)
 Support for Watch-only addresses. More...
 
virtual bool RemoveWatchOnly (const CScript &dest)
 
virtual bool HaveWatchOnly (const CScript &dest) const
 
virtual bool HaveWatchOnly () const
 
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()

bool CBasicKeyStore::AddCScript ( const CScript redeemScript)
virtual

Support for BIP 0013 : see https://github.com/bitcoin/bips/blob/master/bip-0013.mediawiki.

Implements CKeyStore.

Reimplemented in CWallet.

Definition at line 41 of file keystore.cpp.

Referenced by CWallet::AddCScript(), CWallet::LoadCScript(), MutateTxSign(), and signrawtransaction().

◆ AddKeyPubKey()

bool CBasicKeyStore::AddKeyPubKey ( const CKey key,
const CPubKey pubkey 
)
virtual

Add a key to the store.

Implements CKeyStore.

Reimplemented in CWallet, and CCryptoKeyStore.

Definition at line 34 of file keystore.cpp.

Referenced by CCryptoKeyStore::AddKeyPubKey().

◆ AddWatchOnly()

bool CBasicKeyStore::AddWatchOnly ( const CScript dest)
virtual

Support for Watch-only addresses.

Implements CKeyStore.

Reimplemented in CWallet.

Definition at line 85 of file keystore.cpp.

Referenced by CWallet::AddWatchOnly(), and CWallet::LoadWatchOnly().

◆ GetCScript()

bool CBasicKeyStore::GetCScript ( const CScriptID hash,
CScript redeemScriptOut 
) const
virtual

Implements CKeyStore.

Definition at line 57 of file keystore.cpp.

Referenced by listunspent().

◆ GetHDChain()

bool CBasicKeyStore::GetHDChain ( CHDChain hdChainRet) const

Definition at line 117 of file keystore.cpp.

◆ GetKey()

bool CBasicKeyStore::GetKey ( const CKeyID address,
CKey keyOut 
) const
inlinevirtual

Implements CKeyStore.

Reimplemented in CWallet, and CCryptoKeyStore.

Definition at line 91 of file keystore.h.

Referenced by CCryptoKeyStore::GetKey(), and GetPubKey().

◆ GetKeys()

void CBasicKeyStore::GetKeys ( std::set< CKeyID > &  setAddress) const
inlinevirtual

Implements CKeyStore.

Reimplemented in CCryptoKeyStore.

Definition at line 78 of file keystore.h.

Referenced by CCryptoKeyStore::GetKeys().

◆ GetPubKey()

bool CBasicKeyStore::GetPubKey ( const CKeyID address,
CPubKey vchPubKeyOut 
) const
virtual

Implements CKeyStore.

Reimplemented in CWallet, and CCryptoKeyStore.

Definition at line 18 of file keystore.cpp.

Referenced by CCryptoKeyStore::GetPubKey().

◆ HaveCScript()

bool CBasicKeyStore::HaveCScript ( const CScriptID hash) const
virtual

Implements CKeyStore.

Definition at line 51 of file keystore.cpp.

Referenced by ImportScript().

◆ HaveKey()

bool CBasicKeyStore::HaveKey ( const CKeyID address) const
inlinevirtual

Check whether a key corresponding to a given address is present in the store.

Implements CKeyStore.

Reimplemented in CWallet, and CCryptoKeyStore.

Definition at line 69 of file keystore.h.

Referenced by CCryptoKeyStore::HaveKey().

◆ HaveWatchOnly() [1/2]

bool CBasicKeyStore::HaveWatchOnly ( const CScript dest) const
virtual

Implements CKeyStore.

Definition at line 105 of file keystore.cpp.

Referenced by ImportScript().

◆ HaveWatchOnly() [2/2]

bool CBasicKeyStore::HaveWatchOnly ( ) const
virtual

Implements CKeyStore.

Definition at line 111 of file keystore.cpp.

◆ RemoveWatchOnly()

bool CBasicKeyStore::RemoveWatchOnly ( const CScript dest)
virtual

Implements CKeyStore.

Reimplemented in CWallet.

Definition at line 95 of file keystore.cpp.

Referenced by CWallet::RemoveWatchOnly().

Member Data Documentation

◆ hdChain

CHDChain CBasicKeyStore::hdChain
protected

◆ mapKeys

KeyMap CBasicKeyStore::mapKeys
protected

◆ mapScripts

ScriptMap CBasicKeyStore::mapScripts
protected

Definition at line 61 of file keystore.h.

Referenced by AddCScript(), GetCScript(), and HaveCScript().

◆ mapWatchKeys

WatchKeyMap CBasicKeyStore::mapWatchKeys
protected

Definition at line 60 of file keystore.h.

Referenced by AddWatchOnly(), GetPubKey(), and RemoveWatchOnly().

◆ setWatchOnly

WatchOnlySet CBasicKeyStore::setWatchOnly
protected

Definition at line 62 of file keystore.h.

Referenced by AddWatchOnly(), HaveWatchOnly(), and RemoveWatchOnly().


The documentation for this class was generated from the following files: