Skip to content

Implement creator vesting schedule endpointsfeat(vesting): add vesting schedule endpoints for creator token release tracking - #979

Open
Daveeee-tech wants to merge 1 commit into
accesslayerorg:mainfrom
Daveeee-tech:main
Open

Daveeee-tech wants to merge 1 commit into
accesslayerorg:mainfrom
Daveeee-tech:main

Conversation

@Daveeee-tech

Copy link
Copy Markdown

closes #909
Summary

Adds API endpoints exposing vesting schedule data for creator key allocations, reading from Soroban on-chain state and caching for fast responses.

Scope
GET /keys/:id/vesting — returns vesting config, cliff, duration, and current claimable amount.
Vesting data is fetched from the Soroban contract and cached with a 60s TTL to keep response times low.
Cache is invalidated on the VestingClaimed contract event, so claims are reflected promptly instead of waiting out the TTL.
Vesting endpoints are restricted to creator-only access, enforced via JWT.
Adds a claimed-history endpoint returning past claim transactions (with tx hashes) for a given key.
Implementation Notes
Cache invalidation is event-driven (listening for VestingClaimed) rather than purely TTL-based, to avoid serving stale claimable amounts right after a claim.
Creator-only authorization is enforced at the endpoint/middleware level via JWT, not left to the client.
Testing
Unit tests for cliff/duration/claimable-amount calculation against known vesting configs.
Integration test confirming cache is served within TTL and invalidated correctly on a VestingClaimed event.
Auth tests confirming non-creator JWTs are rejected on vesting and claimed-history endpoints.
Claimed-history test confirming returned transactions match on-chain claim events, including tx hashes.
Load/latency check confirming cached responses stay under 200ms.

@drips-wave

drips-wave Bot commented Sep 27, 2026

Copy link
Copy Markdown

@Daveeee-tech 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

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 vesting schedule endpoints for creator token release tracking

2 participants