Commit Graph

248 Commits

Author SHA1 Message Date
Kris Nuttycombe 64c7514941 WIP: Create an in-memory wallet backend. 2024-03-15 09:24:50 -06:00
Jack Grigg 6898dbf094 Replace `unstable-nu6` and `zfuture` feature flags with cfg flags
Neither of these should have been feature flags, as they gate breaking
changes to the Zcash consensus rules (and in some ways are incompatible
with each other), while feature flags should be additive.
2024-03-10 18:42:39 +00:00
Kris Nuttycombe cb4b9f80bc zcash_protocol: Add `TryFrom<&MemoBytes>` for `Memo` 2024-03-08 13:48:30 -07:00
Jack Grigg d539f04f2e zcash_address 0.3.2 2024-03-06 15:07:51 +00:00
Jack Grigg d0673c9bc3 zcash_protocol 0.1.0 2024-03-06 15:07:11 +00:00
Kris Nuttycombe cef9e7641d `zcash_address`: Add support for ZIP 320, TEX addresses. 2024-03-06 14:59:16 +00:00
Kris Nuttycombe eaabc0f514 Apply suggestions from code review
Co-authored-by: Daira-Emma Hopwood <daira@jacaranda.org>
2024-03-05 20:03:46 -07:00
Kris Nuttycombe 8955cfc559 Add missing CHANGELOG entries. 2024-03-05 14:37:26 -07:00
Kris Nuttycombe 5675a76f0d zcash_protocol: Use `BalanceError` instead of `()` for monetary range violations. 2024-03-05 13:59:26 -07:00
Kris Nuttycombe 51d4464472 Remove `network_type` calls that are obviated by the blanket impl. 2024-03-05 13:36:15 -07:00
Kris Nuttycombe b8aa5132c2 Apply suggestions from code review
Co-authored-by: str4d <thestr4d@gmail.com>
Co-authored-by: Daira-Emma Hopwood <daira@jacaranda.org>
2024-03-05 13:36:15 -07:00
Kris Nuttycombe 04fdac7931 zcash_primitives: Move the `memo` module to the `zcash_protocol` crate. 2024-03-05 13:36:15 -07:00
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
Kris Nuttycombe 64454100c5 zcash_client_backend: Move the `ShieldedProtocol` and `PoolType` types to `zcash_protocol` 2024-03-05 09:46:03 -07:00
Kris Nuttycombe a35ccfc10b Fix broken intra-doc links after `zcash_protocol` crate extraction. 2024-03-05 09:45:24 -07:00
Kris Nuttycombe 85d1ca251a zcash_primitives: Move the `local-consensus` module to the `zcash_protocol` crate. 2024-03-05 09:45:24 -07:00
Kris Nuttycombe eb3c7b479e zcash_protocol: Modify `Zatoshis` to directly wrap a u64 2024-03-05 09:45:24 -07:00
Kris Nuttycombe 7188482225 zcash_protocol: Rename value amounts to `Zatoshis` and `ZatBalance` 2024-03-05 09:45:24 -07:00
Kris Nuttycombe 5e4d9abbce Move `Amount` and `NonNegativeAmount` types to the `zcash_protocol` crate. 2024-03-05 09:45:24 -07:00
Kris Nuttycombe bacfe3cb9d Move `zcash_primitives::{consensus, constants}` to the `zcash_protocol` crate 2024-03-05 09:45:24 -07:00
Kris Nuttycombe 66c6bba84e Add stub for a `zcash_protocol` crate. 2024-03-05 09:45:24 -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 374882b7bc Move `zcash_note_encryption` component to https://github.com/zcash/zcash_note_encryption
The `zcash_note_encryption` component crate has been factored out to
its own repository, to avoid circular crate dependencies involving
https://github.com/zcash/librustzcash and the
https://github.com/zcash/orchard and
https://github.com/zcash/sapling-crypto repositories.
2023-11-17 20:39:14 -07:00
Jack Grigg c8e2d81f58 Render byte slices as hex more often in `Debug` impls
This is more generally useful for debugging purposes than the default
`Debug` impl for `&[u8]`.

We also provide an alternate `Debug` impl for `legacy::Script` that
parses and renders known opcodes. Note that we only parse a subset of
the full opcode set.
2023-08-30 20:41:27 +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
Kris Nuttycombe 80adb54e26 Release zcash_note_encryption version 0.4.0 2023-06-06 10:12:33 -06:00
Kris Nuttycombe fe3d0269d1 Add comments detailing the checks required prior to calling `check_note_validity` 2023-05-26 10:12:21 -06:00
Kris Nuttycombe 696a9be0a0 Update `zcash_primitives` to reflect argument changes to `parse_note_plaintext_without_memo_ovk` 2023-05-26 09:43:26 -06:00
Kris Nuttycombe be89e81534 Remove `esk` and `ephemeral_key` arguments from `parse_note_plaintext_without_memo_ovk`
Fixes #850
2023-05-26 09:24:22 -06:00
Jack Grigg a115a8f00f zcash_note_encryption: Remove `esk` check requirement from `Domain::parse_note_plaintext_without_memo_ovk`
This method is only called from `try_output_recovery_with_ock`, and we
can instead rely on the check performed in `check_note_validity`,
reducing the number of checks that `Domain` implementations need to
perform.

The `esk` and `ephemeral_key` parameters become unused, and will be
removed in a subsequent commit (as this change needs to be synchronized
with the `orchard` crate).
2023-05-19 16:30:47 +00: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
Kris Nuttycombe 1a27a7f9ce Update zcash_note_encryption changelog for 0.3.0 release. 2023-03-22 09:54:18 -06:00
Kris Nuttycombe d6fafa291b Update Sapling note encryption for `zcash_note_encryption 0.3.0`
Fixes zcash/librustzcash#455
2023-03-21 11:09:38 -06:00
Kris Nuttycombe c696069f93 Bump zcash_note_encryption to version 0.3.0 for release.
This removes the path-based dependencies on the `zcash_note_encryption`
crate in favor of using versioned dependencies locally. This better
reflects the future state in which `zcash_note_encryption` is factored
out of the workspace and maintained in a separate repository.
2023-03-20 16:16:34 -06:00
Kris Nuttycombe c88f3e1b9d Remove the `recipient` parameter from zcash_note_encyption::Domain::note_plaintext_bytes
The `Domain::Note` type is now expected to contain information about the
recipient of the note, eliminating the need to pass this information in
via the encryption context.
2023-03-20 16:16:00 -06: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 42fd3c1091 Fix changelogs for `zcash_encoding` and `zcash_history` 2022-10-19 15:52:42 -06:00
Jack Grigg 8f068b3b71 zcash_note_encryption 0.2.0 2022-10-13 21:35:39 +00:00
Jack Grigg 9a010d42ff zcash_note_encryption: Clean up changelog and readme
We no longer depend on the previously-mentioned dependencies.
2022-10-13 21:23:09 +00:00
Jack Grigg 8842de18cc Remove unused dependencies
These were mostly detected with `cargo-udeps`, for which I've also added
exclusions for the dependencies it can't detect are used in doc-tests.
2022-10-13 20:06:52 +00: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 29220c716f Remove `zcash_primitives` as a zcash_note_encryption dev dependency.
This was only used to provide example code for Sapling usage of
the `NoteEncryption` struct; this example code has been moved
to `sapling::note_encryption`.
2022-09-16 12:52:00 -06:00
Kris Nuttycombe 72b5e6dfc3 Upgrade chacha20poly1305 dependency to version 0.10
Also upgrade  the `chacha20`, `cipher`, and `subtle` dependency
versions.
2022-09-16 12:52:00 -06:00
Daira Hopwood 515b0a40ec zcash_note_encryption: Add API to prepare epk.
Co-authored-by: Jack Grigg <jack@electriccoin.co>
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-09-15 03:22:41 +01:00