Skip to content

Display miniscript and musig2 addresses on supported devices - #852

Open
Sjors wants to merge 14 commits into
bitcoin-core:masterfrom
Sjors:2026/08/display-address-musig2-miniscript
Open

Display miniscript and musig2 addresses on supported devices#852
Sjors wants to merge 14 commits into
bitcoin-core:masterfrom
Sjors:2026/08/display-address-musig2-miniscript

Conversation

@Sjors

@Sjors Sjors commented Aug 24, 2026

Copy link
Copy Markdown
Member

Split from #794 for easier review.

Device / pinned firmware Segwit wsh(miniscript) tr(key, tapscript) MuSig2 key-path
Ledger legacy / 1.6.6 No No No
Ledger modern / 2.5.0 Yes Yes Yes
Coldcard classic / 5.6.0 No No No
Coldcard Edge / 6.6.0X Yes Yes Yes
BitBox01 / 7.1.0 No No No
BitBox02 / 9.24.0 Yes Yes No
Jade / 1.0.36 Yes No No
Trezor One/T / 2.9.6 No No No
KeepKey / 7.10.0 No No No

@Sjors Sjors mentioned this pull request Aug 24, 2026
@Sjors Sjors changed the title Display musig2 miniscript addresses on Ledger and ColdCard Display musig2 and miniscript addresses on Ledger and ColdCard Aug 24, 2026
@Sjors
Sjors force-pushed the 2026/08/display-address-musig2-miniscript branch from bebdbc2 to d56cf15 Compare August 24, 2026 13:27
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
@Sjors

Sjors commented Aug 24, 2026

Copy link
Copy Markdown
Member Author

I'm adding Jade device support for wsh() miniscript, and BitBox02 for both wsh() and tr(). Neither devices support MuSig2 yet.

@Sjors
Sjors marked this pull request as draft August 24, 2026 14:18
@Sjors Sjors changed the title Display musig2 and miniscript addresses on Ledger and ColdCard Display miniscript and musig2 addresses on supported devices Aug 24, 2026
@Sjors
Sjors force-pushed the 2026/08/display-address-musig2-miniscript branch from d56cf15 to a1ba686 Compare August 24, 2026 15:16
@Sjors
Sjors marked this pull request as ready for review August 24, 2026 15:16
@Sjors
Sjors force-pushed the 2026/08/display-address-musig2-miniscript branch from a1ba686 to ff359ee Compare August 24, 2026 16:18
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
Sjors added 14 commits August 26, 2026 09:12
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
Sjors force-pushed the 2026/08/display-address-musig2-miniscript branch from ff359ee to 35588fe Compare August 26, 2026 07:21
@Sjors

Sjors commented Aug 26, 2026

Copy link
Copy Markdown
Member Author

Rebased after #792.

Sjors added a commit to Sjors/HWI that referenced this pull request Aug 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant