Author

Topic: Retrieve address from Private Key (Read 144 times)

legendary
Activity: 1568
Merit: 6660
bitcoincleanup.com / bitmixlist.org
February 09, 2023, 07:29:17 AM
#7
Just a bit more info, core will rescan the ENTIRE blockchain from the beginning to the end when you do this. On a slower PC or one with a slower drive / other limited resources with it can take a REALLY long time. As in HOURS. Do not stop the process, it will just have be started again. There are ways to shorten it a bit but for the most part just do it and go to bed. When you wake up in the morning it will be done.

If you are running a fast newer machine with a lot of RAM and an m.2 nvme it's a different story, but don't get frustiated while it's rescanning.

-Dave

It also helps to renice(1) the Bitcoin Core process if you have other things running in the background, so that it gets priority CPU and I/O access. Just make sure you don't make it realtime because then you could make the entire system unstable.

Generally, this will not help when there Core is the only process running, and it is only expected to improve the performance to as if it was the only program running on the system.

In Windows you can change the process priority with task manager, and it accomplishes the same thing.
legendary
Activity: 3500
Merit: 6320
Crypto Swap Exchange
February 08, 2023, 11:58:21 AM
#6
Just a bit more info, core will rescan the ENTIRE blockchain from the beginning to the end when you do this. On a slower PC or one with a slower drive / other limited resources with it can take a REALLY long time. As in HOURS. Do not stop the process, it will just have be started again. There are ways to shorten it a bit but for the most part just do it and go to bed. When you wake up in the morning it will be done.

If you are running a fast newer machine with a lot of RAM and an m.2 nvme it's a different story, but don't get frustiated while it's rescanning.

-Dave
legendary
Activity: 2394
Merit: 5531
Self-proclaimed Genius
February 08, 2023, 02:09:37 AM
#5
OK apologies out the way, does anyone know how I can import a private key into my core consul and retrieve my address for that key?
Take note that the instructions provided above wont work in the latest Bitcoin Core's default wallet.
When creating a new wallet, you'll have to untick "Descriptor Wallet" to generate an old-version wallet.dat.

If you prefer to import it to an existing wallet and it's a descriptor wallet, you'll have to import it through importdescriptors command:
Command: https://bitcoincore.org/en/doc/24.0.0/rpc/wallet/importdescriptors/
legendary
Activity: 3290
Merit: 3011
BTC price road to $80k
February 07, 2023, 07:48:26 PM
#4
Be careful of importing private keys on an online PC before you import and do the guide above always make sure to disconnect your PC from the internet to avoid leaks.

Or better generate your new address with your current wallet than expose your private key.

What do you plan for this address? If you are going to deposit then it's not safe but if you plan to transfer funds from that address make sure to send it to a secured wallet/address.
hero member
Activity: 882
Merit: 5829
not your keys, not your coins!
February 07, 2023, 11:59:51 AM
#3
I would use importprivkey, but with a label such that you can then retrieve the address.

Like this:
Code:
importprivkey "privkey" "label"
getaddressesbylabel "label"

Edit: nc50lc is right. But I'd still try give that key a label (through importdescriptors) so you can query the address for that label afterwards.
legendary
Activity: 2380
Merit: 5213
February 07, 2023, 11:42:43 AM
#2
Go to console.
Decrypt your wallet (if it's encrypted) using the following command. Skip this step if your wallet is not encrypted.

Code:
walletpassphrase "YourPassPhrase" 600
With the command your wallet will be encrypted again after 600 seconds. You can change the 600 to any number you want.

After that, use the following command to import your private key.

Code:
importprivkey YourPrivateKey
newbie
Activity: 1
Merit: 5
February 07, 2023, 11:29:06 AM
#1
Hi guys,
Please excuse the log in name.  It is a bizarre situation where I tried every conceivable iteration of my name but they were all taken and I quietly mumbled the above and someone beside me said 'why dont you try that' ..... hey presto, it was available!

OK apologies out the way, does anyone know how I can import a private key into my core consul and retrieve my address for that key?

Quite new to core so a detailed set of instructions would be appreciated.

Thank you
Jump to: