Merge pull request #424 from nuttycom/ivk_prepare

Add `IncomingViewingKey::prepare` convenience method.
This commit is contained in:
Kris Nuttycombe 2024-03-25 06:54:10 -06:00 committed by GitHub
commit 2b9c9a1deb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 0 deletions

View File

@ -10,6 +10,7 @@ and this project adheres to Rust's notion of
## [0.8.0] - 2024-03-25
### Added
- `orchard::keys::IncomingViewingKey::prepare`
- `orchard::note::Rho`
- `orchard::action::Action::rho`
- `orchard::note_encryption::CompactAction::rho`

View File

@ -663,6 +663,11 @@ impl IncomingViewingKey {
pub fn address(&self, d: Diversifier) -> Address {
self.ivk.address(d)
}
/// Returns the [`PreparedIncomingViewingKey`] for this [`IncomingViewingKey`].
pub fn prepare(&self) -> PreparedIncomingViewingKey {
PreparedIncomingViewingKey::new(self)
}
}
/// An Orchard incoming viewing key that has been precomputed for trial decryption.