Commit Graph

18 Commits

Author SHA1 Message Date
Jack Grigg
70b4ad2dcd wallet: Switch from SaplingSpendingKey to SaplingExtendedSpendingKey
The wallet now only stores Sapling extended spending keys, and thus can
only be used with keys generated from an HDSeed via ZIP 32.

Note that not all Sapling keys in the wallet will correspond to the
wallet's HDSeed, as a standalone Sapling xsk can be imported via
z_importkey. However, it must have been generated from a seed itself,
and thus is more likely to be backed up elsewhere.
2018-09-03 10:45:37 +01:00
Jack Grigg
25d5e80cbe Rename *SpendingKey -> *SproutSpendingKey
Also GetPaymentAddresses -> GetSproutPaymentAddresses
2018-08-03 10:10:26 +01:00
Jack Grigg
4c77517772 Rename *ViewingKey* -> *SproutViewingKey* 2018-08-03 02:23:38 +01:00
Jack Grigg
5175a7f07b Pass SaplingPaymentAddress to store through the CKeyStore 2018-08-03 01:01:45 +01:00
Homu
16117c0d5a Auto merge of #3439 - ebfull:fix-ecc, r=ebfull
Don't call ECC_Start/ECC_Stop outside the test harness.
2018-08-01 17:23:14 -07:00
Sean Bowe
262d21bcbb Don't call ECC_Start/ECC_Stop outside the test harness. 2018-08-01 16:45:12 -06:00
Homu
066cc9c6c7 Auto merge of #3429 - str4d:3217-sapling-address-creation, r=str4d
Add Sapling support to z_getnewaddress and z_listaddresses

Closes #3217.
2018-08-01 12:01:39 -07:00
Jack Grigg
4fab49e173 test: Another assert in wallet_zkeys_tests.store_and_load_sapling_zkeys 2018-08-01 09:46:32 +01:00
Jack Grigg
4715b31c76 Implement CKeyStore::GetSaplingPaymentAddresses() 2018-07-30 16:01:22 +01:00
Jack Grigg
3fd0a269e1 test: Move ECC_Start() call into src/gtest/main.cpp 2018-07-27 17:18:49 +02:00
Jay Graber
2173767365 Add crypted keystore sapling add key 2018-07-05 15:00:00 -07:00
Jay Graber
f82a864dc1 Add StoreAndRetrieveSaplingSpendingKey test 2018-07-05 14:52:51 -07:00
Jay Graber
efb7662d4a Add Sapling Add/Have/Get to keystore 2018-07-05 14:37:33 -07:00
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
80ed13d545 Introduce wrappers around CZCPaymentAddress
This patch removes the need for the intermediary Base58 type
CZCPaymentAddress, by providing {Encode,Decode}PaymentAddress
functions that directly operate on the conversion between strings
and libzcash::PaymentAddress.
2018-05-08 21:39:55 +01:00
Jack Grigg
167cd33374 Implement viewing key storage in the wallet 2017-12-20 00:46:37 +00:00
Simon
45232b1961 Add payment disclosure as experimental feature. 2017-11-14 13:29:05 -08:00
Jack Grigg
6daab5b4fc Only run wallet tests when wallet is enabled 2016-12-16 10:52:37 +13:00