Skip to main content

forc_crypto/keys/
mod.rs

1use clap::ValueEnum;
2
3pub mod get_public_key;
4pub mod new_key;
5pub mod parse_secret;
6pub mod vanity;
7
8#[derive(Clone, Debug, Default, ValueEnum)]
9pub enum KeyType {
10    #[default]
11    BlockProduction,
12    Peering,
13}
14
15impl From<KeyType> for &'static str {
16    fn from(key_type: KeyType) -> Self {
17        match key_type {
18            KeyType::BlockProduction => "block-production",
19            KeyType::Peering => "p2p",
20        }
21    }
22}