Skip to content

Taproot keysigning is confusing and the API is unhelpful #744

Open
@apoelstra

Description

@apoelstra

Right now in our Satisfier API we have a lookup_tap_key_spend_sig method which takes no arguments and returns an Option<Signature>.

The premise, I guess, is that there is only one valid key that can sign a keyspend and the satisfier should know this so there's no need to pass in any extra context.

Well, when developing software you might not know the key, at least initially, because

  • The policy compiler will pick a sorta-random key from your policy to be the keyspend key, and it doesn't tell you which one it picks, so you need to know that it does this and then inspect the resulting descriptor
  • The key in the policy isn't even the key that you sign with. You need to tweak the key in the policy.

This would be greatly improved by the API providing a Pk and maybe also a TweakedPublicKey and maybe even the taptweak? And the docs should be improved to explain these things.

In general I feel the satisfier API could be greatly improved to provide more context and information to the satisfier.

Related to #742

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