Enum elements_miniscript::extensions::SpkExpr
source · pub enum SpkExpr<T: ExtParam> {
Const(T),
CurrInputSpk,
Input(IdxExpr),
Output(IdxExpr),
}Expand description
Enum representing operations with transaction script pubkeys. Every variant of this enum pushes a witness program + 1 byte witness version on stack top. If the script pubkey is not a witness program. Push a sha256 hash of the script pubkey followed by -1 witness version This will abort when - Supplied index is out of bounds.
Variants§
Const(T)
A constant fixed script pubkey Pushes the witness program followed by witness version Pushes -1 if the legacy script pubkeys followed by sha256 hash of script pubkey
CurrInputSpk
Script pubkey under the current executing input
INSPECTCURRENTINPUTINDEX INPSECTINPUTSCRIPTPUBKEY
Input(IdxExpr)
Explicit asset at the given input index
i INPSECTINPUTSCRIPTPUBKEY
Output(IdxExpr)
Explicit asset at the given output index
i INPSECTOUTPUTSCRIPTPUBKEY
Implementations§
Trait Implementations§
source§impl<T: ExtParam> ArgFromStr for SpkExpr<T>
impl<T: ExtParam> ArgFromStr for SpkExpr<T>
source§impl<T: Ord + ExtParam> Ord for SpkExpr<T>
impl<T: Ord + ExtParam> Ord for SpkExpr<T>
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl<T: PartialEq + ExtParam> PartialEq<SpkExpr<T>> for SpkExpr<T>
impl<T: PartialEq + ExtParam> PartialEq<SpkExpr<T>> for SpkExpr<T>
source§impl<T: PartialOrd + ExtParam> PartialOrd<SpkExpr<T>> for SpkExpr<T>
impl<T: PartialOrd + ExtParam> PartialOrd<SpkExpr<T>> for SpkExpr<T>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moreimpl<T: Eq + ExtParam> Eq for SpkExpr<T>
impl<T: ExtParam> StructuralEq for SpkExpr<T>
impl<T: ExtParam> StructuralPartialEq for SpkExpr<T>
Auto Trait Implementations§
impl<T> RefUnwindSafe for SpkExpr<T>where T: RefUnwindSafe,
impl<T> Send for SpkExpr<T>where T: Send,
impl<T> Sync for SpkExpr<T>where T: Sync,
impl<T> Unpin for SpkExpr<T>where T: Unpin,
impl<T> UnwindSafe for SpkExpr<T>where T: UnwindSafe,
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