Skip to content

feat: add SSE ledger close event stream endpoint#210

Merged
Sulex45 merged 2 commits into
stellarkit-lab-devtools:mainfrom
unixfundz:feat/sse-ledger-stream
Jun 7, 2026
Merged

feat: add SSE ledger close event stream endpoint#210
Sulex45 merged 2 commits into
stellarkit-lab-devtools:mainfrom
unixfundz:feat/sse-ledger-stream

Conversation

@unixfundz

Copy link
Copy Markdown
Contributor

Closes #200

Summary

  • Adds GET /stream/ledgers SSE endpoint in src/routes/stream.js
  • Streams { sequence, closedAt, baseFee, transactionCount, operationCount } for each new ledger close
  • Sends : ping heartbeat comment every 30 seconds to prevent proxy timeouts
  • Cleans up Horizon stream subscription on client disconnect
  • 4 tests added in tests/stream/ledgers.test.js

What was tested

  • All 4 ledger SSE tests pass

…ools#200)

- Add GET /stream/ledgers SSE endpoint in src/routes/stream.js
- Streams { sequence, closedAt, baseFee, transactionCount, operationCount }
  for each new ledger close via Horizon subscription
- Sends heartbeat comment (': ping') every 30 seconds
- Cleans up Horizon stream subscription on client disconnect
- Add tests/stream/ledgers.test.js with 4 tests
@drips-wave

drips-wave Bot commented Jun 2, 2026

Copy link
Copy Markdown

@unixfundz 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

@Sulex45

Sulex45 commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

resolve conflicts in src/routes/stream.js

@Sulex45 Sulex45 merged commit 069506a into stellarkit-lab-devtools:main Jun 7, 2026
1 of 3 checks passed
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.

Real-Time Ledger Close Event Stream via SSE

2 participants