Struct LoggerAssetProvider

Source
pub struct LoggerAssetProvider<'a>(pub &'a Assets);
Expand description

Wrapper around Assets that logs every query and value returned

Tuple Fields§

§0: &'a Assets

Trait Implementations§

Source§

impl<'a> AssetProvider<DefiniteDescriptorKey> for LoggerAssetProvider<'a>

Source§

fn provider_lookup_ecdsa_sig(&self, pk: &DefiniteDescriptorKey) -> 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: &DefiniteDescriptorKey, ) -> Option<usize>

Lookup the tap key spend sig and return its size
Source§

fn provider_lookup_tap_leaf_script_sig( &self, pk: &DefiniteDescriptorKey, leaf_hash: &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: &Hash) -> Option<PublicKey>

Given a raw Pkh, lookup corresponding bitcoin::PublicKey
Source§

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

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

fn provider_lookup_raw_pkh_ecdsa_sig(&self, hash: &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: &(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, hash: &Hash) -> bool

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

fn provider_lookup_hash256(&self, hash: &Hash) -> bool

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

fn provider_lookup_ripemd160(&self, hash: &Hash) -> bool

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

fn provider_lookup_hash160(&self, hash: &Hash) -> bool

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

fn check_older(&self, s: LockTime) -> bool

Assert whether a relative locktime is satisfied
Source§

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

Assert whether an absolute locktime is satisfied

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V