Struct miniscript::psbt::PsbtInputSatisfier
source · [−]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
sourceimpl<'psbt, ToPkCtx: Copy, Pk: MiniscriptKey + ToPublicKey<ToPkCtx>> Satisfier<ToPkCtx, Pk> for PsbtInputSatisfier<'psbt>
impl<'psbt, ToPkCtx: Copy, Pk: MiniscriptKey + ToPublicKey<ToPkCtx>> Satisfier<ToPkCtx, Pk> for PsbtInputSatisfier<'psbt>
sourcefn lookup_sig(&self, pk: &Pk, to_pk_ctx: ToPkCtx) -> Option<BitcoinSig>
fn lookup_sig(&self, pk: &Pk, to_pk_ctx: ToPkCtx) -> Option<BitcoinSig>
Given a public key, look up a signature with that key
to_pk_ctx
denotes the ToPkCtx required for deriving bitcoin::PublicKey
from MiniscriptKey using ToPublicKey.
If MiniscriptKey is already is bitcoin::PublicKey, then the context
would be NullCtx and [descriptor.DescriptorPublicKeyCtx] if MiniscriptKey is [descriptor.DescriptorPublicKey] Read more
sourcefn lookup_pkh_sig(
&self,
pkh: &Pk::Hash,
to_pk_ctx: ToPkCtx
) -> Option<(PublicKey, BitcoinSig)>
fn lookup_pkh_sig(
&self,
pkh: &Pk::Hash,
to_pk_ctx: ToPkCtx
) -> Option<(PublicKey, BitcoinSig)>
Given a keyhash, look up the 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.
to_pk_ctx
denotes the ToPkCtx required for deriving bitcoin::PublicKey
from MiniscriptKey using ToPublicKey.
If MiniscriptKey is already is bitcoin::PublicKey, then the context
would be NullCtx and [descriptor.DescriptorPublicKeyCtx] if MiniscriptKey is [descriptor.DescriptorPublicKey] Read more
sourcefn check_after(&self, n: u32) -> bool
fn check_after(&self, n: u32) -> bool
Assert whether a absolute locktime is satisfied
sourcefn check_older(&self, n: u32) -> bool
fn check_older(&self, n: u32) -> bool
Assert whether an relative locktime is satisfied
sourcefn lookup_pkh_pk(&self, _: &Pk::Hash) -> Option<Pk>
fn lookup_pkh_pk(&self, _: &Pk::Hash) -> Option<Pk>
Given a Pkh
, lookup corresponding Pk
sourcefn lookup_hash256(&self, _: Hash) -> Option<[u8; 32]>
fn lookup_hash256(&self, _: Hash) -> Option<[u8; 32]>
Given a HASH256 hash, look up its preimage
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more