feat(access_registry): Add read request workflow for TDF letter access#77
Open
arkavo-com wants to merge 1 commit intomainfrom
Open
feat(access_registry): Add read request workflow for TDF letter access#77arkavo-com wants to merge 1 commit intomainfrom
arkavo-com wants to merge 1 commit intomainfrom
Conversation
Add the complete submit/approve/deny read request workflow to the access_registry contract, enabling decentralized access control for ClosureKB TDF letters without a backend server. New types: - RequestStatus enum (Pending, Approved, Denied) - ReadRequestRecord struct (letter_id, email_hash, requester, status, timestamps) - DissemEntry struct (granted_at_block, expires_at_block, is_revoked, granted_by) New storage: - admins: Mapping<Address, bool> for multi-admin support - read_requests: Mapping<[u8;32], ReadRequestRecord> - dissem_entries: Mapping<[u8;32], DissemEntry> for per-letter access lists New messages: - add_admin / remove_admin / is_admin_account - admin management - submit_read_request - anyone can request access (deterministic ID prevents duplicates) - approve_read_request - admin approves + auto-adds dissem entry - deny_read_request - admin denies - get_read_request - query request by ID - check_letter_entitlement - verify read access (checks expiry + revocation) - revoke_letter_entitlement - admin revokes access - add_dissem_entry - admin manually grants access without a request - get_dissem_entry - query dissem entry New events: - AdminAdded, AdminRemoved - ReadRequestSubmitted, ReadRequestApproved, ReadRequestDenied - DissemEntryRevoked Tests: 28 new tests (41 total), all passing. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
access_registryInk! contract, enabling decentralized access control for ClosureKB TDF lettersDissemEntrystorageDetails
New types:
RequestStatus,ReadRequestRecord,DissemEntryNew messages (11):
submit_read_requestapprove_read_requestdeny_read_requestget_read_requestcheck_letter_entitlementrevoke_letter_entitlementadd_dissem_entryget_dissem_entryadd_admin/remove_adminis_admin_accountNew events:
AdminAdded,AdminRemoved,ReadRequestSubmitted,ReadRequestApproved,ReadRequestDenied,DissemEntryRevokedTest plan
🤖 Generated with Claude Code