Struct miniscript::miniscript::types::extra_props::ExtData [−][src]
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, }
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
Trait Implementations
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn type_check<Pk, Ctx, C>(
fragment: &Terminal<Pk, Ctx>,
_child: C
) -> Result<Self, Error<Pk, Ctx>> where
C: FnMut(usize) -> Option<Self>,
Ctx: ScriptContext,
Pk: MiniscriptKey,
fn type_check<Pk, Ctx, C>(
fragment: &Terminal<Pk, Ctx>,
_child: C
) -> Result<Self, Error<Pk, Ctx>> where
C: FnMut(usize) -> Option<Self>,
Ctx: ScriptContext,
Pk: MiniscriptKey,
Compute the type of a fragment assuming all the children of Miniscript have been computed already.
Any extra sanity checks/assertions that should be applied after typechecking Read more
Type property of the False
fragment
Type property of a Multi
fragment
Type property of a Sha256
hash. Default implementation simply
passes through to from_hash
Read more
Type property of a Hash256
hash. Default implementation simply
passes through to from_hash
Read more
Type property of a Ripemd160
hash. Default implementation simply
passes through to from_hash
Read more
Type property of a Hash160
hash. Default implementation simply
passes through to from_hash
Read more
Type property of a relative timelock. Default implementation simply
passes through to from_time
Read more
Type property of an absolute timelock. Default implementation simply
passes through to from_time
Read more
Cast using the Check
wrapper
Cast using the DupIf
wrapper
Cast using the Verify
wrapper
Cast using the NonZero
wrapper
Cast using the ZeroNotEqual
wrapper
Cast by changing [X]
to or_i([X], 0)
or or_i(0, [X])
Cast by changing [X]
to or_i([X], 0)
. Default implementation
simply passes through to cast_or_i_false
Read more
Cast by changing [X]
to or_i(0, [X])
. Default implementation
simply passes through to cast_or_i_false
Read more
Computes the type of an AndOr
fragment
Computes the type of an Thresh
fragment
Auto Trait Implementations
impl RefUnwindSafe for ExtData
impl UnwindSafe for ExtData
Blanket Implementations
Mutably borrows from an owned value. Read more