Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hermes could accept mnemonics on the command line or via stdin #3625

Closed
5 tasks
hdevalence opened this issue Sep 17, 2023 · 2 comments · Fixed by #3645
Closed
5 tasks

Hermes could accept mnemonics on the command line or via stdin #3625

hdevalence opened this issue Sep 17, 2023 · 2 comments · Fixed by #3645
Assignees
Labels
I: CLI Internal: related to the relayer's CLI
Milestone

Comments

@hdevalence
Copy link
Contributor

Summary / Proposal

The keys add subcommand only accepts a --mnemonic-file argument. This is annoying during development or when making test setups, because it means managing files. It would be more convenient to accept a mnemonic on the command line or via stdin.

Acceptance Criteria

Hermes could add a flag like
hermes keys add --mnemonic "SEED PHRASE" to accept a mnemonic on the command line.


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate milestone (priority) applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@romac
Copy link
Member

romac commented Sep 27, 2023

I'd rather not give users a way to leak their seed phrase (eg. in their shell history or elsewhere) by letting them specify it on the command line, if that makes sense?

You can actually pass the mnemonic via stdin by specifying --mnemonic-file /dev/stdin, eg.

echo "$SEED_PHRASE" | hermes keys add --chain my-chain --mnemonic-file /dev/stdin

I am happy to discuss further and perhaps reconsider my position if the latter does not work for you, let me know!

@romac romac removed this from the v1.7.1 milestone Sep 27, 2023
@hdevalence
Copy link
Contributor Author

Honestly, just mentioning that in the cli docs rendered with --help would be sufficient, I think, it didn't occur to me!

@romac romac added this to the v1.7 milestone Oct 2, 2023
@romac romac self-assigned this Oct 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I: CLI Internal: related to the relayer's CLI
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

4 participants