Commit Graph

11 Commits

Author SHA1 Message Date
Kris Nuttycombe 5ae1772d2b scripted-diff: Update Zcash copyrights to 2022
-BEGIN VERIFY SCRIPT-
git grep "// Copyright (c) .* The Zcash developers" \
  | awk -F ':' '{print $1}' \
  | xargs -I {} sed -i"" -e "s#// Copyright (c) \([0-9]\{4\}\)\(-[0-9]\{4\}\)\? The Zcash developers#// Copyright (c) \1-2022 The Zcash developers#" {}
-END VERIFY SCRIPT-
2022-05-11 16:47:12 -06:00
Kris Nuttycombe d08c992b5e Move parsing of unified addresses to UnifiedAddress.
In cases where we want to be able to decode a string that
is known to be a unified address, it doesn't make sense to have
to route through KeyIO::DecodePaymentAddress and then return
an error depending upon the result type, when it's possible to
provide unified address parsing more directly.

KeyIO::DecodePaymentAddress has been modified to delegate
to UnifiedAddress::Parse
2022-02-17 18:27:15 -07:00
Kris Nuttycombe b305ad2892 Remove the `InvalidEncoding` type from key & address variants.
The presence of this variant results in a situation where more
of the code than necessary needs to be aware of and handle
decoding failures. This change moves all handling of decoding
failures to the point of decoding.
2022-01-06 13:44:45 -07:00
practicalswift 4ddfb216ee Fix missing or inconsistent include guards 2020-10-27 23:05:02 +00:00
Kris Nuttycombe 9119ca8f86 Rename KeyInfo -> KeyConstants and move out of Consensus namespace. 2020-07-09 18:19:13 -06:00
Kris Nuttycombe 07ff0d19a0 Make evident the relationship between chainparams and key IO. 2020-07-09 17:48:47 -06:00
Jack Grigg 9658c87d4a Move ZIP 32 classes inside zcash/Address.hpp
This fixes the dependency graph between the general address-handling
logic, ZIP 32, and the core Sapling address classes.
2020-02-20 12:26:58 +00: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
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 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
Pieter Wuille 3d31e09cbb
Split key_io (address/key encodings) off from base58 2018-05-08 21:39:56 +01:00