Skip to main content

Blockthon: Fast and easy generation of Private Keys and Mnemonics, converting Seed, Binary, and Decimal.

Project description

Blockthon

Blockthon Python Package for Generate and Converting Wallet Private Key and Mnemonic for Address Bitcoin

# on windows
pip install Blockthon

# on Linux
pip3 install Blockthon

or for download manual:

git clone https://github.com/Blockthon/Blockthon
cd Blockthon
make

Private Key

generated random private key without repeat :

from Blockthon import Wallet

Privatekey = Wallet.getPrivateKey()

Mnemonic

Generated random mnemonic with standard size :

from Blockthon import Wallet
# default size 12 . can use [12, 18, 24]
mnemonicString = Wallet.getMnemonic(size=12)

Bytes (seed)

Generated Random Bytes Without Repeat :

from Blockthon import Wallet
byte = Wallet.getBytes()

Binary

Generate Random Binary Without repeat 0/1:

from Blockthon import Wallet

binary_string = Wallet.getBin(256)

Private Key To Bytes

from Blockthon import Wallet

privatekey = Wallet.getPrivateKey()
# Convert Private Key HEX To Bytes SEED
byte = Wallet.PrivateKey_To_Bytes(privatekey)

Private Key To Wif

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)

Private Key To Mnemonic

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]

Private Key To Binary

from Blockthon import Wallet

privatekey = Wallet.getPrivateKey()
# convert hex to bin
binary_string = Wallet.PrivateKey_To_Binary(privatekey)

Private Key To Decimal (int)

from Blockthon import Wallet

privatekey = Wallet.getPrivateKey()
# convert private key hex to number (dec)
dec = Wallet.PrivateKey_To_Dec(privatekey)

Private Key To RIPEMD160

from Blockthon import Wallet

privatekey = Wallet.getPrivateKey()
# convert private key to ripemd160 (hash160)
ripemd160 = Wallet.PrivateKey_To_RIPEMD160(privatekey)

Private Key To Address

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)

Private Key To Public Key

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)

Bytes To Private Key

from Blockthon import Wallet

byte = Wallet.getBytes()
# convert bytes to hex (private key)
privatekey = Wallet.Bytes_To_PrivateKey(byte)

Bytes To mnemonic

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)

Bytes To Wif

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)

Bytes To Public Key

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)

Bytes to Dec (number)

convert bytes to decimal number

from Blockthon import Wallet

byte = Wallet.getBytes()
#convert to integer 
dec = Wallet.Bytes_To_Dec(byte)

Wif To Public Key

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)

Wif To Mnemonic

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)

Wif To RIPEMD160

convert wif to RIPEMD160 return hex string

from Blockthon import Wallet

wif = "WIF_STRING_HERE"
RIPEMD160 = Wallet.Wif_To_RIPEMD160(wif)

Mnemonic To Root Key (XPRV)

from Blockthon import Wallet

mnemonic_string = Wallet.getMnemonic(12)
xprv = Wallet.Mnemonic_To_RootKey(mnemonic_string)

Mnemonic To Private key

from Blockthon import Wallet

mnemonic_string = Wallet.getMnemonic(12)
pivatekey = Wallet.Mnemonic_To_PrivateKey()

Mnemonic To Address

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)

Passphrase To Private Key

convert word passphrase to private key (hex)

from Blockthon import Wallet
passphrase = 'Mmdrza.Com'
privatekey = Wallet.Passphrase_To_PrivateKey(passphrase)

Passphrase to Wif

from Blockthon import Wallet

passphrase = 'Mmdrza.Com'

wif = Wallet.Passphrase_To_Wif(passphrase)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Blockthon-4.9.6.tar.gz (16.7 kB view hashes)

Uploaded Source

Built Distribution

Blockthon-4.9.6-py3-none-any.whl (19.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page