 |
Bitcoin Core
21.99.0
P2P Digital Currency
|
Go to the documentation of this file.
6 #ifndef BITCOIN_SCRIPT_SIGNINGPROVIDER_H
7 #define BITCOIN_SCRIPT_SIGNINGPROVIDER_H
51 std::map<CKeyID, std::pair<CPubKey, KeyOriginInfo>>
origins;
52 std::map<CKeyID, CKey>
keys;
66 using KeyMap = std::map<CKeyID, CKey>;
127 virtual std::set<CKeyID>
GetKeys()
const;
138 #endif // BITCOIN_SCRIPT_SIGNINGPROVIDER_H
std::map< CKeyID, CKey > KeyMap
std::map< CScriptID, CScript > ScriptMap
virtual ~SigningProvider()
virtual std::set< CKeyID > GetKeys() const
const SigningProvider * m_provider
virtual bool HaveCScript(const CScriptID &scriptid) const
Fillable signing provider that keeps keys in an address->secret map.
std::map< CKeyID, CKey > keys
An interface to be implemented by keystores that support signing.
HidingSigningProvider(const SigningProvider *provider, bool hide_secret, bool hide_origin)
A reference to a CKey: the Hash160 of its serialized public key.
virtual bool GetPubKey(const CKeyID &address, CPubKey &pubkey) const
virtual bool AddKey(const CKey &key)
void ImplicitlyLearnRelatedKeyScripts(const CPubKey &pubkey) EXCLUSIVE_LOCKS_REQUIRED(cs_KeyStore)
bool GetKeyOrigin(const CKeyID &keyid, KeyOriginInfo &info) const override
virtual std::set< CScriptID > GetCScripts() const
std::map< CScriptID, CScript > scripts
virtual bool HaveKey(const CKeyID &address) const
bool GetKeyOrigin(const CKeyID &keyid, KeyOriginInfo &info) const override
std::map< CKeyID, std::pair< CPubKey, KeyOriginInfo > > origins
virtual bool GetPubKey(const CKeyID &address, CPubKey &vchPubKeyOut) const override
virtual bool GetKeyOrigin(const CKeyID &keyid, KeyOriginInfo &info) const
FlatSigningProvider Merge(const FlatSigningProvider &a, const FlatSigningProvider &b)
const SigningProvider & DUMMY_SIGNING_PROVIDER
virtual bool HaveCScript(const CScriptID &hash) const override
virtual bool GetCScript(const CScriptID &scriptid, CScript &script) const
std::map< CKeyID, CPubKey > pubkeys
CPubKey GetPubKey() const
Compute the public key from a private key.
Serialized script, used inside transaction inputs and outputs.
bool GetKey(const CKeyID &keyid, CKey &key) const override
An encapsulated public key.
An encapsulated private key.
virtual bool GetKey(const CKeyID &address, CKey &keyOut) const override
#define EXCLUSIVE_LOCKS_REQUIRED(...)
bool GetPubKey(const CKeyID &keyid, CPubKey &pubkey) const override
virtual bool AddKeyPubKey(const CKey &key, const CPubKey &pubkey)
virtual bool GetKey(const CKeyID &address, CKey &key) const
std::variant< CNoDestination, PKHash, ScriptHash, WitnessV0ScriptHash, WitnessV0KeyHash, WitnessUnknown > CTxDestination
A txout script template with a specific destination.
virtual bool GetCScript(const CScriptID &hash, CScript &redeemScriptOut) const override
virtual bool AddCScript(const CScript &redeemScript)
CKeyID GetKeyForDestination(const SigningProvider &store, const CTxDestination &dest)
Return the CKeyID of the key involved in a script (if there is a unique one).
bool GetCScript(const CScriptID &scriptid, CScript &script) const override
bool GetCScript(const CScriptID &scriptid, CScript &script) const override
KeyMap mapKeys GUARDED_BY(cs_KeyStore)
Map of key id to unencrypted private keys known by the signing provider.
virtual bool HaveKey(const CKeyID &address) const override
RecursiveMutex cs_KeyStore
bool GetPubKey(const CKeyID &keyid, CPubKey &pubkey) const override
bool GetKey(const CKeyID &keyid, CKey &key) const override
A reference to a CScript: the Hash160 of its serialization (see script.h)