| Listing 1. Revocation-registry smart-contract interface (pseudocode). |
| contract RevocationRegistry { |
| enum Status { Active, Challenged, Revoked } |
| struct Record { |
| Status status; |
| bytes32 evidenceDigest; // H(L_i || R_i^YB || R_i) |
| uint64 revokedAt; |
| address issuerGateway; |
| } |
| mapping(bytes32 => Record) registry; // key: H(DID) |
| event Revoked(bytes32 indexed did, bytes32 evidence); |
| event Anchored(bytes32 indexed root, uint32 batchSize); |
| function revoke(bytes32 did, bytes32 evidence) onlyGateway { ... } |
| function challenge(bytes32 did, bytes32 evidence) onlyGateway { ... } |
| function reinstate(bytes32 did) onlyQuorum { ... } |
| function anchor(bytes32 merkleRoot, uint32 n) onlyGateway { ... } |
| function statusOf(bytes32 did) view returns (Status) { ... } |
| } |