Changeset View
Changeset View
Standalone View
Standalone View
src/interfaces/wallet.cpp
Show First 20 Lines • Show All 123 Lines • ▼ Show 20 Lines | public: | ||||
return m_wallet->GetNewDestination(type, label, dest, error); | return m_wallet->GetNewDestination(type, label, dest, error); | ||||
} | } | ||||
const CChainParams &getChainParams() override { | const CChainParams &getChainParams() override { | ||||
return m_wallet->chainParams; | return m_wallet->chainParams; | ||||
} | } | ||||
bool getPubKey(const CScript &script, const CKeyID &address, | bool getPubKey(const CScript &script, const CKeyID &address, | ||||
CPubKey &pub_key) override { | CPubKey &pub_key) override { | ||||
std::unique_ptr<SigningProvider> provider = | std::unique_ptr<SigningProvider> provider = | ||||
m_wallet->GetSigningProvider(script); | m_wallet->GetSolvingProvider(script); | ||||
if (provider) { | if (provider) { | ||||
return provider->GetPubKey(address, pub_key); | return provider->GetPubKey(address, pub_key); | ||||
} | } | ||||
return false; | return false; | ||||
} | } | ||||
bool getPrivKey(const CScript &script, const CKeyID &address, | |||||
CKey &key) override { | |||||
std::unique_ptr<SigningProvider> provider = | |||||
m_wallet->GetSigningProvider(script); | |||||
if (provider) { | |||||
return provider->GetKey(address, key); | |||||
} | |||||
return false; | |||||
} | |||||
SigningResult signMessage(const std::string &message, | SigningResult signMessage(const std::string &message, | ||||
const PKHash &pkhash, | const PKHash &pkhash, | ||||
std::string &str_sig) override { | std::string &str_sig) override { | ||||
return m_wallet->SignMessage(message, pkhash, str_sig); | return m_wallet->SignMessage(message, pkhash, str_sig); | ||||
} | } | ||||
bool isSpendable(const CTxDestination &dest) override { | bool isSpendable(const CTxDestination &dest) override { | ||||
return m_wallet->IsMine(dest) & ISMINE_SPENDABLE; | return m_wallet->IsMine(dest) & ISMINE_SPENDABLE; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 361 Lines • Show Last 20 Lines |