Skip to content

Add metrics collection, typed events, transaction tracking, and Asset Pool integration - #1215

Merged
Kingsman-99 merged 5 commits into
Stellar-split:mainfrom
ubermensh-323:drips/1140-1141-1142-1159
Oct 21, 2026
Merged

Kingsman-99 merged 5 commits into
Stellar-split:mainfrom
ubermensh-323:drips/1140-1141-1142-1159

Conversation

@ubermensh-323

Copy link
Copy Markdown

Summary

Add metrics collection, typed events, transaction tracking, and Asset Pool integration

What was solved

#1140 — Add performance metrics

Add a performance metrics subsystem to the SDK: a lightweight metrics collector that records RPC request latency, cache hit/miss rates, and batch operation performance, plus an export API producing standard-format (e.g., Prometheus/JSON) metrics for monitoring integration. Wire collection into existing RPC/cache/batch paths with minimal overhead and expose historical/aggregated metrics.

Addressed:

  • Changed: src/analyticsTracking.ts, src/analyticsDashboardExporter.ts
  • Implement a metrics collection system (counters, histograms/timers, gauges) with minimal runtime overhead
  • Track RPC request latency (per-method timing and aggregation)
  • Track cache hit/miss rates

#1141 — Implement event emitter

Add a typed event emitter to the SDK that emits state-change and transaction lifecycle events, supports registration/deregistration, filtering, and async handlers without leaking listeners.

Addressed:

  • Changed: src/events/eventEmitter.ts, src/events/types.ts
  • Design an intuitive event emitter interface (typed events, on/off/once/emit)
  • Implement event registration and deregistration
  • Add transaction lifecycle events (e.g., submitted/confirmed/failed)

#1142 — Add transaction event tracking

Add a transaction event tracking system that emits structured events for each transaction lifecycle step (created, simulated, signed, submitted, confirmed) plus error events, so the UI can track transaction progress. This requires a small event schema/emitter module and wiring it into the existing transaction flow.

Addressed:

  • Changed: src/transactionEvents.ts, src/transactionBuilder.ts, src/transactionSigner.ts
  • Design a transaction event schema covering created, simulated, signed, submitted, confirmed, and error events
  • Emit an event on transaction creation
  • Emit an event on simulation

#1159 — Implement Stellar Asset Pool integration for liquidity

Add a Stellar Asset Pool integration layer to the SDK covering pool interaction, liquidity provider support, swap routing, slippage calculation, and pool monitoring. The repo already has an AMM calculator (src/ammCalculator.ts) and price oracle, so the contribution should build on those patterns with a focused pool module plus tests, staying within the issue's stated scope.

Addressed:

  • Changed: src/ammCalculator.ts
  • Research and model Stellar Asset Pool protocol interactions (pool reserves, share accounting)
  • Implement a pool interaction layer for querying pools and building deposit/withdraw/swap operations
  • Add liquidity provider support (deposit/withdraw liquidity, LP share tracking)

Changes

  • src/analyticsTracking.ts (modify)
  • src/analyticsDashboardExporter.ts (modify)
  • src/events/eventEmitter.ts (create)
  • src/events/types.ts (create)
  • src/transactionEvents.ts (create)
  • src/transactionBuilder.ts (create)
  • src/transactionSigner.ts (create)
  • src/ammCalculator.ts (modify)

Approach

  1. Add performance metrics #1140 — Add performance metrics (Changed: src/analyticsTracking.ts, src/analyticsDashboardExporter.ts)
  2. Implement event emitter #1141 — Implement event emitter (Changed: src/events/eventEmitter.ts, src/events/types.ts)
  3. Add transaction event tracking #1142 — Add transaction event tracking (Changed: src/transactionEvents.ts, src/transactionBuilder.ts, src/transactionSigner.ts)
  4. Implement Stellar Asset Pool integration for liquidity #1159 — Implement Stellar Asset Pool integration for liquidity (Changed: src/ammCalculator.ts)

Issues

Closes #1140
Closes #1141
Closes #1142
Closes #1159

@drips-wave

drips-wave Bot commented Oct 20, 2026

Copy link
Copy Markdown

@ubermensh-323 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

@Kingsman-99
Kingsman-99 merged commit 5f5f372 into Stellar-split:main Oct 21, 2026
1 check passed
@grantfox-oss grantfox-oss Bot mentioned this pull request Oct 21, 2026
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.

Implement Stellar Asset Pool integration for liquidity Add transaction event tracking Implement event emitter Add performance metrics

2 participants