Kris Nuttycombe
4b18426fcd
zcash_address: Use `zcash_protocol::consensus::NetworkType`
...
This inverts the dependency relationship between `zcash_protocol` and
`zcash_address`, permitting the network constants (primarily the HRPs)
defined in `zcash_protocol` to be used directly in `zcash_address`
instead of being duplicated.
2024-03-05 13:36:15 -07:00
Jack Grigg
29dc5d1d5c
zcash_address 0.3.1
2024-01-12 04:53:39 +00:00
Jack Grigg
22271145a7
zcash_address: Improve documentation
2024-01-12 04:53:39 +00:00
Jack Grigg
6570116384
zcash_address: Show feature flags in documentation
2024-01-12 02:45:22 +00:00
Jack Grigg
3f006bffac
zcash_address: Remove private type aliases for raw data sizes
...
These served no type safety purpose; they were just to make developing
the crate easier. However, while docs.rs correctly shows these in trait
APIs as their plain `[u8; N]` form, editor LSPs like `rust-analyzer`
assume the crate-private types are public and auto-create stubs that
reference them, which is not good UX for downstream developers.
2024-01-12 00:15:55 +00:00
Kris Nuttycombe
60ac1070c5
Release zcash_address version 0.3.0
2023-06-06 15:53:16 -06:00
Kris Nuttycombe
75e529eea6
Upgrade to `bs58 0.5`
2023-06-06 15:53:14 -06:00
Jack Grigg
5f7ccb6d84
zcash_address 0.2.1
2023-04-15 00:51:29 +00:00
Jack Grigg
f82866dbb9
Migrate to `bech32 0.9`
2023-04-11 16:01:19 +00:00
Sean Bowe
bd7f9d7c3c
Bump zcash_encoding and zcash_address crate versions to 0.2.
2022-10-19 16:51:59 -06:00
Kris Nuttycombe
34a7abd653
Update unified address test vectors
...
This updates unified address test vectors after
https://github.com/zcash-hackworks/zcash-test-vectors/pull/89
to check addresses across multiple diversifier indices, and also
removes the superfluous binary encoding of UA strings.
2022-10-07 19:50:32 -06:00
Kris Nuttycombe
03c3370de8
Fix problems identified by clippy's beta lints
2022-09-17 08:57:37 -06:00
Kris Nuttycombe
8439f1a4f7
Add binary encoding for unified spending keys.
...
This encoding is wallet-internal-only and is currently
guarded under the `unstable` feature flag.
2022-09-08 11:05:59 -06:00
Kris Nuttycombe
16a0e43f2d
Update to Rust 2021 and explicitly set MSRVs
2022-09-02 12:05:09 -06:00
Jack Grigg
b8e8a0c491
zcash_address: Add `ZcashAddress::convert_if_network`
...
This, along with the corresponding `TryFromRawAddress` trait, enables
converting `ZcashAddress` into a network-agnostic type.
Closes zcash/librustzcash#564 .
2022-06-10 15:19:42 +00:00
Jack Grigg
16938d1c4f
zcash_address: Replace `FromAddress` with `TryFromAddress`
...
This enables the user-defined conversions to be fallible, which they
will almost always want to be (as address data needs to be validated
before it can be used).
2022-06-07 18:09:42 +00:00
Jack Grigg
54e9eb8708
zcash_address 0.1.0
2022-05-10 23:33:05 +00:00
Jack Grigg
6976d3fe85
zcash_encoding 0.1.0
2022-05-10 23:33:05 +00:00
Jack Grigg
a27a5428f0
f4jumble 0.1.0
2022-05-10 23:33:05 +00:00
Kris Nuttycombe
981fc62b08
Add `ZcashAddress::encode` method.
...
This provides the encoding corresponding to
`ZcashAddress::try_from_encoded` and documents the fact that the
`Display` instance can also provide this encoding.
Fixes #463
2022-04-11 10:36:27 -06:00
Kris Nuttycombe
990b0afe5d
Update unified address test vectors
2022-03-29 14:56:00 -06:00
Jack Grigg
fa75c9587c
zcash_address: Avoid an unnecessary allocation while parsing a UA
2022-02-03 00:02:03 +00:00
Jack Grigg
4a30679491
f4jumble: Return `Error` from allocating functions
2022-02-03 00:02:03 +00:00
Squirrel
c910ffdb41
Remove unused dependencies ( #479 )
...
Remove unused dependencies
Co-authored-by: Kris Nuttycombe <kris.nuttycombe@gmail.com>
Co-authored-by: str4d <thestr4d@gmail.com>
2022-01-18 12:04:14 -07:00
Kris Nuttycombe
8d34e62114
Clean up proptest generation for unified containers.
2022-01-04 15:31:20 -07:00
Kris Nuttycombe
6065c07003
Update test vectors to respect item ordering.
2022-01-04 11:48:23 -07:00
Kris Nuttycombe
2fa73ed368
Remove `Ord` instances for sealed items.
...
There are two canonical orderings for sealed items: preference
order and encoding order. Removing the `Ord` instances means
that a user can't accidentally choose the wrong ordering;
these orderings are replaced by explicit `preference_order`
and `encoding_order` comparison functions.
2022-01-04 11:48:23 -07:00
Kris Nuttycombe
e413f12fb5
Apply suggestions from code review
...
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2022-01-04 11:48:23 -07:00
Kris Nuttycombe
4c4c0b1e63
Makes unified container parsing enforce typecode order.
...
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2022-01-04 11:48:23 -07:00
Jack Grigg
d5a375919d
blake2{b,s}_simd 1
2021-12-17 23:44:06 +00:00
Kris Nuttycombe
fd786f28b7
Ensure unrecognized prefixes map to ParseError::NotZcash
2021-12-07 12:59:41 -07:00
Kris Nuttycombe
4e906508ae
Make unified container construction correctly sort items.
...
Newly constructed unified containers now obey ZIP 316 item
ordering rules, while parsing and reserialization preserve
order.
2021-12-07 11:07:15 -07:00
Kris Nuttycombe
cc8c2868eb
Ensure that unknown typecodes don't duplicate known typecodes.
2021-12-07 09:16:55 -07:00
Kris Nuttycombe
cccc493067
Add unknown typecodes to UA proptests.
2021-12-06 11:34:12 -07:00
Kris Nuttycombe
e30f4bd094
Fix incorrect ordering of receivers in writing raw encoding.
2021-12-06 08:32:07 -07:00
Kris Nuttycombe
9144aaef0a
Ensure shrinking will work properly for ufvk proptests.
2021-12-03 15:27:25 -07:00
Kris Nuttycombe
fd300e0061
Apply suggestions from code review
...
Co-authored-by: str4d <jack@electriccoin.co>
2021-12-03 14:26:02 -07:00
Kris Nuttycombe
a6420858f4
Fix clippy lints.
2021-12-03 14:21:40 -07:00
Kris Nuttycombe
76082e4287
Return correct errors for incorrectly encoded unified containers.
2021-12-03 14:15:02 -07:00
Kris Nuttycombe
ba3ff42e13
Address comments from code review.
2021-12-03 12:07:26 -07:00
Kris Nuttycombe
8cf43d255f
Fix clippy complaints.
2021-12-02 14:44:38 -07:00
Kris Nuttycombe
914363f9b7
Rename "to_bytes" internal method to "to_jumbled_bytes"
2021-12-02 14:44:38 -07:00
Kris Nuttycombe
2ffe5963a1
Fix the byte length of Sapling and Transparent UFVK components.
2021-12-02 14:44:38 -07:00
Kris Nuttycombe
7e629db29f
Adds high-level encoding and decoding functions for unified types.
...
This renames the `FromReceivers` trait to `UnifiedEncoding` and makes
its public methods (as well as the private to_bytes method) function in
terms of network values rather than explicit HRP arguments. It also adds
high-level encoding and decoding methods that handle conversion to and
from the Bech32m-encoded transport format for all supported types, and
then delegates to these from locations that previously used lower-level
utilities.
2021-12-02 14:44:38 -07:00
Kris Nuttycombe
3b70731cc4
Adds `unified::SealedContainer::network_hrp`
2021-12-02 14:44:38 -07:00
Kris Nuttycombe
7d801cf71b
Expose unified addresses, IVKs and Fvks
2021-12-02 14:44:38 -07:00
ying tong
c8993881ae
kind::unified: Make ivk::Ivk, fvk::Fvk available outside the crate.
...
Co-authored-by: Kris Nuttycombe <kris@nutty.land>
2021-12-02 14:44:38 -07:00
therealyingtong
c4ceb8e9df
Test both Sapling and Orchard receivers in arb_shielded_* proptests.
2021-12-02 14:44:38 -07:00
therealyingtong
b4c1ca11c9
Remove P2SH variant for FVK and IVK.
2021-12-02 14:44:38 -07:00
therealyingtong
cb06bbcf05
unified::fvk::tests: Add unit tests for parsing UFVK.
2021-12-02 14:44:38 -07:00