-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Labels
Description
Description:
Implement a POST /revoke endpoint that records a document revocation event on the Stellar blockchain. Revocation marks a previously anchored document as no longer valid (e.g., due to fraud or supersession).
Requirements:
- Add a
RevokeRequeststruct:pub struct RevokeRequest { pub document_hash: String, pub reason: String, pub revoked_by: String, }
- The Stellar transaction memo must encode the action as a structured string:
REVOKE:<hash>(truncated to 28 bytes) - Before submitting the revocation, verify that the hash exists on-chain by calling
verify_hash. If not found, return404with an appropriate message - Return a
RevokeResponsewithtransaction_idandrevoked_at - Invalidate any cached verification results for this hash after revocation
Acceptance Criteria:
- Attempting to revoke an unanchored hash returns
404 - Revocation transaction is submitted with the correct memo format
- Cache entry for the revoked hash is cleared after successful revocation
- Unit tests for memo construction and the pre-revocation existence check
Reactions are currently unavailable