mirror of https://github.com/zcash/orchard.git
Merge pull request #137 from nuttycom/orchard_domain_for_action
Add for_action method for constructing an OrchardDomain
This commit is contained in:
commit
541898d22b
|
@ -84,6 +84,13 @@ pub struct OrchardDomain {
|
||||||
rho: Nullifier,
|
rho: Nullifier,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl OrchardDomain {
|
||||||
|
/// Constructs a domain that can be used to trial-decrypt this action's output note.
|
||||||
|
pub fn for_action<T>(act: &Action<T>) -> Self {
|
||||||
|
OrchardDomain { rho: *act.nullifier() }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl Domain for OrchardDomain {
|
impl Domain for OrchardDomain {
|
||||||
type EphemeralSecretKey = EphemeralSecretKey;
|
type EphemeralSecretKey = EphemeralSecretKey;
|
||||||
type EphemeralPublicKey = EphemeralPublicKey;
|
type EphemeralPublicKey = EphemeralPublicKey;
|
||||||
|
|
Loading…
Reference in New Issue