Export NodeKey and NetworkKey types

This commit is contained in:
Alex 2021-10-14 12:08:39 +02:00
parent 7e49d0dac8
commit fe16ff25e9
No known key found for this signature in database
GPG key ID: EDABF9711E244EB1
2 changed files with 5 additions and 1 deletions

View file

@ -26,7 +26,7 @@ pub mod netapp;
pub mod peering;
pub use crate::netapp::*;
pub use util::NodeID;
pub use util::{NetworkKey, NodeID, NodeKey};
#[cfg(test)]
mod test;

View file

@ -8,6 +8,10 @@ use tokio::sync::watch;
/// A node's identifier, which is also its public cryptographic key
pub type NodeID = sodiumoxide::crypto::sign::ed25519::PublicKey;
/// A node's secret key
pub type NodeKey = sodiumoxide::crypto::sign::ed25519::SecretKey;
/// A network key
pub type NetworkKey = sodiumoxide::crypto::auth::Key;
/// Utility function: encodes any serializable value in MessagePack binary format
/// using the RMP library.