circle-user-controlled-wallets 0.1.0

Rust client for the Circle Web3 Services User-Controlled Wallets API
Documentation

circle-user-controlled-wallets

crates.io docs.rs License: Apache-2.0 Rust

Async Rust client for the Circle Web3 Services User-Controlled Wallets API.

With User-Controlled Wallets, end-users own their signing keys through a PIN-protected security model — Circle never has access to the private keys.

Installation

[dependencies]
circle-user-controlled-wallets = "0.1"
tokio = { version = "1", features = ["rt-multi-thread", "macros"] }

Quick Start

use circle_user_controlled_wallets::
    {UserWalletsClient, models::user::CreateUserRequest};

#[tokio::main]
async fn main() -> Result<(), circle_user_controlled_wallets::Error> {
    let client = UserWalletsClient::new("your_api_key");

    let req = CreateUserRequest {
        user_id: "user-unique-id-123".to_string(),
    };
    let resp = client.create_user(&req).await?;
    println!("Created user: {:?}", resp.data);
    Ok(())
}

API Coverage

Area Endpoints
Users Create user, Get user
PIN Challenges Initialize challenge, Get challenge
Wallets List wallets, Get wallet, List balances, List NFTs
Transactions Initiate transaction, List transactions, Get transaction, Cancel transaction
Signing Sign message, Sign typed data
Tokens Get token

Authentication

Obtain an API key from the Circle Developer Console and pass it to the client constructor, or set the CIRCLE_API_KEY environment variable.

License

Licensed under the Apache-2.0 License.