Skip to main content

keygen

Usage: pmc 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..."" │
│ -s, --save=PATH File to save the generated keypair in
│ -n, --node Save the generated keypair in format to be included in│
node properties file
│ -h, --help Show this message and exit
╰─────────────────────────────────────────────────────────────────────────────╯

The keygen command (pmc keygen) generates a public and private key pair. An elliptic curve secp256k1 generates these keys.

  • Saves the key pair in a file named .secret.
pmc keygen --save .secret
  • Generates a key pair from a mnemonic phrase and saves it to a file named .secret.
pmc keygen --save .secret --mnemonic "march aspect beef treat ..."
  • Generates a keypair that PMC uses when commands are executed from this directory.
pmc keygen --save .pmc/config
  • Generates a keypair that PMC uses when commands are executed from this host (global config).
pmc keygen --save ~/.pmc/config