Bitcoin P2PKH - P2SH - P2WPKH - P2WSH & P2WPKH in P2SH and P2WSH in P2SH Address

Generated All Bitcoin Address Type From Private Key Hex : P2PKH - P2SH - P2WPKH - P2WSH & P2WPKH in P2SH and P2WSH in P2SH

import Blockthon as block

# Generated Random Private Key (HEX)
privatekey = block.PrivateKey()
# Generated P2PKH Address Bitcoin Address :
p2pkh = block.P2PKH_From_PrivateKey(privatekey)
# Generated P2SH Address Bitcoin Address :
p2sh = block.P2SH_From_PrivateKey(privatekey)
# Generated P2PKH Address Bitcoin Address :
p2wpkh = block.P2WPKH_From_PrivateKey(privatekey)
# Generated P2WSH Address Bitcoin Address :
p2wsh = block.P2WSH_From_PrivateKey(privatekey)
# Generated P2WPKH in P2SH Address Bitcoin Address :
p2wpkh_p2sh = block.P2WPKH_in_P2SH_From_PrivateKey(privatekey)
# Generated P2WSH in P2SH Address Bitcoin Address :
p2wsh_in_p2sh = block.P2WSH_in_P2SH_From_PrivateKey(privatekey)

Last updated