rust-libp2p/identity/tests/keypair_api.rs
Thomas Eizinger 2a14df25eb
feat: introduce libp2p-identity crate
This patch combines the `libp2p_core::identity` and `libp2p_core::peer_id` modules into a new crate: `libp2p-identity`.

Resolves https://github.com/libp2p/rust-libp2p/issues/3349.

Pull-Request: #3350.
2023-03-12 15:46:58 +01:00

14 lines
263 B
Rust

use libp2p_identity::Keypair;
#[test]
fn calling_keypair_api() {
let _ = Keypair::from_protobuf_encoding(&[]);
}
#[allow(dead_code)]
fn using_keypair(kp: Keypair) {
let _ = kp.to_protobuf_encoding();
let _ = kp.sign(&[]);
let _ = kp.public();
}