Python private key bitcoin

Saved searches

Use saved searches to filter your results more quickly

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.

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

License

Blockthon/Blockthon

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Sign In Required

Please sign in to use Codespaces.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching Xcode

If nothing happens, download Xcode and try again.

Launching Visual Studio Code

Your codespace will open once ready.

There was a problem preparing your codespace, please try again.

Latest commit

Git stats

Files

Failed to load latest commit information.

README.md

Blockthon - Python Package Generated Private Key Mnemonic Wallet

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

if 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-dev
git clone https://github.com/Blockthon/Blockthon cd Blockthon make

generated 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)

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

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

Mnemonic To Root Key (XPRV)

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)

Passphrase To Private Key

convert word passphrase to private key (hex)

from Blockthon import Wallet passphrase = 'Mmdrza.Com' privatekey = Wallet.Passphrase_To_PrivateKey(passphrase)
from Blockthon import Wallet passphrase = 'Mmdrza.Com' wif = Wallet.Passphrase_To_Wif(passphrase)
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>  """)

Programmer & Owner : Mmdrza.Com

Bitcoin (BTC): 1MMDRZA19y8RmmEEqjv6w7tLFDK2uHh5qD

Ethereum & USDT (ERC20): 0x348e3C3b17784AafD7dB67d011b85F838F16E2D1

USDT & TRON (TRC20): TR4mA5quGVHGYS186HKDuArbD8SVssiZVx

Litecoin (LTC): ltc1qtgvxc6na9pxvznu05yys3j5rq9ej6kahe2j50v

About

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

Источник

Читайте также:  Franck olivier sun java rose oud
Оцените статью