bee-network 0.2.2

Networking functionality and types for nodes and clients participating in the IOTA protocol built on top of `libp2p`.
Documentation
// Copyright 2020-2021 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0

//! Networking layer for the Bee framework.

#![warn(missing_docs)]

mod alias;
mod config;
mod error;
mod init;
mod network;
mod peer;
mod service;
mod swarm;

#[cfg(test)]
mod tests;

// Always exported
pub use self::peer::info::{PeerInfo, PeerRelation};
#[doc(inline)]
pub use libp2p_core::{
    multiaddr::{Multiaddr, Protocol},
    PeerId,
};

// Exported only with "full" feature flag.
#[cfg(feature = "full")]
#[doc(inline)]
pub use libp2p::core::identity::{ed25519::Keypair, PublicKey};

#[cfg(feature = "full")]
pub use crate::{
    config::{NetworkConfig, NetworkConfigBuilder},
    error::Error,
    init::{integrated, standalone},
    network::host::integrated::NetworkHost,
    network::origin::Origin,
    service::{
        command::{Command, NetworkCommandSender},
        event::{Event, NetworkEventReceiver},
        host::integrated::ServiceHost,
    },
    swarm::protocols::iota_gossip::{GossipReceiver, GossipSender},
};