pub trait Satisfier<Pk: MiniscriptKey + ToPublicKey> {
Show 13 methods // Provided methods fn lookup_ecdsa_sig(&self, _: &Pk) -> Option<EcdsaSig> { ... } fn lookup_tap_key_spend_sig(&self) -> Option<SchnorrSig> { ... } fn lookup_tap_leaf_script_sig( &self, _: &Pk, _: &TapLeafHash ) -> Option<SchnorrSig> { ... } fn lookup_tap_control_block_map( &self ) -> Option<&BTreeMap<ControlBlock, (Script, LeafVersion)>> { ... } fn lookup_raw_pkh_pk(&self, _: &Hash) -> Option<Pk> { ... } fn lookup_raw_pkh_ecdsa_sig( &self, _: &Hash ) -> Option<(PublicKey, EcdsaSig)> { ... } fn lookup_raw_pkh_tap_leaf_script_sig( &self, _: &(Hash, TapLeafHash) ) -> Option<(XOnlyPublicKey, SchnorrSig)> { ... } fn lookup_sha256(&self, _: &Pk::Sha256) -> Option<Preimage32> { ... } fn lookup_hash256(&self, _: &Pk::Hash256) -> Option<Preimage32> { ... } fn lookup_ripemd160(&self, _: &Pk::Ripemd160) -> Option<Preimage32> { ... } fn lookup_hash160(&self, _: &Pk::Hash160) -> Option<Preimage32> { ... } fn check_older(&self, _: Sequence) -> bool { ... } fn check_after(&self, _: LockTime) -> bool { ... }
}
Expand description

Trait describing a lookup table for signatures, hash preimages, etc. Every method has a default implementation that simply returns None on every query. Users are expected to override the methods that they have data for.

Provided Methods§

source

fn lookup_ecdsa_sig(&self, _: &Pk) -> Option<EcdsaSig>

Given a public key, look up an ECDSA signature with that key

source

fn lookup_tap_key_spend_sig(&self) -> Option<SchnorrSig>

Lookup the tap key spend sig

source

fn lookup_tap_leaf_script_sig( &self, _: &Pk, _: &TapLeafHash ) -> Option<SchnorrSig>

Given a public key and a associated leaf hash, look up an schnorr signature with that key

source

fn lookup_tap_control_block_map( &self ) -> Option<&BTreeMap<ControlBlock, (Script, LeafVersion)>>

Obtain a reference to the control block for a ver and script

source

fn lookup_raw_pkh_pk(&self, _: &Hash) -> Option<Pk>

Given a raw Pkh, lookup corresponding Pk

source

fn lookup_raw_pkh_ecdsa_sig(&self, _: &Hash) -> Option<(PublicKey, EcdsaSig)>

Given a keyhash, look up the EC signature and the associated key Even if signatures for public key Hashes are not available, the users can use this map to provide pkh -> pk mapping which can be useful for dissatisfying pkh.

source

fn lookup_raw_pkh_tap_leaf_script_sig( &self, _: &(Hash, TapLeafHash) ) -> Option<(XOnlyPublicKey, SchnorrSig)>

Given a keyhash, look up the schnorr signature and the associated key Even if signatures for public key Hashes are not available, the users can use this map to provide pkh -> pk mapping which can be useful for dissatisfying pkh.

source

fn lookup_sha256(&self, _: &Pk::Sha256) -> Option<Preimage32>

Given a SHA256 hash, look up its preimage

source

fn lookup_hash256(&self, _: &Pk::Hash256) -> Option<Preimage32>

Given a HASH256 hash, look up its preimage

source

fn lookup_ripemd160(&self, _: &Pk::Ripemd160) -> Option<Preimage32>

Given a RIPEMD160 hash, look up its preimage

source

fn lookup_hash160(&self, _: &Pk::Hash160) -> Option<Preimage32>

Given a HASH160 hash, look up its preimage

source

fn check_older(&self, _: Sequence) -> bool

Assert whether an relative locktime is satisfied

source

fn check_after(&self, _: LockTime) -> bool

Assert whether a absolute locktime is satisfied

Implementations on Foreign Types§

source§

impl<A, B, C, D, E, F, G, Pk> Satisfier<Pk> for (A, B, C, D, E, F, G)where Pk: MiniscriptKey + ToPublicKey, A: Satisfier<Pk>, B: Satisfier<Pk>, C: Satisfier<Pk>, D: Satisfier<Pk>, E: Satisfier<Pk>, F: Satisfier<Pk>, G: Satisfier<Pk>,

source§

impl<Pk: MiniscriptKey + ToPublicKey> Satisfier<Pk> for ()

source§

impl<A, B, C, D, E, F, Pk> Satisfier<Pk> for (A, B, C, D, E, F)where Pk: MiniscriptKey + ToPublicKey, A: Satisfier<Pk>, B: Satisfier<Pk>, C: Satisfier<Pk>, D: Satisfier<Pk>, E: Satisfier<Pk>, F: Satisfier<Pk>,

source§

impl<Pk: MiniscriptKey + ToPublicKey> Satisfier<Pk> for HashMap<(Pk, TapLeafHash), SchnorrSig>

source§

impl<A, B, C, D, Pk> Satisfier<Pk> for (A, B, C, D)where Pk: MiniscriptKey + ToPublicKey, A: Satisfier<Pk>, B: Satisfier<Pk>, C: Satisfier<Pk>, D: Satisfier<Pk>,

source§

impl<'a, Pk: MiniscriptKey + ToPublicKey, S: Satisfier<Pk>> Satisfier<Pk> for &'a mut S

source§

impl<'a, Pk: MiniscriptKey + ToPublicKey, S: Satisfier<Pk>> Satisfier<Pk> for &'a S

source§

impl<A, Pk> Satisfier<Pk> for (A,)where Pk: MiniscriptKey + ToPublicKey, A: Satisfier<Pk>,

source§

impl<A, B, Pk> Satisfier<Pk> for (A, B)where Pk: MiniscriptKey + ToPublicKey, A: Satisfier<Pk>, B: Satisfier<Pk>,

source§

impl<A, B, C, Pk> Satisfier<Pk> for (A, B, C)where Pk: MiniscriptKey + ToPublicKey, A: Satisfier<Pk>, B: Satisfier<Pk>, C: Satisfier<Pk>,

source§

impl<Pk: MiniscriptKey + ToPublicKey> Satisfier<Pk> for LockTime

source§

impl<Pk> Satisfier<Pk> for HashMap<Hash, (Pk, EcdsaSig)>where Pk: MiniscriptKey + ToPublicKey,

source§

fn lookup_ecdsa_sig(&self, key: &Pk) -> Option<EcdsaSig>

source§

fn lookup_raw_pkh_pk(&self, pk_hash: &Hash) -> Option<Pk>

source§

fn lookup_raw_pkh_ecdsa_sig( &self, pk_hash: &Hash ) -> Option<(PublicKey, EcdsaSig)>

source§

impl<Pk> Satisfier<Pk> for HashMap<(Hash, TapLeafHash), (Pk, SchnorrSig)>where Pk: MiniscriptKey + ToPublicKey,

source§

impl<Pk: MiniscriptKey + ToPublicKey> Satisfier<Pk> for Sequence

source§

impl<A, B, C, D, E, F, G, H, Pk> Satisfier<Pk> for (A, B, C, D, E, F, G, H)where Pk: MiniscriptKey + ToPublicKey, A: Satisfier<Pk>, B: Satisfier<Pk>, C: Satisfier<Pk>, D: Satisfier<Pk>, E: Satisfier<Pk>, F: Satisfier<Pk>, G: Satisfier<Pk>, H: Satisfier<Pk>,

source§

impl<Pk: MiniscriptKey + ToPublicKey> Satisfier<Pk> for HashMap<Pk, EcdsaSig>

source§

impl<A, B, C, D, E, Pk> Satisfier<Pk> for (A, B, C, D, E)where Pk: MiniscriptKey + ToPublicKey, A: Satisfier<Pk>, B: Satisfier<Pk>, C: Satisfier<Pk>, D: Satisfier<Pk>, E: Satisfier<Pk>,

Implementors§