bdk_wallet::keys

Trait ExtScriptContext

Source
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

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

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