helia_bitswap/
lib.rs

1//! Bitswap protocol implementation
2//!
3//! This is a Rust implementation of the Bitswap protocol based on the
4//! TypeScript @helia/bitswap package.
5//!
6//! Bitswap is a data exchange protocol used in IPFS for requesting and
7//! providing blocks of data between peers.
8
9// Core modules (TypeScript-based architecture)
10pub mod behaviour;
11pub mod constants;
12pub mod coordinator;
13pub mod network_new;
14pub mod pb;
15pub mod peer_want_lists;
16pub mod stream;
17pub mod utils;
18pub mod wantlist_new;
19
20// Session module (to be rewritten)
21pub mod session;
22
23// Re-exports
24pub use constants::*;
25pub use pb::{BlockPresenceType, WantType};
26pub use utils::*;
27
28// Architecture exports
29pub use behaviour::{BitswapBehaviour, BitswapEvent};
30pub use coordinator::{Bitswap, BitswapConfig, BitswapStats, NotifyOptions, WantOptions};
31pub use network_new::{BitswapMessageEvent, Network, NetworkEvent, NetworkInit};
32pub use peer_want_lists::{PeerWantLists, PeerWantListsStats};
33pub use wantlist_new::{WantList, WantListEntry, WantResult};
34
35// Session exports (temporary until rewrite)
36pub use session::*;
37
38pub type Result<T> = std::result::Result<T, helia_interface::HeliaError>;