Open blmalone opened 4 years ago
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.
Do you guys know about any progress on this by anyone?
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.
For more information see this Introduction and Live Compiler