Merge pull request #794 from zcash/temporary-zcashd-notecommitment-derive

Temporarily re-expose Sapling `NoteCommitment` derivation
This commit is contained in:
str4d 2023-03-17 00:05:20 +00:00 committed by GitHub
commit 0cff3c67ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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].