keygen
Usage: chr keygen [OPTIONS]
Generates public/private key pair
╭─ Options ───────────────────────────────────────────────────────────────────╮
│ -m, --mnemonic=TEXT Mnemonic word list, words separated by space, e.g: │
│ "lift employ roast rotate liar holiday sun fever │
│ output magnet..."" │
│ -f, --file=PATH Set file to save keypair to explicitly │
│ --key-id=TEXT Name the generated key with an id │
│ --dry Perform dry run, prints keys in terminal and does not │
│ save keys to disk │
│ -h, --help Show this message and exit │
╰─────────────────────────────────────────────────────────────────────────────╯
The keygen command (chr keygen
) generates a public and private key pair. By default, the keys are generated with
default key id chromia_key
and saved in the .chromia
folder as chromia_key.pubkey
and chromia_key
.
-
To use a key pair by its key ID, set the property
key.id = <key_id>
in your configuration file (.chromia/config
).If your
TEXT
string ismyKey
then the public key is stored asmyKey.pubkey
and private key asmyKey
. To use a key pair by its key ID, set the propertykey.id = <key_id>
in your Chromia configuration (.chromia/config
) file. If the config file does not exist, then you can create one in the.chromia
folder.- Windows:
C:\Users\<YourUsername>\.chromia\config
- macOS and Linux:
/Users/<YourUsername>/.chromia/config
or/home/<YourUsername>/.chromia/config
- Windows:
-
To recover a key pair from a mnemonic, pass in the mnemonic with
--mnemonic "march aspect pizza treat ..."
.