Implement Core BitCred Protocol Features for Decentralized Academic Credentials #1
Open
peace-source wants to merge 9 commits intomainfrom
Open
Implement Core BitCred Protocol Features for Decentralized Academic Credentials #1peace-source wants to merge 9 commits intomainfrom
peace-source wants to merge 9 commits intomainfrom
Conversation
- Introduced `transfer-counter` and `total-institutions` data variables to track contract activity. - Defined `institutions` map to store institution details, including stake amount, reputation score, and registration status. - Defined `credentials` map to manage academic credentials with fields for verification, endorsements, metadata, and expiration. - Ensured compatibility with STX staking and reputation-based endorsement systems.
- Added `endorsements` map to track credential endorsements with timestamp, weight, and comments. - Introduced `institution-delegates` map to manage delegate permissions and activity for institutions. - Implemented `transfer-requests` map to handle credential ownership transfer requests with status and expiry details. - Enhanced support for decentralized credential management and delegation workflows.
…tions - Added `register-institution` function to allow institutions to register by staking the minimum required STX tokens. - Ensured institutions are uniquely registered and tracked with relevant metadata such as reputation score and registration date. - Introduced `add-delegate` function to enable institutions to assign delegates with specific permissions and expiry dates. - Enhanced contract functionality to support decentralized institution and delegation workflows.
- Implemented `issue-credential` function to allow institutions to issue verified academic credentials. - Ensured credentials are linked to the issuing institution and include metadata such as degree, year, and expiry date. - Updated institution data to track the number of credentials issued and the last update timestamp. - Added validation to ensure only active and non-suspended institutions can issue credentials. - Enhanced support for decentralized and tamper-proof credential management.
…ality - Implemented `batch-issue-credentials` function to allow institutions to issue multiple credentials in a single transaction. - Validated batch size against the maximum allowed and ensured only authorized institutions can perform batch operations. - Added `endorse-credential-extended` function to enable endorsements with additional metadata such as weight, comment, and endorser type. - Updated credential and institution data to reflect endorsement activity, including reputation score adjustments and timestamps. - Enhanced scalability and flexibility for credential issuance and endorsement workflows.
- Implemented `request-credential-transfer` function to allow credential owners to initiate transfer requests. - Validated that the credential is not revoked before creating a transfer request. - Stored transfer request details, including old owner, new owner, status, request time, expiry time, and transfer type. - Incremented the `transfer-counter` variable to track unique transfer request IDs. - Added helper function `is-institution` to verify if an address belongs to a registered institution.
- Implemented `process-credential-issuance` private function to streamline the creation of credentials with metadata such as degree, year, and expiry date. - Added `get-institution-info` read-only function to retrieve details of a registered institution. - Added `get-credential-info` read-only function to fetch information about a specific credential by ID and student. - Enhanced modularity and accessibility for credential management and data retrieval.
…tial validation - Implemented `get-endorsement-info` to retrieve endorsement details for a specific credential and endorser. - Added `get-delegate-info` to fetch information about a delegate assigned to an institution. - Introduced `is-credential-valid` to check if a credential is valid by verifying its revocation status, expiry date, and verification status. - Enhanced data accessibility and validation capabilities for endorsements, delegation, and credential management.
- Detailed overview of BitCred's purpose and key features, including Bitcoin-anchored credential management and institutional staking. - Explained technical architecture with core data structures, system constants, and smart contract functions. - Provided usage examples for institution registration, credential issuance, and endorsement. - Highlighted security model, compliance features, and error codes for better understanding.
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
This PR introduces the foundational components of BitCred, a Bitcoin-anchored protocol for secure academic credential management on Stacks. Key features include institution registration with STX staking, credential issuance/endorsement systems, delegation workflows, and GDPR-compliant transfer mechanisms.
New Features & Technical Highlights
1. Institution Management
MINIMUM_STAKE(1M microSTX) to registerinstitutionsmap with reputation scores and activity statusERR-INSUFFICIENT-STAKEandERR-ALREADY-REGISTERED2. Credential Lifecycle
issue-credential) and batch (batch-issue-credentials) modesexpiry-date)revokedflagweightandendorser-typemetadata3. Delegation Framework
expiry)permissionslist4. Transfer System
pending/expiredstatus trackingtransfer-type)expiry-time)Reviewer Action Items
register-institution