Skip to main content

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.

  • Set your key id --key-id=<key_id> .

  • To use a key pair by its key ID, set the property key.id = <key_id> in your configuration file.

  • To recover a key pair from a mnemonic, pass in the mnemonic with --mnemonic "march aspect pizza treat ...".