Installation | Example | Donate | Contact
Blockthon Python Package for Generate and Converting Wallet Private Key and Mnemonic for Address Bitcoin
# on windows
pip install Blockthon
# on Linux
pip3 install Blockthonif problem on installing on linux / debian :
sudo apt-get update&&sudo apt-get upgrade -y
sudo apt-get install -y autoconf automake build-essential libffi-dev libtool pkg-config python3-devor for download manual:
git clone https://github.com/AnonyPy/Blockthon
cd Blockthon
makegenerated random private key without repeat :
from Blockthon import Wallet
Privatekey = Wallet.getPrivateKey()Generated random mnemonic with standard size :
from Blockthon import Wallet
# default size 12 . can use [12, 18, 24]
mnemonicString = Wallet.getMnemonic(size=12)Generated Random Bytes Without Repeat :
from Blockthon import Wallet
byte = Wallet.getBytes()Generate Random Binary Without repeat 0/1:
from Blockthon import Wallet
binary_string = Wallet.getBin(256)from Blockthon import Wallet
privatekey = Wallet.getPrivateKey()
# Convert Private Key HEX To Bytes SEED
byte = Wallet.PrivateKey_To_Bytes(privatekey)generated private key (hex) and convert to wif compressed and uncompressed.
from Blockthon import Wallet
privatekey = Wallet.getPrivateKey()
# Convert Private key Hex To Wif
# wif compressed
wif_compress = Wallet.PrivateKey_To_Wif(privatekey, compress=True)
# wif Uncompressed
wif_uncompress = Wallet.PrivateKey_To_Wif(privatekey, compress=False)from Blockthon import Wallet
privatekey = Wallet.getPrivateKey()
# convert private key [hex] To mnemonic
mnemonic_string = Wallet.PrivateKey_To_Mnemonics(privatekey, size=12)
# for size mnemonic can use [12, 18, 24]from Blockthon import Wallet
privatekey = Wallet.getPrivateKey()
# convert hex to bin
binary_string = Wallet.PrivateKey_To_Binary(privatekey)from Blockthon import Wallet
privatekey = Wallet.getPrivateKey()
# convert private key hex to number (dec)
dec = Wallet.PrivateKey_To_Dec(privatekey)from Blockthon import Wallet
privatekey = Wallet.getPrivateKey()
# convert private key to ripemd160 (hash160)
ripemd160 = Wallet.PrivateKey_To_RIPEMD160(privatekey)convert private key Hex to Compress and Uncompress Address
from Blockthon import Wallet
privatekey = Wallet.getPrivateKey()
# convert private key to compress address
compress_Address = Wallet.PrivateKey_To_Address(privatekey, compress=True)
# convert to uncompress address
uncompress_Address = Wallet.PrivateKey_To_Address(privatekey, compress=False)generated private key and convert to public key compress and uncompress:
from Blockthon import Wallet
privatekey = Wallet.getPrivateKey()
# convert to public key uncompress
public_uncompress = Wallet.PrivateKey_To_PublicKey(privatekey)
# convert private key hex to public key compress
public_compress = Wallet.PrivateKey_To_PublicKey(privatekey, compress=True)from Blockthon import Wallet
byte = Wallet.getBytes()
# convert bytes to hex (private key)
privatekey = Wallet.Bytes_To_PrivateKey(byte)convert bytes to mnemonic with default size=12
can use standard sizr: 12, 18, 24
from Blockthon import Wallet
byte = Wallet.getBytes()
# Convert bytes to mnemonic with default size 12
mnemonic_words = Wallet.Bytes_To_Mnemonic(byte, 12)convert bytes To wif Compress and uncompress:
from Blockthon import Wallet
byte = Wallet.getBytes()
# compress wif
wif_compress = Wallet.Bytes_To_Wif(byte, compress=True)
#uncompress Wif
wif_uncompress = Wallet.Bytes_To_Wif(byte, compress=False)convert bytes to public key compress and uncompress
from Blockthon import Wallet
byte = Wallet.getBytes()
# compress Publickey
Pub_compress = Wallet.Bytes_To_PublicKey(byte, compress=True)
#uncompress Wif
Pub_uncompress = Wallet.Bytes_To_PublicKey(byte, compress=False)convert bytes to decimal number
from Blockthon import Wallet
byte = Wallet.getBytes()
#convert to integer
dec = Wallet.Bytes_To_Dec(byte)convert wif to public key compress and uncompress
from Blockthon import Wallet
wif = "WIF_STRING_HERE"
pub_compress = Wallet.Wif_To_PublicKey(wif, compress=True)
pub_uncompress = Wallet.Wif_To_PublicKey(wif)convert Wif To Mnemonic With Default size=12, Can use Standard Size 12, 18, 24
from Blockthon import Wallet
wif = "WIF_STRING_HERE"
mnemonic_string = Wallet.Wif_To_Mnemonic(wif, 12)convert wif to RIPEMD160 return hex string
from Blockthon import Wallet
wif = "WIF_STRING_HERE"
RIPEMD160 = Wallet.Wif_To_RIPEMD160(wif)from Blockthon import Wallet
mnemonic_string = Wallet.getMnemonic(12)
xprv = Wallet.Mnemonic_To_RootKey(mnemonic_string)from Blockthon import Wallet
mnemonic_string = Wallet.getMnemonic(12)
pivatekey = Wallet.Mnemonic_To_PrivateKey()convert mnemonic to compressed and uncompressed Address
from Blockthon import Wallet
mnemonic_string = Wallet.getMnemonic(12)
# compress Address
compress_Address = Wallet.Mnemonic_To_Address(mnemonic_string, True)
# uncompress Address
uncompress_Address = Wallet.Mnemonic_To_Address(mnemonic_stringm False)convert word passphrase to private key (hex)
from Blockthon import Wallet
passphrase = 'AnonyPy'
privatekey = Wallet.Passphrase_To_PrivateKey(passphrase)from Blockthon import Wallet
passphrase = 'AnonyPy'
wif = Wallet.Passphrase_To_Wif(passphrase)Example:
from Blockthon import Wallet, Ethereum, Tron, Dogecoin, Bitcoin, Litecoin, Dash, Digibyte, BitcoinGold, Ravencoin, Qtum, zCash
seed = Wallet.getSeed()
privatekey = Wallet.Bytes_To_PrivateKey(seed)
mnemonics = Wallet.Bytes_To_Mnemonic(seed, 12)
wif_compress = Wallet.Bytes_To_Wif(seed, compress=True)
wif_uncompress = Wallet.Bytes_To_Wif(seed, compress=False)
dec = Wallet.Bytes_To_Dec(seed)
xprv = Wallet.Mnemonic_To_RootKey(mnemonics)
publickey = Wallet.Bytes_To_PublicKey(seed)
ripemd160 = Wallet.Bytes_To_RIPEMD160(seed)
compressAddress = Wallet.Bytes_To_Address(seed, compress=True)
uncompressAddress = Wallet.Bytes_To_Address(seed, compress=False)
p2pkhAddress = Bitcoin.Address_From_PrivateKey(privatekey, Type='P2PKH')
p2shAddress = Bitcoin.Address_From_PrivateKey(privatekey, Type='P2SH')
p2wpkhAddress = Bitcoin.Address_From_PrivateKey(privatekey, Type='P2WPKH')
p2wshAddress = Bitcoin.Address_From_PrivateKey(privatekey, Type='P2WSH')
p2wpkhSegwit = Bitcoin.Address_From_PrivateKey(privatekey, Type='P2WPKHinP2SH')
p2wshSegwit = Bitcoin.Address_From_PrivateKey(privatekey, Type='P2WSHinP2SH')
p2pkh_ltc = Litecoin.Address_From_PrivateKey(privatekey, 'P2PKH')
p2sh_ltc = Litecoin.Address_From_PrivateKey(privatekey, 'P2SH')
p2wpkh_ltc = Litecoin.Address_From_PrivateKey(privatekey, 'P2WPKH')
p2wsh_ltc = Litecoin.Address_From_PrivateKey(privatekey, 'P2WSH')
ethereumAddress = Ethereum.Address_From_PrivateKey(privatekey)
tronAddress = Tron.Address_From_PrivateKey(privatekey)
dogeAddress = Dogecoin.Address_From_PrivateKey(privatekey)
dashAddress = Dash.Address_From_PrivateKey(privatekey)
digibyteAddress = Digibyte.Address_From_PrivateKey(privatekey)
RVNAddress = Ravencoin.Address_From_PrivateKey(privatekey)
QtumAddress = Qtum.Address_From_PrivateKey(privatekey)
zcashAddress = zCash.Address_From_PrivateKey(privatekey)
print(f"""
Seed : {seed}
PrivateKey [Hex]: {privatekey}
Mnemonic: {mnemonics}
Wif Compressed: {wif_compress}
Wif UnCompressed: {wif_uncompress}
Decimal: {dec}
RIPEMD160: {ripemd160}
{'-' * 22} Address's {'-' * 22}
Compressed Address: {compressAddress}
UnCompressed Address: {uncompressAddress}
Bitcoin P2PKH: {p2pkhAddress}
Bitcoin P2SH: {p2shAddress}
Bitcoin P2WPKH: {p2wpkhAddress}
Bitcoin P2WSH: {p2wshAddress}
Bitcoin P2WPKH in Segwit: {p2wpkhSegwit}
Bitcoin P2WSH in Segwit: {p2wshSegwit}
Litecoin P2PKH: {p2pkh_ltc}
Litecoin P2SH: {p2sh_ltc}
Litecoin P2WSH: {p2wsh_ltc}
Litecoin P2WPKH: {p2wpkh_ltc}
Ethereum: {ethereumAddress}
Tron: {tronAddress}
Dogecoin: {dogeAddress}
DASH: {dashAddress}
DigiByte: {digibyteAddress}
Ravencoin: {RVNAddress}
QTUM: {QtumAddress}
zCASH: {zcashAddress}
""")Developer : AnonyPy
Email : [email protected]
Github: AnonyPy/Blockthon
Bitcoin (BTC): bc1q4v3wq49qng4wahe4afkjnv94heceh4scnyncdv
Ethereum & USDT (ERC20): 0x766f2433c87DF44BDE684A7b925FA28776A2852F
USDT & TRON (TRC20): TSxGwKgrpH4UAm1aeynu9yhYcL3bbd18QE
Litecoin (LTC): ltc1qwewup459r04n5r6mvfksp2s8jq4e4kjf82tjth