1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
//! # ProofGate SDK
//!
//! Blockchain guardrails for AI agents. Validate transactions
//! before execution to prevent wallet drains, infinite approvals,
//! and other security risks.
//!
//! ## Example
//!
//! ```rust,no_run
//! use proofgate::{ProofGate, ValidateRequest};
//!
//! #[tokio::main]
//! async fn main() -> Result<(), proofgate::Error> {
//! let pg = ProofGate::new("pg_your_api_key")?;
//!
//! let result = pg.validate(ValidateRequest {
//! from: "0xYourAgentWallet".to_string(),
//! to: "0xContractAddress".to_string(),
//! data: "0xa9059cbb...".to_string(),
//! value: Some("0".to_string()),
//! guardrail_id: None,
//! chain_id: None,
//! }).await?;
//!
//! if result.safe {
//! // Execute the transaction
//! println!("Transaction approved!");
//! } else {
//! println!("Blocked: {}", result.reason);
//! }
//!
//! Ok(())
//! }
//! ```
pub use ProofGate;
pub use Error;
pub use *;