6 #ifndef BITCOIN_SCRIPT_SIGNINGPROVIDER_H 7 #define BITCOIN_SCRIPT_SIGNINGPROVIDER_H 53 std::map<CKeyID, std::pair<CPubKey, KeyOriginInfo>>
origins;
54 std::map<CKeyID, CKey>
keys;
70 using KeyMap = std::map<CKeyID, CKey>;
131 virtual std::set<CKeyID>
GetKeys()
const;
142 #endif // BITCOIN_SCRIPT_SIGNINGPROVIDER_H
virtual bool GetPubKey(const CKeyID &address, CPubKey &vchPubKeyOut) const override
virtual ~SigningProvider()
std::map< CScriptID, CScript > ScriptMap
virtual bool GetCScript(const CScriptID &hash, CScript &redeemScriptOut) const override
const SigningProvider & DUMMY_SIGNING_PROVIDER
const SigningProvider * m_provider
RecursiveMutex cs_KeyStore
CPubKey GetPubKey() const
Compute the public key from a private key.
virtual bool HaveCScript(const CScriptID &scriptid) const
std::map< CKeyID, CKey > keys
virtual bool AddCScript(const CScript &redeemScript)
virtual std::set< CScriptID > GetCScripts() const
virtual std::set< CKeyID > GetKeys() const
std::map< CKeyID, std::pair< CPubKey, KeyOriginInfo > > origins
bool GetTaprootSpendData(const XOnlyPubKey &output_key, TaprootSpendData &spenddata) const override
bool GetCScript(const CScriptID &scriptid, CScript &script) const override
bool GetKeyOrigin(const CKeyID &keyid, KeyOriginInfo &info) const override
virtual bool GetTaprootSpendData(const XOnlyPubKey &output_key, TaprootSpendData &spenddata) const
virtual bool GetPubKey(const CKeyID &address, CPubKey &pubkey) const
std::map< CScriptID, CScript > scripts
virtual bool GetKeyOrigin(const CKeyID &keyid, KeyOriginInfo &info) const
bool GetPubKey(const CKeyID &keyid, CPubKey &pubkey) const override
An encapsulated public key.
bool GetKey(const CKeyID &keyid, CKey &key) const override
Fillable signing provider that keeps keys in an address->secret map.
std::map< CKeyID, CPubKey > pubkeys
virtual bool HaveKey(const CKeyID &address) const
void ImplicitlyLearnRelatedKeyScripts(const CPubKey &pubkey) EXCLUSIVE_LOCKS_REQUIRED(cs_KeyStore)
std::variant< CNoDestination, PKHash, ScriptHash, WitnessV0ScriptHash, WitnessV0KeyHash, WitnessV1Taproot, WitnessUnknown > CTxDestination
A txout script template with a specific destination.
virtual bool GetCScript(const CScriptID &scriptid, CScript &script) const
virtual bool GetKey(const CKeyID &address, CKey &key) const
virtual bool GetKey(const CKeyID &address, CKey &keyOut) const override
#define EXCLUSIVE_LOCKS_REQUIRED(...)
bool GetCScript(const CScriptID &scriptid, CScript &script) const override
Map from output key to spend data.
bool GetKey(const CKeyID &keyid, CKey &key) const override
An interface to be implemented by keystores that support signing.
std::map< CKeyID, CKey > KeyMap
Serialized script, used inside transaction inputs and outputs.
bool GetKeyOrigin(const CKeyID &keyid, KeyOriginInfo &info) const override
A reference to a CKey: the Hash160 of its serialized public key.
virtual bool HaveCScript(const CScriptID &hash) const override
std::map< XOnlyPubKey, TaprootSpendData > tr_spenddata
A reference to a CScript: the Hash160 of its serialization (see script.h)
virtual bool AddKeyPubKey(const CKey &key, const CPubKey &pubkey)
HidingSigningProvider(const SigningProvider *provider, bool hide_secret, bool hide_origin)
An encapsulated private key.
CKeyID GetKeyForDestination(const SigningProvider &store, const CTxDestination &dest)
Return the CKeyID of the key involved in a script (if there is a unique one).
FlatSigningProvider Merge(const FlatSigningProvider &a, const FlatSigningProvider &b)
bool GetPubKey(const CKeyID &keyid, CPubKey &pubkey) const override
bool GetTaprootSpendData(const XOnlyPubKey &output_key, TaprootSpendData &spenddata) const override
virtual bool AddKey(const CKey &key)
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