1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
// Copyright 2021 MaidSafe.net limited.
//
// This SAFE Network Software is licensed to you under The General Public License (GPL), version 3.
// Unless required by applicable law or agreed to in writing, the SAFE Network Software distributed
// under the GPL Licence is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. Please review the Licences for the specific language governing
// permissions and limitations relating to use of the SAFE Network Software.

//! The Safe Network Client.
//!
//! In order to connect to The Safe Network you'll need to send messages back and forth to network nodes.
//! The [Client] has everything needed to perform this communication, with APIs to enable
//! working with data.
//!
//! With these APIs you can easily:
//! - Connect to The Safe Network
//! - Read Public data from the network
//! - Write data to the network (assuming you have a SafeCoin balance)
//!
//! ## Basic Usage
//!
//! Setting up a random client for read only access:
//!
//! # Examples
//!
//! TODO: update once data types are crdt compliant
//!

mod config_handler;
mod connections;
mod errors;

// Export public API.

pub use client_api::Client;
pub use config_handler::{ClientConfig, DEFAULT_AE_WAIT, DEFAULT_QUERY_TIMEOUT};
pub use errors::ErrorMessage;
pub use errors::{Error, Result};
pub use qp2p::Config as QuicP2pConfig;

/// Client trait and related constants.
pub mod client_api;

/// Utility functions.
pub mod utils;