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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/// O2 Exchange SDK for Rust.
///
/// A production-quality SDK for interacting with the O2 Exchange,
/// a fully on-chain order book DEX on the Fuel Network.
///
/// # Quick Start
///
/// ```rust,no_run
/// use o2_sdk::{O2Client, Network};
///
/// #[tokio::main]
/// async fn main() -> Result<(), o2_sdk::O2Error> {
/// let mut client = O2Client::new(Network::Testnet);
///
/// // Generate a wallet
/// let wallet = client.generate_wallet()?;
///
/// // Setup account (idempotent)
/// let account = client.setup_account(&wallet).await?;
///
/// // Fetch markets
/// let markets = client.get_markets().await?;
///
/// Ok(())
/// }
/// ```
///
/// # Guides
///
/// The [`guides`] module contains integration guides covering common
/// workflows and patterns:
///
/// - [`guides::trading`] — Order types, batch actions, and market maker patterns
/// - [`guides::market_data`] — Fetching depth, trades, candles, and balances
/// - [`guides::websocket_streams`] — Real-time data with `TypedStream`
/// - [`guides::error_handling`] — Error types and recovery patterns
/// - [`guides::external_signers`] — Integrating KMS/HSM via the `SignableWallet` trait
// Re-export primary types for convenience.
pub use O2Client;
pub use ;
pub use ;
pub use UnsignedDecimal;
pub use O2Error;
pub use *;
pub use ;
pub use ;