Author

Topic: Bitcoin core import p2wpkh (Read 202 times)

legendary
Activity: 2534
Merit: 6080
Self-proclaimed Genius
October 24, 2022, 12:13:00 AM
#8
Would this work also on a non blank wallet? Or will it cause problems to have multiple active descriptors?
Since it's not a blank wallet, it will be pre-loaded with active descriptors for Legacy, P2SH-SegWit, Bech32 (SegWit) and Bech32m (Taproot), plus another set for change.
If you set a new descriptor as active (the tutorial doesn't include active flags), it will deactivate the previous active descriptor of the same type,
but your wallet can have multiple active descriptors as long as those are for different script types and for change (internal) or not.

Importing more descriptors will work but only the active descriptors will be used when prompting for a new address/change.
The non-active ones will still be scanned for transaction/balance.
newbie
Activity: 25
Merit: 0
October 23, 2022, 01:43:08 PM
#7
For descriptor wallet, you can try this (to import your whole Electrum wallet): https://bitcointalksearch.org/topic/m.60178631
But instead of "xpub" key, import the "xpriv" key that you can get using the command in Electrum's console: getmasterprivate()
Also, you must add \"active\": true, to the 'receiving' and 'change' descriptors to set those as the active descriptors.

Very helpful! Thank you.

I removed the \"watching-only\": false, from the descriptors also.

Would this work also on a non blank wallet? Or will it cause problems to have multiple active descriptors?
legendary
Activity: 2534
Merit: 6080
Self-proclaimed Genius
August 15, 2022, 05:22:40 AM
#6
Solution:
Creating new wallet without descriptions. It works!
I am very grateful!

Do I need to do rescan?
If you haven't added "false" flag after importprivkey, it should automatically do a rescan. If it didn't rescan, you need to since it's necessary to update the balance.
Also, you can also use a blank wallet (non-descriptor) wallet if you do not want to have other private keys in your wallet.

For descriptor wallet, you can try this (to import your whole Electrum wallet): https://bitcointalksearch.org/topic/m.60178631
But instead of "xpub" key, import the "xpriv" key that you can get using the command in Electrum's console: getmasterprivate()
Also, you must add \"active\": true, to the 'receiving' and 'change' descriptors to set those as the active descriptors.
legendary
Activity: 3290
Merit: 16489
Thick-Skinned Gang Leader and Golden Feather 2021
August 15, 2022, 04:55:01 AM
#5
I have a seed phrase, can I somehow import it from electrum?
I don't think that's possible. You'll have to import all addresses separately.

Do I need to do rescan?
If the address has a balance: yes.
newbie
Activity: 3
Merit: 15
August 15, 2022, 04:37:26 AM
#4
Or maybe you can still create a New Wallet and untick Descriptor Wallet.
Solution:
Creating new wallet without descriptions. It works!
I am very grateful!

Do I need to do rescan?
newbie
Activity: 3
Merit: 15
August 15, 2022, 04:25:56 AM
#3
After spending a lot of time in Google, I realized that it was about some descriptors
I haven't used descriptor wallets 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(). Then use getdescriptorinfo to get the checksum and create wpkh()#, and then use importdescriptors to import that descriptor
Or maybe you can still create a New Wallet and untick Descriptor Wallet.

Unfortunately wpkh returns the error Method not found (code -32601)

I have a seed phrase, can I somehow import it from electrum? Or convert to a suitable bitcoin core format
legendary
Activity: 3290
Merit: 16489
Thick-Skinned Gang Leader and Golden Feather 2021
August 15, 2022, 04:17:37 AM
#2
After spending a lot of time in Google, I realized that it was about some descriptors
I haven't used descriptor wallets 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(). Then use getdescriptorinfo to get the checksum and create wpkh()#, and then use importdescriptors to import that descriptor
Or maybe you can still create a New Wallet and untick Descriptor Wallet.
newbie
Activity: 3
Merit: 15
August 15, 2022, 04:06:06 AM
#1
Hi!
I ask for help with the import p2wpkh address from Electrum to Bitcoin core.


I use the command importprivkey ********* , but I get an error in response This type of wallet does not support this command (code -4)

I tried various options, but unfortunately it didn't work out to import. After spending a lot of time in Google, I realized that it was about some descriptors, but I do not know how to use and add them. And maybe it's not about them at all. Please help me.



Ubuntu 22.04.1 LTS
Linux 5.15.0-46-generic #49-Ubuntu
Client version: v23.0.0
Jump to: