Skip to content

Commit 2ce6d3e

Browse files
committed
Update README with changes to Miniscript Satisfier and clarification on 'issane' property
1 parent ec9c1ae commit 2ce6d3e

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
This project is a JavaScript implementation of Bitcoin Miniscript, a high-level language for describing Bitcoin spending conditions.
44

5-
It includes a transpilation of [Peter Wuille's C++ code](https://github.com/sipa/miniscript) for compiling spending policies into Miniscript and Bitcoin scripts, as well as a Miniscript Satisfier for generating expressive witness scripts from the input Miniscript.
5+
It includes a transpilation of [Peter Wuille's C++ code](https://github.com/sipa/miniscript) for compiling spending policies into Miniscript and Bitcoin scripts, as well as a Miniscript Satisfier for generating explicit witness scripts that are decoupled from the tx signer.
66

77
## Features
88

99
- Compile Policies into Miniscript and Bitcoin scripts.
1010
- A Miniscript Satisfier that discards malleable solutions.
11-
- The Miniscript Satisfier is able to generate expressive witness scripts from Miniscripts that use variables, such as `pk(key)`.
11+
- The Miniscript Satisfier is able to generate explicit witness scripts from Miniscripts using variables, such as `pk(key)`.
1212

1313
For example, Miniscript `and_v(v:pk(key),after(10))` can be satisfied with `[{ witness: '<sig(key)>', nLockTime: 10 }]`.
1414
- The ability to generate different satisfactions depending on the presence of `unknowns`.
@@ -39,8 +39,7 @@ const policy = 'or(and(pk(A),older(8640)),pk(B))';
3939

4040
const { miniscript, asm, issane } = compilePolicy(policy);
4141
```
42-
43-
Where `issane` is a boolean that indicates whether the Miniscript is valid and follows the consensus and standardness rules for Bitcoin scripts. It should have non-malleable solutions, not mix different timelock units on a single branch of the script, and not contain duplicate keys. In other words, it should be a well-formed and standards-compliant script that can be safely used in transactions.
42+
`issane` is a boolean that indicates whether the Miniscript is valid and follows the consensus and standardness rules for Bitcoin scripts. A sane Miniscript should have non-malleable solutions, not mix different timelock units on a single branch of the script, and not contain duplicate keys. In other words, it should be a well-formed and standards-compliant script that can be safely used in transactions.
4443

4544
### Compiling Miniscript into Bitcoin script
4645

@@ -66,6 +65,7 @@ const miniscript =
6665

6766
const satisfactions = satisfier(miniscript);
6867
```
68+
`satisfier` makes sure that output `satisfactions` are non-malleable and that the `miniscript` is sane.
6969

7070
You can also set `unknowns`:
7171

@@ -83,6 +83,8 @@ const satisfactions = satisfier(miniscript, unknowns);
8383

8484
The project was initially developed and is currently maintained by [Jose-Luis Landabaso](https://github.com/landabaso). Contributions and help from other developers are welcome.
8585

86+
Here are some resources to help you get started with contributing:
87+
8688
### Building from source
8789

8890
To download the source code and build the project, follow these steps:

0 commit comments

Comments
 (0)