Document how to build a reliable off-chain indexer over Shade's events — the foundation for dashboards, notifications, reporting, and reconciliation — including how to handle reorgs, gaps, and backfills.
Proposed steps:
- Create
docs/guides/indexing-events.md.
- Document the data sources: RPC
getEvents, the pagination/cursor model, and retention limits that force periodic backfills from an archive.
- Provide a recommended relational schema for merchants, invoices, payments, refunds, subscriptions, and tickets derived from the event stream.
- Document the ingestion loop: cursor persistence, batching, idempotent upserts keyed by ledger sequence and event index, and gap detection.
- Document reconciliation: periodically comparing indexed state against on-chain reads (
get_invoice, get_merchant_analytics) and how to repair drift.
- Document reorg and failed-transaction handling.
- Include a worked minimal indexer example for one event type.
Acceptance criteria:
docs/guides/indexing-events.md exists.
- A concrete schema and ingestion loop are specified.
- Idempotency, gap detection, and backfill strategies are documented.
- A reconciliation procedure against on-chain state is included.
Document how to build a reliable off-chain indexer over Shade's events — the foundation for dashboards, notifications, reporting, and reconciliation — including how to handle reorgs, gaps, and backfills.
Proposed steps:
docs/guides/indexing-events.md.getEvents, the pagination/cursor model, and retention limits that force periodic backfills from an archive.get_invoice,get_merchant_analytics) and how to repair drift.Acceptance criteria:
docs/guides/indexing-events.mdexists.