40 releases (11 stable)

Uses old Rust 2015

5.1.0 Jan 29, 2021
4.0.3 Dec 10, 2020
4.0.1 Nov 30, 2020
3.0.0 Oct 14, 2020
0.1.0 Nov 13, 2018

#9 in Cryptocurrencies

Download history 1232/week @ 2020-12-21 1101/week @ 2020-12-28 972/week @ 2021-01-04 2596/week @ 2021-01-11 2455/week @ 2021-01-18 2438/week @ 2021-01-25 1852/week @ 2021-02-01 2329/week @ 2021-02-08 3664/week @ 2021-02-15 1812/week @ 2021-02-22 2285/week @ 2021-03-01 2161/week @ 2021-03-08 1668/week @ 2021-03-15 2335/week @ 2021-03-22 1377/week @ 2021-03-29 1971/week @ 2021-04-05

8,879 downloads per month
Used in 34 crates (17 directly)

CC0 license

770KB
15K SLoC

Build

Minimum Supported Rust Version: 1.29.0

This crate uses "2015" edition and won't be ported over "2018" edition in the near future as this will change the MSRV to 1.31.

Miniscript

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.

High-Level Features

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 compiler flag)
  • 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 bitcoin::PublicKey
  • Determining satisfiability, and optimal witnesses, for a given descriptor; completing an unsigned bitcoin::TxIn with appropriate data
  • Determining the specific keys, hash preimages and timelocks used to spend coins in a given Bitcoin transaction

More information can be found in the documentation or in the examples/ directory

Contributing

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 freenode.

Release Notes

See CHANGELOG.md.

Dependencies

~2MB
~39K SLoC