Author

Topic: Watchonly for a migrated descriptor wallet (Read 45 times)

legendary
Activity: 2618
Merit: 6452
Self-proclaimed Genius
December 27, 2024, 10:24:40 PM
#4
There were some errors when importing all the descriptors, I don't know why.
The error should indicate what went wrong including errors in the command/arg's syntax.

In the meantime, I asked "Copilot" and it told me that the command
Code:
importdescriptors
also works for addresses
Yes, there's an addr descriptor to directly import addresses.
The difference of using the migrated combo(pubKey/prvKey) descriptor(s) is it works the same as your legacy wallet which includes all major script types per key (excluding TapRoot).

For reference here are the available descriptors in Bitcoin Core: https://github.com/bitcoin/bitcoin/blob/master/doc/descriptors.md#features
member
Activity: 134
Merit: 14
December 27, 2024, 01:44:09 PM
#3
Thank you for your help. Yes, I meant "migrated" and corrected it in the title, sorry for the confusion.

There were some errors when importing all the descriptors, I don't know why.

In the meantime, I asked "Copilot" and it told me that the command
Code:
importdescriptors
also works for addresses
Code:
importdescriptors '[{ "desc": "addr(ADDRESS)#HASH, "timestamp": UNIXTIME }]'

I can even combine it to import all addresses from the legacy wallet at once.

This did the job, problem solved  Smiley
legendary
Activity: 2618
Merit: 6452
Self-proclaimed Genius
December 27, 2024, 09:30:21 AM
#2
I use Bitcoin Core v28.0.0 and just recently merged my legacy wallet to a new descriptor wallet standard.
Do you mean "migrated"?
If so, those migrated keys' descriptors should show among the results of listdescriptors command.
Copy all of your descriptors including the additional information and import all of those with importdescriptors command just like how you imported the previous two.

However, this will be a tedious task if your legacy wallet was not HD and you've previously used a lot of keys since each of your public/private keys are imported as "combo" descriptors.
In that case, you'll need to import all of those to track their past and future transactions.
member
Activity: 134
Merit: 14
December 27, 2024, 06:58:43 AM
#1
I use Bitcoin Core v28.0.0 and just recently merged my legacy wallet to a new descriptor wallet standard. The new wallet.dat of the descriptor wallet will be stored at a save place. In order to keep track of my wallet, I would like to create a watchonly wallet.

I have created a new, empty wallet with private keys disabled. Next, I have imported two descriptors with the command
Code:
importdescriptors
for wpkh (Pay-to-witness-pubkey-hash scripts), one with
Code:
"internal\": false,
for the receiving addresses and
Code:
"internal\": true,
for the change addresses.

The problem: Because this is a merged legacy wallet, the new watchonly will only cover the new, future transactions. This is good, but I also want to cover all the history, legacy transactions included.

How can I accomplish this? Is there a descriptor that covers all the legacy wallet transactions, that I can import?
Jump to: