🔐
Blockthon
HomeGithubMmdrza
  • install
  • Private Key
    • Private Key To Address
    • Private Key To Bytes
    • Private Key To Mnemonic
    • Private Key To Binary
    • Private Key To Decimal
    • Private Key To Wif
    • Private Key To xprv
    • Private Key To UnCompress
    • Private Key To Compress
    • Private Key From Passphrase
    • Private Key From Root Key
    • Private Key From Binary
    • Public Key Hash Address
  • Mnemonic
    • Mnemonic To Private Key
    • Mnemonic To Bytes
    • Mnemonic To XPRV (Root Key)
  • Public Key
    • Public Key Hash Address
  • Bytes (seed)
    • Bytes To Mnemonic
    • Bytes To Private Key
    • Bytes To Public Key
    • Bytes To WIF
  • Address
Powered by GitBook
On this page
  1. Private Key

Private Key To Mnemonic

Generated and convert Private Key Hex To Mnemonic Word's

generated private key with blockthon and convert private key (hex) to mnemonic:

PrivateKey_To_Mnemonics(privatekey: str)

from Blockthon.Wallet import PrivateKey_To_Mnemonics, PrivateKey

# Private Key Hex [str]
privatekey = PrivateKey()
# convert Private Key [hex] to Mnemonic string (word's)
mnemonic_Words = PrivateKey_To_Mnemonics(privatekey)

Generated Private Key , Convert To Mnemonic and Create compress & uncompress address bitcoin wallet:

example : generated private key hex convert To mnemonic word's and create compress and uncompress bitcoin address wallet with check value balance per address:

from Blockthon.Wallet import PrivateKey, PrivateKey_To_Mnemonics
from Blockthon.Bitcoin import Balance_BTC, PrivateKey_To_Address

# counter per process
count = 0
# counter total found address with value balance
found = 0
while True:
    count += 1
    # Generated Private Key HEX Without Repeat
    key = PrivateKey()
    # Convert Private Key To Mnemonic String
    mnemonicWords = PrivateKey_To_Mnemonics(key)
    # Convert Private Key To Compress Bitcoin Address
    compressAddr = PrivateKey_To_Address(key, 'compress')
    # Convert Private Key To UnCompress Bitcoin Address
    uncompressAddr = PrivateKey_To_Address(key, 'uncompress')
    # Check Balance Value Compress Address
    balance_compress = Balance_BTC(compressAddr)
    # Check Balance Value UnCompress Address
    balance_uncompress = Balance_BTC(uncompressAddr)
    if balance_uncompress != '0' or balance_compress != '0':
        found += 1
        # if Value Balance per Address > 0 Save All Detail's To Found.txt
        open('Found.txt', 'a').write(f'{compressAddr} - {balance_compress}\n{uncompressAddr} - {balance_compress}\n{key}\n{mnemonicWords}\n')
    else:
        # else , Balance == 0 print detail's 
        print(f"Checked:{count} / Found:{found} # {compressAddr} : {balance_compress}")
        print(f"Checked:{count} / Found:{found} # {uncompressAddr} : {balance_uncompress}")
        print(f"Checked:{count} / Found:{found} # {key}")
        print(f"Checked:{count} / Found:{found} # {mnemonicWords}")
        print(f"{'-' * 70}")
PreviousPrivate Key To BytesNextPrivate Key To Binary

Last updated 1 year ago