Merge pull request #794 from zcash/temporary-zcashd-notecommitment-derive
Temporarily re-expose Sapling `NoteCommitment` derivation
This commit is contained in:
commit
0cff3c67ed
|
@ -7,6 +7,11 @@ and this library adheres to Rust's notion of
|
||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
## [0.10.2] - 2023-03-16
|
||||||
|
### Added
|
||||||
|
- `zcash_primitives::sapling::note`:
|
||||||
|
- `NoteCommitment::temporary_zcashd_derive`
|
||||||
|
|
||||||
## [0.10.1] - 2023-03-08
|
## [0.10.1] - 2023-03-08
|
||||||
### Added
|
### Added
|
||||||
- Sapling bundle component constructors, behind the `temporary-zcashd` feature
|
- Sapling bundle component constructors, behind the `temporary-zcashd` feature
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
[package]
|
[package]
|
||||||
name = "zcash_primitives"
|
name = "zcash_primitives"
|
||||||
description = "Rust implementations of the Zcash primitives"
|
description = "Rust implementations of the Zcash primitives"
|
||||||
version = "0.10.1"
|
version = "0.10.2"
|
||||||
authors = [
|
authors = [
|
||||||
"Jack Grigg <jack@z.cash>",
|
"Jack Grigg <jack@z.cash>",
|
||||||
"Kris Nuttycombe <kris@electriccoin.co>"
|
"Kris Nuttycombe <kris@electriccoin.co>"
|
||||||
|
|
|
@ -25,6 +25,17 @@ impl NoteCommitment {
|
||||||
}
|
}
|
||||||
|
|
||||||
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$.
|
/// $NoteCommit^Sapling$.
|
||||||
///
|
///
|
||||||
/// Defined in [Zcash Protocol Spec § 5.4.8.2: Windowed Pedersen commitments][concretewindowedcommit].
|
/// Defined in [Zcash Protocol Spec § 5.4.8.2: Windowed Pedersen commitments][concretewindowedcommit].
|
||||||
|
|
Loading…
Reference in New Issue