Browse Source

Add some missing viewkey methods that cause compile errors, unrelated but necessary

pull/132/head
Duke Leto 6 years ago
parent
commit
be008aeaf2
  1. 12
      src/zcash/Address.cpp
  2. 9
      src/zcash/Address.hpp

12
src/zcash/Address.cpp

@ -37,3 +37,15 @@ PaymentAddress SpendingKey::address() const {
}
}
bool IsValidPaymentAddress(const libzcash::PaymentAddress& zaddr) {
return zaddr.which() != 0;
}
bool IsValidViewingKey(const libzcash::ViewingKey& vk) {
return vk.which() != 0;
}
bool IsValidSpendingKey(const libzcash::SpendingKey& zkey) {
return zkey.which() != 0;
}

9
src/zcash/Address.hpp

@ -88,4 +88,13 @@ public:
}
/** Check whether a PaymentAddress is not an InvalidEncoding. */
bool IsValidPaymentAddress(const libzcash::PaymentAddress& zaddr);
/** Check whether a ViewingKey is not an InvalidEncoding. */
bool IsValidViewingKey(const libzcash::ViewingKey& vk);
/** Check whether a SpendingKey is not an InvalidEncoding. */
bool IsValidSpendingKey(const libzcash::SpendingKey& zkey);
#endif // ZC_ADDRESS_H_

Loading…
Cancel
Save