feat: add point-in-time stream snapshots and claim endpoint - #935
feat: add point-in-time stream snapshots and claim endpoint#935InfamousCanary wants to merge 1 commit into
Conversation
|
@InfamousCanary 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! 🚀 |
|
@InfamousCanary is attempting to deploy a commit to the ritik4ever's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
This PR completes the existing stream snapshot and claim API endpoints.
GET
/api/streams/:id/snapshot?at=Adds point-in-time stream state calculation for an arbitrary Unix timestamp.
The endpoint now:
atquery parameter as a Unix timestamp400for invalid, missing, or negative timestamps404for unknown streamsThis covers the required snapshot behavior, including:
scheduled, vested0completed, vested equals the total stream amountPOST
/api/streams/:id/claimCompletes the existing claim endpoint by replacing the placeholder local transaction result with an actual Soroban claim transaction flow.
The endpoint now:
claim(stream_id, recipient, amount)invocationNo new dependencies or database migrations were introduced.
Validation
Targeted validation completed successfully:
GET /snapshottests: 7/7 passedPOST /claimtests: 7/7 passedgit diff --checkpassedThe repository-wide TypeScript check is currently blocked by pre-existing syntax errors in
backend/src/services/streamStore.tson the upstream baseline; those unrelated errors were intentionally left unchanged.Closes #705
Closes #710