pub trait ExtScriptContext: ScriptContext {
    // Required method
    fn as_enum() -> ScriptContextEnum;

    // Provided methods
    fn is_legacy() -> bool { ... }
    fn is_segwit_v0() -> bool { ... }
    fn is_taproot() -> bool { ... }
}
Expand description

Trait that adds extra useful methods to ScriptContexts

Required Methods§

Provided Methods§

source

fn is_legacy() -> bool

Returns whether the script context is Legacy

source

fn is_segwit_v0() -> bool

Returns whether the script context is Segwitv0

source

fn is_taproot() -> bool

Returns whether the script context is Tap, aka Taproot or Segwit V1

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<Ctx: ScriptContext + 'static> ExtScriptContext for Ctx