6 #ifndef FABCOIN_KEYSTORE_H 7 #define FABCOIN_KEYSTORE_H 15 #include <boost/signals2/signal.hpp> 33 virtual void GetKeys(std::set<CKeyID> &setAddress)
const =0;
48 typedef std::map<CKeyID, CKey>
KeyMap;
70 result = (mapKeys.count(address) > 0);
74 void GetKeys(std::set<CKeyID> &setAddress)
const override 79 KeyMap::const_iterator mi = mapKeys.begin();
80 while (mi != mapKeys.end())
82 setAddress.insert((*mi).first);
91 KeyMap::const_iterator mi = mapKeys.find(address);
92 if (mi != mapKeys.end())
111 typedef std::map<CKeyID, std::pair<CPubKey, std::vector<unsigned char> > >
CryptedKeyMap;
113 #endif // FABCOIN_KEYSTORE_H CCriticalSection cs_KeyStore
virtual bool AddKeyPubKey(const CKey &key, const CPubKey &pubkey)=0
Add a key to the store.
void GetKeys(std::set< CKeyID > &setAddress) const override
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/fabcoin/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)
virtual void GetKeys(std::set< CKeyID > &setAddress) const =0
struct evm_uint160be address(struct evm_env *env)
An encapsulated private key.
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
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