Closed a5an0 closed 2 years ago
This breaks compatibility with yeticold.com restore but can be used by anyone who doesn't need or want that compatibility.
If you have made a wallet with both descriptors imported, can you see if restoring the xpubs with yeticold.com using the m/ derivation path shows all change and deposits? If so, I can merge this and keep descriptor.txt the yeti compatible m/ derivation path.
This commit changes the descriptor to add another component to the derivation path for the xpubs (was
m/*
, is nowm/0/*
) and adds a second descriptor with the same xpubs and a derivation path ofm/1/*
. When callingimport descriptors
, it passes both, marking the /1/ descriptor asinternal
. The effect of all of this is that the wallet now generates change addresses automatically.I also changed the wallet descriptor to use
sortedmulti
instead ofmulti
. This means that in the future if you ever had to regenerate the descriptor from the private keys, ordering wouldn't matter (sortedmulti
does a lexicographic sort of the XPUBs). It also means that you can import the wallet descriptor into other software like Sparrow wallet for watching or formatting transactions.The other scripts (coin flip wallet, custom wallet) have not been updated, nor have the docs. Planning on getting to those when I have time, but if anyone wants to play with this change, here it is!
Also note that this breaks compatibility with the yeticold restore functionality. Maybe I should copy and rename this script to keep one that works with yeti, and one that is new-and-improved. Thoughts?