Closed Huge closed 3 years ago
you are not supposed to be running cli.py
directly, but through the shamir
command
you are not supposed to be running
cli.py
directly, but through theshamir
command
So just to clarify, when I'm interested to see the secret splitting or combining process step-by-step, the recommended way is like this:
python setup.py develop
pudb3 my_path_to/python-shamir-mnemonic/.venv/bin/shamir create 2of2
?
That seems workable, although the boilerplate the script starts through felt somewhat overwhelming at first.
Presumably, yes. I mean, for your purpose it might be easier to use the main.py
you submitted, but I see no point in including it in the upstream repository.
also bear in mind that a lot of the boilerplate you see comes from Click, which is a library for handling command-line options. You would actually be much better off by writing a simple script that does the steps you want directly, so e.g.:
from shamir_mnemonic import generate_mnemonics
secret = b"my secret"
passphrase = b""
generate_mnemonics(group_threshold=2, groups=[(1,3), (1,1)], master_secret=secret, passphrase=passphrase)
So far, after
git clone
you would not be able to run and debug the source code obtained as relative imports would fail:Including the script adapter for the package like this, cli script runs nice and smoothly.