Skip to content

Commit

Permalink
Add DiversifiableFullViewingKey::to_internal_fvk.
Browse files Browse the repository at this point in the history
This is needed in order to permit spending of internal notes after the
previous change to `Builder::add_spend`.
  • Loading branch information
nuttycom committed Dec 5, 2024
1 parent 7d97028 commit 69cb5f6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ and this library adheres to Rust's notion of
- `SpendAuthorizingKey::to_bytes`
- `SpendValidatingKey::to_bytes`
- `sapling_crypto::value::ValueSum::to_raw`
- `sapling_crypto::zip32::DiversifiableFullViewingKey::to_internal_fvk`

### Fixed
- `sapling_crypto::prover::OutputProver::prepare_circuit` now takes `esk` as an
Expand Down
2 changes: 1 addition & 1 deletion src/pczt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ mod io_finalizer;
pub use io_finalizer::IoFinalizerError;

mod updater;
pub use updater::{SpendUpdater, OutputUpdater, Updater, UpdaterError};
pub use updater::{OutputUpdater, SpendUpdater, Updater, UpdaterError};

mod prover;
pub use prover::ProverError;
Expand Down
5 changes: 5 additions & 0 deletions src/zip32.rs
Original file line number Diff line number Diff line change
Expand Up @@ -705,6 +705,11 @@ impl DiversifiableFullViewingKey {
&self.fvk
}

/// Returns the internal [`FullViewingKey`] component of this diversifiable full viewing key.
pub fn to_internal_fvk(&self) -> FullViewingKey {
self.derive_internal().fvk
}

/// Derives a nullifier-deriving key for the provided scope.
///
/// This API is provided so that nullifiers for change notes can be correctly computed.
Expand Down

0 comments on commit 69cb5f6

Please sign in to comment.