Coder Social home page Coder Social logo

harshit933 / rust-miniscript Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rust-bitcoin/rust-miniscript

0.0 0.0 0.0 3.11 MB

Support for Miniscript and Output Descriptors for rust-bitcoin

License: Creative Commons Zero v1.0 Universal

Shell 0.19% Rust 99.81% RPC 0.01%

rust-miniscript's Introduction

Build

Minimum Supported Rust Version: 1.56.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 on Rust 1.56.1.

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.

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.

Benchmarks

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.

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.

rust-miniscript's People

Contributors

sanket1729 avatar apoelstra avatar tcharding avatar darosior avatar sarcasticnastik avatar afilini avatar rcasatta avatar dr-orlovsky avatar kiminuo avatar llfourn avatar stevenroose avatar jeremyrubin avatar harshil-jani avatar danielabrozzoni avatar thomaseizinger avatar randymcmillan avatar sgeisler avatar joemphilips avatar kanishk779 avatar shesek avatar storopoli avatar instagibbs avatar justinmoon avatar quad avatar notmandatory avatar practicalswift avatar evanlinjin avatar eunoia1729 avatar 6293 avatar wthrajat avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.