@seraph-labs/shared

v0.1.0

Published

Shared TypeScript types, database schema, and utilities for the Seraph cross-chain explorer.

Readme

seraph-shared

Shared TypeScript types, database schema, and utilities for the Seraph cross-chain explorer.

All four Seraph services — indexer, API, and web — import from this package to stay in sync on core data structures.

What's inside

seraph-shared/
├── src/
│   ├── types/          # Core TypeScript interfaces and enums
│   ├── schema/         # Database schema (Supabase/PostgreSQL)
│   └── utils/          # Shared helper functions
└── index.ts            # Barrel export

Core types

import {
  CrossChainEvent,
  StitchedTransaction,
  TxStatus,
  ChainId,
  ProtocolId,
  ProtocolAdapter,
} from '@elyon-labs/seraph-shared'

TxStatusPending | InFlight | Confirmed | Failed

CrossChainEvent — a single indexed event from any supported bridge protocol

StitchedTransaction — a correlated source + destination event pair representing a full cross-chain journey

ProtocolAdapter — the standard interface all 14 protocol adapters implement

Supported protocols

LayerZero V2 · Wormhole · Axelar · Across · Stargate · CCTP · Hop · Connext (MVP — 8 of 14)

Usage

This package is consumed locally across the polyrepo. Clone alongside the service repos and reference via tsconfig path aliases or npm link during development.

// tsconfig.json in consumer repo
{
  "compilerOptions": {
    "paths": {
      "@elyon-labs/seraph-shared": ["../seraph-shared/src"]
    }
  }
}