Changeset View
Changeset View
Standalone View
Standalone View
src/script/sign.h
Show All 16 Lines | |||||
class CKey; | class CKey; | ||||
class CKeyID; | class CKeyID; | ||||
class CMutableTransaction; | class CMutableTransaction; | ||||
class CScript; | class CScript; | ||||
class CScriptID; | class CScriptID; | ||||
class CTransaction; | class CTransaction; | ||||
struct KeyOriginInfo { | struct KeyOriginInfo { | ||||
//! First 32 bits of the Hash160 of the public key at the root of the path | |||||
uint8_t fingerprint[4]; | uint8_t fingerprint[4]; | ||||
std::vector<uint32_t> path; | std::vector<uint32_t> path; | ||||
friend bool operator==(const KeyOriginInfo &a, const KeyOriginInfo &b) { | friend bool operator==(const KeyOriginInfo &a, const KeyOriginInfo &b) { | ||||
return std::equal(std::begin(a.fingerprint), std::end(a.fingerprint), | return std::equal(std::begin(a.fingerprint), std::end(a.fingerprint), | ||||
std::begin(b.fingerprint)) && | std::begin(b.fingerprint)) && | ||||
a.path == b.path; | a.path == b.path; | ||||
} | } | ||||
ADD_SERIALIZE_METHODS; | |||||
template <typename Stream, typename Operation> | |||||
inline void SerializationOp(Stream &s, Operation ser_action) { | |||||
READWRITE(fingerprint); | |||||
READWRITE(path); | |||||
} | |||||
void clear() { | |||||
memset(fingerprint, 0, 4); | |||||
path.clear(); | |||||
} | |||||
}; | }; | ||||
/** An interface to be implemented by keystores that support signing. */ | /** An interface to be implemented by keystores that support signing. */ | ||||
class SigningProvider { | class SigningProvider { | ||||
public: | public: | ||||
virtual ~SigningProvider() {} | virtual ~SigningProvider() {} | ||||
virtual bool GetCScript(const CScriptID &scriptid, CScript &script) const { | virtual bool GetCScript(const CScriptID &scriptid, CScript &script) const { | ||||
return false; | return false; | ||||
▲ Show 20 Lines • Show All 218 Lines • Show Last 20 Lines |