Skip to content

feat(api): add tip leaderboard, community polls, governance voting weight, and invoice schedule APIs - #1202

Open
wheval wants to merge 1 commit into
accesslayerorg:mainfrom
wheval:feat/issues-1173-1174-1176-1177
Open

wheval wants to merge 1 commit into
accesslayerorg:mainfrom
wheval:feat/issues-1173-1174-1176-1177

Conversation

@wheval

@wheval wheval commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Key Tipping Leaderboard (Implement key tipping leaderboard REST endpoint #1173): Expose GET /keys/:key_id/tips/leaderboard?limit=N returning ranked top tippers (rank, truncated wallet or null when anonymous, total_tipped, tip_count, anonymous flag) with a 5-minute Redis cache invalidated on TipSent events and empty list [] when a key has no tips.
  • Key Community Polls REST API (Build key community poll REST API with creator and voter endpoints #1174): Expose GET /keys/:key_id/polls (paginated active and closed polls with tally and time_remaining_seconds), GET /keys/:key_id/polls/:poll_id (per-option breakdown and caller wallet_vote), and GET /keys/:key_id/polls/:poll_id/weight/:wallet (snapshot-based vote weight), backed by a 30s Redis cache invalidated on PollVoteCast and PollClosed events.
  • Governance Voting Weight with Delegation (Build key governance voting weight REST API with delegation support #1176): Expose GET /governance/voting-weight/:wallet/:key_id returning own_weight, delegated_weight, total, and active delegators ({ wallet, amount }), cached for 60s and invalidated on VotingDelegated / DELEGATION_SET and DelegationRevoked / DELEGATION_REVOKED events.
  • Invoice Payment Schedule & Instalment Tracking (Build invoice payment schedule indexer and instalment tracking REST API #1177): Index InstalmentPaid contract events idempotently into instalment_payments and expose GET /invoices/:invoice_id/schedule and GET /invoices/:invoice_id/schedule/next with request-time overdue computation and a 60s Redis cache invalidated on InstalmentPaid events.

Closes #1173
Closes #1174
Closes #1176
Closes #1177

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

@Chucks1093

Copy link
Copy Markdown
Member

⚠️ Merge Conflict Detected

This PR currently has a merge conflict and cannot be merged until it is resolved.

Please rebase or merge the latest changes from the base branch into your branch and push again.

1 similar comment
@Chucks1093

Copy link
Copy Markdown
Member

⚠️ Merge Conflict Detected

This PR currently has a merge conflict and cannot be merged until it is resolved.

Please rebase or merge the latest changes from the base branch into your branch and push again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants