Summary
Adding a key via a pubkey requires the user to know internal details of how a key is specified.
Problem Definition
Currently, a pubkey is specified with:
gaiad keys add [name] --pubkey "{\"@type\":\"/cosmos.crypto.secp256k1.PubKey\",\"key\":\"AtObiFVE4s+9+RX5...\"}"
A user shouldn't have to read code and tests in order to figure this out (like I had to do) and manually enter escaped JSON into the command line.
Proposal
- Take in a bech32 pubkey by default, just as a string (like before)
- 99% of chains use secp256k1, so specifying the algo every single time doesn't make sense. It's safe to assume secp256k1 is the default.
- Use the
--algo option for exceptions, and if it exists assume the pubkey is raw. Do the heavy lifting in code. Don't make the user do it.
For Admin Use
Summary
Adding a key via a pubkey requires the user to know internal details of how a key is specified.
Problem Definition
Currently, a pubkey is specified with:
A user shouldn't have to read code and tests in order to figure this out (like I had to do) and manually enter escaped JSON into the command line.
Proposal
--algooption for exceptions, and if it exists assume the pubkey is raw. Do the heavy lifting in code. Don't make the user do it.For Admin Use