Skip to content

BIP-388 policy support #785

Open
Open

Description

@Sjors

We could add a --bip388-policy (or just --policy) option to the signtx and displayaddress commands.

For devices that support it, e.g. Ledger, these commands would first register the policy if needed. Since displaying an address is a good idea anyway before sending money to it, I don't think we need a separate register command.

Ledger returns an HMAC after registration. Afaik this isn't documented in any BIP. I also don't know if other devices do this. We could add a --ledger-hmac argument for the time being and replace it with something more generic later?

Combined with #783 this should enable MuSig2 support, at least for the manual flow, since Bitcoin Core doesn't pass these fields (yet). The policy can be manually derived from a descriptor, though bitcoin/bitcoin#32659 would make that easier.

Activity

  1. bigspider commented on Jun 4, 2025

    @bigspider
    Contributor

    In the typical multisig wallet workflow, 'wallet registration' and 'address visualization' are two different UX flows that happen at different times. Clearly separating them would make the API of HWI match common practice. Therefore, I would strongly recommend having an explicit registration command and API.

    Not sure if other devices apart from Ledger currently use the proof-of-registration approach, but most (all?) the devices that support multisig or more need a registration step, as it's not possible to get the same security level without. I believe at least BitBox showed interest in having an explicit registration API (cc @benma).

    Ledger's proof-of-registration is not covered by a BIP, but for the purpose HWI's API, I think it would already be a great improvement to consider it a binary blob and leave it vendor-specific what the meaning is, or whether it's used at all.

  2. Sjors commented on Jul 18, 2025

    @Sjors
    MemberAuthor
  3. achow101 commented on Jul 31, 2026

    @achow101
    Member

    No device does registration the same way. This seems to me to be more device specific stuff that we are specifically trying to avoid. Given that we can do on-the-fly registration, I don't think this is at all necessary; sure the UX sucks, but until the hardware vendors can standardize and agree on something, I don't want to implement any device specific policy registration things.

  4. Sjors commented on Jul 31, 2026

    @Sjors
    MemberAuthor

    The standard could be as simple as: given a BIP388 policy, return up to 255 bytes to re-authenticate later?

  5. added a commit that references this issue on Aug 25, 2026
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