[][src]Trait miniscript::TranslatePk3

pub trait TranslatePk3<P: MiniscriptKey + ToPublicKey, Q: MiniscriptKey<Hash = Hash>>: TranslatePk<P, Q> {
    pub fn translate_pk3<Fpk, E>(
        &self,
        translatefpk: Fpk
    ) -> Result<Self::Output, E>
    where
        Fpk: FnMut(&P) -> Result<Q, E>
, { ... }
pub fn translate_pk3_infallible<Fpk: FnMut(&P) -> Q>(
        &self,
        translatefpk: Fpk
    ) -> Self::Output { ... } }

Variant of TranslatePk where Q's hash is hash160 so we can derive hashes by calling hash_to_hash160

Provided methods

pub fn translate_pk3<Fpk, E>(
    &self,
    translatefpk: Fpk
) -> Result<Self::Output, E> where
    Fpk: FnMut(&P) -> Result<Q, E>, 
[src]

Translate a struct from one generic to another where the translation for Pk is provided by translatefpk

pub fn translate_pk3_infallible<Fpk: FnMut(&P) -> Q>(
    &self,
    translatefpk: Fpk
) -> Self::Output
[src]

Translate a struct from one generic to another where the translation for Pk is provided by translatefpk

Loading content...

Implementors

impl<P: MiniscriptKey + ToPublicKey, Q: MiniscriptKey<Hash = Hash>, T: TranslatePk<P, Q>> TranslatePk3<P, Q> for T[src]

Loading content...