Overview
The backend polls on-chain state on demand. There is no mechanism for the contract or a Horizon event indexer to push events to the backend, causing latency in status updates.
Specifications
Features:
- Horizon event streaming script that listens to contract topic events
- Signs events with a shared secret and POSTs to backend webhook endpoint
- Backend webhook handler verifies signature and updates DB
Tasks:
- Create scripts/event-indexer.ts using Stellar SDK SSE
- Wire to existing WebhooksController in backend
- Add integration test
Impacted Files:
- contracts/earn-quest/examples/indexer-example.ts (extend)
- BackEnd/src/modules/webhooks/webhooks.controller.ts`n
Acceptance Criteria:
- On-chain events delivered to backend within 10s
- Backend DB status updated on receipt
Overview
The backend polls on-chain state on demand. There is no mechanism for the contract or a Horizon event indexer to push events to the backend, causing latency in status updates.
Specifications
Features:
Tasks:
Impacted Files:
Acceptance Criteria: