{"repo":"bitcoinerlab/miniscript","free":true,"listed":false,"github":"https://github.com/bitcoinerlab/miniscript","clone":"git clone https://github.com/bitcoinerlab/miniscript.git","description":"A Bitcoin Miniscript compiler and an symbolic Satisfier decoupled from the tx signer.","language":"TypeScript","stars":28,"topics":["asm","bitcoin","miniscript","policy","satisfier","descriptors"],"license":null,"category":"blockchain-web3","readme_excerpt":"Bitcoin Miniscript Miniscript is a structured, human-friendly way to express Bitcoin spending conditions, making scripts easier to reason about and analyze, while providing safety guarantees around spending behavior. This package provides a TypeScript implementation for compiling and analyzing miniscript and for deriving witnesses (the data a spending transaction must provide to unlock an output). The satisfier is signer-agnostic: it derives symbolic witness stacks using placeholders like and preimage markers, so you can reason about satisfactions without private keys. Installation To install the package, use npm: Usage You can test the examples in this section using the online playground demo available at . Compiling Policies into Miniscript and Bitcoin script Policies are a higher-level, human-readable language for describing spending conditions (for example: and/or clauses, timelocks and key checks). Policy compilation is provided by the companion package @bitcoinerlab/miniscript-policies . Compiling Miniscript into Bitcoin script To compile a Miniscript into Bitcoin ASM you can use the compileMiniscript function: Generating script witnesses To generate script witnesses from a Miniscript, you can use the satisfier function. The satisfier runs the Miniscript static type system analysis and throws when a miniscript is not sane. A sane miniscript follows consensus and standardness rules: it avoids malleable-only paths (more on that later), does not mix timelock units on a sin","default_branch":null,"files":null,"tree":[],"storefront":"/r/bitcoinerlab","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/bitcoinerlab/miniscript/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}