Skip to content

feat(backend): tip read endpoints and indexer poll loop#1081

Merged
Akanimoh12 merged 2 commits into
Akanimoh12:test-implement-dripsfrom
manoahLinks:test-implement-drips
Jun 27, 2026
Merged

feat(backend): tip read endpoints and indexer poll loop#1081
Akanimoh12 merged 2 commits into
Akanimoh12:test-implement-dripsfrom
manoahLinks:test-implement-drips

Conversation

@manoahLinks

Copy link
Copy Markdown
Contributor

Add tip read APIs and the off-chain indexer poll loop.

Tips module:

  • GET /tips/:id returns a single tip (404 when missing)
  • GET /profiles/:username/tips lists tips received by a profile
  • GET /users/me/tips/sent lists tips sent by the authenticated user
  • Cursor pagination (limit/cursor) and Zod-validated inputs; BigInt amounts serialized to decimal strings

Indexer (src/indexer):

  • Poll getEvents from the stored cursor ledger forward at the configured interval, resuming via the IndexerCursor table
  • Idempotent projections: EventLog deduped by (txHash, topic, ledger) and Tip upserted on the unique txHash, so replays produce no duplicates
  • Wired into server bootstrap with graceful shutdown

Closes #872
Closes #873
Closes #874
Closes #893

Description

Closes #

Type of Change

Please mark the options that are relevant:

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 🧪 Tests (adding new tests or updating existing tests)
  • 📝 Documentation (changes to documentation/configs only)
  • 🚀 DevOps & CI/CD (changes to workflows, scripts, or templates)

Changes Made

How to Test

Checklist

💻 Smart Contract Changes (if applicable)

  • Running cargo fmt -- --check passes successfully.
  • Running cargo clippy -- -D warnings runs without any warnings.
  • All tests pass successfully using cargo test.
  • New unit or integration tests have been written to cover the changes.
  • No hardcoded values are present (e.g. addresses, fees) that should be configurable.

🎨 Frontend Changes (if applicable)

  • TypeScript compiles cleanly with no errors (npm run typecheck or npx tsc --noEmit).
  • Running npm run lint shows no linting errors.
  • The production build compiles successfully via npm run build.
  • Changes verified on local browser environment with Freighter/xBull/Albedo wallet.
  • Responsive design verified (tested on mobile, tablet, and desktop viewport sizes).
  • Keyboard navigation and accessibility (a11y) considerations are addressed.

⚙️ General

  • Code follows the project's coding standards and structure guidelines.
  • Self-reviewed the changes to ensure clean code with no commented-out code blocks.
  • No console.log or debug code remains in production files.
  • The branch is up-to-date with the main branch.

Screenshots / Demos (if applicable)

Add tip read APIs and the off-chain indexer poll loop.

Tips module:
- GET /tips/:id returns a single tip (404 when missing)
- GET /profiles/:username/tips lists tips received by a profile
- GET /users/me/tips/sent lists tips sent by the authenticated user
- Cursor pagination (limit/cursor) and Zod-validated inputs; BigInt
  amounts serialized to decimal strings

Indexer (src/indexer):
- Poll getEvents from the stored cursor ledger forward at the configured
  interval, resuming via the IndexerCursor table
- Idempotent projections: EventLog deduped by (txHash, topic, ledger) and
  Tip upserted on the unique txHash, so replays produce no duplicates
- Wired into server bootstrap with graceful shutdown

Closes Akanimoh12#872
Closes Akanimoh12#873
Closes Akanimoh12#874
Closes Akanimoh12#893
@drips-wave

drips-wave Bot commented Jun 27, 2026

Copy link
Copy Markdown

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

@Akanimoh12 Akanimoh12 merged commit ec2acef into Akanimoh12:test-implement-drips Jun 27, 2026
4 of 5 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.

Indexer: Indexer poll loop Tips: GET /users/me/tips/sent Tips: GET /profiles/:username/tips (tips received) Tips: GET /tips/:id (single tip)

2 participants