Skip to main content

Crate proofgate

Crate proofgate 

Source
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§

AgentCheckResponse
Response from agent check.
AgentRegistration
Registration info for an agent.
AgentStats
Validation statistics for an agent.
EvidenceAgent
Agent info in evidence.
EvidenceProof
Proof metadata in evidence.
EvidenceResponse
Response from evidence retrieval.
EvidenceResult
Validation result in evidence.
EvidenceTransaction
Transaction details in evidence.
ProofGate
ProofGate SDK client.
UsageResponse
Response from usage check.
ValidateRequest
Request for transaction validation.
ValidateResponse
Response from transaction validation.
ValidationCheck
Individual check result from validation.

Enums§

Error
Error type for ProofGate SDK operations.
Severity
Severity level for validation checks.
TrustTier
Trust tier for an agent.
ValidationResult
Validation result status.
VerificationStatus
Verification status for an agent.