MCPcopy Create free account
hub / github.com/base/base / default_key_path

Method default_key_path

crates/consensus/cli/src/bootnode.rs:292–298  ·  view source on GitHub ↗

Returns the default key path for the given chain.

(chain_id: u64)

Source from the content-addressed store, hash-verified

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> {

Callers

nothing calls this directly

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected