pub trait ScriptContext: Debug + Clone + Ord + PartialOrd + Eq + PartialEq + Sealed {
    fn check_frag_non_malleable<Pk: MiniscriptKey, Ctx: ScriptContext>(
        _frag: &Terminal<Pk, Ctx>
    ) -> Result<(), ScriptContextError>; fn check_frag_validity<Pk: MiniscriptKey, Ctx: ScriptContext>(
        _frag: &Terminal<Pk, Ctx>
    ) -> Result<(), ScriptContextError>; }

Required Methods

Depending on ScriptContext, fragments can be malleable. For Example, under Legacy context, PkH is malleable because it is possible to estimate the cost of satisfaction because of compressed keys This is currently only used in compiler code for removing malleable compilations. This does NOT recursively check if the children of the fragment are valid or not. Since the compilation proceeds in a leaf to root fashion, a recursive check is unnecessary.

Depending on script Context, some of the Terminals might not be valid. For example, in Segwit Context with MiniscriptKey as bitcoin::PublicKey uncompressed public keys are non-standard and thus invalid. Post Tapscript upgrade, this would have to consider other nodes. This does not recursively check

Implementors