Post
Topic
Board Bitcoin Technical Support
Merits 1 from 1 user
Re: Bitcoin core import p2wpkh
by
LoyceV
on 15/08/2022, 09:17:37 UTC
⭐ Merited by hosseinimr93 (1)
After spending a lot of time in Google, I realized that it was about some descriptors
I haven't used this feature myself yet, but achow101 on Stack Exchange gives this solution:
Quote
The migration tool has not been implemented yet, and it is not for manually importing keys. Rather it takes an existing wallet and migrates everything in that wallet.

As the error message says, descriptor wallets do not support the importprivkey. You will have to use importdescriptors with the private key you want to import as part of the proper descriptor.

For example, if you wanted to import the p2wpkh address for a private key, you would make a descriptor of the form wpkh(<privkey>). Then use getdescriptorinfo to get the checksum and create wpkh(<privkey>)#<checksum>, and then use importdescriptors to import that descriptor
Or maybe you can still create a New Wallet and untick Descriptor Wallet.