1#![forbid(unsafe_code)]
38
39pub mod endpoint;
40pub mod error;
41#[cfg(not(target_arch = "wasm32"))]
42pub mod gossip;
43pub mod identity;
44pub mod inbox;
45pub mod interfaces;
46pub mod ipfs_publish;
47#[cfg(not(target_arch = "wasm32"))]
48pub mod iroh;
49#[cfg(not(target_arch = "wasm32"))]
50pub mod outbox;
51#[cfg(not(target_arch = "wasm32"))]
52pub mod resolve;
53pub mod service;
54pub mod topic;
55pub mod transport;
56pub(crate) mod ttl_queue;
57
58#[cfg(all(not(target_arch = "wasm32"), feature = "kubo"))]
59pub mod kubo;
60pub mod pinning;
61
62pub use did_ma::{
65 Did, Document, EncryptionKey, Headers, MaError, Message, Proof, ReplayGuard, SigningKey,
66 VerificationMethod, DEFAULT_MAX_CLOCK_SKEW_SECS, DEFAULT_MESSAGE_TTL_SECS,
67 DEFAULT_REPLAY_WINDOW_SECS,
68};
69
70pub use error::{Error, Result};
73
74pub use service::{
77 Service, BROADCAST_PROTOCOL, BROADCAST_TOPIC, CONTENT_TYPE_BROADCAST, CONTENT_TYPE_DOC,
78 CONTENT_TYPE_IPFS_REQUEST, CONTENT_TYPE_MESSAGE, INBOX_PROTOCOL, IPFS_PROTOCOL,
79};
80
81pub use inbox::Inbox;
84
85pub use topic::{topic_id, Topic, TopicId};
88
89pub use endpoint::{MaEndpoint, DEFAULT_DELIVERY_PROTOCOL_ID};
92#[cfg(not(target_arch = "wasm32"))]
93pub use iroh::channel::Channel;
94#[cfg(not(target_arch = "wasm32"))]
95pub use iroh::IrohEndpoint;
96#[cfg(not(target_arch = "wasm32"))]
97pub use outbox::Outbox;
98
99#[cfg(not(target_arch = "wasm32"))]
102pub use ::iroh::endpoint::{presets, Connection, RecvStream, SendStream};
103#[cfg(not(target_arch = "wasm32"))]
104pub use ::iroh::protocol::{AcceptError, ProtocolHandler, Router};
105#[cfg(not(target_arch = "wasm32"))]
106pub use ::iroh::{Endpoint, EndpointAddr, EndpointId, RelayUrl, SecretKey};
107
108#[cfg(not(target_arch = "wasm32"))]
111pub use gossip::{
112 broadcast_topic_id, gossip_send, gossip_send_text, join_broadcast_channel, join_gossip_topic,
113 topic_id_for,
114};
115
116pub use transport::{
119 endpoint_id_from_transport, endpoint_id_from_transport_value, normalize_endpoint_id,
120 protocol_from_transport, resolve_endpoint_for_protocol, resolve_inbox_endpoint_id,
121 transport_string,
122};
123
124pub use identity::{generate_secret_key_file, load_secret_key_bytes, socket_addr_to_multiaddr};
127
128#[cfg(not(target_arch = "wasm32"))]
131pub use resolve::{DidResolver, GatewayResolver};
132
133pub use interfaces::{DidPublisher, IpfsPublisher};
136#[cfg(all(not(target_arch = "wasm32"), feature = "kubo"))]
137pub use ipfs_publish::KuboDidPublisher;
138#[cfg(all(not(target_arch = "wasm32"), feature = "kubo"))]
139pub use ipfs_publish::{handle_ipfs_publish, publish_did_document_to_kubo};
140pub use ipfs_publish::{
141 validate_ipfs_publish_request, IpfsPublishDidRequest, IpfsPublishDidResponse,
142 ValidatedIpfsPublish,
143};
144#[cfg(all(not(target_arch = "wasm32"), feature = "kubo"))]
145pub use kubo::KuboKey;
146pub use pinning::{pin_update_add_rm, PinUpdateOutcome};