44 lines
1.3 KiB
Go
44 lines
1.3 KiB
Go
// Copyright © 2017 Ethan Frey
|
|
//
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
// you may not use this file except in compliance with the License.
|
|
// You may obtain a copy of the License at
|
|
//
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
//
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
// See the License for the specific language governing permissions and
|
|
// limitations under the License.
|
|
|
|
package keys
|
|
|
|
import (
|
|
"github.com/cosmos/cosmos-sdk/client"
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
// 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.
|
|
|
|
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(
|
|
addKeyCommand(),
|
|
listKeysCmd,
|
|
showKeysCmd,
|
|
client.LineBreak,
|
|
deleteKeyCommand(),
|
|
updateKeyCommand(),
|
|
)
|
|
return cmd
|
|
}
|