Skip to content

Implement dividend pool distribution API endpoints #965

Description

@Chucks1093

Summary

Build REST endpoints for fetching dividend distribution history per key, per-holder pending dividends, and submitting claim transactions to the Soroban contract.

Scope

  • GET /keys/:keyId/dividends — distribution history with pagination
  • GET /holders/:wallet/dividends — aggregate pending and claimed across all held keys
  • POST /keys/:keyId/dividends/claim — build and return unsigned claim transaction
  • Dividend data indexed from contract events
  • Cache distribution history with 60s TTL

Acceptance Criteria

  • Distribution history returns paginated events with correct amounts
  • Holder aggregate returns correct pending and claimed totals per key
  • Claim endpoint returns valid unsigned transaction
  • Events indexed correctly from contract logs
  • Cache invalidated after claim transaction confirmed

ETA

12 hours

Activity

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

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave program

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions