Skip to content

Feat/horizon listener skeleton#100

Open
KingFRANKHOOD wants to merge 3 commits intoDisciplr-Org:mainfrom
KingFRANKHOOD:feat/horizon-listener-skeleton
Open

Feat/horizon listener skeleton#100
KingFRANKHOOD wants to merge 3 commits intoDisciplr-Org:mainfrom
KingFRANKHOOD:feat/horizon-listener-skeleton

Conversation

@KingFRANKHOOD
Copy link

Add Stellar Horizon vault listener service skeleton Closes #14

Description

This PR adds a dedicated Horizon listener module in listener.ts to monitor vault contract events. It establishes the foundational pipeline for pulling, normalizing, and enqueuing Stellar events for downstream processing.

What Changed

  • Listener Module: Introduced listener.ts for vault contract event monitoring.
  • Network Config: Added support for Testnet and Mainnet via environment variables, including optional Horizon URL overrides.
  • Processing Pipeline: Implemented a basic "Pull → Normalize → Log → Enqueue" flow.
  • App Integration: Wired the listener into the main application bootstrap in index.ts, controlled by an enable flag.
  • Documentation: Updated README.md with new listener-specific environment variables.

Event Subscriptions

The listener is designed to support the following vault events:

  • vault_created
  • validation
  • release
  • redirect

✅ Checklist

  • Horizon listener service/module added
  • Env-based network config (testnet/mainnet) added
  • Contract event subscription support added
  • Basic log + enqueue processing pipeline implemented
  • Startup wiring integrated into app bootstrap
  • Tests added for config parsing and processing pipeline

CI & Configuration Fixes

Included critical fixes to unblock CI and improve environment stability:

  • package.json: Dependency/script adjustments.
  • eslint.config.js: Updated linting rules.
  • analytics.ts: Configuration refinements.

Validation

  • New Tests: Added horizonListener.test.ts covering config parsing and pipeline logic.
  • Local Run: Verified listener initializes correctly with local .env settings.

Branch

feat/horizon-vault-listener

@KingFRANKHOOD
Copy link
Author

@1nonlypiece Please review and merge. All conflicts resolved

@1nonlypiece
Copy link
Contributor

@KingFRANKHOOD Can you resolve the conflicts?

@KingFRANKHOOD
Copy link
Author

Yes, I'll do so now

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.

Horizon Listener Service Skeleton

2 participants