wallet: Add HaveSpendingKeyForPaymentAddress visitor

This commit is contained in:
Jack Grigg
2018-08-04 12:07:18 +01:00
parent e22c115e78
commit 81e0fd2eb9
2 changed files with 32 additions and 0 deletions

View File

@@ -1319,6 +1319,18 @@ public:
bool operator()(const libzcash::InvalidEncoding& no) const;
};
class HaveSpendingKeyForPaymentAddress : public boost::static_visitor<bool>
{
private:
CWallet *m_wallet;
public:
HaveSpendingKeyForPaymentAddress(CWallet *wallet) : m_wallet(wallet) {}
bool operator()(const libzcash::SproutPaymentAddress &zaddr) const;
bool operator()(const libzcash::SaplingPaymentAddress &zaddr) const;
bool operator()(const libzcash::InvalidEncoding& no) const;
};
class GetSpendingKeyForPaymentAddress : public boost::static_visitor<boost::optional<libzcash::SpendingKey>>
{
private: