Skip to content

Add a holder cap update endpoint for creators to change the maximum keys a single wallet can hold #841

Description

@Chucks1093

Summary

The on-chain holder cap can be set by the creator but there is no server endpoint for this. A POST /creator/:keyId/holder-cap endpoint that submits the set_holder_cap contract call and records the new cap in the database should be added.

Scope

  • Add POST /creator/:keyId/holder-cap with { capBps: number } body requiring a JWT matching the key creator
  • Validate capBps is between 100 and 2500 (1%–25%)
  • Submit the set_holder_cap contract call
  • Update the holderCapBps field on the key record in the database
  • Return the updated holderCapBps and the equivalent percentage in the response

Acceptance Criteria

  • Cap updated in contract and database for valid input
  • capBps below 100 returns 422
  • capBps above 2500 returns 422
  • Non-creator JWT returns 403
  • Response includes holderCapBps and percentage equivalent

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