• Stars
    star
    342
  • Rank 123,697 (Top 3 %)
  • Language
    Rust
  • License
    Creative Commons ...
  • Created about 6 years ago
  • Updated 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Support for Miniscript and Output Descriptors for rust-bitcoin

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

Building

The cargo feature std is enabled by default. At least one of the features std or no-std or both must be enabled.

Enabling the 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 (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
cargo update -p once_cell --precise 1.13.1
cargo update -p bzip2 --precise 0.4.2

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.

Licensing

The code in this project is licensed under the Creative Commons CC0 1.0 Universal license. We use the SPDX license list and SPDX IDs.

More Repositories

1

rust-bitcoin

Rust Bitcoin library
Rust
2,063
star
2

rust-secp256k1

Rust language bindings for Bitcoin secp256k1 library.
C
337
star
3

rust-bitcoincore-rpc

Rust RPC client library for the Bitcoin Core JSON-RPC API.
Rust
293
star
4

rust-wallet

*archived* Library for a Bitcoin Wallet
Rust
180
star
5

murmel

Bitcoin SPV client in Rust.
Rust
102
star
6

rust-bech32

Bech32 format encoding and decoding
Rust
94
star
7

rust-bip39

A Rust library for working with Bitcoin BIP-39 mnemonics
Rust
88
star
8

bitcoin_hashes

Simple library which implements a few hashes and does nothing else
Rust
66
star
9

hammersbald

Hammersbald is a fast embedded blockchain database
Rust
52
star
10

rust-bitcoinconsensus

Bitcoin's libbitcoinconsenus.a with Rust binding. Built from Bitcoin sources with cargo.
C++
46
star
11

bitcoind

Utility to launch a regtest bitcoind process in a rust test
Rust
34
star
12

rust-bip47

BIP47 implementation in Rust
Rust
26
star
13

rust-lightning-invoice

lightning BOLT 11 invoice implementation
Rust
20
star
14

rust-bech32-bitcoin

Encoding and decoding Segregated Witness addresses in Bech32 format
Rust
16
star
15

bip324

encrypted messages over the Bitcoin P2P Protocol
Rust
15
star
16

bip322

Implements BIP322 generic message signing and verification
Rust
14
star
17

constants

Constants used across Bitcoin libraries
Rust
8
star
18

hex-conservative

Hex crate with a conservative MSRV and dependency policy
Rust
7
star
19

rust-bitcoin-chain

In-Memory Bitcoin blockchain
Rust
5
star
20

www.rust-bitcoin.org

Web site source code
Shell
5
star
21

rust-bitcoin.github.io

SCSS
5
star
22

rust-bitcoind-json-rpc

Support for Bitcoin Core's JSON-RPC API
Rust
5
star
23

rust-bitcoin-maintainer-tools

Scripts, test vectors, and other things used by or across multiple repositories in the rust-bitcoin ecosystem.
Rust
5
star
24

workshop

Conference workshop material
HTML
2
star
25

rust-psbt-v0

Partially Signed Bitcoin Transaction Format - BIP-174
Rust
1
star