Trait elements_miniscript::extensions::Extension
source · pub trait Extension: Clone + Eq + Ord + Debug + Display + Hash {
// Required methods
fn corr_prop(&self) -> Correctness;
fn mall_prop(&self) -> Malleability;
fn extra_prop(&self) -> ExtData;
fn script_size(&self) -> usize;
fn segwit_ctx_checks(&self) -> Result<(), ScriptContextError>;
fn from_name_tree(
_name: &str,
children: &[Tree<'_>]
) -> Result<Self, FromTokenIterError>;
// Provided method
fn tap_ctx_checks(&self) -> Result<(), ScriptContextError> { ... }
}
Expand description
Extensions to elements-miniscript. Refer to implementations(unimplemented!) for example and tutorials
Required Methods§
sourcefn corr_prop(&self) -> Correctness
fn corr_prop(&self) -> Correctness
Calculate the correctness property for the leaf fragment. See miniscript reference for more info on different types
sourcefn mall_prop(&self) -> Malleability
fn mall_prop(&self) -> Malleability
Calculate the malleability property for the leaf fragment. See miniscript reference for more info on different types
sourcefn extra_prop(&self) -> ExtData
fn extra_prop(&self) -> ExtData
Calculate the Extra properties property for the leaf fragment. See current implementation for different fragments in extra_props.rs
sourcefn script_size(&self) -> usize
fn script_size(&self) -> usize
Get the script size of the current fragment
sourcefn segwit_ctx_checks(&self) -> Result<(), ScriptContextError>
fn segwit_ctx_checks(&self) -> Result<(), ScriptContextError>
Validity rules for fragment in segwit context
sourcefn from_name_tree(
_name: &str,
children: &[Tree<'_>]
) -> Result<Self, FromTokenIterError>
fn from_name_tree( _name: &str, children: &[Tree<'_>] ) -> Result<Self, FromTokenIterError>
Create an instance of this object from a Tree with root name and children as
Vec<Tree>
.
Provided Methods§
sourcefn tap_ctx_checks(&self) -> Result<(), ScriptContextError>
fn tap_ctx_checks(&self) -> Result<(), ScriptContextError>
Validity rules for fragment in tap context