Bitcoin Forum
August 07, 2024, 08:21:51 AM *
News: Latest Bitcoin Core release: 27.1 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How do you import a P2PK address into Bitcoin Core  (Read 118 times)
BitcoinCanSaveUsAll (OP)
Member
**
Offline Offline

Activity: 104
Merit: 120


View Profile
June 22, 2021, 04:12:11 PM
Merited by LoyceV (5)
 #1

I know that importprivkey is the way to import keys, but how do you specify that the address format you want is P2PKH?  As far as I understand things, P2PKH is the only address format supported that you can sign messages with that has a standardized signature cross platform.
ranochigo
Legendary
*
Offline Offline

Activity: 3010
Merit: 4320


Crypto Swap Exchange


View Profile
June 22, 2021, 04:21:51 PM
Merited by LoyceV (2)
 #2

I assume you're talking about P2PKH, not P2PK.

Go to Window>Console, and type in this:

Code:
importprivkey LPRIVATEKEY

If it is encrypted,
Code:
walletpassphrase PASSWORD 600

Core automatically generates (and imports) all 3 main address type (P2PKH, P2WPKH, P2SH-P2WPKH) during importing.

█▀▀▀











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











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
BitcoinCanSaveUsAll (OP)
Member
**
Offline Offline

Activity: 104
Merit: 120


View Profile
June 22, 2021, 08:23:01 PM
 #3

Thank you very much.  I was unaware of the bitcoin core importing all address types associated with the private keys although I guess in hindsight it only makes senses.  Either way you feedback was much appreciated. 
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!