Improve keyring docs (#5822)
* Update cli.md * Update cli.md * Update docs/interfaces/cli.md Co-Authored-By: Alessio Treglia <alessio@tendermint.com> * Update docs/interfaces/cli.md Co-Authored-By: Alessio Treglia <alessio@tendermint.com> * replace cli modifications with keyring md * update pasword to keypasswd Co-authored-by: Alessio Treglia <alessio@tendermint.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
parent
43627d0d1c
commit
2be38d0304
@ -62,8 +62,7 @@ The root command (called `rootCmd`) is what the user first types into the comman
|
||||
* **Status** command from the SDK rpc client tools, which prints information about the status of the connected [`Node`](../core/node.md). The Status of a node includes `NodeInfo`,`SyncInfo` and `ValidatorInfo`.
|
||||
* **Config** [command](https://github.com/cosmos/cosmos-sdk/blob/master/client/config.go) from the SDK client tools, which allows the user to edit a `config.toml` file that sets values for [flags](#flags) such as `--chain-id` and which `--node` they wish to connect to.
|
||||
The `config` command can be invoked by typing `appcli config` with optional arguments `<key> [value]` and a `--get` flag to query configurations or `--home` flag to create a new configuration.
|
||||
* **Keys** [commands](https://github.com/cosmos/cosmos-sdk/blob/master/client/keys) from the SDK client tools, which includes a collection of subcommands for using the key functions in the SDK crypto tools, including adding a new key and saving it to disk, listing all public keys stored in the key manager, and deleting a key.
|
||||
For example, users can type `appcli keys add <name>` to add a new key and save an encrypted copy to disk, using the flag `--recover` to recover a private key from a seed phrase or the flag `--multisig` to group multiple keys together to create a multisig key. For full details on the `add` key command, see the code [here](https://github.com/cosmos/cosmos-sdk/blob/master/client/keys/add.go).
|
||||
* **Keys** [commands](https://github.com/cosmos/cosmos-sdk/blob/master/client/keys) from the SDK client tools, which includes a collection of subcommands for using the key functions in the SDK crypto tools, including adding a new key and saving it to disk, listing all public keys stored in the key manager, and deleting a key. For example, users can type `appcli keys add <name>` to add a new key and save an encrypted copy to disk, using the flag `--recover` to recover a private key from a seed phrase or the flag `--multisig` to group multiple keys together to create a multisig key. For full details on the `add` key command, see the code [here](https://github.com/cosmos/cosmos-sdk/blob/master/client/keys/add.go). For more details about usage of `--keyring-backend` for storage of key credentials look at the [keyring docs](/keyring.md).
|
||||
* [**Transaction**](#transaction-commands) commands.
|
||||
* [**Query**](#query-commands) commands.
|
||||
|
||||
@ -135,4 +134,3 @@ Here is an example of an `initConfig()` function from the [nameservice tutorial
|
||||
And an example of how to add `initConfig` as a `PersistentPreRunE` to the root command:
|
||||
|
||||
+++ https://github.com/cosmos/sdk-tutorials/blob/86a27321cf89cc637581762e953d0c07f8c78ece/nameservice/cmd/nscli/main.go#L42-L44
|
||||
|
||||
|
||||
@ -44,9 +44,10 @@ to execute commands using the `file` option you may want to utilize the followin
|
||||
for multiple prompts:
|
||||
|
||||
```sh
|
||||
$ gaiacli config keyring-backend file # use file backend
|
||||
$ (echo '1234567890'; echo '1234567890') | gaiacli keys add me # add the key 'me'
|
||||
$ (echo '1234567890'; echo '1234567890'; echo '1234567890') | gaiad collect-gentxs # multiple prompts
|
||||
# assuming that KEYPASSWD is set in the environment
|
||||
$ gaiacli config keyring-backend file # use file backend
|
||||
$ (echo $KEYPASSWD; echo $KEYPASSWD) | gaiacli keys add me # multiple prompts
|
||||
$ echo $KEYPASSWD | gaiacli keys show me # single prompt
|
||||
```
|
||||
|
||||
::: tip
|
||||
|
||||
Loading…
Reference in New Issue
Block a user