Add for_action method for constructing an OrchardDomain

This commit is contained in:
Kris Nuttycombe 2021-06-30 11:21:07 -06:00
parent bb159a2ccf
commit 1e95360a74
1 changed files with 6 additions and 0 deletions

View File

@ -84,6 +84,12 @@ pub struct OrchardDomain {
rho: Nullifier,
}
impl OrchardDomain {
pub fn for_action<T>(act: &Action<T>) -> Self {
OrchardDomain { rho: *act.nullifier() }
}
}
impl Domain for OrchardDomain {
type EphemeralSecretKey = EphemeralSecretKey;
type EphemeralPublicKey = EphemeralPublicKey;