fix gaia keys doc
This commit is contained in:
parent
5e473f30d7
commit
515ad58dfb
|
@ -2,15 +2,13 @@ Key Management
|
||||||
==============
|
==============
|
||||||
|
|
||||||
Here we explain a bit how to work with your keys, using the
|
Here we explain a bit how to work with your keys, using the
|
||||||
``basecli keys`` subcommand. Note that because ``basecli`` is
|
``gaia client keys`` subcommand.
|
||||||
an implementation of the Cosmmos SDK, other implementations, such
|
|
||||||
as ``gaia`` will have a compatible set of tooling.
|
|
||||||
|
|
||||||
**Note:** This keys tooling is not considered production ready and is
|
**Note:** This keys tooling is not considered production ready and is
|
||||||
for dev only.
|
for dev only.
|
||||||
|
|
||||||
We'll look at what you can do using the six sub-commands of
|
We'll look at what you can do using the six sub-commands of
|
||||||
``basecli keys``:
|
``gaia client keys``:
|
||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
|
@ -24,14 +22,14 @@ We'll look at what you can do using the six sub-commands of
|
||||||
Create keys
|
Create keys
|
||||||
-----------
|
-----------
|
||||||
|
|
||||||
``basecli keys new`` has two inputs (name, password) and two outputs
|
``gaia client keys new`` has two inputs (name, password) and two outputs
|
||||||
(address, seed).
|
(address, seed).
|
||||||
|
|
||||||
First, we name our key:
|
First, we name our key:
|
||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
basecli keys new alice
|
gaia client keys new alice
|
||||||
|
|
||||||
This will prompt (10 character minimum) password entry which must be
|
This will prompt (10 character minimum) password entry which must be
|
||||||
re-typed. You'll see:
|
re-typed. You'll see:
|
||||||
|
@ -73,13 +71,13 @@ command, e.g.:
|
||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
echo 1234567890 | basecli keys new fred --output json
|
echo 1234567890 | gaia client keys new fred --output json
|
||||||
|
|
||||||
After trying each of the three ways to create a key, look at them, use:
|
After trying each of the three ways to create a key, look at them, use:
|
||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
basecli keys list
|
gaia client keys list
|
||||||
|
|
||||||
to list all the keys:
|
to list all the keys:
|
||||||
|
|
||||||
|
@ -127,18 +125,18 @@ If we want information about one specific key, then:
|
||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
basecli keys get charlie --output json
|
gaia client keys get charlie --output json
|
||||||
|
|
||||||
will, for example, return the info for only the "charlie" key returned
|
will, for example, return the info for only the "charlie" key returned
|
||||||
from the previous ``basecoin keys list`` command.
|
from the previous ``gaia client keys list`` command.
|
||||||
|
|
||||||
The keys tooling can support different types of keys with a flag:
|
The keys tooling can support different types of keys with a flag:
|
||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
basecli keys new bit --type secp256k1
|
gaia client keys new bit --type secp256k1
|
||||||
|
|
||||||
and you'll see the difference in the ``"type": field from``\ basecli
|
and you'll see the difference in the ``"type": field from``\ gaia client
|
||||||
keys get\`
|
keys get\`
|
||||||
|
|
||||||
Before moving on, let's set an enviroment variable to make
|
Before moving on, let's set an enviroment variable to make
|
||||||
|
@ -160,7 +158,7 @@ First, let's simulate the loss by deleting a key:
|
||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
basecli keys delete alice
|
gaia client keys delete alice
|
||||||
|
|
||||||
which prompts for your current password, now rendered obsolete, and
|
which prompts for your current password, now rendered obsolete, and
|
||||||
gives a warning message. The only way you can recover your key now is
|
gives a warning message. The only way you can recover your key now is
|
||||||
|
@ -169,7 +167,7 @@ it:
|
||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
basecli keys recover alice-again
|
gaia client keys recover alice-again
|
||||||
|
|
||||||
which prompts for a new password then the seed:
|
which prompts for a new password then the seed:
|
||||||
|
|
||||||
|
@ -187,7 +185,7 @@ To change the password of a key, we can:
|
||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
basecli keys update alice-again
|
gaia client keys update alice-again
|
||||||
|
|
||||||
and follow the prompts.
|
and follow the prompts.
|
||||||
|
|
||||||
|
@ -196,11 +194,11 @@ That covers most features of the keys sub command.
|
||||||
.. raw:: html
|
.. raw:: html
|
||||||
|
|
||||||
<!-- use later in a test script, or more advance tutorial?
|
<!-- use later in a test script, or more advance tutorial?
|
||||||
SEED=$(echo 1234567890 | basecli keys new fred -o json | jq .seed | tr -d \")
|
SEED=$(echo 1234567890 | gaia client keys new fred -o json | jq .seed | tr -d \")
|
||||||
echo $SEED
|
echo $SEED
|
||||||
(echo qwertyuiop; echo $SEED stamp) | basecli keys recover oops
|
(echo qwertyuiop; echo $SEED stamp) | gaia client keys recover oops
|
||||||
(echo qwertyuiop; echo $SEED) | basecli keys recover derf
|
(echo qwertyuiop; echo $SEED) | gaia client keys recover derf
|
||||||
basecli keys get fred -o json
|
gaia client keys get fred -o json
|
||||||
basecli keys get derf -o json
|
gaia client keys get derf -o json
|
||||||
```
|
```
|
||||||
-->
|
-->
|
||||||
|
|
Loading…
Reference in New Issue