Skip to content

Subgraph-style JS/Postgres indexer example - #130

Merged
truthixify merged 1 commit into
wraith-protocol:developfrom
heymide:indexer-example
Aug 1, 2026
Merged

Subgraph-style JS/Postgres indexer example#130
truthixify merged 1 commit into
wraith-protocol:developfrom
heymide:indexer-example

Conversation

@heymide

@heymide heymide commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Close: #116

Summary

Created a reference Subgraph-style indexer for Wraith Protocol on Stellar!

What's included:

  • Directory structure : stellar/examples/indexer/
  • Tech stack : TypeScript, Fastify, Postgres, PostGraphile, Docker Compose
  • Core features :
    • Ingests events from all 4 Wraith contracts (stealth-announcer, stealth-registry, stealth-sender, wraith-names)
    • Reorg-safe using watermark tracking and rollback to previous ledgers
    • GraphQL API for querying data (GraphiQL playground included)
  • Files created :
    • package.json : Project dependencies and scripts
    • tsconfig.json : TypeScript configuration
    • docker-compose.yml : Docker setup for Postgres and indexer
    • Dockerfile : Container image for indexer
    • .env.example : Environment variables
    • schema.sql : Postgres database schema
    • src/db.ts : Database utilities
    • src/processor.ts : Event processor with reorg handling
    • src/server.ts : Fastify server with PostGraphile
    • src/index.ts : Main entry point
    • src/processor.test.ts : Test for reorg handling
    • README.md : Documentation

@drips-wave

drips-wave Bot commented Jul 24, 2026

Copy link
Copy Markdown

@heymide Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@heymide

heymide commented Jul 24, 2026

Copy link
Copy Markdown
Contributor Author

Done, Close: #130

@truthixify

Copy link
Copy Markdown
Contributor

No CI signal on this branch. It predates recent workflow fixes on develop (pnpm 10 corepack pin, ci.yml trigger updates, etc). Rebase against latest develop and force-push; CI will fire on the new commit and I'll see the real state.

@heymide

heymide commented Aug 1, 2026

Copy link
Copy Markdown
Contributor Author

No CI signal on this branch. It predates recent workflow fixes on develop (pnpm 10 corepack pin, ci.yml trigger updates, etc). Rebase against latest develop and force-push; CI will fire on the new commit and I'll see the real state.

Done, Kindly merge

@truthixify
truthixify merged commit f940627 into wraith-protocol:develop Aug 1, 2026
8 checks passed
@truthixify

Copy link
Copy Markdown
Contributor

Merged. Nice work @heymide, the JS/Postgres indexer example is a great reference for downstream integrators.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Subgraph-style JS/Postgres indexer example

2 participants