MCPcopy Create free account
hub / github.com/ceramicnetwork/rust-ceramic / p2p_keypair

Method p2p_keypair

core/src/node_id.rs:317–320  ·  view source on GitHub ↗

Construct a [`libp2p_identity::Keypair`] from this node key.

(&self)

Source from the content-addressed store, hash-verified

315
316 /// Construct a [`libp2p_identity::Keypair`] from this node key.
317 pub fn p2p_keypair(&self) -> libp2p_identity::Keypair {
318 libp2p_identity::Keypair::ed25519_from_bytes(self.private_key_bytes)
319 .expect("private key bytes should already be validated")
320 }
321}
322
323impl std::ops::Deref for NodeKey {

Callers 1

newMethod · 0.80

Calls 1

expectMethod · 0.80

Tested by

no test coverage detected