1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/*
   Appellation: acme-network
   Context: library
   Creator: FL03 <jo3mccain@icloud.com>
   Description:
       This crate was created in support of acme, an all-in-one blockchain toolkit and enables the
       developer to implement a number of standard networking features for building optimized EVM
       side-chains.
*/
pub use crate::{behaviours::*, common::*, crypto::*, nodes::*, peers::*, providers::*};

mod behaviours;
mod crypto;
mod nodes;
mod peers;
mod providers;

mod common {
    pub use types::*;

    mod types {
        pub use libp2p::identity::Keypair as PeerKey;
        pub use libp2p::noise::X25519Spec as CryptoSpec;
        pub use libp2p::Multiaddr as NetworkAddress;
        pub use libp2p::PeerId;
        use libp2p::{
            self,
            core::{muxing::StreamMuxerBox, transport::Boxed},
        };

        // Authenticated DH Keys
        pub type AuthNoiseKey = libp2p::noise::AuthenticKeypair<CryptoSpec>;
        // Boxed Transport
        pub type BoxedTransport = Boxed<(PeerId, StreamMuxerBox)>;
        pub type KademliaMS = libp2p::kad::Kademlia<libp2p::kad::store::MemoryStore>;
        // Wrapper for Noise Keypair
        pub type NoiseKey = libp2p::noise::Keypair<CryptoSpec>;
    }
}