Skip to content

Add cursor-based pagination to the key holders list endpoint #778

Description

@Chucks1093

Summary

The key holders list endpoint returns all holders in a single response, which will degrade under load as holder counts grow. Cursor-based pagination using the holder wallet address as the cursor should be introduced.

Scope

  • Add cursor and limit query parameters to GET /keys/:keyId/holders
  • Default limit to 20, maximum 100
  • Return a nextCursor field in the response if more records exist
  • Use an index on (keyId, walletAddress) to support efficient keyset queries
  • Return an empty holders array with no nextCursor when no results exist

Acceptance Criteria

  • First page returns up to limit records with a nextCursor
  • Passing nextCursor returns the next page starting after the cursor
  • Last page returns no nextCursor
  • limit above 100 is clamped to 100
  • Response order is stable across pages

ETA: 12 hours


Coordinate on Telegram

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