Generating Keys

After installing the secretcli, the next thing to do is to start generating your own keys (public and private) to begin receiving, sending, and bonding SCRT.

Generate a secp256k1 Key

To generate a new secp256k1 key:

secretcli keys add <key-alias>

Note: The output of the above command contains a seed phrase. It's recommended to save the seed phrase in a safe place in case you forget the password of the operating system's credentials store.

The above command will generate an output similar to:

- name: test
  type: local
  address: secret1knpfllytv22umrlahglwmhjxkgavccjltxwnca
  pubkey: '{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"A0QMBqFY4J39i6NrH4qR5uOEnyytpkyeWFg/e0sPd8NJ"}'
  mnemonic: ""


**Important** write this mnemonic phrase in a safe place.
It is the only way to recover your account if you ever forget your password.

become inspire first replace ask luxury extend member social donor expire lock correct buddy skull task dizzy rather injury decline series reflect piece dumb

Delete A Key

To delete a key use:

After deleting a key you will no longer have access to the associated key account. You may regenerate the deleted key using the secretcli and the keys seed phrase.

Multiple keys may be deleted at once. You will be prompted to confirm each keys deletion:

Regenerate Key From Seed Phrase

You can regenerate the key from the seed phrase with the following command:

Regenerate Key From Old Key Path

Backup And Export Key

You can also backup your key using export β€” which outputs to stderr:

(copy and paste to a <key-export-file>)

Import Key

You can import a key using the secretcli with:

After importing your key, verify the key is imported with:

\

Last updated

Was this helpful?