Skip to content

Add runnable indexer entrypoints for streams and distributions #56

Description

@pragmaticAweds

Context

The indexer packages currently expose library modules and dev scripts that watch src/index.ts, but there is no concrete runtime entrypoint that loads config, builds the RPC client, registers handlers, starts polling, and shuts down cleanly. Contributors need a runnable path for local indexing after the poller and repositories are wired.

Scope

  • Add stream indexer runtime entrypoint
  • Add distribution indexer runtime entrypoint
  • Load validated indexer config with loadIndexerConfig
  • Register domain handlers based on configured contract IDs
  • Start the poller from the configured start ledger and interval
  • Handle SIGINT/SIGTERM with graceful shutdown logs
  • Add root/package scripts for running each indexer locally
  • Document local run commands and required environment variables

Out of Scope

  • GraphQL API server
  • Production deployment manifests
  • New database schema design beyond dependencies

Acceptance Criteria

  • bun run indexer:streams or equivalent starts the streams indexer
  • bun run indexer:distributions or equivalent starts the distributions indexer
  • Missing required config fails fast with a clear error
  • Runtime startup is covered by tests or a small composition test with mocked dependencies
  • README documents the commands and required env values
  • bun run indexer:type-check passes
  • bun run indexer:test passes
  • bun run indexer:lint passes

Dependencies

Suggested Files or Packages

  • indexer/streams/src/
  • indexer/distributions/src/
  • indexer/common/src/config/
  • package.json
  • indexer/README.md

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave program

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions