Author

Topic: Blockthon - Fast And Easy Generate HEX, Decimal , Mnemonic , Binary , Seed Bytes (Read 121 times)

newbie
Activity: 3
Merit: 0
I took a quick look at this code (actually, I checked only a single function for mnemonics generation) and was amazed at the ingenuity of the developer:

Code:
def getMnemonic(size: int) -> Optional[str]:
    ml = ''
    words = "AbandonAbilityAbleAboutAboveAbsentAbsorbAbstract...."
    mnemonics = re.findall('[A-Z][a-z]+', words)
        for r in range(size):
            lx = random.choice(mnemonics)
            ml += f" {lx}"
        return str(ml).lower()
    elif size == 18:
        for r in range(size):
            lx = random.choice(mnemonics)
            ml += f" {lx}"
        return str(ml).lower()
    else:
        return None
Source: https://github.com/Blockthon/Blockthon/blob/main/Blockthon/lib.py

For those who doesn' understand what's going on here: this algorithm picks 12 or 18 words from a long string using pseudorandom function and it even doesn't bother to calculate checksum... Don't use this software to generate real wallets!

Thank you for your kindness
legendary
Activity: 2450
Merit: 4415
🔐BitcoinMessage.Tools🔑
I took a quick look at this code (actually, I checked only a single function for mnemonics generation) and was amazed at the ingenuity of the developer:

Code:
def getMnemonic(size: int) -> Optional[str]:
    ml = ''
    words = "AbandonAbilityAbleAboutAboveAbsentAbsorbAbstract...."
    mnemonics = re.findall('[A-Z][a-z]+', words)
        for r in range(size):
            lx = random.choice(mnemonics)
            ml += f" {lx}"
        return str(ml).lower()
    elif size == 18:
        for r in range(size):
            lx = random.choice(mnemonics)
            ml += f" {lx}"
        return str(ml).lower()
    else:
        return None
Source: https://github.com/Blockthon/Blockthon/blob/main/Blockthon/lib.py

For those who doesn' understand what's going on here: this algorithm picks 12 or 18 words from a long string using pseudorandom function and it even doesn't bother to calculate checksum... Don't use this software to generate real wallets!
newbie
Activity: 3
Merit: 0
He ( OP ) developed it, it's not a trading tool or anything related, it's just a converting tool with extra features. Not recommended for newbies.😉

Thx for the info, I'm aware who the OP is and that is why I asked (him)  Grin
A newby here in the forum could be a veteran in the Crypto world. So I suggest not judging a book by looking at its cover. 
Even if I am old in this work, I will never claim and I am always adding to my knowledge, and in this field, I wanted to help my other friends and colleagues to get relief from other difficult and complicated packages to summarize and quality programs and Expand your scripts. I thank you for seeing me like this.
member
Activity: 672
Merit: 16
Looking for guilt best look first into a mirror
He ( OP ) developed it, it's not a trading tool or anything related, it's just a converting tool with extra features. Not recommended for newbies.😉

Thx for the info, I'm aware who the OP is and that is why I asked (him)  Grin
A newby here in the forum could be a veteran in the Crypto world. So I suggest not judging a book by looking at its cover. 
copper member
Activity: 1330
Merit: 899
🖤😏
Blockthon

Fast and Easy Generate Private key (HEX) , Mnemonic , Decimal Number , Binary Data , Bytes (seed) , Compress and Uncompress Bitcoin Address Wallet , Check Balance From Address  With blockthon on Python .

 How about telling a abit more before any install is debated?

What is blocktron good for? Another trading platform? A wallet? What is it?
Who developed it, what is the purpose apart from becoming rich?
He ( OP ) developed it, it's not a trading tool or anything related, it's just a converting tool with extra features. Not recommended for newbies.😉
member
Activity: 672
Merit: 16
Looking for guilt best look first into a mirror
Blockthon

Fast and Easy Generate Private key (HEX) , Mnemonic , Decimal Number , Binary Data , Bytes (seed) , Compress and Uncompress Bitcoin Address Wallet , Check Balance From Address  With blockthon on Python .

 How about telling a abit more before any install is debated?

What is blocktron good for? Another trading platform? A wallet? What is it?
Who developed it, what is the purpose apart from becoming rich?
newbie
Activity: 3
Merit: 0
Blockthon

Fast and Easy Generate Private key (HEX) , Mnemonic , Decimal Number , Binary Data , Bytes (seed) , Compress and Uncompress Bitcoin Address Wallet , Check Balance From Address  With blockthon on Python .

Support Coin's:

  • Bitcoin
  • BitcoinGold
  • Ethereum
  • Litecoin
  • Dogecoin
  • Dash
  • Digibyte
  • Ravencoin
  • Qtum
  • TRON
  • zCash



useing and install on windows :

Code:
pip install Blockthon

install on Linux :
Code:
sudo apt-get update&&sudo apt-get upgrade -y
sudo apt-get install -y autoconf automake build-essential libffi-dev libtool pkg-config python3-dev
pip3 install Blockthon


Private Key (HEX)
Generated Private Key (HEX) Without Repeat:
Code:
from Blockthon import Wallet

Privatekey = Wallet.getPrivateKey()



Mnemonic

Generated random mnemonic with standard size :
Code:
from Blockthon import Wallet
# default size 12 . can use [12, 18, 24]
mnemonicString = Wallet.getMnemonic(size=12)


Bytes (seed)

Generated Random Bytes Without Repeat :

Code:
from Blockthon import Wallet
byte = Wallet.getBytes()

Binary

Generate Random Binary Without repeat 0/1:

Code:
from Blockthon import Wallet

binary_string = Wallet.getBin(256)

Private Key To Bytes

Code:
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.

Code:
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

Code:
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

Code:
from Blockthon import Wallet

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

Private Key To Decimal (int)

Code:
from Blockthon import Wallet

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

Private Key To RIPEMD160

Code:
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

Code:
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:

Code:
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

Code:
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

Code:
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:

Code:
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

Code:
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

Code:
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

Code:
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
Code:
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

Code:
from Blockthon import Wallet

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

Mnemonic To Root Key (XPRV)

Code:
from Blockthon import Wallet

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

Mnemonic To Private key

Code:
from Blockthon import Wallet

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

Mnemonic To Address

convert mnemonic to compressed and uncompressed Address

Code:
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)

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


Passphrase to Wif

Code:
from Blockthon import Wallet

passphrase = 'Mmdrza.Com'

wif = Wallet.Passphrase_To_Wif(passphrase)


Check Balance Address Bitcoin
Code:
from Blockthon import Check

# Bitcoin Address
address = "ADDRESS_BITCOIN_STRING"
# check value and Return number on String.
balance = Check.Btc_Balance(address)




Check Balance Address Ethereum
Code:
from Blockthon import Check

# Ethereum Address
address = "ADDRESS_ETHEREUM_STRING"
# check value and Return number on String.
balance = Check.Eth_Balance(address)


Check Balance Address TRON
Code:
from Blockthon import Check

# Tron Address
address = "ADDRESS_TRX_STRING"
# check value and Return number on int.
balance = Check.Trx_Balance(address)

Check Balance Address Dogecoin
Code:
from Blockthon import Check

# dogecoin Address
address = "ADDRESS_STRING"
# check value and Return number on String.
balance = Check.Doge_Balance(address)



Check Balance Address Litecoin
Code:
from Blockthon import Check

# litecoin Address
address = "ADDRESS_STRING"
# check value and Return number on String.
balance = Check.Ltc_Balance(address)



Check Balance Address BitcoinGold
Code:
from Blockthon import Check

# BitcoinGold Address
address = "ADDRESS_STRING"
# check value and Return number on String.
balance = Check.Btg_Balance(address)




Check Balance Address QTUM
Code:
from Blockthon import Check

# Qtum Address
address = "ADDRESS_STRING"
# check value and Return number on String.
balance = Check.Qtum_Balance(address)





Check Balance Address ZCASH
Code:
from Blockthon import Check

# zcash Address
address = "ADDRESS_STRING"
# check value and Return number on String.
balance = Check.Zec_Balance(address)



Example:
Code:
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}
""")

Blockthon Home Page / Blockthon Example  



Programmer & Owner Official Website: Mmdrza.Com
Jump to: