Skip to content

Beef up the Descriptor type #687

Open
@thunderbiscuit

Description

@thunderbiscuit

The Descriptor type is one of the most complex types coming from BDK/Miniscript, and we expose a simplified version of what's available in Rust, partly because it's a whole lot of generics on top of generics.

I still need to play around with the Rust code to figure out a few things we could add to make the type more powerful in the bindings, but the first thing that I realized only today is that given a descriptor, there is currently not a lot of introspection available into it.

For example, at any point your Descriptor probably came from either the domain layer (you created it yourself from entropy or a recovery phrase) and used our descriptor templates, in which case you know the script type (P2TR, P2WPKH, etc.), or it was given to you by a user in the form of a string. In this case, you can create the descriptor but cannot query it directly for metadata (script type, checksum, etc.). The only way to do this currently is to manually parse the string, but surely we can do better because those methods are available in some form in Rust.

Metadata

Metadata

Assignees

No one assigned

    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