Display miniscript and musig2 addresses on supported devices - #852
Open
Sjors wants to merge 14 commits into
Open
Display miniscript and musig2 addresses on supported devices#852Sjors wants to merge 14 commits into
Sjors wants to merge 14 commits into
Conversation
Draft
Sjors
force-pushed
the
2026/08/display-address-musig2-miniscript
branch
from
August 24, 2026 13:27
bebdbc2 to
d56cf15
Compare
Sjors
added a commit
to Sjors/HWI
that referenced
this pull request
Aug 24, 2026
# Conflicts: # hwilib/descriptor.py # test/test_descriptor.py # test/test_device.py
Sjors
added a commit
to Sjors/HWI
that referenced
this pull request
Aug 24, 2026
# Conflicts: # hwilib/descriptor.py # test/test_descriptor.py # test/test_device.py
Member
Author
|
I'm adding Jade device support for |
Sjors
marked this pull request as draft
August 24, 2026 14:18
Sjors
force-pushed
the
2026/08/display-address-musig2-miniscript
branch
from
August 24, 2026 15:16
d56cf15 to
a1ba686
Compare
Sjors
marked this pull request as ready for review
August 24, 2026 15:16
Sjors
force-pushed
the
2026/08/display-address-musig2-miniscript
branch
from
August 24, 2026 16:18
a1ba686 to
ff359ee
Compare
Sjors
added a commit
to Sjors/HWI
that referenced
this pull request
Aug 24, 2026
# Conflicts: # hwilib/descriptor.py # test/test_bitbox02.py # test/test_coldcard.py # test/test_descriptor.py # test/test_device.py
Reject malformed ranged derivation suffixes such as /0*, which were silently misparsed as /*, as well as empty key expressions and trailing commas, which raised IndexError or were silently dropped. Move the ranged suffix parsing into a shared helper.
A key that appears more than once in a descriptor, e.g. with different derivation path suffixes, must use a single entry in the BIP 388 Key information vector. Assign key placeholder indexes accordingly after parsing and return each key once from get_pubkey_providers(). Derivation-related callers use the new get_derivation_providers(), which still returns every appearance of a key.
Move the derivation path checks into _check_bip388_deriv_path() and the suffix serialization into _get_bip388_deriv_suffix(), so key expression types with a different placeholder prefix can reuse them. No behavior change.
parse_pubkey() splits at the first comma, which cannot handle key expressions that themselves contain commas. No behavior change for valid descriptors.
Registered descriptor policies may contain Miniscript expressions in P2WSH. Parse their structure so keys land in the BIP 388 key information vector and the same policy validation applies as for other descriptors. Miniscript type checking remains the responsibility of the device.
Parse musig() key expressions as specified in BIP 390, checked against its test vectors. Participants may carry derivation paths only when the aggregate key has none; in that case derivation happens on the participant keys before aggregation. Aggregate key derivation must be unhardened and requires extended public key participants. The aggregate key carries the derivation path suffix, so derivation-related callers use the new get_derivation_providers(), while get_pubkey_providers() returns the participant keys, matching the BIP 388 Key information vector. BIP 388 does not allow derivation before aggregation, so get_bip388_placeholder() rejects it.
Sjors
force-pushed
the
2026/08/display-address-musig2-miniscript
branch
from
August 26, 2026 07:21
ff359ee to
35588fe
Compare
Member
Author
|
Rebased after #792. |
Sjors
added a commit
to Sjors/HWI
that referenced
this pull request
Aug 26, 2026
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.
Split from #794 for easier review.