Skip to content
This repository was archived by the owner on Oct 22, 2026. It is now read-only.
This repository was archived by the owner on Oct 22, 2026. It is now read-only.

Descriptor::parse_descriptor is hard to discover #716

Open

Description

@apoelstra

If you have a descriptor string containing secret keys, it's super non-obvious how to parse this. You can type from_str into docs.rs but nothing will come up. You can type parse and the Descriptor::parse_descriptor method does show up in the list, but there's nothing in the name indicating that it's for secret-key descriptors (and the word "secret" doesn't appear til late in the description so you need a wide screen for it to show up).

As a further thing, it kinda sucks that you can't just parse and re-serialize secret-key-containing descriptors without needing a secp context and doing all the secret key derivations.

I think both API issues would be solved by introducing a SecretDescriptor type which can be parsed/reserialized and converted to/from a (Descriptor, KeyMap) pair, and nothing else.

Activity

  1. apoelstra commented on Jul 30, 2024

    @apoelstra
    MemberAuthor

    cc @thunderbiscuit who asked how to parse secret keys at the rust-bitcoin meetup and it took me 5 minutes to figure it out

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

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