> For the complete documentation index, see [llms.txt](https://developer.1moneynetwork.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.1moneynetwork.com/integrations/sdks/rust/get-started.md).

# Get Started

### Installation

Add this to your `Cargo.toml`:

```rust
[dependencies]
onemoney-protocol = "0.1.0"
tokio = { version = "1.0", features = ["macros", "rt-multi-thread"] }
```

### Quick Start

```rust
use onemoney_protocol::{Client, ClientBuilder, Network, OneMoneyAddress, TokenAmount};
use std::str::FromStr;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    // Create clients for different networks
    let mainnet_client = Client::mainnet();          // Mainnet
    let testnet_client = Client::testnet();          // Testnet
    let local_client = Client::local();              // Local development

    // Or use the builder pattern
    let client = ClientBuilder::new()
        .network(Network::Testnet)
        .build()?;

    // Get account nonce
    let address = OneMoneyAddress::from_str("0x742d35Cc6634C0532925a3b8D91D6F4A81B8Cbc0")?;
    let nonce = client.get_account_nonce(address).await?;
    println!("Account nonce: {}", nonce.nonce);

    // Get latest checkpoint number
    let checkpoint_info = client.get_checkpoint_number().await?;
    println!("Current checkpoint: {}", checkpoint_info.number);

    Ok(())
}
```
