diff --git a/src/zcash/Address.hpp b/src/zcash/Address.hpp index 558777e50..fc000f60a 100644 --- a/src/zcash/Address.hpp +++ b/src/zcash/Address.hpp @@ -4,9 +4,16 @@ #include "uint256.h" #include "uint252.h" #include "serialize.h" +#include namespace libzcash { +class InvalidEncoding { +public: + friend bool operator==(const InvalidEncoding &a, const InvalidEncoding &b) { return true; } + friend bool operator<(const InvalidEncoding &a, const InvalidEncoding &b) { return true; } +}; + const size_t SerializedPaymentAddressSize = 64; const size_t SerializedViewingKeySize = 64; const size_t SerializedSpendingKeySize = 32; @@ -74,7 +81,7 @@ public: } }; -class SpendingKey : public uint252 { +class SproutSpendingKey : public uint252 { public: SpendingKey() : uint252() { } SpendingKey(uint252 a_sk) : uint252(a_sk) { } @@ -86,6 +93,10 @@ public: PaymentAddress address() const; }; +typedef boost::variant PaymentAddress; +typedef boost::variant ViewingKey; +typedef boost::variant SpendingKey; + } /** Check whether a PaymentAddress is not an InvalidEncoding. */