Struct miniscript::psbt::PsbtInputSatisfier
source · pub struct PsbtInputSatisfier<'psbt> {
pub psbt: &'psbt Psbt,
pub index: usize,
}
Expand description
Psbt satisfier for at inputs at a particular index Takes in &psbt because multiple inputs will share the same psbt structure All operations on this structure will panic if index is more than number of inputs in pbst
Fields§
§psbt: &'psbt Psbt
pbst
index: usize
input index
Implementations§
Trait Implementations§
source§impl<'psbt, Pk: MiniscriptKey + ToPublicKey> Satisfier<Pk> for PsbtInputSatisfier<'psbt>
impl<'psbt, Pk: MiniscriptKey + ToPublicKey> Satisfier<Pk> for PsbtInputSatisfier<'psbt>
source§fn lookup_tap_key_spend_sig(&self) -> Option<Signature>
fn lookup_tap_key_spend_sig(&self) -> Option<Signature>
Lookup the tap key spend sig
source§fn lookup_tap_leaf_script_sig(
&self,
pk: &Pk,
lh: &TapLeafHash
) -> Option<Signature>
fn lookup_tap_leaf_script_sig( &self, pk: &Pk, lh: &TapLeafHash ) -> Option<Signature>
Given a public key and a associated leaf hash, look up an schnorr signature with that key
source§fn lookup_raw_pkh_pk(&self, pkh: &Hash) -> Option<PublicKey>
fn lookup_raw_pkh_pk(&self, pkh: &Hash) -> Option<PublicKey>
Given a raw
Pkh
, lookup corresponding bitcoin::PublicKey
source§fn lookup_tap_control_block_map(
&self
) -> Option<&BTreeMap<ControlBlock, (ScriptBuf, LeafVersion)>>
fn 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 lookup_raw_pkh_tap_leaf_script_sig(
&self,
pkh: &(Hash, TapLeafHash)
) -> Option<(XOnlyPublicKey, Signature)>
fn lookup_raw_pkh_tap_leaf_script_sig( &self, pkh: &(Hash, TapLeafHash) ) -> Option<(XOnlyPublicKey, Signature)>
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_ecdsa_sig(&self, pk: &Pk) -> Option<Signature>
fn lookup_ecdsa_sig(&self, pk: &Pk) -> Option<Signature>
Given a public key, look up an ECDSA signature with that key
source§fn lookup_raw_pkh_ecdsa_sig(&self, pkh: &Hash) -> Option<(PublicKey, Signature)>
fn lookup_raw_pkh_ecdsa_sig(&self, pkh: &Hash) -> Option<(PublicKey, Signature)>
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 check_after(&self, n: LockTime) -> bool
fn check_after(&self, n: LockTime) -> bool
Assert whether a absolute locktime is satisfied Read more
source§fn check_older(&self, n: LockTime) -> bool
fn check_older(&self, n: LockTime) -> bool
Assert whether an relative locktime is satisfied Read more
source§fn lookup_hash160(&self, h: &Pk::Hash160) -> Option<Preimage32>
fn lookup_hash160(&self, h: &Pk::Hash160) -> Option<Preimage32>
Given a HASH160 hash, look up its preimage
source§fn lookup_sha256(&self, h: &Pk::Sha256) -> Option<Preimage32>
fn lookup_sha256(&self, h: &Pk::Sha256) -> Option<Preimage32>
Given a SHA256 hash, look up its preimage
source§fn lookup_hash256(&self, h: &Pk::Hash256) -> Option<Preimage32>
fn lookup_hash256(&self, h: &Pk::Hash256) -> Option<Preimage32>
Given a HASH256 hash, look up its preimage
source§fn lookup_ripemd160(&self, h: &Pk::Ripemd160) -> Option<Preimage32>
fn lookup_ripemd160(&self, h: &Pk::Ripemd160) -> Option<Preimage32>
Given a RIPEMD160 hash, look up its preimage
source§fn lookup_raw_pkh_x_only_pk(&self, _: &Hash) -> Option<XOnlyPublicKey>
fn lookup_raw_pkh_x_only_pk(&self, _: &Hash) -> Option<XOnlyPublicKey>
Given a raw
Pkh
, lookup corresponding bitcoin::secp256k1::XOnlyPublicKey
Auto Trait Implementations§
impl<'psbt> RefUnwindSafe for PsbtInputSatisfier<'psbt>
impl<'psbt> Send for PsbtInputSatisfier<'psbt>
impl<'psbt> Sync for PsbtInputSatisfier<'psbt>
impl<'psbt> Unpin for PsbtInputSatisfier<'psbt>
impl<'psbt> UnwindSafe for PsbtInputSatisfier<'psbt>
Blanket Implementations§
source§impl<T, Pk> AssetProvider<Pk> for Twhere
T: Satisfier<Pk>,
Pk: MiniscriptKey + ToPublicKey,
impl<T, Pk> AssetProvider<Pk> for Twhere T: Satisfier<Pk>, Pk: MiniscriptKey + ToPublicKey,
source§fn provider_lookup_ecdsa_sig(&self, pk: &Pk) -> bool
fn provider_lookup_ecdsa_sig(&self, pk: &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>
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: &Pk,
leaf_hash: &TapLeafHash
) -> Option<usize>
fn provider_lookup_tap_leaf_script_sig( &self, pk: &Pk, 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), Global>>
fn provider_lookup_tap_control_block_map( &self ) -> Option<&BTreeMap<ControlBlock, (ScriptBuf, LeafVersion), Global>>
Obtain a reference to the control block for a ver and script
source§fn provider_lookup_raw_pkh_pk(&self, hash: &Hash) -> Option<PublicKey>
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>
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>
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)>
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: &<Pk as MiniscriptKey>::Sha256) -> bool
fn provider_lookup_sha256(&self, hash: &<Pk as MiniscriptKey>::Sha256) -> bool
Given a SHA256 hash, look up its preimage, return whether we found it
source§fn provider_lookup_hash256(&self, hash: &<Pk as MiniscriptKey>::Hash256) -> bool
fn provider_lookup_hash256(&self, hash: &<Pk as MiniscriptKey>::Hash256) -> bool
Given a HASH256 hash, look up its preimage, return whether we found it
source§fn provider_lookup_ripemd160(
&self,
hash: &<Pk as MiniscriptKey>::Ripemd160
) -> bool
fn provider_lookup_ripemd160( &self, hash: &<Pk as MiniscriptKey>::Ripemd160 ) -> bool
Given a RIPEMD160 hash, look up its preimage, return whether we found it
source§fn provider_lookup_hash160(&self, hash: &<Pk as MiniscriptKey>::Hash160) -> bool
fn provider_lookup_hash160(&self, hash: &<Pk as MiniscriptKey>::Hash160) -> bool
Given a HASH160 hash, look up its preimage, return whether we found it
source§fn check_older(&self, s: LockTime) -> bool
fn check_older(&self, s: LockTime) -> bool
Assert whether a relative locktime is satisfied
source§fn check_after(&self, l: LockTime) -> bool
fn check_after(&self, l: LockTime) -> bool
Assert whether an absolute locktime is satisfied
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more