fn pkh_signature<Pk, S>(sat: S, pkh: &Pk::Hash) -> Self
    where
        Pk: ToPublicKey,
        S: Satisfier<Pk>,
    {
        match sat.lookup_pkh_sig(pkh) {
            Some((pk, (sig, hashtype))) => {
                let mut ret = sig.serialize_der().to_vec();
                ret.push(hashtype.as_u32() as u8);
                Witness::Stack(vec![ret.to_vec(), pk.to_public_key().to_bytes()])
            }
            None => Witness::Unavailable,
        }
    }
/// Turn a key/signature pair related to a pkh into (part of) a satisfaction
Turn a key/signature pair related to a pkh into (part of) a satisfaction
Turn a key / signature pair related to a pkh into ( part of ) a satisfaction
fn pkh_signature<Pk, S>(sat: S, pkh: &Pk::Hash) -> Self
    where
        Pk: ToPublicKey,
        S: Satisfier<Pk>,
    {
        match sat.lookup_pkh_sig(pkh) {
            Some((pk, (sig, hashtype))) => {
                let mut ret = sig.serialize_der().to_vec();
                ret.push(hashtype.as_u32() as u8);
                Witness::Stack(vec![ret.to_vec(), pk.to_public_key().to_bytes()])
            }
            None => Witness::Unavailable,
        }
    }
fn pkh_signature < Pk , S > ( sat : S , pkh : & Pk :: Hash ) -> Self where Pk : ToPublicKey , S : Satisfier < Pk > , { match sat . lookup_pkh_sig ( pkh ) { Some ( ( pk , ( sig , hashtype ) ) ) => { let mut ret = sig . serialize_der ( ) . to_vec ( ) ; ret . push ( hashtype . as_u32 ( ) as u8 ) ; Witness :: Stack ( vec ! [ ret to_vec ( ) pk to_public_key ( ) to_bytes ( ) ] ) } None => Witness :: Unavailable , } }
Turn a key/signature pair related to a pkh into (part of) a satisfaction
Turn a key / signature pair related to a pkh into ( part of ) a satisfaction
sat
S
pkh
&Pk::Hash
sat
S
pkh
&Pk::Hash