tonapi 0.3.2

SDK for integrating TonAPI into Rust apps
Documentation
1
2
3
4
5
6
7
8
9
10
11
use tonapi::{Network, RestApiClientV2};

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = RestApiClientV2::new(Network::Mainnet, None);

    let result = client.get_account("0QCbOix87iy37AwRCWaYhJHzc2gXE_WnAG5vVEAySNT7zClz").await.unwrap();
    println!("Account balance: {}", result.balance);

    Ok(())
}