Context
Currently admin operations require the original deployer key. This is a single point of failure — if that key is lost, no admin actions can be taken. Admin delegation allows a safe key rotation and multi-admin setups.
What to implement
Route: POST /api/admin/delegate
Body: { targetAddress: string }
- Validates
targetAddress as a valid Stellar public key
- Adds
targetAddress to the admin list
- Emits an
admin.delegated audit log entry with actor + target + timestamp
- Requires current admin auth (existing middleware)
Route: DELETE /api/admin/delegate/:address
Revokes admin rights from the given address.
- Cannot revoke the last admin (returns 409 with
error: 'cannot_remove_last_admin')
Route: GET /api/admin/list
Returns all current admin addresses:
{ "admins": ["GABC...", "GXYZ..."], "count": 2 }
Acceptance criteria
🎁 Evidencia visual = reward extra
- Si tu PR incluye video demo o capturas de pantalla mostrando la funcionalidad pedida funcionando end-to-end, va a ser considerado para rewards de GrantFox en esta issue. No es obligatorio, pero suma mucho para la evaluación.
Context
Currently admin operations require the original deployer key. This is a single point of failure — if that key is lost, no admin actions can be taken. Admin delegation allows a safe key rotation and multi-admin setups.
What to implement
Route: POST /api/admin/delegate
Body:
{ targetAddress: string }targetAddressas a valid Stellar public keytargetAddressto the admin listadmin.delegatedaudit log entry with actor + target + timestampRoute: DELETE /api/admin/delegate/:address
Revokes admin rights from the given address.
error: 'cannot_remove_last_admin')Route: GET /api/admin/list
Returns all current admin addresses:
{ "admins": ["GABC...", "GXYZ..."], "count": 2 }Acceptance criteria
🎁 Evidencia visual = reward extra