Implement encoding and decoding of Sapling keys and addresses

This commit is contained in:
Jack Grigg
2018-06-07 16:40:59 +12:00
parent c8511dfc07
commit bec3e62bc1
3 changed files with 92 additions and 4 deletions

View File

@@ -95,10 +95,6 @@ public:
SproutPaymentAddress address() const;
};
typedef boost::variant<InvalidEncoding, SproutPaymentAddress> PaymentAddress;
typedef boost::variant<InvalidEncoding, SproutViewingKey> ViewingKey;
typedef boost::variant<InvalidEncoding, SproutSpendingKey> SpendingKey;
//! Sapling functions.
class SaplingPaymentAddress {
public:
@@ -209,6 +205,10 @@ public:
boost::optional<SaplingPaymentAddress> default_address() const;
};
typedef boost::variant<InvalidEncoding, SproutPaymentAddress, SaplingPaymentAddress> PaymentAddress;
typedef boost::variant<InvalidEncoding, SproutViewingKey> ViewingKey;
typedef boost::variant<InvalidEncoding, SproutSpendingKey, SaplingSpendingKey> SpendingKey;
}
/** Check whether a PaymentAddress is not an InvalidEncoding. */