Autonomous Oracles for Networked Aquatic systems — Real water protection through decentralized infrastructure and AI-powered analysis on Solana.
Transform water quality monitoring from reactive crisis management to proactive protection:
- 🌐 DePIN Foundation — Community-owned sensors + smartphone reports
- 🤖 Autonomous AI Agents — Self-executing intelligence with real Solana payments
- 💰 x402 Micropayments — HTTP 402 Payment Required for sustainable data economy
- 💳 Instant Payouts — Node operators receive earnings via Phantom CASH (ApplePay/GooglePay/VISA)
- 📊 Oracle Integration — Switchboard price feeds for transparent USD pricing
- 🔗 Real-Time Intelligence — USGS + Open-Meteo + blockchain synthesis
| Page | Purpose |
|---|---|
/dashboard |
Network overview + real-time agent activity |
/atlas |
Interactive map (Open-Meteo + USGS + AONA nodes) |
/nodes |
Sensor network with reputation rankings |
/alerts |
AI-generated water quality alerts (EPA standards) |
/contribute |
Submit smartphone sensor reports → earn Phantom CASH |
/idl |
Solana program documentation |
git clone https://github.com/ValenteCreativo/AONA.git
cd AONA
npm installnpm run seed
# Creates 10 water monitoring nodes on Solana devnetnpm run agent
# Watch real x402 payments in action!
# Agent discovers nodes → pays SOL → fetches data → analyzes → generates alertsnpm run dev
# Open http://localhost:3000┌──────────────────────┐
│ Physical Sensors │ IoT devices + smartphone apps
│ pH, turbidity, temp │
└──────────┬───────────┘
│
▼
┌──────────────────────┐
│ Solana Blockchain │ Anchor Program: 3SPZr1HBn...
│ Node Registry │ Reputation-based pricing
│ State Accounts │ Latest readings
└──────────┬───────────┘
│
▼
┌──────────────────────┐
│ x402 Payment API │ HTTP 402 Protocol
│ GET /nodes │ FREE — discover network
│ GET /reading/[id] │ PAID — requires SOL payment
│ Verify on-chain tx │ Before serving data
└──────────┬───────────┘
│
▼
┌──────────────────────┐
│ AI Water Analyst │ Autonomous Agent
│ 1. Discover nodes │
│ 2. Send SOL payment │ Real Solana transactions
│ 3. Fetch data │ + USGS + Open-Meteo enrichment
│ 4. EPA analysis │ Water quality standards
│ 5. Generate alerts │ Critical/Warning/Info
└──────────┬───────────┘
│
▼
┌──────────────────────┐
│ Next.js Dashboard │
│ Real-time atlas │ Leaflet maps
│ Impact metrics │ Protection stats
│ Alert management │ AI warnings
│ Contribution portal │ Earn Phantom CASH
└──────────────────────┘
Program Address: 3SPZr1HBntkGvrTUCZnivEpCm4PsShHZ8nbxYeLUotwL
Network: Solana Devnet
View on Explorer
Built with sponsor technologies driving the Solana ecosystem forward:
- Solana — Sub-second finality, $0.00025 per transaction
@solana/web3.jsv1.98.4@coral-xyz/anchorv0.32.1 (Anchor framework)
- x402 Protocol — HTTP 402 Payment Required
@coinbase/x402v0.7.1- Autonomous agent payments with on-chain verification
- Switchboard Oracle — SOL/USDC price feeds
@switchboard-xyz/solana.jsv3.2.5- Real-time pricing for micropayments
- Phantom CASH — Instant fiat conversion
- ApplePay, GooglePay, VISA integration
- DePIN-to-fiat bridge for contributors
- Next.js 15.1.6 — App router + React Server Components
- Tailwind CSS v4.1.9 — Minimalist aqua-shodō aesthetic
- Leaflet + react-leaflet — Interactive maps
- shadcn/ui — Radix UI components
- USGS Water Services — Government watershed data (13,500+ sites)
- Open-Meteo — Global weather forecasts
Location: agents/water-analyst/agent.js
Fully autonomous program demonstrating trustless agent architecture with real Solana payments:
npm run agent- Wallet Setup — Generate ephemeral keypair + airdrop SOL
- Node Discovery — Fetch sensor network from blockchain
- Payment Execution — Send SOL to node operators via x402
- Data Purchase — Retrieve readings with on-chain verification
- EPA Analysis — Check water quality against federal standards
- Alert Generation — Create actionable contamination warnings
- JSON Output — Save results to
public/agent-output.json
🤖 AONA Water Analyst Agent starting...
✅ Generated wallet: 76nEUPUPV2H7V5Gt2yL64TKNr2f83wSyexixwAu91wUc
💰 Balance: 1.0 SOL
🔍 Discovering nodes...
✅ Found 3 nodes on-chain
💧 Consulting: Colorado River — Grand County
💸 Sending payment: 0.001 SOL...
✅ Payment sent: 2tC5MYYf6NPKLNqH...
📡 Fetching data...
✅ Reading received
pH: 6.2 ⚠️ CRITICAL (below 6.5)
============================================================
📊 AGENT EXECUTION SUMMARY
============================================================
Nodes Consulted: 3
Total Spent: 0.003 SOL
Alerts Generated: 5 (2 Critical, 2 Warning, 1 Info)
Overall Water Quality: FAIR
============================================================Discover all water monitoring nodes with reputation rankings.
Response:
{
"nodes": [{
"id": "node-001-colorado",
"name": "Colorado River — Grand County",
"authority": "AuthorityPubkey...",
"reputation": {
"score": 92,
"rank": "Platinum",
"totalReadings": 1547,
"uptime": 98.5
},
"price": { "sol": 0.001, "usd": 0.02 }
}],
"count": 3,
"programId": "3SPZr1HBntkGvrTUCZnivEpCm4PsShHZ8nbxYeLUotwL"
}Without Payment → HTTP 402:
{
"error": "Payment required",
"price": { "sol": 0.001, "usd": 0.02 },
"recipient": "AuthorityPubkey..."
}With Payment (header: X-Payment-Signature) → Data:
{
"reading": { "ph": 7.2, "turbidity": 1.8, "temperature": 18.5 },
"enrichment": {
"usgs": { "siteName": "Colorado River at Glenwood Springs" },
"weather": { "temperature": 22.5, "precipitation": 0 }
},
"payment": { "verified": true, "amount": { "sol": 0.001 } }
}Program ID: 3SPZr1HBntkGvrTUCZnivEpCm4PsShHZ8nbxYeLUotwL
Framework: Anchor 0.32.1
- Node Account (PDA) — Seeds:
["node", authority, agent]- Stores operator address (payment recipient), authorized agent, metadata
- State Account (PDA) — Seeds:
["state", node]- Latest readings: pH, turbidity, conductivity, temp, level, sequence
create_node(name)— Initialize new sensorsubmit_reading(data)— Submit water quality data (agent-only)
- Agent authorization via signature verification
- PDA validation prevents unauthorized modifications
- Custom error:
UnauthorizedAgent(6000)
Full Documentation: Visit /idl page or run npm run idl
Agent analyzes readings against EPA Safe Drinking Water Act standards:
| Parameter | Safe | Warning | Critical | Unit |
|---|---|---|---|---|
| pH | 6.5-8.5 | Outside range | <6.0 or >9.0 | — |
| Turbidity | <0.5 | 0.5-1.0 | >1.0 | NTU |
| Temperature | <25 | 25-30 | >30 | °C |
| Conductivity | <1000 | 1000-1500 | >1500 | μS/cm |
Alert Levels: 🔴 Critical (immediate action) | 🟠 Warning (monitor) | 🟡 Info (awareness)
Anyone can contribute water quality reports using their smartphone:
- Visit
/contributepage - Enable Geolocation — Auto-detect your location
- Report Conditions — Describe water appearance, odor, debris
- AI Verification — Agent cross-references with USGS + Open-Meteo
- Earn Rewards — Verified reports receive SOL micropayments to Phantom CASH
- Convert to Fiat — Instant ApplePay/GooglePay/VISA conversion
Making water stewardship economically sustainable for everyday contributors worldwide.
MIT License — See LICENSE
Built with technologies advancing the Solana ecosystem:
- Solana Foundation — High-performance blockchain infrastructure
- Coinbase — x402 Protocol specification and SDK
- Switchboard — Decentralized oracle framework
- Phantom — CASH integration for seamless DePIN-to-fiat conversion
- USGS — Free public water quality data
- Open-Meteo — Free global weather forecasts
🌊 Water knows. The network translates. AONA. 🌊
From México with 💙