Optionally pass BIP388 policy to displayaddress - #841
Draft
Sjors wants to merge 4 commits into
Draft
Conversation
Convert combined multipath output descriptors into BIP388 descriptor templates and key vectors, and validate that the result follows BIP388. Cover all canonical valid and invalid BIP388 policy vectors. Co-authored-by: Codex (GPT-5.6 Sol) <noreply@openai.com>
Frame the device registration and policy name as separately length-prefixed fields before hex encoding the opaque value. Decode and validate all fields while allowing later fields to be appended. Co-authored-by: Codex (GPT-5.6 Sol) <noreply@openai.com>
Accept a combined multipath output descriptor, address index, optional registration, and change flag. Convert the descriptor to a BIP388 policy and display the selected address on Ledger devices. Decode opaque Ledger registrations so the device registration and policy name do not need separate command-line arguments. Co-authored-by: Codex (GPT-5.6 Sol) <noreply@openai.com>
Translate BIP388 policies into BitBox02 script configs and derive the selected receive or change address from the device key's multipath expression. Cover branch selection with unit tests and display a registered policy address in the BitBox02 simulator suite. Co-authored-by: Codex (GPT-5.6 Sol) <noreply@openai.com>
Sjors
force-pushed
the
2026/08/display-address-bip388
branch
from
August 2, 2026 17:37
599b8a6 to
499c52a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds BIP 388 wallet policy support to
displayaddress, following the descriptor-based approach introduced in #791 and #792. The command takes a combined multipath descriptor and an address index, instead of requiring callers to construct a BIP 388 policy directly.The existing direct descriptor use case remains supported, including the single-sig descriptor form used by Bitcoin Core wallets.
For Ledger, custom policies can be displayed using the opaque policy registration returned by
registerpolicy. Standard policies do not require registration.For BitBox02, the descriptor is translated to the device's registered policy format.
Includes unit tests and Ledger and BitBox02 simulator coverage.
PR is draft, because the first two commits are shared with #791.