proofgate
Blockchain guardrails for AI agents. Validate transactions before execution.
What is ProofGate?
ProofGate validates blockchain transactions before your AI agent executes them. It prevents:
- 🚫 Wallet drains from prompt injection attacks
- 🚫 Infinite approvals to malicious contracts
- 🚫 Excessive spending beyond daily limits
- 🚫 High slippage swaps that lose money
Installation
Add to your Cargo.toml:
[]
= "0.1"
= { = "1.0", = ["rt-multi-thread", "macros"] }
Quick Start
use ;
async
API Reference
ProofGate::new(api_key)
Create a new ProofGate client.
let pg = new?;
ProofGate::with_config(config)
Create with custom configuration:
use ;
use Duration;
let pg = with_config?;
pg.validate(request)
Validate a transaction:
let result = pg.validate.await?;
// ValidateResponse has:
// - validation_id: String
// - result: ValidationResult (Pass, Fail, Pending)
// - reason: String
// - safe: bool
// - checks: Vec<ValidationCheck>
// - authenticated: bool
// - evidence_uri: String
pg.validate_or_throw(request)
Validate and return error if unsafe:
use Error;
match pg.validate_or_throw.await
pg.check_agent(wallet)
Check an agent's trust score:
let agent = pg.check_agent.await?;
println!;
// Output: 🥇 85/100
pg.get_evidence(validation_id)
Get evidence for a past validation:
let evidence = pg.get_evidence.await?;
println!;
Guardrails
Guardrails define what your agent can do. Create them at proofgate.xyz/guardrails.
Example guardrail rules:
- Whitelist contracts: Only Uniswap, Aave, Compound
- Max approval: 1,000 USDC per approval
- Max slippage: 1% on swaps
- Daily limit: $10,000 total spending
Error Handling
use Error;
match pg.validate.await
Feature Flags
native-tls(default) - Use native TLSrustls- Use rustls for TLS
[]
= { = "0.1", = false, = ["rustls"] }
Get Your API Key
- Go to proofgate.xyz
- Connect your wallet
- Register your AI agent
- Copy your API key (starts with
pg_)
Free tier: 100 validations/month
Links
- Website: proofgate.xyz
- Documentation: docs.rs/proofgate
- Dashboard: proofgate.xyz/dashboard
- GitHub: github.com/ProofGate/proofgate-rs
License
MIT © 0xCR6