circle_compliance/lib.rs
1//! Rust client for the Circle Web3 Services Compliance Engine API.
2//!
3//! This crate provides a typed, async HTTP client for the
4//! [Circle W3S Compliance Engine API](https://developers.circle.com/api-reference/w3s/compliance),
5//! which enables automated blockchain address and transaction screening for
6//! regulatory compliance (OFAC, AML/KYC workflows).
7//!
8//! ## Covered Endpoints
9//!
10//! | Module | Functionality |
11//! |--------|---------------|
12//! | [`models::screening`] | Screen blockchain addresses for sanctions / risk |
13//!
14//! ## Quick Start
15//!
16//! ```no_run
17//! use circle_compliance::{
18//! ComplianceClient,
19//! models::screening::{Chain, ScreenAddressRequest},
20//! };
21//!
22//! #[tokio::main]
23//! async fn main() -> Result<(), circle_compliance::Error> {
24//! let client = ComplianceClient::new("your_api_key");
25//! let request = ScreenAddressRequest {
26//! idempotency_key: "550e8400-e29b-41d4-a716-446655440000".to_string(),
27//! address: "0xTargetAddress".to_string(),
28//! chain: Chain::Eth,
29//! };
30//! let result = client.screen_address(&request).await?;
31//! println!("Screening result: {:?}", result);
32//! Ok(())
33//! }
34//! ```
35//!
36//! ## Authentication
37//!
38//! All requests require a Circle API key, which can be created in the
39//! [Circle Developer Console](https://console.circle.com).
40//!
41//! ## Error Handling
42//!
43//! Every fallible operation returns [`Error`], which captures both HTTP-level
44//! transport failures and API-level error responses from Circle.
45
46#![deny(missing_docs)]
47
48pub mod client;
49pub mod error;
50pub mod models;
51
52pub use client::ComplianceClient;
53pub use error::Error;