Post
Topic
Board Bitcoin Technical Support
Merits 6 from 2 users
Re: Bitcoin Core generates wrong private key?
by
HCP
on 17/02/2021, 21:16:19 UTC
⭐ Merited by LoyceV (4) ,malevolent (2)
For example
Code:
p2wpkh-p2sh:5BitcoinPrivateKey
This should generate the corresponding p2wpkh-p2sh bitcoin address.

For example
Code:
p2wpkh:5PrivateKey
This should generate the corresponding Bech32 address
[/quote]
Just a quick note... you should NOT be using WIF keys that start with a "5" for generating SegWit addresses... these are for "uncompressed" keys... and can cause a great deal of grief! Shocked

Only use WIF keys that start with a "K" or an "L" for SegWit.


Quote
Bitaddress doesn't support Segwit, right?
No, it doesn't... you'd need to use https://segwitaddress.org/ (for Nested Segwit aka "3" type) and https://segwitaddress.org/bech32/ (for native segwit aka "bc1")