Skip to content

Feat: Script Type Detection #20

@alexanderwiederin

Description

@alexanderwiederin

Feature Request: Script Type Detection

Add script type detection methods to identify common Bitcoin script patterns (Taproot, OP_RETURN, P2SH, etc.).

Proposed API

pub trait ScriptPubkeyExt {
   fn is_taproot(&self) -> bool;
   fn is_op_return(&self) -> bool;
   fn is_p2sh(&self) -> bool;
}

Note: should probably expose bitcoin core's existing script classification functions through the C API (.e.g IsPayToScriptHash, IsPayToWitnessScriptHash, etc.) but is out of scope for the current state of the project

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions