Skip to content

Output Script Descriptor (with Miniscript) support #911

Closed

Description

@darosior

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?

Activity

  1. darosior commented on May 6, 2022

    @darosior
    Author

    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.

  2. benma commented on May 13, 2022

    @benma
    Collaborator

    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.

  3. deleted a comment from papawcoin on Jun 25, 2023
  4. benma commented on Jul 11, 2023

    @benma
    Collaborator

    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.

  5. self-assigned this
    on Jul 11, 2023
  6. benma commented on Oct 10, 2023

    @benma
    Collaborator

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

    Miniscript support was released in v9.15.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions