Skip to main content

onemoney_protocol/
lib.rs

1//! # OneMoney Rust SDK
2//!
3//! Official Rust SDK for OneMoney L1 blockchain REST API.
4//!
5//! ## Quick Start
6//!
7//! ```rust
8//! use onemoney_protocol::{Client, ClientBuilder, Network};
9//!
10//! #[tokio::main]
11//! async fn main() -> Result<(), Box<dyn std::error::Error>> {
12//!     // Create clients for different networks
13//!     let mainnet_client = Client::mainnet()?; // Mainnet
14//!     let testnet_client = Client::testnet()?; // Testnet
15//!     let local_client = Client::local()?; // Local development
16//!
17//!     // Or use the builder pattern
18//!     let client = ClientBuilder::new()
19//!         .network(Network::Testnet)
20//!         .timeout(std::time::Duration::from_secs(30))
21//!         .build()?;
22//!
23//!     Ok(())
24//! }
25//! ```
26
27pub mod api;
28pub mod client;
29pub mod error;
30pub mod transport;
31pub mod utils;
32
33// Re-export payload types from requests module
34pub use client::{Client, ClientBuilder, Network};
35pub use error::{ConfigError, Error, Result};
36pub use om_primitives_types::{
37    core::chain::NamedChain,
38    transaction::{Signable, payload::*},
39};
40pub use om_rest_types::{RestSignature as Signature, crypto, crypto::*, *};
41pub use transport::*;
42pub use utils::*;