Commit Graph

31 Commits

Author SHA1 Message Date
Pieter Wuille
07444da1db Introduce wrappers around CBitcoinAddress
This patch removes the need for the intermediary Base58 type
CBitcoinAddress, by providing {Encode,Decode,IsValid}Destination
function that directly operate on the conversion between strings
and CTxDestination.
2018-05-03 01:12:57 +01:00
Jack Grigg
28915c30ca Fix z_importviewingkey startHeight parameter
Closes #2937.
2018-04-03 02:43:52 +01:00
Maxwell Gubler
f70cd24521 Fix syntax examples for z_importwallet and export 2018-02-20 16:46:12 -05:00
Homu
1683c2d5bf Auto merge of #2143 - str4d:1997-viewing-keys, r=str4d
Implement incoming viewing keys

Closes #1997.
2017-12-20 14:11:05 -08:00
Jack Grigg
bec2235148 Cleanup: Add braces for clarity 2017-12-20 11:18:59 +00:00
Jack Grigg
e85b33a52e Add RPC methods for exporting/importing viewing keys 2017-12-20 00:46:37 +00:00
Simon
ba1dbb3040 RPC dumpwallet and z_exportwallet updated to no longer allow
overwriting an existing file.
2017-11-16 22:29:37 -08:00
Nathan Wilcox
de422c066b [tests pass] Ensure importprivkey outputs the address in case key is already imported. 2017-09-18 15:30:42 +09:00
Nathan Wilcox
d187317083 [tests pass] Output address on new key import. 2017-09-18 15:30:42 +09:00
Jack Grigg
33589401ba Require that z_importkey height parameter be in valid range 2017-03-24 16:07:53 +13:00
Jack Grigg
b7e5b7d5ee Simplify z_importkey by making rescan a string
Transparently handles older boolean values as well.
2017-03-23 15:57:11 +13:00
Jack Grigg
a31ba7a0cb Usability improvements for z_importkey
- Add height parameter to z_importkey to reduce rescan range
- Change semantics of rescan parameter, so users can explicitly force a rescan
  for existing keys.

Closes #2032
2017-03-16 19:34:41 +13:00
Jonas Schnelli
a10a6e2a0e [Univalue] add univalue over subtree
similar to secp256k1 include and compile univalue over a subtree
2017-02-10 02:18:51 +00:00
Jack Grigg
0d37ae3a59 Migrate Zcash-specific code to UniValue 2017-02-10 00:52:57 +00:00
Jonas Schnelli
d014114d67 Remove JSON Spirit wrapper, remove JSON Spirit leftovers
- implement find_value() function for UniValue
- replace all Array/Value/Object types with UniValues, remove JSON Spirit to UniValue wrapper
- remove JSON Spirit sources
2017-02-10 00:35:24 +00:00
Jonas Schnelli
851f58f94e remove JSON Spirit UniValue wrapper 2017-02-10 00:35:24 +00:00
Jonas Schnelli
9756b7bd29 extend conversion to UniValue 2017-02-10 00:35:24 +00:00
Jeff Garzik
ed21d5bd4b Convert tree to using univalue. Eliminate all json_spirit uses. 2017-02-10 00:35:24 +00:00
zkbot
0edb3c0f16 Auto merge of #1978 - str4d:1941-scan-whole-chain-on-zkey-import, r=ebfull
Scan the whole chain whenever a z-key is imported

Closes #1941.
2017-01-20 00:02:12 +00:00
Simon
9064d73bf8 Fixes #1497 ZCA-009 by restricting data exporting to user defined folder.
Previously the RPC interface allowed z_exportwallet, backupwallet and
dumpwallet to write data to an arbitrary filename.  ZCA-009 demonstrates
how this is vulnerable.  The resolution is to only allow data to
written when the -exportdir has been configured.  Also filenames are
restricted to alphanumeric characters.
2017-01-16 10:56:06 -08:00
Jack Grigg
7e3a20f235 Scan the whole chain whenever a z-key is imported
Closes #1941.
2017-01-04 15:40:35 +01:00
Sean Bowe
58c4c0bba3 Change some Bitcoin strings to Zcash strings. 2016-10-26 13:29:05 -06:00
zkbot
27bc01a05b Auto merge of #1523 - bitcartel:master_1504_z_logging, r=bitcartel
Refine LogPrint debugging for z_* rpc calls

For #1504 ZCA011
2016-10-14 11:11:26 -04:00
Simon
438d1e45be Use -debug=zrpc for z_* rpc calls (#1504) 2016-10-12 15:46:24 -07:00
Simon
950f8ffdb6 Fixes #1491 by updating help message for rpc call z_importkey 2016-10-11 16:52:38 -07:00
Simon
3bff998b38 Rename methods to avoid using prefix of _ underscore which is reserved.
Added logging of explicit exception rather than a catch all.
Removed redundant spending key check.
Updated user facing help message.
2016-08-24 11:55:26 -07:00
Simon
0feffd1424 Don't mark wallet as dirty if key already exists.
Fix incorrect method name used in error message.
2016-08-24 11:19:33 -07:00
Simon
92444edc00 Add z_importwallet and z_exportwallet to handle keys for both
taddr and zaddr.  Restore behaviour of dumpwallet and importwallet
to only handle taddr.
2016-08-24 11:19:33 -07:00
Simon
c1c4594371 Implemented RPC calls z_importkey, z_exportkey, z_getnewaddress.
Modified RPC calls dumpwallet and importwallet to include spending keys.
2016-08-24 11:19:33 -07:00
Jonas Schnelli
b9fb692d04 Push down RPC reqWallet flag 2015-04-12 19:37:29 +02:00
Jonas Schnelli
50c72f23ad [Move Only] Move wallet related things to src/wallet/
could once be renamed from /src/wallet to /src/legacywallet.
2015-03-12 14:13:02 +01:00