Support 4 and 3-character abbreviations of mnemonic words, as per BIP-39, for the existing-mnemonic workflow.
When safe-guarding a mnemonic via steel mnemonic store, only the first 4 characters of each word - 3 for words that are only 3 characters long - are stored.
When attempting to use the abbreviations, currently eth2.0-deposit-cli will exit with an error. Mnemonic was double-checked against full version, and the full version was accepted by the tool.
Traceback (most recent call last):
File "/app/eth2deposit/deposit.py", line 28, in <module>
cli()
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 1257, in invoke
sub_ctx = cmd.make_context(cmd_name, args, parent=ctx)
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 700, in make_context
self.parse_args(ctx, args)
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 1048, in parse_args
value, args = param.handle_parse_result(ctx, opts, args)
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 1630, in handle_parse_result
value = invoke_param_callback(self.callback, ctx, self, value)
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 123, in invoke_param_callback
return callback(ctx, param, value)
File "/usr/local/lib/python3.7/site-packages/eth2deposit-1.1.0-py3.7.egg/eth2deposit/cli/existing_mnemonic.py", line 23, in validate_mnemonic
eth2deposit.exceptions.ValidationError: That is not a valid mnemonic, please check for typos.
Enhancement
Support 4 and 3-character abbreviations of mnemonic words, as per BIP-39, for the
existing-mnemonicworkflow.Rationale
When safe-guarding a mnemonic via steel mnemonic store, only the first 4 characters of each word - 3 for words that are only 3 characters long - are stored.
Current behavior
When attempting to use the abbreviations, currently eth2.0-deposit-cli will exit with an error. Mnemonic was double-checked against full version, and the full version was accepted by the tool.