Skip to content

Create webhook endpoint for Stellar Horizon event notifications #963

@Anuoluwapo25

Description

@Anuoluwapo25

Summary

The event indexer currently polls Stellar Horizon on a timer. Supporting push webhooks from Horizon (or a relay service) would reduce polling overhead and give near-real-time event processing.

Proposed Endpoint

POST /api/webhooks/horizon

  • Verifies HMAC signature of incoming payload
  • Parses event and dispatches to the existing event-indexer service
  • Returns 200 immediately, processes async

Acceptance Criteria

  • Endpoint created with HMAC-SHA256 signature verification
  • Unverified requests rejected with 401
  • Payload parsed and routed to event-indexer.service.ts
  • Integration test with a signed and unsigned payload
  • WEBHOOK_SECRET added to server/.env.example

Files

  • server/src/routes/
  • server/src/services/event-indexer.service.ts

Metadata

Metadata

Assignees

No one assigned

    Labels

    backendAPI/database/infrastructurefeatureNew feature implementationintegrationContract-to-frontend wiring

    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