Skip to content

Get started

The fastest path into the Rust ecosystem is circles-sdk. It layers the lower level crates (circles-rpc, circles-pathfinder, circles-transfers, circles-profiles, and circles-types) behind a single typed entrypoint.

Add the SDK

[dependencies]
circles-sdk = "0.1.1"
alloy-primitives = "1"
tokio = { version = "1", features = ["macros", "rt-multi-thread"] }

First read

use alloy_primitives::address;
use circles_sdk::{Sdk, config};
 
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let sdk = Sdk::new(config::gnosis_mainnet(), None)?;
    let avatar = address!("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
 
    let info = sdk.avatar_info(avatar).await?;
    println!("avatar type: {:?}", info.avatar_type);
 
    Ok(())
}

Add write execution when you need it

  • Sdk::new(config, None) keeps the SDK read-first.
  • EoaContractRunner enables direct private-key execution.
  • SafeContractRunner enables existing single-owner Safe execution.
  • SafeExecutionBuilder prepares the canonical Safe payload/hash when another host signs or submits the transaction.

Where to go next