From e5dad037e9ac091d75dbc4e962f9e34e100f0c67 Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Fri, 2 Sep 2022 01:13:20 +0000 Subject: [PATCH] zcash_primitives: Make `NullifierDerivingKey` internals public The `zcashd` Rust code relies on being able to construct the Sapling types transparently. This part of the "public API" of the crate was broken when the `NullifierDerivingKey` newtype was introduced. We do want to migrate to all of these types having stronger type safety guarantees (by only constructing them via constructors), but that should be done consistently across the types. For now we maintain the existing API by changing `NullifierDerivingKey` to be a transparent newtype. --- zcash_primitives/src/sapling.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zcash_primitives/src/sapling.rs b/zcash_primitives/src/sapling.rs index 689708d65..f13a9a68e 100644 --- a/zcash_primitives/src/sapling.rs +++ b/zcash_primitives/src/sapling.rs @@ -192,7 +192,7 @@ impl ProofGenerationKey { /// A key used to derive the nullifier for a Sapling note. #[derive(Debug, Copy, Clone, PartialEq, Eq)] -pub struct NullifierDerivingKey(pub(crate) jubjub::SubgroupPoint); +pub struct NullifierDerivingKey(pub jubjub::SubgroupPoint); #[derive(Debug, Clone)] pub struct ViewingKey {