Crates.io | py-bip39-bindings |
lib.rs | py-bip39-bindings |
version | 0.1.6 |
source | src |
created_at | 2020-08-27 12:59:27.89838 |
updated_at | 2020-11-15 13:09:47.935884 |
description | Python bindings for tiny-bip39 RUST crate |
homepage | https://github.com/polkascan/py-bip39-bindings |
repository | https://github.com/polkascan/py-bip39-bindings |
max_upload_size | |
id | 281425 |
size | 23,547 |
Python bindings for the tiny-bip39 library: https://crates.io/crates/tiny-bip39
Reference to Reference to https://github.com/LocalCoinSwap/kusama-reference-implementation/tree/improve-trading-tests/bindings for the initial work
https://docs.rs/py-bip39-bindings/
pip install py-bip39-bindings
pip install -r requirements.txt
maturin develop
pip install -r requirements.txt
# Build local OS wheelhouse
maturin build
# Build manylinux1 wheelhouse
docker build . --tag polkasource/maturin
docker run --rm -i -v $(pwd):/io polkasource/maturin build
import binascii
from bip39 import bip39_to_mini_secret, bip39_generate, bip39_validate
mnemonic = bip39_generate(12)
bip39_validate(mnemonic)
seed_array = bip39_to_mini_secret(mnemonic, "")
seed_hex = binascii.hexlify(bytearray(seed_array)).decode("ascii")
https://github.com/polkascan/py-bip39-bindings/blob/master/LICENSE