6 #ifndef BITCOIN_KEYSTORE_H 7 #define BITCOIN_KEYSTORE_H 16 #include <boost/signals2/signal.hpp> 27 virtual std::set<CKeyID>
GetKeys()
const =0;
47 using KeyMap = std::map<CKeyID, CKey>;
64 std::set<CKeyID>
GetKeys()
const override;
83 #endif // BITCOIN_KEYSTORE_H std::map< CKeyID, CKey > KeyMap
virtual bool AddKeyPubKey(const CKey &key, const CPubKey &pubkey)=0
Add a key to the store.
CPubKey GetPubKey() const
Compute the public key from a private key.
CCriticalSection cs_KeyStore
virtual bool AddWatchOnly(const CScript &dest)=0
Support for Watch-only addresses.
virtual std::set< CScriptID > GetCScripts() const =0
virtual bool AddCScript(const CScript &redeemScript)=0
Support for BIP 0013 : see https://github.com/bitcoin/bips/blob/master/bip-0013.mediawiki.
virtual bool HaveCScript(const CScriptID &hash) const =0
virtual bool GetPubKey(const CKeyID &address, CPubKey &pubkey) const
std::set< CScript > WatchOnlySet
bool AddKey(const CKey &key)
virtual bool HaveKey(const CKeyID &address) const =0
Check whether a key corresponding to a given address is present in the store.
An encapsulated public key.
virtual bool RemoveWatchOnly(const CScript &dest)=0
virtual bool GetCScript(const CScriptID &scriptid, CScript &script) const
virtual bool GetKey(const CKeyID &address, CKey &key) const
#define EXCLUSIVE_LOCKS_REQUIRED(...)
std::map< CScriptID, CScript > ScriptMap
An interface to be implemented by keystores that support signing.
Serialized script, used inside transaction inputs and outputs.
virtual bool HaveWatchOnly() const =0
A virtual base class for key stores.
A reference to a CKey: the Hash160 of its serialized public key.
std::map< CKeyID, CPubKey > WatchKeyMap
A reference to a CScript: the Hash160 of its serialization (see script.h)
CKeyID GetKeyForDestination(const CKeyStore &store, const CTxDestination &dest)
Return the CKeyID of the key involved in a script (if there is a unique one).
An encapsulated private key.
virtual std::set< CKeyID > GetKeys() const =0
boost::variant< CNoDestination, PKHash, ScriptHash, WitnessV0ScriptHash, WitnessV0KeyHash, WitnessUnknown > CTxDestination
A txout script template with a specific destination.
Basic key store, that keeps keys in an address->secret map.