Skip to content

Seraph-Labz/seraph-indexer

Repository files navigation

seraph-indexer

Multi-chain event indexer for Seraph — the cross-chain transaction explorer.

Ingests bridge events from EVM, Solana, and Cosmos runtimes, persists them to Postgres, and stitches correlated events into unified cross-chain transaction journeys.

Prerequisites

  • Node.js >=20.0.0
  • npm (bundled with Node)
  • Supabase project (Postgres + TimescaleDB)
  • Upstash Redis instance
  • Alchemy Growth API key (EVM)
  • Helius API key (Solana) — only required when running the Solana runtime

Quickstart

# 1. Install dependencies
npm install

# 2. Configure environment
cp .env.example .env
# edit .env and fill in DATABASE_URL, REDIS_URL, ALCHEMY_API_KEY (minimum)

# 3. Run the indexer in watch mode
npm run dev

Scripts

Script What it does
npm run dev Run with tsx watch mode — restarts on file change
npm run build Compile TypeScript to dist/
npm start Run the compiled output (production)
npm run typecheck Type-check without emitting
npm run test Run Vitest once
npm run test:watch Run Vitest in watch mode
npm run lint ESLint over src/
npm run lint:fix ESLint with --fix
npm run format Prettier write
npm run format:check Prettier check (CI)

Project layout

src/
├── index.ts              # entrypoint — boots runtimes, stitcher, health server
├── config/               # typed env + chain registry
├── runtimes/             # evm/, solana/, cosmos/ — subscribe & ingest
├── adapters/             # per-protocol parsers (LayerZero, Wormhole, ...)
├── stitcher/             # background correlation engine
├── db/                   # Kysely client, repositories, migrations
├── cache/                # Upstash Redis helpers
├── observability/        # pino, Sentry, metrics
└── utils/                # indexer-only helpers

Shared types (CrossChainEvent, TxStatus, ChainId, etc.) live in @seraph-labs/shared.

Architecture

See ADR-001 in the Seraph engineering docs for full architectural context.

License

MIT © Seraph Labs

About

Multi-chain event indexer for Seraph — EVM, Solana, and Cosmos bridge protocol adapters.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors