Repository navigation
Conversation
Chinko21
added a commit
to Chinko21/accesslayer-server
that referenced
this pull request
Oct 24, 2026
Chinko21
added a commit
to Chinko21/accesslayer-server
that referenced
this pull request
Oct 24, 2026
Chinko21
force-pushed
the
fix/issue-1062-build-performance-bond-status-api-for-creator-r2
branch
from
October 24, 2026 10:15
ebe3611 to
935b239
Compare
Chinko21
force-pushed
the
fix/issue-1062-build-performance-bond-status-api-for-creator-r2
branch
from
October 24, 2026 10:15
935b239 to
3b9c56c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This PR adds REST endpoints that expose the performance bond status for creator keys, including the deposited amount, current lifecycle state, creator, and forfeiture history. Bond state is read from the bond contract via
get_bond_statuswith a 60s cache, andBondForfeitedevents are indexed into a forfeiture history table.Related Issue
Closes #[issue number]
Changes
🔐 Performance Bond Status API
[MODIFY]
src/modules/creator/creator.routes.tsGET /keys/:key_id/bondandGET /keys/:key_id/bond/history.[MODIFY]
src/modules/creator/creator.controllers.tsgetKeyBondreturns amount, state (deposited/released/forfeited), and creator; returns 404 when the key has no bond record.getKeyBondHistoryreturns forfeiture records with reason and timestamp, ordered descending.[MODIFY]
src/clients/soroban.client.tsget_bond_statuscontract call used to fetch live bond state, wrapped with a 60s stale-while-revalidate cache.[MODIFY]
src/indexer/event-processor.tsBondForfeitedevents and writes them to the forfeiture history table with reason and timestamp.[MODIFY]
prisma/schema/creator.prisma[MODIFY]
src/constants/creator.constants.tsVerification Results
No automated tests were added in this change. Acceptance criteria are listed below for reviewer validation.
Closes #1062