Python bindings for sr25519 library: https://github.com/w3f/schnorrkel
Reference to https://github.com/LocalCoinSwap/kusama-reference-implementation/tree/improve-trading-tests/bindings and https://gitlab.com/kauriid/schnorrpy/ for the initial work
pip install py-sr25519-bindings
pip install -r requirements.txt
maturin develop
``` pip install -r requirements.txt
maturin build
docker build . --tag polkasource/maturin docker run --rm -i -v $(pwd):/io polkasource/maturin build
```
```python import bip39 import sr25519
message = b"test"
seed = bip39.bip39tomini_secret('daughter song common combine misery cotton audit morning stuff weasel flee field','')
publickey, privatekey = sr25519.pairfromseed(bytes(seed))
signature = sr25519.sign( (publickey, privatekey), message )
print('Signature', signature.hex())
if sr25519.verify(signature, message, public_key): print('Verified') ```
https://github.com/polkascan/py-sr25519-bindings/blob/master/LICENSE