#![forbid(unsafe_code)]
#![allow(
clippy::cast_possible_truncation,
clippy::cast_precision_loss,
clippy::if_not_else,
clippy::items_after_statements,
clippy::manual_let_else,
clippy::map_unwrap_or,
clippy::missing_errors_doc,
clippy::must_use_candidate,
clippy::uninlined_format_args
)]
#[cfg(feature = "acl")]
pub mod acl;
#[cfg(feature = "config")]
pub mod config;
pub mod endpoint;
pub mod error;
pub mod identity;
pub mod inbox;
pub mod interfaces;
#[cfg(all(not(target_arch = "wasm32"), feature = "kubo"))]
pub mod ipfs;
#[cfg(feature = "iroh")]
pub mod iroh;
#[cfg(feature = "iroh")]
pub mod outbox;
pub mod resolve;
pub mod service;
pub mod topic;
pub mod transport;
pub(crate) mod ttl_queue;
pub use did_ma::{
Did, Document, EncryptionKey, Headers, MaError, Message, Proof, ReplayGuard, SigningKey,
VerificationMethod, DEFAULT_MAX_CLOCK_SKEW_SECS, DEFAULT_MESSAGE_TTL_SECS,
DEFAULT_REPLAY_WINDOW_SECS,
};
pub use error::{Error, Result};
#[cfg(feature = "acl")]
pub use acl::Acl;
pub use service::{
Service, BROADCAST_PROTOCOL, BROADCAST_TOPIC, CONTENT_TYPE_BROADCAST, CONTENT_TYPE_DOC,
CONTENT_TYPE_IPFS_REQUEST, CONTENT_TYPE_MESSAGE, INBOX_PROTOCOL, INBOX_PROTOCOL_ID,
IPFS_PROTOCOL,
};
pub use inbox::Inbox;
pub use topic::{topic_id, Topic, TopicId};
pub use endpoint::{MaEndpoint, DEFAULT_DELIVERY_PROTOCOL_ID};
#[cfg(feature = "iroh")]
pub use iroh::channel::Channel;
#[cfg(feature = "iroh")]
pub use iroh::IrohEndpoint;
#[cfg(feature = "iroh")]
pub use outbox::Outbox;
#[cfg(feature = "iroh")]
pub use ::iroh::endpoint::{presets, Connection, RecvStream, SendStream};
#[cfg(feature = "iroh")]
pub use ::iroh::protocol::{AcceptError, ProtocolHandler, Router};
#[cfg(feature = "iroh")]
pub use ::iroh::{Endpoint, EndpointAddr, EndpointId, RelayUrl, SecretKey};
#[cfg(feature = "gossip")]
pub use iroh::gossip::{
broadcast_topic_id, gossip_send, gossip_send_text, join_broadcast_channel, join_gossip_topic,
topic_id_for,
};
pub use transport::{
endpoint_id_from_transport, endpoint_id_from_transport_value, normalize_endpoint_id,
protocol_from_transport, resolve_endpoint_for_protocol, resolve_inbox_endpoint_id,
transport_string,
};
pub use identity::{generate_secret_key_file, load_secret_key_bytes, socket_addr_to_multiaddr};
#[cfg(all(feature = "config", not(target_arch = "wasm32")))]
pub use config::MaArgs;
#[cfg(feature = "config")]
pub use config::{BrowserIdentityExport, Config, SecretBundle};
pub use resolve::DidResolver;
#[cfg(not(target_arch = "wasm32"))]
pub use resolve::GatewayResolver;
pub use interfaces::{DidPublisher, IpfsPublisher};
#[cfg(all(not(target_arch = "wasm32"), feature = "kubo"))]
pub use ipfs::*;