--mnemonic flag is required in existing-mnemonic subcommand
When you want to generate keys from existing-mnemonic - command fails if you do not provide --mnemonic flag:
./eth-staking-smith existing-mnemonic --withdrawal_credentials 0x0000000000000000000000000000000000000000 --num_validators 1 --chain mainnet
error: The following required arguments were not provided:
--mnemonic <mnemonic>
USAGE:
eth-staking-smith existing-mnemonic --chain <chain> --mnemonic <mnemonic> --num_validators <num_validators> --withdrawal_credentials <withdrawal_credentials>
However help states that you can omit this flag and you will be prompted on console:
--mnemonic <mnemonic>
The mnemonic that you used to generate your
keys. (It is recommended not to use this
argument, and wait for the CLI to ask you
for your mnemonic as otherwise it will
appear in your shell history.)
Thanks for the report, this will be easy to implement, will do -- mnemonic will be either read from stdin, or asked as an input
@mksh Any updates on the issue?
We removed the inconsistency in the docs and added support for mnemonic as environment variable #60 @ank-everstake
--mnemonic flag is not required any more, we support passing mnemonic as environment variable, which can be used in combination with small shell wrapper like follows
echo "Please enter your mnemonic" ; read -s MNEMONIC ; export MNEMONIC
Please enter your mnemonic
./target/debug/eth-staking-smith existing-mnemonic --chain mainnet --num_validators 1
allows to achieve behavior which was originally described in the docstring. Apologize for initial inconsistency, we have coped docs from the upstream python cli initially.
Full documentation for MNEMONIC environment variable is here:
https://github.com/ChorusOne/eth-staking-smith/tree/v20241030.0?tab=readme-ov-file#passing-mnemonic-as-environment-variable
Using environment variable instead of --mnemonic flag now supported in all commands that accept mnemonic as parameter, i.e.
existing-mnemonicbls-to-execution-changepresigned-exit-messagebatch-presigned-exit-message
https://github.com/ChorusOne/eth-staking-smith/releases/tag/v20241030.0 -- release binaries that support env var are here