Skip to content

Latest commit

 

History

12 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

miniscript-diagnostics

A Rust library and CLI that explains Miniscript satisfaction state under a supplied spending context.

It walks the public rust-miniscript AST and produces a diagnostic tree showing why each supported fragment is SATISFIED, UNAVAILABLE, or IMPOSSIBLE. Fragments outside the supported set are reported as UNSUPPORTED. Each diagnostic node includes a reason when applicable, explaining why that status was reached.

Example

AND_V [UNAVAILABLE]
├── pk(...) [SATISFIED]
└── older(144) [UNAVAILABLE]
    required: 144 blocks
    available: 83 blocks
    remaining: 61 blocks

ROOT STATUS: UNAVAILABLE

Supported

  • pk, pkh

  • sha256, hash256, ripemd160, hash160

  • after, older

  • and_v, and_b, or_i

  • or_b, or_c, or_d, andor

  • thresh(k, ...), multi, multi_a

Usage

cargo run -- \
  'pk(0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798)' \
  --key 0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798

Run cargo run -- --help for available options.

Use --json for machine-readable output.

Development

cargo test

See ARCHITECTURE.md for design details.

About

A Rust diagnostic layer for Miniscript that explains why supported fragments are satisfied, unavailable, impossible, or unsupported.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages