Temporarily re-expose Sapling `NoteCommitment` derivation

This commit is contained in:
Jack Grigg 2023-03-16 23:23:54 +00:00
parent e934316db9
commit 2530eb3a9d
3 changed files with 17 additions and 1 deletions

View File

@ -7,6 +7,11 @@ and this library adheres to Rust's notion of
## [Unreleased]
## [0.10.2] - 2023-03-16
### Added
- `zcash_primitives::sapling::note`:
- `NoteCommitment::temporary_zcashd_derive`
## [0.10.1] - 2023-03-08
### Added
- Sapling bundle component constructors, behind the `temporary-zcashd` feature

View File

@ -1,7 +1,7 @@
[package]
name = "zcash_primitives"
description = "Rust implementations of the Zcash primitives"
version = "0.10.1"
version = "0.10.2"
authors = [
"Jack Grigg <jack@z.cash>",
"Kris Nuttycombe <kris@electriccoin.co>"

View File

@ -25,6 +25,17 @@ impl NoteCommitment {
}
impl NoteCommitment {
/// Derives a Sapling note commitment.
#[cfg(feature = "temporary-zcashd")]
pub fn temporary_zcashd_derive(
g_d: [u8; 32],
pk_d: [u8; 32],
v: NoteValue,
rcm: jubjub::Fr,
) -> Self {
Self::derive(g_d, pk_d, v, NoteCommitTrapdoor(rcm))
}
/// $NoteCommit^Sapling$.
///
/// Defined in [Zcash Protocol Spec § 5.4.8.2: Windowed Pedersen commitments][concretewindowedcommit].