Kris Nuttycombe
700b98f0b0
Add tests for keystore storage and retrieval of UFVKs.
2021-12-22 15:57:47 -07:00
Kris Nuttycombe
0dcdc28a38
Add CWallet::GetUnifiedForReceiver
2021-12-22 15:57:47 -07:00
Kris Nuttycombe
b29ca10b8d
Add unified address generation.
...
Generate unified addresses from UFVKs, and add the associated
metadata to the wallet database.
2021-12-22 15:57:47 -07:00
Kris Nuttycombe
e56f252a86
Add unified address tracking to KeyStore
2021-12-22 15:55:36 -07:00
Kris Nuttycombe
ef068c51a9
Store ufvks to the wallet database.
2021-12-22 15:55:36 -07:00
Kris Nuttycombe
b67e62d977
Address comments from code review.
2021-10-29 13:38:36 -06:00
Kris Nuttycombe
8883ae8b9e
Add support for externally searching for valid Sapling diversifiers.
...
In order to support generation of unified addresses, it needs
to be possible for the code generating a unified address to search
the space of Sapling diversifiers to obtain a valid diversifier.
Historically, invalid diviersifiers were simply skipped, so we retain
this behavior when obtaining a Sapling address from the legacy HD seed.
2021-10-19 11:48:02 -06:00
Kris Nuttycombe
5677649af1
Derive random HD seeds from ZIP-339 seed phrases.
...
Add support for dump of legacy HD seeds & persistence of mnemonic-based seeds.
2021-10-19 11:48:02 -06:00
Yuri Zhykin
e715e1393b
Fix for incorrect locking in GetPubKey() (keystore.cpp)
...
zcash: cherry picked from commit 220f950ab1302f8f8c0bb5b9c818f3d6569796bd
zcash: https://github.com/bitcoin/bitcoin/pull/7913
2021-02-19 15:11:22 -07:00
Jorge Timón
c3983ccb1c
scripted-diff: Remove #include <boost/foreach.hpp>
...
-BEGIN VERIFY SCRIPT-
sed -i ':a;N;$!ba;s/#include <boost\/foreach.hpp>\n//' ./src/*.h ./src/*.cpp ./src/*/*.h ./src/*/*.cpp ./src/*/*/*.h ./src/*/*/*.cpp
-END VERIFY SCRIPT-
2020-11-23 23:07:15 +00:00
Jack Grigg
a62405f44f
Store imported Sapling ExtFVKs in wallet database
2020-02-21 01:32:15 +00:00
Jack Grigg
b62bb98087
Remove default address parameter from Sapling keystore methods
...
Now that we store SaplingExtendedFullViewingKey internally, we have
access to the default address everywhere we require it.
2020-02-20 13:01:49 +00:00
Jack Grigg
d74fdd76eb
SaplingFullViewingKey -> SaplingExtendedFullViewingKey in keystore maps
...
All of these maps are created from scratch on wallet load, so we can
alter their contents without compatibility concerns. With this change,
we can use the existing maps to implement viewing key support. The
downside is that the wallet will take more space in memory, but that can
easily be improved in future by storing ExtFVK fingerprints in some of
the maps (which would improve memory usage even compared to the original
layout).
2020-02-20 13:01:49 +00:00
Matt Corallo
e61f62923b
Add logic to track pubkeys as watch-only, not just scripts
2019-11-14 15:46:06 +00:00
Larry Ruane
5a5094bbb5
simplify locking, merge cs_SpendingKeyStore into cs_KeyStore
2019-11-03 19:53:28 -07:00
Daira Hopwood
bc909a7a7f
Replace http with https: in links to the MIT license.
...
Also change MIT/X11 to just MIT, since no distinction was intended.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2019-07-18 15:26:01 +01:00
Simon
cb9cff5fdc
Fix deadlock from calling CWallet::AddSaplingIncomingViewingKey instead of CBasicKeyStore::AddSaplingIncomingViewingKey
2018-10-05 21:15:08 -07:00
Homu
325ba00336
Auto merge of #3542 - Eirik0:3511-update-address-mapping, r=bitcartel
...
Add newly discovered sapling addresses to the wallet when decrypting
Closes #3511
2018-10-03 21:49:32 -07:00
Eirik Ogilvie-Wigley
a4ecd0fa72
Add newly discovered sapling addresses to the wallet
2018-10-01 09:34:25 -06:00
Eirik Ogilvie-Wigley
83c4e360da
Address need not be optional when adding sapling keys
2018-09-27 15:44:04 -06:00
Eirik Ogilvie-Wigley
5e360fb29f
Add sapling spending keys to z_exportwallet
2018-09-14 15:07:15 -06:00
Jack Grigg
b33a7ec46e
wallet: Don't allow an HDSeed to be overwritten
...
We can maybe relax this restriction later once we have worked out the UX
implications.
2018-09-03 10:45:37 +01:00
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
70c8c25e4b
Store HDSeed in CBasicKeyStore
2018-09-03 10:27:52 +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
93fcf892d4
Rename SpendingKeyMap -> SproutSpendingKeyMap
2018-08-03 01:47:30 +01:00
Jack Grigg
5175a7f07b
Pass SaplingPaymentAddress to store through the CKeyStore
2018-08-03 01:01:45 +01:00
Jay Graber
8e91ebf76c
Change default_address to return SaplingPaymentAddr and not boost::optional
2018-07-05 14:52:51 -07:00
Jay Graber
f82a864dc1
Add StoreAndRetrieveSaplingSpendingKey test
2018-07-05 14:52:51 -07:00
Jay Graber
f4207d0c0e
Add SaplingIncomingViewingKeys map, SaplingFullViewingKey methods
2018-07-05 14:52:46 -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
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
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
0d7386916d
Add separate lock for SpendingKey key store operations
2016-08-16 22:17:33 +12:00
Jack Grigg
0bfdb9628e
Merge AddSpendingKeyPaymentAddress into AddSpendingKey to simplify API
2016-08-12 14:24:29 +12:00
Jack Grigg
7c929cf5bc
Add support for spending keys to the basic key store
2016-08-09 17:38:25 +12:00
Cory Fields
a354a59f1f
wallet: move crypter to wallet
2015-03-22 15:18:55 -04:00
Cory Fields
5a6155ccfa
c++11: don't forward-declare types used in maps
2015-02-03 23:30:59 -05:00
Pavel Janík
5262fde0ec
Remove whitespaces before double colon in errors and logs
2015-01-31 17:38:28 -05:00
sandakersmann
f914f1a746
Added "Core" to copyright headers
...
Github-Pull: #5494
Rebased-From: 15de949bb9277e442302bdd8dee299a8d6deee60
2014-12-19 19:55:32 +01:00
Michael Ford
2b173d3bcc
Update comments in keystore to be doxygen compatible
2014-10-28 12:06:59 +08:00
Cory Fields
066e2a1403
script: move CScriptID to standard.h and add a ctor for creating them from CScripts
...
This allows for a reversal of the current behavior.
This:
CScript foo;
CScriptID bar(foo.GetID());
Becomes:
CScript foo;
CScriptID bar(foo);
This way, CScript is no longer dependent on CScriptID or Hash();
2014-10-17 13:44:14 -04:00
Cozz Lovan
ccca27a788
[Wallet] Watch-only fixes
2014-10-03 04:29:51 +02:00
jtimon
cbd22a50c4
Move CScript class and dependencies to script/script
2014-09-08 20:19:31 +02:00
jtimon
86dbeea2cd
Rename script.h/.cpp to scriptutils.h/.cpp (plus remove duplicated includes)
2014-09-08 20:19:31 +02:00
Wladimir J. van der Laan
d49b0876a4
Merge pull request #4673
...
1c5f0af
[Qt] Add column Watch-only to transactions list (Cozz Lovan)
939ed97
Add boolean HaveWatchonly and signal NotifyWatchonlyChanged (Cozz Lovan)
2014-08-26 17:41:33 +02:00