7 #ifndef RAVEN_KEYSTORE_H 8 #define RAVEN_KEYSTORE_H 16 #include <boost/signals2/signal.hpp> 34 virtual std::set<CKeyID>
GetKeys()
const =0;
49 typedef std::map<CKeyID, CKey>
KeyMap;
71 result = (mapKeys.count(address) > 0);
78 std::set<CKeyID> set_address;
79 for (
const auto& mi : mapKeys) {
80 set_address.insert(mi.first);
88 KeyMap::const_iterator mi = mapKeys.find(address);
89 if (mi != mapKeys.end())
108 typedef std::map<CKeyID, std::pair<CPubKey, std::vector<unsigned char> > >
CryptedKeyMap;
110 #endif // RAVEN_KEYSTORE_H CCriticalSection cs_KeyStore
virtual bool AddKeyPubKey(const CKey &key, const CPubKey &pubkey)=0
Add a key to the store.
std::map< CScriptID, CScript > ScriptMap
std::vector< unsigned char, secure_allocator< unsigned char > > CKeyingMaterial
std::map< CKeyID, std::pair< CPubKey, std::vector< unsigned char > > > CryptedKeyMap
virtual bool AddWatchOnly(const CScript &dest)=0
Support for Watch-only addresses.
std::set< CScript > WatchOnlySet
virtual bool AddCScript(const CScript &redeemScript)=0
Support for BIP 0013 : see https://github.com/raven/bips/blob/master/bip-0013.mediawiki.
virtual bool HaveCScript(const CScriptID &hash) const =0
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
std::map< CKeyID, CPubKey > WatchKeyMap
virtual bool GetKey(const CKeyID &address, CKey &keyOut) const =0
WatchOnlySet setWatchOnly
bool GetKey(const CKeyID &address, CKey &keyOut) const override
virtual bool AddKey(const CKey &key)
virtual bool GetPubKey(const CKeyID &address, CPubKey &vchPubKeyOut) const =0
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.
A reference to a CScript: the Hash160 of its serialization (see script.h)
An encapsulated private key.
virtual std::set< CKeyID > GetKeys() const =0
bool HaveKey(const CKeyID &address) const override
Check whether a key corresponding to a given address is present in the store.
std::map< CKeyID, CKey > KeyMap
std::set< CKeyID > GetKeys() const override
Basic key store, that keeps keys in an address->secret map.
Wrapped boost mutex: supports recursive locking, but no waiting TODO: We should move away from using ...
virtual bool GetCScript(const CScriptID &hash, CScript &redeemScriptOut) const =0