Commit Graph

14 Commits

Author SHA1 Message Date
Jack Grigg e5eab182b5
Use boost::variant to represent shielded addresses and keys
libzcash::PaymentAddress has been renamed to libzcash::SproutPaymentAddress,
and a new typedef boost::variant is now libzcash::PaymentAddress. Similarly
for ViewingKey and SpendingKey.

A new class InvalidEncoding is introduced as the default boost::variant
option for each address and key type; it is used during decoding instead
of boost::optional.

All address and key storage functions in the wallet have been modified to
refer specifically to the Sprout types, as they are used very precisely.
In most other cases, the more general type is leveraged as much as possible,
and we convert to the Sprout type when necessary. This will be subsequently
wrapped in, or replaced with, context-specific functions once Sapling
types are implemented.
2018-05-11 17:14:49 -04:00
Jack Grigg 68a1a592ca
Remove nType and nVersion from Zcash-specific code 2018-04-17 13:09:47 +01:00
Jack Grigg 49cf707d2c
Add Base58 encoding of viewing keys 2017-12-20 00:46:33 +00:00
Jack Grigg aa666c9673
Implement viewing key storage in the keystore 2017-12-04 17:17:18 +00:00
Jack Grigg 642a1caf93
ViewingKey -> ReceivingKey per zcash/zips#117 2017-12-04 17:17:18 +00:00
syd 4e4aa5b6ec Get rid of underscore prefixes for include guards.
This is because they may conflict with reserved names. Also took
this opportunity to make the guards in the zcash subdir a bit
more uniform by having them all conform to ZC_<...>_H_

This closes #1272
2017-11-28 14:57:58 -05:00
Jack Grigg 3a15b1637e Move serialized Zcash address length constants into zcash/Address.hpp 2016-09-13 14:21:49 +12:00
Jack Grigg 16d140f4a2 Add support for encrypting spending keys 2016-09-13 14:21:49 +12:00
Jack Grigg 32a103aab7 Changes after review 2016-09-01 11:48:15 +12:00
Jack Grigg 02e674555e Add wallet method for finding spendable notes in a CTransaction 2016-08-30 00:29:49 +12:00
Jack Grigg 7c929cf5bc Add support for spending keys to the basic key store 2016-08-09 17:38:25 +12:00
Sean Bowe 62b7cd6173 Do not encode leading bytes in `PaymentAddress` serialization; this is a task for a higher-level API. 2016-06-15 14:58:30 -06:00
Sean Bowe defe37a6d4 Enforce first four bits are zero for all spending keys and phi. 2016-05-24 11:07:09 -06:00
Sean Bowe 369df06583 Introduce new `libzcash` Zcash protocol API and crypto constructions surrounding the zkSNARK circuit. 2016-05-12 16:44:27 -06:00