feat: REST revoke API key #32#106
Merged
greatest0fallt1me merged 18 commits intoCalloraOrg:mainfrom Feb 28, 2026
Merged
Conversation
Implemented a batch payout service to aggregate developer revenue from API usage and settle payments via Soroban. Closes CalloraOrg#26
Add GET /api/developers/revenue (authenticated) returning total revenue, pending settlement, and paginated list of settlements. - Add requireAuth middleware with Bearer token validation - Add Settlement, RevenueSummary, DeveloperRevenueResponse types - Add in-memory mock data layer for settlements and usage - Add developer routes module mounted at /api/developers - Add 8 tests covering auth, response shape, values, and pagination closes CalloraOrg#37
- Add /v1/call/:apiSlugOrId/* proxy route with full middleware pipeline - Resolve APIs by slug or ID via ApiRegistry - Auth (x-api-key), rate-limit (429), billing (402) checks - Forward safe headers, strip internal ones (x-api-key, host, etc.) - Inject X-Request-Id (UUID) on every request/response - Configurable timeout (PROXY_TIMEOUT_MS env, default 30s) → 504 - Stream upstream response back to caller - Record usage events for all proxied requests - Integration tests covering all error paths and header behavior
This commit implements usage metering for proxied API calls. The billing and recording logic has been moved to a non-blocking post-response flow to avoid added latency, and is now based on individual endpoint pricing. Closes CalloraOrg#21
Implemented a batch payout service to aggregate developer revenue from API usage and settle payments via Soroban. Closes CalloraOrg#26
- Implemented GET /api/vault/balance route - Created VaultController to fetch and format balance from stroops - Integrated requireAuth middleware for endpoint protection - Added unit tests for VaultController covering various test cases Closes CalloraOrg#30
- Added functionality to revoke an API key for a specified user - Implemented endpoint requiring authentication - Added unit tests to ensure users can only revoke their own keys and the endpoint is idempotent Closes CalloraOrg#32
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 Add REST Route: Revoke API Key #32