Last active
January 14, 2018 23:52
-
-
Save therocco/3353ac056688ab3e0e7e94f7d7f6dc34 to your computer and use it in GitHub Desktop.
Ufocoin invalid WIF to valid WIF
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# In the summer of 2017 the Ufocoin paper wallet | |
# generator located at www.ufocoin.it was generating | |
# invalid WIF (wallet import format) keys. The following | |
# scripts converts those invalid keys to valid keys. | |
# | |
# Install pybitcoin as follows: | |
# pip2 install pybitcoin | |
class UfocoinPrivateKey(BitcoinPrivateKey): | |
_pubkeyhash_version_byte = 27 | |
private_key_WIF = input("WIF: ") | |
private_key_ufo = UfocoinPrivateKey(private_key_WIF) | |
print(private_key_ufo.to_hex()) | |
print(private_key_ufo.to_wif()) | |
print(private_key_ufo.public_key().address()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment