45 releases (11 major breaking)
|new 11.0.0||Nov 22, 2023|
|10.0.0||May 25, 2023|
|9.0.2||Aug 8, 2023|
|9.0.1||Mar 9, 2023|
|0.1.0||Nov 13, 2018|
#1424 in Magic Beans
30,572 downloads per month
Used in 84 crates (40 directly)
Minimum Supported Rust Version: 1.48.0
Library for handling Miniscript, which is a subset of Bitcoin Script designed to support simple and general tooling. Miniscripts represent threshold circuits of spending conditions, and can therefore be easily visualized or serialized as human-readable strings.
This library supports
- Output descriptors including embedded Miniscripts
- Parsing and serializing descriptors to a human-readable string format
- Compilation of abstract spending policies to Miniscript (enabled by the
- Semantic analysis of Miniscripts and spending policies, with user-defined public key types
- Encoding and decoding Miniscript as Bitcoin Script, given key types that
are convertible to
- Determining satisfiability, and optimal witnesses, for a given descriptor;
completing an unsigned
bitcoin::TxInwith appropriate data
- Determining the specific keys, hash preimages and timelocks used to spend coins in a given Bitcoin transaction
no_stdsupport enabled by disabling the
embedded/for an example.
The cargo feature
std is enabled by default. At least one of the features
no-std or both must be enabled.
no-std feature does not disable
std. To disable the
std feature you must disable default features. The
no-std feature only enables additional features required for this crate to be usable without
std. Both can be enabled without conflict.
Minimum Supported Rust Version (MSRV)
This library should always compile with any combination of features on Rust 1.48.0.
Some dependencies do not play nicely with our MSRV, if you are running the tests
you may need to pin some dependencies. See
./contrib/test.sh for current pinning.
Contributions are generally welcome. If you intend to make larger changes please discuss them in an issue before PRing them to avoid duplicate work and architectural mismatches. If you have any questions or ideas you want to discuss please join us in ##miniscript on Libera.
We use a custom Rust compiler configuration conditional to guard the bench mark code. To run the
bench marks use:
RUSTFLAGS='--cfg=bench' cargo +nightly bench.