This repository contains the code for the KeyUtils library, which is a Python wrapper for the Qubic KeyUtils C++ library.
The Qubic KeyUtils library is a C++ library that provides functions for generating keys and signatures for the Qubic blockchain. It is using fourq for hash algorithm, but unfortunatly it is not implemented in Python. So for the purpose of using Qubic in Python, I implemented binding for the KeyUtils library in Python.
get_subseed_from_seedget_private_key_from_subseedget_public_key_from_private_keyget_identity_from_public_keyget_digest_from_siblings32get_tx_hash_from_digestget_public_key_from_identitycheck_sum_identitysign_with_nonce_ksignverifykangaroo_twelve
- Install Python 3.10 or later
- Install Visual Studio 2022 Community Edition
- Set Environment Variables for
cl.exe - Open a new VS2022 x64 Native Tools Command Prompt and run the following commands
cl /LD /EHsc /I. /FeKeyUtils.dll KeyUtils.cpp- Check the exports of the DLL
dumpbin -exports KeyUtils.dll- Install build essentials
sudo apt install build-essential- Build the DLL
g++ -shared -fPIC -o KeyUtils.so KeyUtils.cpp- Check DLL functions
nm -D libKeyUtils.so- Build
clang++ -shared -o libKeyUtils.dylib KeyUtils.cpp- Check Lib functions
nm -g libKeyUtils.dylib