How to Run
the Case.
A field guide to Walytics — built on Tatum Sui RPC, Walrus decentralized storage, and Gemini AI. Read the evidence. Interrogate the data.
Getting Started
Clone the repo, copy .env.example to .env.local, fill in your keys, then run: npm install && npm run dev. Walytics boots on localhost:3000.
Add TATUM_API_KEY to .env.local. Walytics routes all Sui RPC calls through https://sui-mainnet.gateway.tatum.io — no public node rate limits.
Set WALRUS_PACKAGE_ID in .env.local. Walytics listens for BlobRegistered events on Sui to build a live index of all blobs stored in Walrus.
Add GEMINI_API_KEY. Head to AI Analytics and ask questions like 'Who are the top publishers?' or 'How is storage trending this week?'
TATUM_API_KEYYour Tatum dashboard API key — used in the x-api-key header for all Sui RPC calls.
GEMINI_API_KEYGoogle AI Studio key — powers the Walytics Holmes chat and automated report generation.
WALRUS_PACKAGE_IDThe on-chain package ID of the Walrus protocol — used to filter BlobRegistered events.
Tatum Integration
Tatum operates managed Sui full nodes with high availability, no rate limits on authenticated keys, and consistent latency. Walytics uses a single authenticated client in lib/tatum.ts that injects the x-api-key header on every call — no public node congestion.
https://sui-mainnet.gateway.tatum.iosuix_queryEvents{ MoveEventType: '<PACKAGE>::blob_store::BlobRegistered' }x-api-key: <TATUM_API_KEY>const res = await fetch("https://sui-mainnet.gateway.tatum.io", {
method: "POST",
headers: {
"Content-Type": "application/json",
"x-api-key": process.env.TATUM_API_KEY!,
},
body: JSON.stringify({
jsonrpc: "2.0", id: 1,
method: "suix_queryEvents",
params: [{ MoveEventType: `${WALRUS_PACKAGE_ID}::blob_store::BlobRegistered` }, null, 50, false],
}),
});Walrus Storage
Walrus is a decentralized blob storage protocol built on Sui. Publishers submit blobs, which are sharded and distributed across storage nodes. Blob metadata — ID, size, encoding, epoch — is recorded on-chain as Move events.
Walytics calls suix_queryEvents via Tatum RPC, filtering for BlobRegistered events from the Walrus package. Each event is parsed, aggregated in memory, and surfaced in the dashboard and explorer — no off-chain database required.
Each BlobRegistered event exposes: blob_id, size (bytes),publisher address, epoch, and storage_type. These fields drive every chart, filter, and AI insight in Walytics.
Generated analytics reports are written back to Walrus as blobs — creating an immutable, on-chain audit trail of the metrics themselves. Walytics watches itself.
AI Analytics — Walytics Holmes
Walytics Holmes is a Gemini 2.0 Flash agent that receives the current aggregated Walrus metrics as system context on every chat turn. The model reasons over real on-chain data — blob counts, storage totals, publisher rankings, epoch trends — and answers in natural language.
"Who are the top publishers?"
"What is the average blob size?"
"How is storage trending this week?"
"Generate a weekly report"
The /api/chat route fetches fresh aggregated metrics from the Walrus event index, serialises them into a structured system prompt, then streams the Gemini response back to the client. The AI has no stale training knowledge of Walrus state — every answer is grounded in the latest on-chain data pulled through Tatum RPC.
Blob Explorer
Paginated table of every BlobRegistered event indexed from Walrus. Sorted by recency by default. Shows blob ID, size, publisher, and epoch.
Filter by publisher address to see storage from a specific actor. Filter by size range to find large or small blobs. Combine filters freely.
Click any row to open the detail panel. See full blob_id, raw size in bytes and human-readable format, epoch number, and storage type classification.
The explorer feeds selected blob data into Holmes. Ask targeted questions about a specific publisher or size cohort directly from the explorer view.
Architecture
Tech Stack
app/api/blobsServer route — queries Tatum RPC, returns paginated blob events
app/api/analyticsAggregates raw events into dashboard metrics
app/api/chatStreams Gemini responses with live metrics as system context
components/ExplorerClient component — filterable blob table + detail panel
components/HolmesChat UI — sends user prompt to /api/chat, streams reply tokens
lib/tatum.tsThin RPC client — wraps fetch with Tatum auth header
Resources
Walytics was built for the Tatum × Walrus hackathon. It demonstrates end-to-end use of Tatum enterprise Sui RPC nodes for on-chain analytics, Walrus decentralized storage as both a data source and write target, and Gemini AI as an intelligent query layer over live blockchain data.
Feature Overview
All on-chain reads go through Tatum's enterprise Sui node at sui-mainnet.gateway.tatum.io. Authenticated via TATUM_API_KEY header — fast, reliable, rate-limit-free.
Walytics subscribes to BlobRegistered events from the Walrus package on Sui. Each event carries blob ID, size, publisher, and epoch — the raw evidence.
Gemini 2.0 Flash powers the Holmes chat. The model receives live aggregated metrics as context and answers natural-language questions grounded in real on-chain data.
Browse every blob indexed from Walrus. Filter by publisher address, size range, or epoch. Click any row to inspect full blob metadata in the detail panel.
Real-time totals: blob count, cumulative storage, unique publishers, average blob size. Timeline charts show ingest rate trends across Walrus epochs.
One-click weekly analytics report: trend summaries, top-publisher breakdowns, and storage anomaly detection — all generated by Holmes from live data.