-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
feat(cast): wallet keystore decrypting #7893
feat(cast): wallet keystore decrypting #7893
Conversation
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.
supportive, could we can a casttest! for this as well?
ideally run both commands in sequence
2cba6a3
to
0a65341
Compare
Fixing clippy failing... |
0a65341
to
f4ef8ec
Compare
Ready for review @mattsse |
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.
lgtm, pending doc nit
Fixed @Evalir |
Motivation
After integrating
cast wallet import
and using it for a while, some users might want to get the private key for an account back through decryption of the keystone, so we're just making it easy for them in the same cli they created the keystore.Solution
Added an extra command
DecryptKeystore
to theWalletSubcommands
enum, alongside the implementation where we verify the file exists, prompt for the password (they can also send it in clear text from the cli call if they wish to), decrypt the keystore to instantiate aLocalWallet
and then make it an alloyB256
so it formats properly in the print.