Private Key (hex) from bytes
first needed install blockthon
:
pip install blockthon
linux :
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
after install from Blockthon.Wallet
import Bytes_To_PrivateKey
, in this example first generated random bytes (seed) and convert to hex private key:
from Blockthon.Wallet import getBytes, Bytes_To_PrivateKey
# generated random bytes without repeat
bytes_str = getBytes()
# convert bytes to hex private key
privatekey = Bytes_To_PrivateKey(bytestring=bytes_str)
Top comments (0)