Add `IncomingViewingKey::prepare` convenience method.

This commit is contained in:
Kris Nuttycombe 2024-03-23 10:23:55 -06:00
parent 33474bdbfd
commit c6ff554d10
2 changed files with 6 additions and 0 deletions

View File

@ -8,6 +8,7 @@ and this project adheres to Rust's notion of
## [Unreleased]
### 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.