Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: BitcoinCanSaveUsAll on June 22, 2021, 04:12:11 PM



Title: How do you import a P2PK address into Bitcoin Core
Post by: BitcoinCanSaveUsAll on June 22, 2021, 04:12:11 PM
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.


Title: Re: How do you import a P2PK address into Bitcoin Core
Post by: ranochigo on June 22, 2021, 04:21:51 PM
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.


Title: Re: How do you import a P2PK address into Bitcoin Core
Post by: BitcoinCanSaveUsAll on June 22, 2021, 08:23:01 PM
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.