Support loading mnemonic + HD path as encrypted keystore
GopherJ opened this issue · 3 comments
GopherJ commented
Component
Cast
Describe the feature you would like
Currently cast only support generating random keypair, it'll be great to support creating encrypted keystore using existing mnemonic + HD path.
Metamask didn't support exporting as encrypted json. That's why I'm seeking tools to export without re-inventing wheels
Additional context
No response
PatrickAlphaC commented
An API like:
cast wallet import <NAME> <KEY>
Which then prompts the user for a password, and ecrypts it locally. Somewhere like:
~/.cast/wallets/<name>_keystore.json
Then, have a command to list stored keystores:
cast wallet list
And, then, when deploying commands with forge or cast, add the option to prompt the user to decrypt their password:
$ forge script script/Deploy.s.sol --rpc-url $RPC_URL --cast-wallet <WALLET_NAME>
enter password to decrypt <WALLET_NAME>
_
Or
$ cast send [TO] [SIG] [ARGS] --cast-wallet <WALLET_NAME>
enter password to decrypt <WALLET_NAME>
_
robbiesumner commented
I believe this feature has been added in #5551. Should this issue be closed?