Skip to content

Add sunset tracking endpoint for keys approaching inactivity threshold #931

Description

@Chucks1093

Summary

Build an endpoint that returns creator keys approaching or reaching the inactivity sunset threshold, with days since last trade and sunset status.

Scope

  • GET /keys/sunset-watch returns all keys with sunset_pending or near-threshold status
  • Days since last trade calculated per key from trade records
  • Sunset threshold read from contract configuration
  • Admin-only endpoint for monitoring
  • Keys sorted by inactivity duration descending

Acceptance Criteria

  • Keys listed with correct days since last trade
  • sunset_pending status reflected for flagged keys
  • Keys sorted by inactivity duration correctly
  • Admin-only access enforced via role middleware
  • Response updates within one sync cycle of new KeySunsetFlagged event

ETA

12 hours

Activity

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

Metadata

Metadata

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