pub struct TxTemplate(/* private fields */);
Expand description

Newtype around sha256::Hash which implements Satisfier using h as an transaction template hash

Trait Implementations§

source§

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

source§

fn check_tx_template(&self, h: Hash) -> bool

Assert if tx template is satisfied
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_pkh_pk(&self, _: &Pk::Hash) -> Option<Pk>

Given a Pkh, lookup corresponding Pk
source§

fn lookup_pkh_ecdsa_sig(&self, _: &Pk::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_pkh_tap_leaf_script_sig( &self, _: &(Pk::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, _: Hash) -> Option<Preimage32>

Given a SHA256 hash, look up its preimage
source§

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

Given a HASH256 hash, look up its preimage
source§

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

Given a RIPEMD160 hash, look up its preimage
source§

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

Given a HASH160 hash, look up its preimage
source§

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

Assert whether an relative locktime is satisfied
source§

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

Assert whether a 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>,

§

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>,

§

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.