pub enum Witness {
Stack(Vec<Vec<u8>>),
Unavailable,
Impossible,
}
Expand description
A witness, if available, for a Miniscript fragment
Variants§
Stack(Vec<Vec<u8>>)
Witness Available and the value of the witness
Third party can possibly satisfy the fragment but we cannot Witness Unavailable
Impossible
No third party can produce a satisfaction without private key Witness Impossible
Implementations§
Source§impl Witness
impl Witness
Sourcepub fn ripemd160_preimage<Pk: ToPublicKey, S: Satisfier<Pk>>(
sat: S,
h: &Pk::Ripemd160,
) -> Self
pub fn ripemd160_preimage<Pk: ToPublicKey, S: Satisfier<Pk>>( sat: S, h: &Pk::Ripemd160, ) -> Self
Turn a hash preimage into (part of) a satisfaction
Sourcepub fn hash160_preimage<Pk: ToPublicKey, S: Satisfier<Pk>>(
sat: S,
h: &Pk::Hash160,
) -> Self
pub fn hash160_preimage<Pk: ToPublicKey, S: Satisfier<Pk>>( sat: S, h: &Pk::Hash160, ) -> Self
Turn a hash preimage into (part of) a satisfaction
Sourcepub fn sha256_preimage<Pk: ToPublicKey, S: Satisfier<Pk>>(
sat: S,
h: &Pk::Sha256,
) -> Self
pub fn sha256_preimage<Pk: ToPublicKey, S: Satisfier<Pk>>( sat: S, h: &Pk::Sha256, ) -> Self
Turn a hash preimage into (part of) a satisfaction
Sourcepub fn hash256_preimage<Pk: ToPublicKey, S: Satisfier<Pk>>(
sat: S,
h: &Pk::Hash256,
) -> Self
pub fn hash256_preimage<Pk: ToPublicKey, S: Satisfier<Pk>>( sat: S, h: &Pk::Hash256, ) -> Self
Turn a hash preimage into (part of) a satisfaction
Source§impl Witness
impl Witness
Sourcepub fn hash_dissatisfaction() -> Self
pub fn hash_dissatisfaction() -> Self
Produce something like a 32-byte 0 push
Trait Implementations§
Source§impl Ord for Witness
impl Ord for Witness
Source§impl PartialOrd for Witness
impl PartialOrd for Witness
impl Eq for Witness
impl StructuralPartialEq for Witness
Auto Trait Implementations§
impl Freeze for Witness
impl RefUnwindSafe for Witness
impl Send for Witness
impl Sync for Witness
impl Unpin for Witness
impl UnwindSafe for Witness
Blanket Implementations§
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