You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
wallet: reconstruct or natively support multipath descriptors #36075
BIP389 multipath descriptors can be imported into the wallet, but we forget the original form. A subsequent call to listdescriptors will show a receive and change descriptor, and a call to getaddressinfo returns only the receive or change variant.
This is confusing, but more importantly it's problem with hardware wallets that need a register descriptor or BIP388 policy.
HWI recently added a registerdescriptor command in bitcoin-core/HWI#842. It handles the conversion from descriptor to BIP388 for us, but it does need a multipath descriptor.
There's are several ways we can go about this:
Find matches using simple string manipulation, e.g. replace 1/* in change descriptors with 0/* and see if it matches the receive descriptor.
Advanced string parsing that matches .../n/... change descriptors with .../m/... receive descriptors for any m < n.
I think (4) is the better approach, and if done correctly can be expanded to more generic multipath support. Downsides are that it's very involved and such wallets are not backward compatible.
Make multipath descriptors a first class wallet citizen
I strongly dislike this. It completely breaks the current structure we have where all of the scripts from one descriptor are either entirely for receiving addresses, or entirely for change. Combining them makes all everything else so much more complicated.
I think we could do something where we store in a DescSPKM whether it is a multipath, and then the IDs of the other DescSPKMs that are its multipath partners. Then we can have a multipath reconstruction function on Descriptor which can traverse all of the descriptors in lockstep to figure out where the multipath is.
Activity
achow101 commentedon Aug 25, 2026
I strongly dislike this. It completely breaks the current structure we have where all of the scripts from one descriptor are either entirely for receiving addresses, or entirely for change. Combining them makes all everything else so much more complicated.
I think we could do something where we store in a DescSPKM whether it is a multipath, and then the IDs of the other DescSPKMs that are its multipath partners. Then we can have a multipath reconstruction function on Descriptor which can traverse all of the descriptors in lockstep to figure out where the multipath is.
Sjors commentedon Aug 25, 2026
Maybe that's simpler yes. Added as item 5 in the issue description, prototype in Sjors#125.
Sjors commentedon Aug 31, 2026
Implemented approach (5) in #36133.
We can close this if that PR gets concept ACKs. Otherwise we'll need to consider another approach.