Bitcoin Forum
May 07, 2024, 10:35:17 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Retrieve address from Private Key  (Read 144 times)
FuckMyOlBoots (OP)
Newbie
*
Offline Offline

Activity: 1
Merit: 5


View Profile
February 07, 2023, 03:29:06 PM
Merited by o_e_l_e_o (4), ABCbits (1)
 #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
1715121317
Hero Member
*
Offline Offline

Posts: 1715121317

View Profile Personal Message (Offline)

Ignore
1715121317
Reply with quote  #2

1715121317
Report to moderator
I HATE TABLES I HATE TABLES I HA(╯°□°)╯︵ ┻━┻ TABLES I HATE TABLES I HATE TABLES
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
hosseinimr93
Legendary
*
Offline Offline

Activity: 2394
Merit: 5235



View Profile
February 07, 2023, 03:42:43 PM
Merited by o_e_l_e_o (4), OgNasty (1), ABCbits (1)
 #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

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
n0nce
Hero Member
*****
Offline Offline

Activity: 882
Merit: 5818


not your keys, not your coins!


View Profile WWW
February 07, 2023, 03:59:51 PM
Last edit: February 08, 2023, 03:27:59 PM by n0nce
 #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.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
BitMaxz
Legendary
*
Offline Offline

Activity: 3248
Merit: 2965


Block halving is coming.


View Profile WWW
February 07, 2023, 11: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.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
nc50lc
Legendary
*
Offline Offline

Activity: 2408
Merit: 5591


Self-proclaimed Genius


View Profile
February 08, 2023, 06:09:37 AM
Merited by LoyceV (2), ABCbits (1), hosseinimr93 (1), n0nce (1)
 #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/

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
DaveF
Legendary
*
Online Online

Activity: 3472
Merit: 6266


Crypto Swap Exchange


View Profile WWW
February 08, 2023, 03:58:21 PM
Merited by n0nce (1)
 #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

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
NotATether
Legendary
*
Offline Offline

Activity: 1596
Merit: 6730


bitcoincleanup.com / bitmixlist.org


View Profile WWW
February 09, 2023, 11: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.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!