Skip to content

Support Miniscript address display - #852

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

Sjors wants to merge 7 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)
Ledger modern / 2.5.0 Yes Yes
Coldcard Edge / 6.6.0X Yes Yes
BitBox02 / 9.24.0 Yes Yes
Jade / 1.0.36 Yes 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
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
@fametrano

Copy link
Copy Markdown
Contributor

Comment, not an ACK: the descriptor in test_tapscript_miniscript_policy is refused by Bitcoin Core, so please replace its two leaves that Core refuses.

The andor(pk(K),older(1000),1) leaf can be spent without any signature: when pk(K) is dissatisfied, andor takes its third branch, 1. Core 31.1.0 refuses it as not sane ("witnesses without signature exist"), and and_v(v:pk(K),older(1000)) would keep the key plus timelock. With that replaced, Core still refuses the thresh leaf, because snl:sha256(H) is ill-typed there. btclib-wallet refuses both leaves too. HWI only parses the descriptor, so the test passes. I also derived 25 other wsh(), tr() and MuSig2 descriptors from the tests with Core and btclib-wallet, and all 65 addresses match; I can share the script and log.

Sjors added 6 commits October 24, 2026 05:27
Introduce get_derivation_providers() and route the existing key collection
and derive() through it, preserving repeated keys and traversal order.
Cover repeated key expressions with different suffixes and assign one
BIP 388 key-information entry and placeholder index to each key. Keep
derivation traversal separate so every occurrence is still derived.
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.
@Sjors
Sjors force-pushed the 2026/08/display-address-musig2-miniscript branch from 35588fe to 73966d9 Compare October 24, 2026 06:24
@Sjors

Sjors commented Oct 24, 2026 •

Copy link
Copy Markdown
Member Author

@fametrano good catch, taken.

I split a few independent fixes out into #862.

I also reduced the scope of this PR to just Miniscript support, and opened #863 as a followup for MuSig2.

@Sjors Sjors changed the title Display miniscript and musig2 addresses on supported devices Support Miniscript address display Oct 24, 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.

2 participants