feat(keys): add auction, metadata & staking endpoints; extend holders with staked/liquid quantities - #859
Open
devJaja wants to merge 1 commit into
Open
Conversation
…ers with staked/liquid quantities - Add GET /keys/:keyId/auction returning auctionPrice, auctionSupply, auctionSold, and auctionStatus (not_configured/active/completed) with 30s Redis cache and invalidation after auction buys (accesslayerorg#844) - Add GET /keys/:keyId/metadata returning on-chain name, bio, avatar_uri, and creator address with 5-minute Redis cache, invalidated on metadata_updated events; 404 when uninitialised or unknown (accesslayerorg#845) - Add GET /keys/:keyId/staking returning stakingPoolBalance, totalStaked, recentFeeInflow (30-day sum), and stakerCount with 60s Redis cache, invalidated on stake/unstake/fee events; 404 for unknown keys (accesslayerorg#847) - Extend GET /creators/:id/holders with stakedQuantity and liquidQuantity per holder derived from the staking_positions contract, cached per holder in Redis for 30s; backward compatible (accesslayerorg#846)
|
@devJaja 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! 🚀 |
This was referenced Aug 31, 2026
Open
Member
❌ CI Failed —
|
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.
Closes #844
Closes #845
Closes #846
Closes #847
Summary
This PR adds four key-related endpoints and extends the holders endpoint with staking data.
#844 — Auction state endpoint
GET /api/v1/keys/:keyId/auction(no auth)auctionPrice,auctionSupply,auctionSold, andauctionStatus(not_configured|active|completed)#845 — Key metadata endpoint
GET /api/v1/keys/:keyId/metadata(no auth)name,bio,avatarUri, andcreatorAddressfrom on-chain storage via Soroban RPCmetadata_updatedevents#846 — Holder registry with staked/liquid balance
GET /api/v1/creators/:id/holderswithstakedQuantityandliquidQuantityper holderliquidQuantity = key_balance - stakedQuantitystaking_positionspersistent map, each holder cached in Redis for 30s#847 — Staking pool stats endpoint
GET /api/v1/keys/:keyId/staking(no auth)stakingPoolBalance,totalStaked,recentFeeInflow(sum of fees in the past 30 days), andstakerCountTests
Added unit tests for all new services. Build and lint pass.