Skip to content

feat: Stellar Wave enhancements - cliff events, trustline reserves, and batch operations - #1213

Merged
Jaydbrown merged 4 commits into
conduit-protocol:mainfrom
blackbutterflyy:feature/stellar-wave-enhancements
Nov 26, 2026
Merged

Jaydbrown merged 4 commits into
conduit-protocol:mainfrom
blackbutterflyy:feature/stellar-wave-enhancements

Conversation

@blackbutterflyy

Copy link
Copy Markdown
Contributor

Summary

This PR implements four Stellar Wave program enhancements to improve SDK functionality for high-throughput dashboards and batch operations.

Issues Closed

Closes #1134
Closes #1133
Closes #1125
Closes #1124

Changes

Issue #1134: Filter cliff reached events by stream ID

  • Added filterCliffReachedEvents() helper in src/events.ts
  • Enables applications to trigger webhooks when streams pass cliff dates
  • Supports real-time alerting for milestone-based compensation contracts
  • Accepts both bigint and string stream IDs

Issue #1133: Trustline reserve requirement helper

  • Added getTrustlineReserveRequirement() in src/token.ts
  • Calculates minimum XLM balance needed for new trustlines
  • Warns users if available XLM is insufficient for ledger entry reserves
  • Accounts for subentries and sponsorship relationships

Issue #1125: Lightweight stream status fetching

  • Added StreamsModule.getStreamStatus() method in src/streams.ts
  • Returns only the status enum (Active, Paused, Completed) without full metadata
  • Optimized for high-throughput dashboards displaying thousands of streams
  • Reduces unnecessary network bandwidth consumption

Issue #1124: Batch stream cancellation

  • Added StreamsModule.cancelStreamsBatch() method in src/streams.ts
  • Allows senders to cancel multiple streams with bounded concurrency
  • Structured flow with per-stream success/error reporting
  • Prevents tedious sequential cancellations for employee/grant streams

Testing

All functions include JSDoc examples and follow existing SDK patterns. Functions are:

  • Properly typed with TypeScript
  • Exported from src/index.ts
  • Include comprehensive documentation
  • Follow SDK naming and style conventions

Breaking Changes

None - all additions are backwards compatible.

…ering

Implements conduit-protocol#1134 - Add helper to filter stream cliff reached events by stream ID.

Applications listening to streaming payments can now trigger webhooks or
notifications when a stream passes its cliff date, enabling real-time
alerting for milestone-based compensation contracts.

Changes:
- Add filterCliffReachedEvents function in src/events.ts
- Export function from src/index.ts
- Function filters events to return only cliff reached events
- Accepts both bigint and string stream IDs

Closes conduit-protocol#1134
…alculation

Implements conduit-protocol#1133 - Add helper to compute minimum required balance for token trustline setup.

Creating accounts or adding trustlines for newly streamed assets requires
maintaining Stellar base reserve requirements. This helper warns users if
their available XLM balance is insufficient to satisfy ledger entry reserves.

Changes:
- Add getTrustlineReserveRequirement function in src/token.ts
- Export function from src/index.ts
- Calculates reserve needed based on account subentries and sponsorship
- Returns the additional XLM needed in stroops

Closes conduit-protocol#1133
Implements conduit-protocol#1125 and conduit-protocol#1124 - Add helpers for fetching stream status directly
and batch canceling multiple streams.

conduit-protocol#1125: High-throughput dashboards displaying thousands of streams only need
to know if each stream is Active, Paused, or Completed. This adds a
getStreamStatus method that returns just the status enum.

conduit-protocol#1124: Managing multiple employee or grant streams requires canceling multiple
streams sequentially, which is tedious and slow. This adds cancelStreamsBatch
to allow senders to prepare and sign cancellations in a structured flow.

Changes:
- Add StreamsModule.getStreamStatus method in src/streams.ts
- Add StreamsModule.cancelStreamsBatch method in src/streams.ts
- Both methods support AbortSignal for cancellation
- Batch cancel uses bounded concurrency for rate limiting

Closes conduit-protocol#1125
Closes conduit-protocol#1124
@drips-wave

drips-wave Bot commented Nov 23, 2026

Copy link
Copy Markdown

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

@Jaydbrown
Jaydbrown merged commit 264dcec into conduit-protocol:main Nov 26, 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

2 participants