Expand description
§ProofGate SDK
Blockchain guardrails for AI agents. Validate transactions before execution to prevent wallet drains, infinite approvals, and other security risks.
§Example
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(())
}Structs§
- Agent
Check Response - Response from agent check.
- Agent
Registration - Registration info for an agent.
- Agent
Stats - Validation statistics for an agent.
- Evidence
Agent - Agent info in evidence.
- Evidence
Proof - Proof metadata in evidence.
- Evidence
Response - Response from evidence retrieval.
- Evidence
Result - Validation result in evidence.
- Evidence
Transaction - Transaction details in evidence.
- Proof
Gate - ProofGate SDK client.
- Usage
Response - Response from usage check.
- Validate
Request - Request for transaction validation.
- Validate
Response - Response from transaction validation.
- Validation
Check - Individual check result from validation.
Enums§
- Error
- Error type for ProofGate SDK operations.
- Severity
- Severity level for validation checks.
- Trust
Tier - Trust tier for an agent.
- Validation
Result - Validation result status.
- Verification
Status - Verification status for an agent.