Returns the default key path for the given chain.
(chain_id: u64)
| 290 | |
| 291 | /// Returns the default key path for the given chain. |
| 292 | pub fn default_key_path(chain_id: u64) -> PathBuf { |
| 293 | let mut path = dirs::home_dir().unwrap_or_else(|| PathBuf::from(".")); |
| 294 | path.push(".base"); |
| 295 | path.push(chain_id.to_string()); |
| 296 | path.push("bootnode_p2p_priv.txt"); |
| 297 | path |
| 298 | } |
| 299 | |
| 300 | /// Converts a libp2p keypair into a discv5 signing key. |
| 301 | pub fn local_node_key(keypair: Keypair) -> eyre::Result<k256::ecdsa::SigningKey> { |