#script #bitcoin #miniscript #crypto

no-std miniscript-debug

Miniscript: a subset of Bitcoin Script designed for analysis

1 release (0 unstable)

9.0.1-debug Aug 4, 2023

#7 in #miniscript

Download history 13/week @ 2024-08-31 3/week @ 2024-09-07 5/week @ 2024-09-14 22/week @ 2024-09-21 13/week @ 2024-09-28 3/week @ 2024-10-05 2/week @ 2024-10-26 5/week @ 2024-11-02 1/week @ 2024-11-09 3/week @ 2024-11-16 10/week @ 2024-11-23 21/week @ 2024-11-30 17/week @ 2024-12-07 12/week @ 2024-12-14

61 downloads per month
Used in 4 crates (via bdk-debug)

CC0 license

4MB
44K SLoC

Build

Minimum Supported Rust Version: 1.41.1

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
  • no_std support enabled by disabling the default-features and enabling "no-std". See embedded/ for an example.

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

Minimum Supported Rust Version (MSRV)

This library should always compile with any combination of features (minus no-std) on Rust 1.41.1 or Rust 1.47 with no-std.

Some dependencies do not play nicely with our MSRV, if you are running the tests you may need to pin as follows:

cargo update --package url --precise 2.2.2
cargo update --package form_urlencoded --precise 1.0.1

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

Release Notes

See CHANGELOG.md.

Dependencies

~7.5MB
~96K SLoC