Thursday, November 7, 2024

pockets safety – How you can verify that I management an handle

  1. Check the home windows python code under with the personal/public key generated from
    web site. Simply to confirm the correctness. If right proceed.
  2. Throw coin 256x get your personal key.
  3. Throw cube no matter, till you get 256 bits.
  4. enter the personal key within the code under.
  5. it is best to get your bitcoin handle.

Code:

# COMMENTS
import bitcoin 
import binascii
PrivKey1 = 'e8ee7398abbbdc8920f53c8fd454e86eab74beae2a9c42d28bf86402f3d87fcb'
PrivKey1Type = bitcoin.get_privkey_format(PrivKey1)
print("Non-public Key sorts")
G = bitcoin.encode_privkey(PrivKey1, 'hex',0)
print("Kind: hex", G)
G = bitcoin.encode_privkey(PrivKey1, 'hex_compressed',0)
print("Kind: hex_compressed",G)
G = bitcoin.encode_privkey(PrivKey1, 'wif',0)
print("Kind: wif",G)
G = bitcoin.encode_privkey(PrivKey1, 'wif_compressed',0)
print("Kind: wif_compressed",G)    
PubKey1  = bitcoin.privkey_to_pubkey(PrivKey1)
PubKey1type = bitcoin.get_pubkey_format(PubKey1)
H1 = bitcoin.encode_pubkey(PubKey1, 'bin')
print("Public Key")
print("Bin format", H1)
H2 = bitcoin.encode_pubkey(PubKey1, 'bin_compressed')
print("Bin Compressed format", H2)
H3 = bitcoin.encode_pubkey(PubKey1, 'hex')
print("hex format", H3)
H4 = bitcoin.encode_pubkey(PubKey1, 'hex_compressed')
print("Hex Compressed format", H4)
K1 = bitcoin.decode_pubkey(H4)
print("decoded format", K1)
Hash1 = bitcoin.bin_hash160((H1))
print("PubKey Hash from Uncompressed PubKey", binascii.b2a_hex(Hash1))
Hash2 = bitcoin.bin_hash160((H2))
print("PubKey Hash from compressed PubKey", binascii.b2a_hex(Hash2))
BTCaddress = bitcoin.pubkey_to_address(PubKey1, 0)
print("Bitcoin Tackle", BTCaddress)

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles