1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
//! A lightweight, `no_std`-compatible miniscript parser and validator for Bitcoin.
//!
//! This crate provides parsing, validation, and script generation for Bitcoin miniscript
//! expressions. It's designed to work in both standard and embedded environments through
//! feature flags.
//!
//! # Features
//!
//! - **`debug`**: Enables `Debug` trait implementations for error types, useful for
//! development and debugging.
//!
//! # Examples
//!
//! ```rust
//! use tinyminiscript::Context;
//!
//! // Parse a simple miniscript
//! let result = Context::try_from("wsh(multi(1,022f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4,025cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc))");
//! if let Ok(ctx) = result {
//! let script = ctx.build_script().unwrap();
//! println!("Successfully parsed miniscript");
//! println!("Generated script: {:?}", script);
//! }
//! ```
//!
//! # Crate Features
//!
//! By default, this crate is `no_std` compatible. Enable the `debug` feature for
//! enhanced error reporting capabilities.
/// Context for miniscript expressions
/// Bitcoin descriptor parsing and validation
/// Limits for miniscript expressions
/// Miniscript parser and AST representation
/// Satisfactions and dis-satisfactions of miniscript expressions
/// Bitcoin script generation from parsed miniscript
/// Type checking and correctness property validation
/// Utility functions
pub extern crate alloc;
pub type Vec<T> = Vec;
pub use Context;