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:
secretclikeysadd<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:testtype:localaddress:secret1knpfllytv22umrlahglwmhjxkgavccjltxwncapubkey:'{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"A0QMBqFY4J39i6NrH4qR5uOEnyytpkyeWFg/e0sPd8NJ"}'mnemonic:""**Important** write this mnemonic phrase in a safe place.Itistheonlywaytorecoveryouraccountifyoueverforgetyourpassword.become inspire first replace ask luxury extend member social donor expire lock correct buddy skull task dizzy rather injury decline series reflect piece dumb
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:
secretclikeysdeletepub_addr_2pub_addr_1multisig_sorted# This is the output you should expect to seeb Keyreferencewillbedeleted.Continue? [y/N]: yPublickeyreferencedeletedKeyreferencewillbedeleted.Continue? [y/N]: yPublickeyreferencedeletedKeyreferencewillbedeleted.Continue? [y/N]: yKeydeletedforever (uh oh!)
Regenerate Key From Seed Phrase
You can regenerate the key from the seed phrase with the following command:
secretclikeysadd--recover<key-alias>Enteryourbip39mnemonicbecome inspire first replace ask luxury extend member social donor expire lock correct buddy skull task dizzy rather injury decline series reflect piece dumb
-name:testtype:localaddress:secret1knpfllytv22umrlahglwmhjxkgavccjltxwncapubkey:'{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"A0QMBqFY4J39i6NrH4qR5uOEnyytpkyeWFg/e0sPd8NJ"}'mnemonic:""
Regenerate Key From Old Key Path
secretclikeysaddtest--coin-type118--recoverEnteryourbip39mnemonicbecome inspire first replace ask luxury extend member social donor expire lock correct buddy skull task dizzy rather injury decline series reflect piece dumb
-name:testtype:localaddress:secret1tnmmdv2xkty3jgqh5l52tndgsk9m5caakv3ud6pubkey:'{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"A/MV4cGgm7ILcdc/tyxysevjBBWjqBjsBoO5QIItzohJ"}'mnemonic:""
Backup And Export Key
You can also backup your key using export — which outputs to stderr: