Skip to content

Commit

Permalink
Merge pull request #323 from cosmos/gaia-docs
Browse files Browse the repository at this point in the history
fixup gaia docs
  • Loading branch information
zramsay authored Jan 12, 2018
2 parents 5298bfe + 7a8b652 commit c30b49e
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 36 deletions.
2 changes: 1 addition & 1 deletion docs/staking/intro.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ that you've setup or joined a testnet.
Generating Keys
---------------

Review the `key management tutorial <../sdk/key-management.html>`__ and create one key
Review the `key management tutorial <./key-management.html>`__ and create one key
if you'll be joining the public testnet, and three keys if you'll be trying out a local
testnet.

Expand Down
56 changes: 23 additions & 33 deletions docs/sdk/key-management.rst → docs/staking/key-management.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ Key Management
==============

Here we explain a bit how to work with your keys, using the
``basecli keys`` subcommand. Note that because ``basecli`` is
an implementation of the Cosmmos SDK, other implementations, such
as ``gaia`` will have a compatible set of tooling.
``gaia client keys`` subcommand. Note that because ``gaia client`` is
an implementation of the Cosmos SDK, other implementations will have
a compatible set of tooling.

**Note:** This keys tooling is not considered production ready and is
**Warning:** This keys tooling is not considered production ready and is
for dev only.

We'll look at what you can do using the six sub-commands of
``basecli keys``:
``gaia client keys``:

::

Expand All @@ -24,14 +24,14 @@ We'll look at what you can do using the six sub-commands of
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).

First, we name our key:

.. code:: shelldown
basecli keys new alice
gaia client keys new alice
This will prompt (10 character minimum) password entry which must be
re-typed. You'll see:
Expand Down Expand Up @@ -73,21 +73,21 @@ 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:

::

basecli keys list
gaia client keys list

to list all the keys:

::

All keys:
alice 6FEA9C99E2565B44FCC3C539A293A1378CDA7609
bob A159C96AE911F68913E715ED889D211C02EC7D70
bob A159C96AE911F68913E715ED889D211C02EC7D70
charlie 784D623E0C15DE79043C126FA6449B68311339E5

Again, we can use the ``--output json`` flag:
Expand Down Expand Up @@ -127,28 +127,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
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:

::

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
keys get\`

Before moving on, let's set an enviroment variable to make
``--output json`` the default.

Either run or put in your ``~/.bash_profile`` the following line:

::

export BC_OUTPUT=json
and you'll see the difference in the ``"type": field from``

Recover a key
-------------
Expand All @@ -160,7 +150,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
gives a warning message. The only way you can recover your key now is
Expand All @@ -169,7 +159,7 @@ it:

::

basecli keys recover alice-again
gaia client keys recover alice-again

which prompts for a new password then the seed:

Expand All @@ -187,20 +177,20 @@ To change the password of a key, we can:

::

basecli keys update alice-again
gaia client keys update alice-again

and follow the prompts.

That covers most features of the keys sub command.
That covers most features of the ``gaia client keys`` sub command.

.. raw:: html

<!-- 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 qwertyuiop; echo $SEED stamp) | basecli keys recover oops
(echo qwertyuiop; echo $SEED) | basecli keys recover derf
basecli keys get fred -o json
basecli keys get derf -o json
(echo qwertyuiop; echo $SEED stamp) | gaia client keys recover oops
(echo qwertyuiop; echo $SEED) | gaia client keys recover derf
gaia client keys get fred -o json
gaia client keys get derf -o json
```
-->
4 changes: 2 additions & 2 deletions docs/staking/public-testnet.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ other testnets, choose different initialization files, described below.
Get Tokens
----------

If you haven't already `created a key <../sdk/key-management.html>`__,
If you haven't already `created a key <./key-management.html>`__,
do so now. Copy your key's address and enter it into
`this utility <http://www.cosmosvalidators.com/>`__ which will send you
some ``fermion`` testnet tokens.
Expand Down Expand Up @@ -60,5 +60,5 @@ and check our balance:
Where ``$MYADDR`` is the address originally generated by ``gaia keys new bob``.

You are now ready to declare candidacy or delegate some fermions. See the
`staking module overview <./staking-module.html>`__ for more information
`staking module overview <./intro.html>`__ for more information
on using the ``gaia client``.

0 comments on commit c30b49e

Please sign in to comment.