Skip to content

Implemented creator revenue share indexer and distribution history REST API - #1187

Merged
Chucks1093 merged 4 commits into
accesslayerorg:mainfrom
DioChuks:feat/revenue-share
Oct 21, 2026
Merged

Chucks1093 merged 4 commits into
accesslayerorg:mainfrom
DioChuks:feat/revenue-share

Conversation

@DioChuks

Copy link
Copy Markdown
Contributor

Summary

  • Added the revenue_distributions, revenue_distribution_shares, and revenue_share_claims read models and migration in revenue.prisma and migration.sql.
  • Routed both event types through the indexer. Distribution events snapshot explicit recipient shares when supplied, or allocate by positive key balances otherwise. Claim events update claimed amounts; invalid or unresolved events fail processing so the shared cursor does not advance past them. See revenue-share-indexer.service.ts and indexer-pipeline.service.ts.
  • Added the paginated distribution list and per-wallet claimable/claimed endpoint, with a 60-second cache invalidated for the key after distribution or claim events. See revenue-distributions.routes.ts and revenue-distributions.service.ts.
  • Documented the endpoints in api-endpoints.md.

Validation passed: Prisma validation and client generation, pnpm build, ESLint, Prettier check, and focused Jest tests (3 suites, 16 tests). Jest used --forceExit because the shared Redis client keeps an open handle.

Closes #1133

Testing

  • pnpm lint
  • pnpm build
  • pnpm exec prisma generate when schema or generated types changed

Checklist

  • Linked issue or backlog item
  • No secrets or live credentials added
  • Docs updated if setup or env changed
  • Change is scoped to one problem

@drips-wave

drips-wave Bot commented Oct 21, 2026

Copy link
Copy Markdown

@DioChuks 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

@Chucks1093
Chucks1093 merged commit 8f4efc1 into accesslayerorg:main Oct 21, 2026
2 checks passed
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.

Build creator revenue share indexer and distribution history REST API

2 participants