bee_network/
lib.rs

1// Copyright 2020-2021 IOTA Stiftung
2// SPDX-License-Identifier: Apache-2.0
3
4//! Networking layer for the Bee framework.
5
6#![warn(missing_docs)]
7
8mod alias;
9mod config;
10mod error;
11mod init;
12mod network;
13mod peer;
14mod service;
15mod swarm;
16
17#[cfg(test)]
18mod tests;
19
20// Always exported
21pub use self::peer::info::{PeerInfo, PeerRelation};
22#[doc(inline)]
23pub use libp2p_core::{
24    multiaddr::{Multiaddr, Protocol},
25    PeerId,
26};
27
28// Exported only with "full" feature flag.
29#[cfg(feature = "full")]
30#[doc(inline)]
31pub use libp2p::core::identity::{ed25519::Keypair, PublicKey};
32
33#[cfg(feature = "full")]
34pub use crate::{
35    config::{NetworkConfig, NetworkConfigBuilder},
36    error::Error,
37    init::{integrated, standalone},
38    network::host::integrated::NetworkHost,
39    network::origin::Origin,
40    service::{
41        command::{Command, NetworkCommandSender},
42        event::{Event, NetworkEventReceiver},
43        host::integrated::ServiceHost,
44    },
45    swarm::protocols::iota_gossip::{GossipReceiver, GossipSender},
46};