Trezor-crypto python binding
Project description
This is the ctypes and cffi python binding for trezor-crypto used in Monero implementation.
The python module builds trezor-crypto as a shared library. Currently only ctypes is fully supported. CFFI module is built but the python method wrappers are not implemented yet (no the roadmap).
The module automatically generates the bindings from the trezor-crypto header files using ctypeslib2 and pycparser.
Note the forked version of the original trezor-crypto is used in order to support library mode (for now).
Requirements:
gcc / clang
pkg-config
libsodium
In order to use this module please install libsodium.
sudo apt-get install libsodium-dev
Pypi
pip install py_trezor_crypto_ph4
Dev Requirements:
In order to generate bindings from the trezor-crypto header files the following tools are needed:
clang
ctypeslib2
pycparser
libclang.so / libclang.dylib
Roadmap
Code generate CFFI wrappers in the similar manner as ctype wrappers.
Refresh Ctype bindings
In order to refresh method definitions and regenerate ctype wrappers from trezor-crypto header files run
python trezor_crypto/cffi_build.py -a ctypes --debug
Refresh CFFI bindings
In order to refresh data/cffi.h from trezor-crypto header files run:
python trezor_crypto/cffi_build.py -a cffi_h --debug
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file py_trezor_crypto_ph4-0.1.1.tar.gz
.
File metadata
- Download URL: py_trezor_crypto_ph4-0.1.1.tar.gz
- Upload date:
- Size: 3.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c523afd73949ac083bb7c5ef67416f0a971edc1921f4046a8cd40f87e43133ff |
|
MD5 | db82f4a30bf883a233dc0f0312768f8e |
|
BLAKE2b-256 | 3886a4bc56272dbb5ac2d3e880785d1858a895208dbe9e874aefb6f65f694975 |
File details
Details for the file py_trezor_crypto_ph4-0.1.1-cp36-cp36m-macosx_10_12_x86_64.whl
.
File metadata
- Download URL: py_trezor_crypto_ph4-0.1.1-cp36-cp36m-macosx_10_12_x86_64.whl
- Upload date:
- Size: 594.5 kB
- Tags: CPython 3.6m, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 525b10f58e6190714c1bd5c984f01302f8d03b74deee7c1a3f925429da3d9598 |
|
MD5 | 6e944388d8409a256022de61a9933963 |
|
BLAKE2b-256 | 3313e4dae402482cdd1607450dd737a47c40c54792a47af0538553de3d3c6f12 |