Keygen Command
The keygen command generates RSA keys for SSV operator identification
anchor keygen [OPTIONS]Options
| Option | Description | Default |
|---|---|---|
-d, --data-dir <DIR> | Directory to store generated keys | ~/.anchor/{network} |
--force | Force overwrite of existing key files | Disabled |
--encrypt | Enable password encryption (password read from terminal or --password-file) | Disabled |
--password-file <PATH> | Path to a file containing the password to use | None |
--network <NETWORK> | Network to use (mainnet, holesky, hoodi) | hoodi |
-t, --testnet-dir <DIR> | Directory containing testnet specs | None |
--debug-level <DEBUG_LEVEL> | Verbosity level for terminal logs | INFO |
-h, --help | Display help information |
Examples
This will create an unencrypted private_key.txt file containing the newly generated
private key and a public_key.txt file with the BASE64 encoded public key used for
registering the operator.
anchor keygenThis will create a encrypted_private_key.json file encrypted with the provided password
and a public_key.txt file with the BASE64 encoded public key used for registering the
operator. The password must be provided via --password-file or interactively when running
Anchor.
anchor keygen --encrypt --data-dir /path/to/keysAnchor will look for the key file in the default directory ~/.anchor/{network}, or the directory specified by --data-dir.
