bitcoinjs-lib icon indicating copy to clipboard operation
bitcoinjs-lib copied to clipboard

TODO: Miniscript library under bitcoinjs org

Open blmalone opened this issue 6 years ago • 3 comments
trafficstars

For more information see this Introduction and Live Compiler

blmalone avatar Aug 28 '19 10:08 blmalone

I think this would be good for a separate library under the bitcoinjs org.

Since many people who are not Bitcoin devs will also likely use it.

junderw avatar Aug 28 '19 12:08 junderw

Do you guys know about any progress on this by anyone?

landabaso avatar Nov 08 '22 10:11 landabaso

I've been investigating this.

We could use sipa's implementation (wasm) or rust-miniscript (also wasm?).

I managed to convert sipa's implementation into pure javascript (no wasm) using binaryen wasm2js, so we could even build a pure javascript version (it was very fast based on some examples I tested).

However, the last piece I'm missing in both packages is witness creation (how to produce the unlocking script).

There are not (yet) reference implementations for witness creation from arbitrary miniscripts. rust-miniscript is able to sign arbitrary descriptors but I believe there is no way to get the witness for an arbitrary policy.

landabaso avatar Nov 09 '22 17:11 landabaso