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§

source

fn corr_prop(&self) -> Correctness

Calculate the correctness property for the leaf fragment. See miniscript reference for more info on different types

source

fn mall_prop(&self) -> Malleability

Calculate the malleability property for the leaf fragment. See miniscript reference for more info on different types

source

fn extra_prop(&self) -> ExtData

Calculate the Extra properties property for the leaf fragment. See current implementation for different fragments in extra_props.rs

source

fn script_size(&self) -> usize

Get the script size of the current fragment

source

fn segwit_ctx_checks(&self) -> Result<(), ScriptContextError>

Validity rules for fragment in segwit context

source

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§

source

fn tap_ctx_checks(&self) -> Result<(), ScriptContextError>

Validity rules for fragment in tap context

Implementors§