-
Notifications
You must be signed in to change notification settings - Fork 479
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
goal: added "wallet new -n" non-interactive wallet creation #6160
base: master
Are you sure you want to change the base?
goal: added "wallet new -n" non-interactive wallet creation #6160
Conversation
I don't quite understand what this is doing, so I assume users will be in the same boat. Does it create a account that can be used without a password? Or with the empty password? Is there a distinction between those two things? Or perhaps it creates an account that kmd can't use, and the seed phrase must be used to recover it? (a few minutes pass) Having read some kmd source code, I think it makes an unencrypted wallet. I think the argument and the help text should be directed at telling the user that, rather than simply saying "skip password". Something like |
@@ -134,7 +142,7 @@ var newWalletCmd = &cobra.Command{ | |||
} | |||
reportInfof(infoCreatedWallet, walletName) | |||
|
|||
if !recoverWallet { | |||
if !recoverWallet && !noPassword { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I might make --no-seed
a separate option, assuming you agree with my thought that this should be called --unencrypted
instead of --non-interactive
. I get that you're thinking of the single use case of non-interactive, which ought to imply "no-seed". But if we treat "unencrypted" as the use case, it is separable from "non-interactive".
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6160 +/- ##
==========================================
+ Coverage 55.99% 56.28% +0.29%
==========================================
Files 494 494
Lines 69958 69963 +5
==========================================
+ Hits 39174 39380 +206
+ Misses 28077 27910 -167
+ Partials 2707 2673 -34 ☔ View full report in Codecov by Sentry. |
Correct, the idea is to create a wallet without prompting for password. I agree that Will also split the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree with JJ - use --unencrypted
for suppressing the password prompt only. This should not affect the mnemonic output since a master key used for account key generation and orthogonal to wallet passwords.
Adds this option to
goal wallet new
:Skipping the password prompt is useful in scripted KMD creation.
The password prompt method for
goal wallet new
, which hides the input from the console, doesn't work with piping (unlikegoal account import
, which acceptsecho apple apple apple ... | goal account import
)