Changeset View
Changeset View
Standalone View
Standalone View
src/script/descriptor.cpp
Show First 20 Lines • Show All 223 Lines • ▼ Show 20 Lines | virtual bool GetPrivKey(int pos, const SigningProvider &arg, | ||||
CKey &key) const = 0; | CKey &key) const = 0; | ||||
}; | }; | ||||
class OriginPubkeyProvider final : public PubkeyProvider { | class OriginPubkeyProvider final : public PubkeyProvider { | ||||
KeyOriginInfo m_origin; | KeyOriginInfo m_origin; | ||||
std::unique_ptr<PubkeyProvider> m_provider; | std::unique_ptr<PubkeyProvider> m_provider; | ||||
std::string OriginString() const { | std::string OriginString() const { | ||||
return HexStr(std::begin(m_origin.fingerprint), | return HexStr(m_origin.fingerprint) + FormatHDKeypath(m_origin.path); | ||||
std::end(m_origin.fingerprint)) + | |||||
FormatHDKeypath(m_origin.path); | |||||
} | } | ||||
public: | public: | ||||
OriginPubkeyProvider(uint32_t exp_index, KeyOriginInfo info, | OriginPubkeyProvider(uint32_t exp_index, KeyOriginInfo info, | ||||
std::unique_ptr<PubkeyProvider> provider) | std::unique_ptr<PubkeyProvider> provider) | ||||
: PubkeyProvider(exp_index), m_origin(std::move(info)), | : PubkeyProvider(exp_index), m_origin(std::move(info)), | ||||
m_provider(std::move(provider)) {} | m_provider(std::move(provider)) {} | ||||
bool GetPubKey(int pos, const SigningProvider &arg, CPubKey &key, | bool GetPubKey(int pos, const SigningProvider &arg, CPubKey &key, | ||||
▲ Show 20 Lines • Show All 1,108 Lines • Show Last 20 Lines |