12 #include <boost/foreach.hpp> 23 WatchKeyMap::const_iterator it =
mapWatchKeys.find(address);
25 vchPubKeyOut = it->second;
30 vchPubKeyOut =
key.GetPubKey();
60 ScriptMap::const_iterator mi =
mapScripts.find(hash);
63 redeemScriptOut = (*mi).second;
74 std::vector<unsigned char> vch;
75 if (!dest.
GetOp(pc, opcode, vch) || vch.size() < 33 || vch.size() > 65)
virtual bool GetCScript(const CScriptID &hash, CScript &redeemScriptOut) const
bool IsFullyValid() const
fully validate whether this is a valid public key (more expensive than IsValid()) ...
virtual bool AddWatchOnly(const CScript &dest)
Support for Watch-only addresses.
virtual bool AddKeyPubKey(const CKey &key, const CPubKey &pubkey)=0
Add a key to the store.
static bool ExtractPubKey(const CScript &dest, CPubKey &pubKeyOut)
virtual bool HaveWatchOnly() const
static const unsigned int MAX_SCRIPT_ELEMENT_SIZE
CKeyID GetID() const
Get the KeyID of this public key (hash of its serialization)
virtual bool RemoveWatchOnly(const CScript &dest)
bool GetOp(iterator &pc, opcodetype &opcodeRet, std::vector< unsigned char > &vchRet)
bool GetKey(const CKeyID &address, CKey &keyOut) const
bool GetHDChain(CHDChain &hdChainRet) const
bool GetPubKey(const CKeyID &address, CPubKey &vchPubKeyOut) const
CCriticalSection cs_KeyStore
static bool error(const char *format)
virtual bool AddCScript(const CScript &redeemScript)
Support for BIP 0013 : see https://github.com/bitcoin/bips/blob/master/bip-0013.mediawiki.
virtual bool AddKey(const CKey &key)
virtual bool HaveCScript(const CScriptID &hash) const
bool AddKeyPubKey(const CKey &key, const CPubKey &pubkey)
Add a key to the store.
WatchOnlySet setWatchOnly