diff --git a/examples/basecoin/cmd/basecli/client.go b/examples/basecoin/cmd/basecli/client.go index 682a571e6..484ac73f7 100644 --- a/examples/basecoin/cmd/basecli/client.go +++ b/examples/basecoin/cmd/basecli/client.go @@ -60,7 +60,6 @@ func GetCommands(cmds ...*cobra.Command) []*cobra.Command { func PostCommands(cmds ...*cobra.Command) []*cobra.Command { for _, c := range cmds { c.Flags().String(flagName, "", "Name of private key with which to sign") - c.Flags().String(flagPassword, "", "Password to use the named private key") } return cmds } diff --git a/examples/basecoin/cmd/basecli/key.go b/examples/basecoin/cmd/basecli/key.go deleted file mode 100644 index b3ffa323a..000000000 --- a/examples/basecoin/cmd/basecli/key.go +++ /dev/null @@ -1,77 +0,0 @@ -package main - -import "github.com/spf13/cobra" - -const ( - flagPassword = "password" - flagNewPassword = "new-password" - flagType = "type" - flagSeed = "seed" - flagDryRun = "dry-run" -) - -var ( - listKeysCmd = &cobra.Command{ - Use: "list", - Short: "List all locally availably keys", - RunE: todoNotImplemented, - } - - showKeysCmd = &cobra.Command{ - Use: "show ", - Short: "Show key info for the given name", - RunE: todoNotImplemented, - } -) - -// KeyCommands registers a sub-tree of commands to interact with -// local private key storage. -func KeyCommands() *cobra.Command { - cmd := &cobra.Command{ - Use: "keys", - Short: "Add or view local private keys", - } - cmd.AddCommand( - addKeyCommand(), - listKeysCmd, - showKeysCmd, - lineBreak, - deleteKeyCommand(), - updateKeyCommand(), - ) - return cmd -} - -func addKeyCommand() *cobra.Command { - cmd := &cobra.Command{ - Use: "add ", - Short: "Create a new key, or import from seed", - RunE: todoNotImplemented, - } - cmd.Flags().StringP(flagPassword, "p", "", "Password to encrypt private key") - cmd.Flags().StringP(flagType, "t", "ed25519", "Type of private key (ed25519|secp256k1|ledger)") - cmd.Flags().StringP(flagSeed, "s", "", "Provide seed phrase to recover existing key instead of creating") - cmd.Flags().Bool(flagDryRun, false, "Perform action, but don't add key to local keystore") - return cmd -} - -func updateKeyCommand() *cobra.Command { - cmd := &cobra.Command{ - Use: "update ", - Short: "Change the password used to protect private key", - RunE: todoNotImplemented, - } - cmd.Flags().StringP(flagPassword, "p", "", "Current password to decrypt key") - cmd.Flags().String(flagNewPassword, "", "New password to use to protect key") - return cmd -} - -func deleteKeyCommand() *cobra.Command { - cmd := &cobra.Command{ - Use: "delete ", - Short: "Delete the given key", - RunE: todoNotImplemented, - } - cmd.Flags().StringP(flagPassword, "p", "", "Password of existing key to delete") - return cmd -}