Skip to main content

ant_core/data/
mod.rs

1//! Data operations for the Autonomi decentralized network.
2//!
3//! Provides high-level APIs for storing and retrieving data
4//! using post-quantum cryptography.
5
6pub mod client;
7pub mod error;
8pub mod network;
9
10pub use client::cache::ChunkCache;
11pub use client::{Client, ClientConfig};
12pub use error::{Error, Result};
13pub use network::Network;
14
15// LocalDevnet (and the optional node-side dep it pulls in) is gated behind
16// the `devnet` feature. Default builds of ant-core do not link ant-node.
17#[cfg(feature = "devnet")]
18pub use crate::node::devnet::LocalDevnet;
19
20// Re-export commonly used types from the wire protocol crate.
21pub use ant_protocol::{compute_address, DataChunk, XorName};
22
23// Re-export client data types
24pub use client::batch::{finalize_batch_payment, PaidChunk, PaymentIntent, PreparedChunk};
25pub use client::data::DataUploadResult;
26pub use client::file::{
27    DownloadEvent, ExternalPaymentInfo, FileUploadResult, PreparedUpload, UploadCostEstimate,
28    UploadEvent, Visibility,
29};
30pub use client::merkle::{
31    finalize_merkle_batch, MerkleBatchPaymentResult, PaymentMode, PreparedMerkleBatch,
32    DEFAULT_MERKLE_THRESHOLD,
33};
34
35// Re-export self-encryption types
36pub use self_encryption::DataMap;
37
38// Re-export networking types needed by CLI for P2P node creation. The
39// devnet manifest types live in ant-protocol because both the node
40// (writer) and the CLI (reader) need them; they are always available
41// regardless of the `devnet` feature.
42pub use ant_protocol::transport::{
43    CoreNodeConfig, IPDiversityConfig, MultiAddr, NodeMode, P2PNode,
44};
45pub use ant_protocol::{DevnetManifest, MAX_CHUNK_SIZE, MAX_WIRE_MESSAGE_SIZE};
46
47// Re-export EVM types needed by CLI for wallet and network setup
48pub use ant_protocol::evm::{
49    Address as EvmAddress, CustomNetwork, Network as EvmNetwork, Wallet, U256,
50};