From 9729cd8d266a6121bd8c7f3b43053440b787d413 Mon Sep 17 00:00:00 2001 From: Kris Nuttycombe Date: Mon, 26 Feb 2024 10:03:16 -0700 Subject: [PATCH] Add note_encryption::CompactAction::cmx --- CHANGELOG.md | 1 + src/note_encryption.rs | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7a562d95..66a65dde 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to Rust's notion of ### Added - `impl subtle::ConstantTimeEq for note::Nullifier` - `impl Clone for note_encryption::CompactAction` +- `note_encryption::CompactAction::cmx` ## [0.7.0] - 2024-01-26 ### Licensing diff --git a/src/note_encryption.rs b/src/note_encryption.rs index 00a6a17f..27da4724 100644 --- a/src/note_encryption.rs +++ b/src/note_encryption.rs @@ -326,10 +326,15 @@ impl CompactAction { } } - ///Returns the nullifier of the note being spent. + /// Returns the nullifier of the note being spent. pub fn nullifier(&self) -> Nullifier { self.nullifier } + + /// Returns the commitment to the new note being created. + pub fn cmx(&self) -> ExtractedNoteCommitment { + self.cmx + } } #[cfg(test)]