Commit Graph

19 Commits

Author SHA1 Message Date
Kris Nuttycombe fa225d479a Allow transparent-only unified addresses and viewing keys. 2024-04-23 16:30:52 -06:00
Kris Nuttycombe aea04d1ad2 `zcash_address`: Add support for ZIP 316, Revision 1 2024-04-22 17:53:44 -06:00
Kris Nuttycombe 0341171c84 zcash_address: Add handling for Unified Metadata Items 2024-04-22 17:18:53 -06:00
Jack Grigg 22271145a7 zcash_address: Improve documentation 2024-01-12 04:53:39 +00:00
Kris Nuttycombe 8d34e62114 Clean up proptest generation for unified containers. 2022-01-04 15:31:20 -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
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 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 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
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
therealyingtong 194a790335 unified::fvk: Parse unified full viewing keys. 2021-12-02 14:44:38 -07:00