pub mod chains;
pub mod networking;
pub mod types {
use std::collections::HashMap;
use bson;
use chrono;
use libp2p::{self, core::{muxing::StreamMuxerBox, transport::Boxed}};
use crate::chains::types::*;
pub type Container<T> = Dict<Vec<T>>;
pub type Dict<T> = HashMap<String, T>;
pub type DateTime<T> = chrono::DateTime<T>;
pub type LocalTime = chrono::Local;
pub type TimeStamp = bson::DateTime;
pub type BoxedError = Box<dyn std::error::Error>;
pub type DynamicError = Box<dyn std::error::Error + Send + Sync + 'static>;
pub type ContentId = String;
pub type ObjectId = bson::oid::ObjectId;
pub type BoxedTransport = Boxed<(PeerId, StreamMuxerBox)>;
pub type NetworkAddress = libp2p::Multiaddr;
pub type CryptoSpec = libp2p::noise::X25519Spec;
pub type AuthNoiseKey = libp2p::noise::AuthenticKeypair<CryptoSpec>;
pub type NoiseKey = libp2p::noise::Keypair<CryptoSpec>;
pub type PeerId = libp2p::PeerId;
pub type PeerKey = libp2p::identity::Keypair;
}