Changeset View
Changeset View
Standalone View
Standalone View
src/interfaces/wallet.cpp
Show First 20 Lines • Show All 123 Lines • ▼ Show 20 Lines | public: | ||||
std::string error; | std::string error; | ||||
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 { | ||||
const SigningProvider *provider = | std::unique_ptr<SigningProvider> provider = | ||||
m_wallet->GetSigningProvider(script); | m_wallet->GetSigningProvider(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, | bool getPrivKey(const CScript &script, const CKeyID &address, | ||||
CKey &key) override { | CKey &key) override { | ||||
const SigningProvider *provider = | std::unique_ptr<SigningProvider> provider = | ||||
m_wallet->GetSigningProvider(script); | m_wallet->GetSigningProvider(script); | ||||
if (provider) { | if (provider) { | ||||
return provider->GetKey(address, key); | return provider->GetKey(address, key); | ||||
} | } | ||||
return false; | return false; | ||||
} | } | ||||
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 383 Lines • Show Last 20 Lines |