2018-02-22 07:17:19 -08:00
|
|
|
package keys
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/spf13/cobra"
|
2018-12-10 06:27:25 -08:00
|
|
|
|
2019-05-28 01:44:04 -07:00
|
|
|
"github.com/cosmos/cosmos-sdk/client/flags"
|
2018-02-22 07:17:19 -08:00
|
|
|
)
|
|
|
|
|
2018-02-22 08:20:25 -08:00
|
|
|
// Commands registers a sub-tree of commands to interact with
|
|
|
|
// local private key storage.
|
|
|
|
func Commands() *cobra.Command {
|
|
|
|
cmd := &cobra.Command{
|
|
|
|
Use: "keys",
|
|
|
|
Short: "Add or view local private keys",
|
|
|
|
Long: `Keys allows you to manage your local keystore for tendermint.
|
2018-02-22 07:17:19 -08:00
|
|
|
|
2018-02-22 08:20:25 -08:00
|
|
|
These keys may be in any format supported by go-crypto and can be
|
|
|
|
used by light-clients, full nodes, or any other application that
|
|
|
|
needs to sign with a private key.`,
|
|
|
|
}
|
|
|
|
cmd.AddCommand(
|
2018-10-17 10:37:58 -07:00
|
|
|
mnemonicKeyCommand(),
|
2018-02-22 08:20:25 -08:00
|
|
|
addKeyCommand(),
|
2019-05-30 08:44:28 -07:00
|
|
|
exportKeyCommand(),
|
|
|
|
importKeyCommand(),
|
2019-02-08 12:45:23 -08:00
|
|
|
listKeysCmd(),
|
2018-08-30 21:06:44 -07:00
|
|
|
showKeysCmd(),
|
2019-05-28 01:44:04 -07:00
|
|
|
flags.LineBreak,
|
2018-02-22 08:20:25 -08:00
|
|
|
deleteKeyCommand(),
|
|
|
|
updateKeyCommand(),
|
2019-05-02 06:34:02 -07:00
|
|
|
parseKeyStringCommand(),
|
2019-09-30 08:49:12 -07:00
|
|
|
migrateCommand(),
|
2018-02-22 08:20:25 -08:00
|
|
|
)
|
|
|
|
return cmd
|
2018-02-22 07:17:19 -08:00
|
|
|
}
|