Construct a [`libp2p_identity::Keypair`] from this node key.
(&self)
| 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 | |
| 323 | impl std::ops::Deref for NodeKey { |