Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: sampei7777 on November 10, 2025, 05:05:28 PM



Title: listdescriptor and importdescriptor
Post by: sampei7777 on November 10, 2025, 05:05:28 PM
Hi, just a question.

If I do

Code:
bitcoin-cli listdescriptors true

and than i do

Code:
bitcoin-cli importdescriptors

on previously exported file on a new installatio/machine, will I have the some funds and address of original wallets?

i.e. does listdescriptors true and importdescriptor the same thing that once did dumpprivkey and importprivkey?

Thanks to all



Title: Re: listdescriptor and importdescriptor
Post by: achow101 on November 10, 2025, 05:19:07 PM
Yes, after a rescan


Title: Re: listdescriptor and importdescriptor
Post by: TokenTikas on November 11, 2025, 04:55:12 AM
If the exported file contains the private key then when you import it to a new machine, you will get your original wallet and funds.

If you only have the public key, you will only be able to view the addresses, not spend the funds.


Title: Re: listdescriptor and importdescriptor
Post by: satscraper on November 11, 2025, 09:36:41 AM
If the exported file contains the private key then when you import it to a new machine, you will get your original wallet and funds.

If you only have the public key, you will only be able to view the addresses, not spend the funds.

If you set "true" to private arguments of listdescriptors command then private keys are also exported, and after importing relevant discriptors you will be able to spend funds. So, achow101 response has covered your question. In modern wallet architecture listdescriptors true and importdescriptors act as replacements for the dumpprivkey and importprivkey commands used in legacy wallets.




Title: Re: listdescriptor and importdescriptor
Post by: Forsyth Jones on November 11, 2025, 06:09:45 PM
Hi, just a question.

If I do

Code:
bitcoin-cli listdescriptors true

and than i do

Code:
bitcoin-cli importdescriptors

on previously exported file on a new installatio/machine, will I have the some funds and address of original wallets?

i.e. does listdescriptors true and importdescriptor the same thing that once did dumpprivkey and importprivkey?

Thanks to all
In this post you will find instructions on how to import an xpriv according to its script type (address): How to import an xpriv to a descriptor wallet in bitcoin core? (https://bitcointalk.org/index.php?topic=5483885.msg63602317#msg63602317)

To import individual WIFI private keys, the concept is the same, i opened this thread: [HOW-TO] Import privkeys into a Bitcoin Core descriptor wallet (https://bitcointalk.org/index.php?topic=5498210.0)