pub trait Translator<P, Q, E>where
    P: MiniscriptKey,
    Q: MiniscriptKey,
{ fn pk(&mut self, pk: &P) -> Result<Q, E>; fn sha256(&mut self, sha256: &P::Sha256) -> Result<Q::Sha256, E>; fn hash256(&mut self, hash256: &P::Hash256) -> Result<Q::Hash256, E>; fn ripemd160(&mut self, ripemd160: &P::Ripemd160) -> Result<Q::Ripemd160, E>; fn hash160(&mut self, hash160: &P::Hash160) -> Result<Q::Hash160, E>; }
Expand description

Describes an object that can translate various keys and hashes from one key to the type associated with the other key. Used by the TranslatePk trait to do the actual translations.

Required Methods

Translates public keys P -> Q.

Provides the translation from P::Sha256 -> Q::Sha256

Provides the translation from P::Hash256 -> Q::Hash256

Translates ripemd160 hashes from P::Ripemd160 -> Q::Ripemd160

Translates hash160 hashes from P::Hash160 -> Q::Hash160

Implementors