Skip to main content

On This Page

Prove AI Agent Output Integrity for $0.01: x402 + NEAR Anchoring in Practice

3 min read
Share

These articles are AI-generated summaries. Please check the original sources for full details.

How to prove an AI agent output existed — x402 + NEAR anchoring in practice

AOTrust is a live notarization service that issues Provenance Data Records (PDRs) for $0.01 USDC via x402 on Base L2. It has already issued 9 PDRs on Base Mainnet, all anchored to NEAR Mainnet with Ed25519 signatures.

Why This Matters

Logs are mutable, timestamps lie, and Git history can be rewritten, yet deployed AI agents generate critical outputs like financial reports or medical summaries that demand cryptographic proof of existence and integrity. Without an independent notary binding a hash to time at minimal cost—$0.01 per proof—disputes over whether an agent produced specific content or if it was modified go unresolved.

Key Insights

    • Blind notarization: The notary never sees the artifact—only its SHA-256 hash—ensuring confidentiality while proving existence at a timestamp (AOTrust, 2026).
    • Self-contained verification: The PDR is a 239-byte binary record with an Ed25519 signature (NEP-413 standard), verifiable offline without any API calls using a standalone Python parser (open standard, MIT license).
    • On-chain anchoring: PDRs are batched into Merkle trees every ~16 minutes and anchored on NEAR Mainnet via the merkle_anchor contract, providing a second layer of independent timestamping via NEAR consensus.
    • x402 payment protocol: The API returns HTTP 402 with exact payment details; users pay $0.01 USDC inline via EIP-3009 transfer on Base L2—no signup, no API key required.

Working Examples

Hash the AI artifact locally before sending to the notary.

# Step 1 — Hash your agent output
import hashlib
report = b"The Q3 revenue projection based on agent analysis is $2.4M..."
work_hash = hashlib.sha256(report).hexdigest()
print(work_hash)
# → e.g. "a1b2c3d4e5f6...64 hex chars..."
# Step 2 — Request a quote (HTTP 402)
curl -s https://api.aotrust.link/v1/notarize/quote \
-H "Content-Type: application/json" \
-d '{"work_hash":"a1b2c3d4e5f6...your_sha256_hash..."}'

Practical Applications

    • Use case: An autonomous trading agent generates financial reports – AOTrust proves the report existed at time T and remains unmodified. Pitfall: Relying solely on server logs – logs are mutable and can be altered after the fact.
    • Use case: A multi-agent pipeline where Agent A passes output to Agent B – each stage can be independently notarized for full chain-of-custody. Pitfall: Assuming Git history suffices – Git commits can be force-pushed or rebased without trace.
    • Use case: Compliance audit of agent-generated medical summaries – cryptographic receipts provide signed timestamps from an independent notary. Pitfall: Using centralized timestamping services that require trust in a single party’s database.

References:

Continue reading

Next article

Robust Solana Token Staking Smart Contract Built with Anchor Now Open-Sourced

Related Content