Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Output Script Descriptor (with Miniscript) support #911

Closed
darosior opened this issue May 6, 2022 · 4 comments
Closed

Output Script Descriptor (with Miniscript) support #911

darosior opened this issue May 6, 2022 · 4 comments
Assignees

Comments

@darosior
Copy link

darosior commented May 6, 2022

Output Script Descriptor are a sane standard for wallet backups. They express all the information necessary to locate owned (or partially owned) outputs in an engineer-readable format, avoiding the pitfalls of previously used implicit hacks to recover only from a mnemonic.

Miniscript is an extension to Output Script Descriptors, which defines a language to reason about a subset of Script. Miniscript allows to:

  1. Safely write more complicated contracts than the basic well-known templates
  2. Produce a valid witness for any Script that is a valid Miniscript, given the necessary material (signature, etc)
  3. Statically analyse the properties of any Script that is a valid Miniscript: determine the semantics of the contract, whether it is non-malleable, whether some spending paths may exceed standardness or consensus limits --in short, whether it's safe to participate in such a Script.

Miniscript also guarantees consensus soundness (unless the conditions of the Miniscript are met, no witness can be created for the Script) and standardness completeness (for any Miniscript that was analysed as sane, a witness can be constructed in the bounds of the consensus and standardness rules).

Output Script Descriptors along with Miniscript are particularly appealing to signing devices, as it permits the user of this device to safely take part in more complex contracts. It also gives a framework to add support for new Scripts, instead of relying on hard-coded Script templates and footgun-y backup solutions.

Output descriptors have been in Bitcoin Core for a while now, and Miniscript was merged into Bitcoin Core mainline this year. The Specter signing device added support for Output descriptors and Miniscript more than a year ago. Ledger added support for (a subset of) output descriptors last year and is currently working toward Miniscript support.
Is there any plan to implement to implement Output Script Descriptors (with Miniscript) for the Bitbox2?

@darosior
Copy link
Author

darosior commented May 6, 2022

Note that libwally is implementing Miniscript and Output Descriptors, since it is already a dependency of this project it would very likely not be necessary to re-implement it here.

@benma
Copy link
Collaborator

benma commented May 13, 2022

Hi

Do you know of any user wallets where descriptors with miniscript can be imported and used?

Are there compelling use cases for end users?

I'd love to add support for it, but we are stretched thin demand for this seems very low at the moment.

@BitBoxSwiss BitBoxSwiss deleted a comment from papawcoin Jun 25, 2023
@benma
Copy link
Collaborator

benma commented Jul 11, 2023

Support for wsh(miniscript) wallet policies is now merged to master: #1095

It follows this wallet policies BIP:

bitcoin/bips#1389

Here is a playground to interact with it using Go:

https://github.com/digitalbitbox/bitbox02-api-go/blob/master/cmd/miniscript/main.go#L195

I am currently experimenting with making a BitBox02 Rust library, which should make integration into Liana easier.

@benma
Copy link
Collaborator

benma commented Oct 10, 2023

The Rust library has been published a while ago: https://crates.io/crates/bitbox-api

Miniscript support was released in v9.15.0.

@benma benma closed this as completed Oct 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants