Struct sapio_miniscript::miniscript::types::extra_props::ExtData
source · pub struct ExtData {
pub pk_cost: usize,
pub has_free_verify: bool,
pub ops_count_static: usize,
pub ops_count_sat: Option<usize>,
pub ops_count_nsat: Option<usize>,
pub stack_elem_count_sat: Option<usize>,
pub stack_elem_count_dissat: Option<usize>,
pub max_sat_size: Option<(usize, usize)>,
pub max_dissat_size: Option<(usize, usize)>,
pub timelock_info: TimeLockInfo,
pub exec_stack_elem_count_sat: Option<usize>,
pub exec_stack_elem_count_dissat: Option<usize>,
}
Expand description
Structure representing the extra type properties of a fragment.
Fields§
§pk_cost: usize
The number of bytes needed to encode its scriptpubkey
has_free_verify: bool
Whether this fragment can be verify-wrapped for free
ops_count_static: usize
The worst case static(unexecuted) ops-count for this Miniscript fragment.
ops_count_sat: Option<usize>
The worst case ops-count for satisfying this Miniscript fragment.
ops_count_nsat: Option<usize>
The worst case ops-count for dissatisfying this Miniscript fragment.
stack_elem_count_sat: Option<usize>
The worst case number of stack elements for satisfying this Miniscript fragment.
stack_elem_count_dissat: Option<usize>
The worst case number of stack elements for dissatisfying this Miniscript fragment.
max_sat_size: Option<(usize, usize)>
Maximum size, in bytes, of a satisfying witness. First elements is the cost for the witness stack, the second one is the cost for scriptSig. All signatures are assumed to be 73 bytes in size, including the length prefix (segwit) or push opcode (pre-segwit) and sighash postfix.
max_dissat_size: Option<(usize, usize)>
Maximum dissatisfaction cost, in bytes, of a Miniscript fragment. First elements is the cost for the witness stack, the second one is the cost for scriptSig.
timelock_info: TimeLockInfo
The timelock info about heightlocks and timelocks
exec_stack_elem_count_sat: Option<usize>
Maximum stack + alt stack size during satisfaction execution This does not include initial witness elements. This element only captures the additional elements that are pushed during execution.
exec_stack_elem_count_dissat: Option<usize>
Maximum stack + alt stack size during dissat execution This does not include initial witness elements. This element only captures the additional elements that are pushed during execution.
Trait Implementations§
source§impl Ord for ExtData
impl Ord for ExtData
source§impl PartialEq for ExtData
impl PartialEq for ExtData
source§impl PartialOrd for ExtData
impl PartialOrd for ExtData
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl Property for ExtData
impl Property for ExtData
source§fn type_check<Pk, Ctx, C>(
fragment: &Terminal<Pk, Ctx>,
_child: C
) -> Result<Self, Error<Pk, Ctx>>
fn type_check<Pk, Ctx, C>( fragment: &Terminal<Pk, Ctx>, _child: C ) -> Result<Self, Error<Pk, Ctx>>
Compute the type of a fragment assuming all the children of Miniscript have been computed already.
source§fn sanity_checks(&self)
fn sanity_checks(&self)
source§fn from_false() -> Self
fn from_false() -> Self
False
fragmentsource§fn from_multi(k: usize, n: usize) -> Self
fn from_multi(k: usize, n: usize) -> Self
Multi
fragmentsource§fn from_multi_a(k: usize, n: usize) -> Self
fn from_multi_a(k: usize, n: usize) -> Self
MultiA
fragmentsource§fn from_sha256() -> Self
fn from_sha256() -> Self
Sha256
hash. Default implementation simply
passes through to from_hash
source§fn from_txtemplate() -> Self
fn from_txtemplate() -> Self
TxTemplate
hash. Default implementation simply
passes through to from_txtemplate
source§fn from_hash256() -> Self
fn from_hash256() -> Self
Hash256
hash. Default implementation simply
passes through to from_hash
source§fn from_ripemd160() -> Self
fn from_ripemd160() -> Self
Ripemd160
hash. Default implementation simply
passes through to from_hash
source§fn from_hash160() -> Self
fn from_hash160() -> Self
Hash160
hash. Default implementation simply
passes through to from_hash
source§fn from_after(t: u32) -> Self
fn from_after(t: u32) -> Self
from_time
source§fn from_older(t: u32) -> Self
fn from_older(t: u32) -> Self
from_time
source§fn cast_check(self) -> Result<Self, ErrorKind>
fn cast_check(self) -> Result<Self, ErrorKind>
Check
wrappersource§fn cast_dupif(self) -> Result<Self, ErrorKind>
fn cast_dupif(self) -> Result<Self, ErrorKind>
DupIf
wrappersource§fn cast_verify(self) -> Result<Self, ErrorKind>
fn cast_verify(self) -> Result<Self, ErrorKind>
Verify
wrappersource§fn cast_nonzero(self) -> Result<Self, ErrorKind>
fn cast_nonzero(self) -> Result<Self, ErrorKind>
NonZero
wrappersource§fn cast_zeronotequal(self) -> Result<Self, ErrorKind>
fn cast_zeronotequal(self) -> Result<Self, ErrorKind>
ZeroNotEqual
wrappersource§fn cast_or_i_false(self) -> Result<Self, ErrorKind>
fn cast_or_i_false(self) -> Result<Self, ErrorKind>
[X]
to or_i([X], 0)
or or_i(0, [X])
source§fn cast_unlikely(self) -> Result<Self, ErrorKind>
fn cast_unlikely(self) -> Result<Self, ErrorKind>
[X]
to or_i([X], 0)
. Default implementation
simply passes through to cast_or_i_false
source§fn cast_likely(self) -> Result<Self, ErrorKind>
fn cast_likely(self) -> Result<Self, ErrorKind>
[X]
to or_i(0, [X])
. Default implementation
simply passes through to cast_or_i_false
source§fn and_or(a: Self, b: Self, c: Self) -> Result<Self, ErrorKind>
fn and_or(a: Self, b: Self, c: Self) -> Result<Self, ErrorKind>
AndOr
fragment