[SDK] Add and export runtime type guards for StreamStatus and VestingSchedule
Overview
External developers using @flowfi/sdk receive raw JSON data from RPC or backend and need runtime TypeScript type guards to narrow stream objects safely.
Problem
- Consumers must manually write assertions like
status === 'Active'without compiler-enforced type guard guarantees.
Proposed Changes
- In
packages/flowfi-sdk/src/types.ts, implement:isStreamStatus(value: unknown): value is StreamStatusisVestingSchedule(value: unknown): value is VestingSchedule
- Export guards from package entrypoint
index.ts.
Acceptance Criteria
- [ ] Type guards validate inputs and narrow TypeScript types accurately.
- [ ] Unit tests in
packages/flowfi-sdk/tests/cover valid and invalid inputs.
@flexible74 has applied to work on this issue as part of the Stellar Wave Program's 9th wave.
I can fix the issue please assign me to it
ℹ️ Repo Maintainers: To accept this application, review their application or assign @flexible74 to this issue.
@Rafiat30 has applied to work on this issue as part of the Stellar Wave Program's 9th wave.
Can i work on this
ℹ️ Repo Maintainers: To accept this application, review their application or assign @Rafiat30 to this issue.
Congratulations, @Rafiat30! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on September 30, 2026.
🧑💻 @Rafiat30: Please resolve the issue such that the repo's maintainers have enough time to review your contribution before the due date. You'll earn Points for completing the issue on-time, which will make you eligible for a share of the Stellar Wave Program's reward pool.
[!WARNING] When opening a PR, please link it to this issue to ensure it gets tracked accurately. Points are awarded when this issue is marked as completed by the maintainer.
🤠 Repo maintainers: Please keep an eye on the contributor's progress and review their work before the due date. You can manage this issue, including adjusting its complexity and points, here.
🌊 Happy Wave 🌊
This issue has been marked as completed by a Drips Wave moderator for @Rafiat30 as part of the Stellar Wave Program's 9th Wave 🥳
Moderator's reason: [Auto-assessed] The PR (#1555) is open with a clean CI state, no merge conflicts, and full diff coverage. It implements the requested runtime type guards (isStreamStatus and isVestingSchedule) along with corresponding TypeScript types and comprehensive unit tests in packages/flowfi-sdk/tests/types.test.ts, matching all acceptance criteria. There are no maintainer objections across any channel.
😎 @Rafiat30: You earned 200 Points for completing this issue! After the current Wave ends, you'll be eligible for a percentage of the Wave's reward pool based on the percentage of total points you've earned. Learn more here.
🧑💻 Repo maintainers: How'd the contributor do? Leave a review to share your experience working with them.
ℹ️ Note: This issue was marked complete via moderation. Points were issued even though the GitHub issue remains open.