diff --git a/code/key-to-address-ecc-example.py b/code/key-to-address-ecc-example.py index 441e84da..1ce9389a 100644 --- a/code/key-to-address-ecc-example.py +++ b/code/key-to-address-ecc-example.py @@ -20,8 +20,8 @@ compressed_private_key = private_key + '01' print("Private Key Compressed (hex) is: ", compressed_private_key) # Generate a WIF format from the compressed private key (WIF-compressed) -wif_compressed_private_key = cryptos.encode_privkey( - cryptos.decode_privkey(compressed_private_key, 'hex'), 'wif') +wif_compressed_private_key = bitcoin.encode_privkey( + cryptos.decode_privkey(compressed_private_key, 'hex_compressed'), 'wif_compressed') print("Private Key (WIF-Compressed) is: ", wif_compressed_private_key) # Multiply the EC generator point G with the private key to get a public key point