From 6527e792e428c9e47e87344e297e0a178bd95bd9 Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Sat, 12 Oct 2024 01:17:18 +0000 Subject: [PATCH] Broaden `Authorization`s from `SpendDescriptionV5::into_spend_description` This enables the method to be used with bundles that have spend auth signatures and proofs, but not yet binding signatures. --- CHANGELOG.md | 5 +++++ src/bundle.rs | 7 +++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f55bbc2..95bd5e2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,11 @@ and this library adheres to Rust's notion of `sapling_crypto::keys::EphemeralSecretKey`, matching the existing public APIs that expose it. +### Changed +- `sapling_crypto::bundle::SpendDescriptionV5::into_spend_description` now + supports any `Authorization` for which the `SpendDescription` itself is fully + authorized. + ## [0.3.0] - 2024-10-02 ### Changed diff --git a/src/bundle.rs b/src/bundle.rs index c8fedbb..7ade87e 100644 --- a/src/bundle.rs +++ b/src/bundle.rs @@ -298,12 +298,15 @@ impl SpendDescriptionV5 { Self { cv, nullifier, rk } } - pub fn into_spend_description( + pub fn into_spend_description( self, anchor: bls12_381::Scalar, zkproof: GrothProofBytes, spend_auth_sig: redjubjub::Signature, - ) -> SpendDescription { + ) -> SpendDescription + where + A: Authorization>, + { SpendDescription { cv: self.cv, anchor,