KGKasGraphGitHub

architecture

One Kaspa data plane with GraphQL, MCP, streaming, and verification surfaces.

KasGraph separates the public product site from the hosted node. The node and API are long-running services backed by Rust, TypeScript, and managed Postgres.

stage 01
Kaspa Node / RPC / wRPC

Blocks, accepted transactions, virtual-chain changes, and continuous notifications.

stage 02
KasGraph Indexer

Ingests Kaspa activity, tracks progress, handles reorg-aware state transitions, and dispatches work.

stage 03
Detectors + Mappings

Recognizes KRC assets, Covenant IDs, app patterns, and runs deterministic mapping handlers.

stage 04
Proof of Indexing

Builds checkpoint hashes over indexed entity state so output can be independently compared.

stage 05
PostgreSQL Entity Store

Stores registry rows, schemas, lineage, checkpoints, and versioned application entities.

stage 06
GraphQL / SDK / CLI / MCP / WebSocket / KasStream

Serves query, developer, agent, subscription, and streaming interfaces.

stage 07
Wallets / Explorers / Dashboards / AI Agents / Covenant Apps

Consumes indexed state without every product rebuilding a parser.

Indexer node

The Rust node ingests Kaspa RPC/wRPC, applies detector events, dispatches WASM mappings, persists entity versions, and writes POI checkpoints.

PostgreSQL store

Registry rows, migrations, per-subgraph schemas, lineage, entity state, reorg audit, and checkpoints live in Postgres.

GraphQL gateway

The TypeScript API package serves base gateway types plus per-subgraph schemas generated from deployed schema.graphql files.

MCP server

The MCP package delegates schema lookup and query execution to the same registry-aware gateway data plane.

KasStream and WebSocket

Streaming primitives and subscriptions expose near-live events without duplicating indexer state.

Proof of Indexing

POI hashes committed entity state per block so verifier code can detect divergence in published checkpoint chains.