Crate helia_bitswap

Crate helia_bitswap 

Source
Expand description

Bitswap protocol implementation

This is a Rust implementation of the Bitswap protocol based on the TypeScript @helia/bitswap package.

Bitswap is a data exchange protocol used in IPFS for requesting and providing blocks of data between peers.

Re-exports§

pub use pb::BlockPresenceType;
pub use pb::WantType;
pub use behaviour::BitswapBehaviour;
pub use behaviour::BitswapEvent;
pub use coordinator::Bitswap;
pub use coordinator::BitswapConfig;
pub use coordinator::BitswapStats;
pub use coordinator::NotifyOptions;
pub use coordinator::WantOptions;
pub use network_new::BitswapMessageEvent;
pub use network_new::Network;
pub use network_new::NetworkEvent;
pub use network_new::NetworkInit;
pub use peer_want_lists::PeerWantLists;
pub use peer_want_lists::PeerWantListsStats;
pub use wantlist_new::WantList;
pub use wantlist_new::WantListEntry;
pub use wantlist_new::WantResult;
pub use constants::*;
pub use utils::*;
pub use session::*;

Modules§

behaviour
Bitswap NetworkBehaviour implementation built on streaming substreams.
constants
Bitswap protocol constants Based on @helia/bitswap TypeScript implementation
coordinator
Bitswap coordinator - High-level API for block exchange Based on @helia/bitswap/src/index.ts
network_new
Network layer for Bitswap protocol Based on @helia/bitswap/src/network.ts
pb
Protocol Buffer definitions for Bitswap messages Based on the Bitswap 1.2.0 specification
peer_want_lists
Peer WantLists - tracks what each peer wants from us Based on @helia/bitswap/src/peer-want-lists/
session
stream
Utilities for length-prefixed Bitswap framing compatible with Helia JS.
utils
Utilities for Bitswap message handling Based on @helia/bitswap utils
wantlist_new
WantList manager for Bitswap protocol Based on @helia/bitswap/src/want-list.ts

Type Aliases§

Result