pub trait AssetProvider<Pk: MiniscriptKey> {
Show 14 methods // Provided methods fn provider_lookup_ecdsa_sig(&self, _: &Pk) -> bool { ... } fn provider_lookup_tap_key_spend_sig(&self, _: &Pk) -> Option<usize> { ... } fn provider_lookup_tap_leaf_script_sig( &self, _: &Pk, _: &TapLeafHash ) -> Option<usize> { ... } fn provider_lookup_tap_control_block_map( &self ) -> Option<&BTreeMap<ControlBlock, (ScriptBuf, LeafVersion)>> { ... } fn provider_lookup_raw_pkh_pk(&self, _: &Hash) -> Option<PublicKey> { ... } fn provider_lookup_raw_pkh_x_only_pk( &self, _: &Hash ) -> Option<XOnlyPublicKey> { ... } fn provider_lookup_raw_pkh_ecdsa_sig(&self, _: &Hash) -> Option<PublicKey> { ... } fn provider_lookup_raw_pkh_tap_leaf_script_sig( &self, _: &(Hash, TapLeafHash) ) -> Option<(XOnlyPublicKey, usize)> { ... } fn provider_lookup_sha256(&self, _: &Pk::Sha256) -> bool { ... } fn provider_lookup_hash256(&self, _: &Pk::Hash256) -> bool { ... } fn provider_lookup_ripemd160(&self, _: &Pk::Ripemd160) -> bool { ... } fn provider_lookup_hash160(&self, _: &Pk::Hash160) -> bool { ... } fn check_older(&self, _: Sequence) -> bool { ... } fn check_after(&self, _: LockTime) -> bool { ... }
}
Expand description

Trait describing a present/missing lookup table for constructing witness templates

This trait mirrors the Satisfier trait, with the difference that most methods just return a boolean indicating the item presence. The methods looking up keys return the key length, the methods looking up public key hashes return the public key, and a few other methods need to return the item itself.

This trait is automatically implemented for every type that is also a satisfier, and simply proxies the queries to the satisfier and returns whether an item is available or not.

All the methods have a default implementation that returns false or None.

Provided Methods§

source

fn provider_lookup_ecdsa_sig(&self, _: &Pk) -> bool

Given a public key, look up an ECDSA signature with that key, return whether we found it

source

fn provider_lookup_tap_key_spend_sig(&self, _: &Pk) -> Option<usize>

Lookup the tap key spend sig and return its size

source

fn provider_lookup_tap_leaf_script_sig( &self, _: &Pk, _: &TapLeafHash ) -> Option<usize>

Given a public key and a associated leaf hash, look up a schnorr signature with that key and return its size

source

fn provider_lookup_tap_control_block_map( &self ) -> Option<&BTreeMap<ControlBlock, (ScriptBuf, LeafVersion)>>

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

source

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

Given a raw Pkh, lookup corresponding bitcoin::PublicKey

source

fn provider_lookup_raw_pkh_x_only_pk(&self, _: &Hash) -> Option<XOnlyPublicKey>

Given a raw Pkh, lookup corresponding [bitcoin::secp256k1::XOnlyPublicKey]

source

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

Given a keyhash, look up the EC signature and the associated key. Returns the key if a signature is found. 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 provider_lookup_raw_pkh_tap_leaf_script_sig( &self, _: &(Hash, TapLeafHash) ) -> Option<(XOnlyPublicKey, usize)>

Given a keyhash, look up the schnorr signature and the associated key. Returns the key and sig len if a signature is found. 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 provider_lookup_sha256(&self, _: &Pk::Sha256) -> bool

Given a SHA256 hash, look up its preimage, return whether we found it

source

fn provider_lookup_hash256(&self, _: &Pk::Hash256) -> bool

Given a HASH256 hash, look up its preimage, return whether we found it

source

fn provider_lookup_ripemd160(&self, _: &Pk::Ripemd160) -> bool

Given a RIPEMD160 hash, look up its preimage, return whether we found it

source

fn provider_lookup_hash160(&self, _: &Pk::Hash160) -> bool

Given a HASH160 hash, look up its preimage, return whether we found it

source

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

Assert whether a relative locktime is satisfied

source

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

Assert whether an absolute locktime is satisfied

Implementors§