circle_buidl_wallets/lib.rs
1//! Rust client for the Circle Web3 Services Modular Wallets (Buidl) API.
2//!
3//! This crate provides a typed, async HTTP client for the
4//! [Circle W3S Buidl Wallets API](https://developers.circle.com/api-reference/w3s/buidl-wallets),
5//! which enables Account-Abstraction-powered (ERC-4337) wallets.
6//!
7//! ## Covered Endpoints
8//!
9//! | Module | Functionality |
10//! |--------|---------------|
11//! | [`models::transfer`] | List and retrieve cross-chain transfers |
12//! | [`models::user_op`] | List and retrieve ERC-4337 user operations |
13//! | [`models::wallet`] | Query wallet balances and NFT holdings |
14//!
15//! ## Quick Start
16//!
17//! ```no_run
18//! use circle_buidl_wallets::{BuidlWalletsClient, models::transfer::ListTransfersParams};
19//!
20//! #[tokio::main]
21//! async fn main() -> Result<(), circle_buidl_wallets::Error> {
22//! let client = BuidlWalletsClient::new("your_api_key");
23//! let params = ListTransfersParams {
24//! wallet_addresses: Some("0xYourWalletAddress".to_string()),
25//! ..Default::default()
26//! };
27//! let transfers = client.list_transfers(¶ms).await?;
28//! println!("Found {} transfers", transfers.data.transfers.len());
29//! Ok(())
30//! }
31//! ```
32//!
33//! ## Authentication
34//!
35//! All requests require a Circle API key, which can be created in the
36//! [Circle Developer Console](https://console.circle.com).
37//!
38//! ## Error Handling
39//!
40//! Every fallible operation returns [`Error`], which captures both HTTP-level
41//! transport failures and API-level error responses from Circle.
42//!
43//! ## Feature Flags
44//!
45//! This crate currently has no optional feature flags.
46
47#![deny(missing_docs)]
48
49pub mod client;
50pub mod error;
51pub mod models;
52
53pub use client::BuidlWalletsClient;
54pub use error::Error;