wnfs_common/lib.rs
1//! This crate contains the common types and functions used by the WNFS crates.
2pub mod blockstore;
3mod encoding;
4mod error;
5mod link;
6mod metadata;
7mod pathnodes;
8mod storable;
9pub mod utils;
10
11pub use blockstore::*;
12pub use encoding::*;
13pub use error::*;
14pub use link::*;
15pub use metadata::*;
16pub use pathnodes::*;
17pub use storable::*;
18
19//--------------------------------------------------------------------------------------------------
20// Constants
21//--------------------------------------------------------------------------------------------------
22
23pub const HASH_BYTE_SIZE: usize = 32;
24pub const MAX_BLOCK_SIZE: usize = usize::pow(2, 18);
25
26//--------------------------------------------------------------------------------------------------
27// Type Definitions
28//--------------------------------------------------------------------------------------------------
29
30/// The general size of digests in WNFS.
31pub type HashOutput = [u8; HASH_BYTE_SIZE];
32
33//--------------------------------------------------------------------------------------------------
34// Re-exports
35//--------------------------------------------------------------------------------------------------
36
37pub mod libipld {
38 pub use libipld::*;
39}