-
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Implement initialize authorize_issuer and revoke_issuer functions in Vault Contract (#139) * Implement initialize, authorize and revoke issuer functions Co-authored-by: Juan Manuel Giraldo <[email protected]> * Improve texts Co-authored-by: Juan Manuel Giraldo <[email protected]> * format code * Improve code Co-authored-by: Mario Alejandro Rodríguez <[email protected]> * Authorize issuer to specific DID Co-authored-by: Mario Alejandro Rodríguez <[email protected]> * Add validation did to functions Co-authored-by: Juan Manuel Giraldo <[email protected]> * Refactor read in storage to dids Co-authored-by: Juan Manuel Giraldo <[email protected]> --------- Co-authored-by: Juan Manuel Giraldo <[email protected]> Co-authored-by: Juan Manuel <[email protected]> Co-authored-by: Mario Alejandro Rodríguez <[email protected]> * Implement verifiable credential functions (#140) * Implement vc functions and tests Co-authored-by: Juan Manuel Giraldo <[email protected]> --------- Co-authored-by: Juan Manuel Giraldo <[email protected]> * Implement register and revoke did (#141) * Implement register and revoke did Co-authored-by: Juan Manuel Giraldo <[email protected]> * Implement duplicated did validation --------- Co-authored-by: Juan Manuel Giraldo <[email protected]> Co-authored-by: Juan Manuel <[email protected]> * Implement initialize in vcs contract (#146) * Implement initialize basic setup Co-authored-by: Juan Manuel Giraldo <[email protected]> * Complete test and format * Add max amount validation * Rename files structs and functions --------- Co-authored-by: Juan Manuel Giraldo <[email protected]> * Update README file (#148) * Updated README files * Updated repository license * Issue Verifiable Credential (VC) (#149) * Implement issue vc Co-authored-by: Mario Alejandro Rodríguez <[email protected]> * Remove require auth and add tests Co-authored-by: Juan Manuel Giraldo <[email protected]> * Update CI and refactor tests Co-authored-by: Juan Manuel Giraldo <[email protected]> --------- Co-authored-by: Mario Rodriguez <[email protected]> Co-authored-by: Juan Manuel Giraldo <[email protected]> * Place did_contract as git submodule + remove deprecated code (#150) * Remove deprecated issuance code * Remove deprecated did code * Added git submodule for the did_contract * Improved minor README texts * Ignore git submodule changes (#151) * Verify and revoke VC (#147) * Implement verify and revoke * Update verify return, test, and CD * Fix error name and format status strings * Remove issuance_contract in Cargo.toml --------- Co-authored-by: Mario Alejandro Rodríguez <[email protected]> * Prepare for v0.12 release (#152) --------- Co-authored-by: Mario Alejandro Rodríguez <[email protected]> Co-authored-by: Juan Manuel Giraldo <[email protected]> Co-authored-by: Mario Alejandro Rodríguez <[email protected]> Co-authored-by: Juan Hurtado <[email protected]>
- Loading branch information
1 parent
25c15ec
commit 8f444b8
Showing
53 changed files
with
1,934 additions
and
4,123 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[submodule "did_contract"] | ||
path = did_contract | ||
url = [email protected]:kommitters/soroban-did-contract.git | ||
ignore = dirty |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,106 +1,74 @@ | ||
![Chaincerts Logo](https://github.com/kommitters/chaincerts-smart-contracts/assets/50219561/63963006-1b41-4d21-82c2-dbc3ae188b13) | ||
[![CHAINCERTS_LOGO](https://github.com/kommitters/chaincerts-smart-contracts/assets/1649973/a43a4a8b-932b-47e5-af63-470e35ab9330)][chaincerts.co] | ||
|
||
[**Chaincerts**][chaincerts.co] is a cutting-edge platform that revolutionizes the way digital credentials are issued, verified, and showcased. | ||
Issue, store, and verify your credentials backed by smart contracts on Soroban. | ||
|
||
**Chaincerts** issues secure, non-transferable, and verifiable digital credentials on the Stellar network. Managed through Soroban smart contracts, serve as unique identity credentials that showcase an individual or entity's characteristics, features, traits, and accomplishments in a visually appealing format. | ||
|
||
# Chaincerts Smart Contracts | ||
**[Chaincerts](https://chaincerts.co/)** are Web3 Verifiable Credentials ([as standardized by the W3C][w3c-vcs-spec]). | ||
|
||
![Version Badge](https://img.shields.io/github/v/release/kommitters/chaincerts-smart-contracts?style=for-the-badge) | ||
[![License badge](https://img.shields.io/github/license/kommitters/chaincerts-smart-contracts?style=for-the-badge)](https://github.com/kommitters/chaincerts-smart-contracts/blob/main/LICENSE) | ||
![Build Badge](https://img.shields.io/github/actions/workflow/status/kommitters/chaincerts-smart-contracts/ci.yml?branch=main&style=for-the-badge) | ||
[![Coverage Status](https://img.shields.io/coveralls/github/kommitters/chaincerts-smart-contracts?style=for-the-badge)](https://coveralls.io/github/kommitters/chaincerts-smart-contracts) | ||
[![OpenSSF Scorecard](https://img.shields.io/ossf-scorecard/github.com/kommitters/chaincerts-smart-contracts?label=openssf%20scorecard&style=for-the-badge)](https://api.securityscorecards.dev/projects/github.com/kommitters/chaincerts-smart-contracts) | ||
<br/> | ||
<br/> | ||
|
||
This repository hosts a collection of smart contracts, specifically developed for the purpose of creating, distributing, and revoking digital credentials using Decentralized Identifiers (DIDs) on the blockchain. The objective of this project is to provide a decentralized, secure, and tamper-proof solution for issuing and managing digital credentials, utilizing the power of Soroban smart contracts. | ||
|
||
📖 As part of our commitment to transparency in the Chaincerts system, we encourage the use of a **"build in the open"** approach when developing these smart contracts. This approach allows anyone to easily review and examine the underlying code of the smart contracts, ensuring that they function as intended and do not contain any hidden vulnerabilities or malicious code. By using this approach, we can build trust in the system and promote greater confidence in the use of Chaincerts. Check the Open Source [LICENSE][license] for details. | ||
|
||
### Issuance Contract | ||
The Issuance Contract defines the rules for issuing and managing digital credentials within the Chaincerts ecosystem. With this contract, issuing entities can set the revocability and expiration of credentials, define the eligible recipients, and restrict the distribution of credentials. Additionally, the Issuance Contract is responsible for executing the distribution action to different recipients, and it can revoke credentials making them invalid. | ||
|
||
### DID Contract | ||
The DID Contract allows to manage a digital identity within the Chaincerts ecosystem. By following the guidelines set forth in the [W3C DID Core specification][w3c-did-core-spec], this contract empowers users to take control of their digital credentials, enabling self-revocation, customizable access capabilities, and streamlined credential issuance authorization. | ||
# Build in the Open ☝️ | ||
As part of our commitment to transparency, we promote the adoption of a **"build in the open"** approach to developing these contracts. This approach allows anyone to use or inspect the underlying code of smart contracts, ensuring that it works as intended and does not contain any hidden vulnerabilities or malicious code. We aim to foster trust within the ecosystem and community, promoting greater confidence in using Chaincerts. | ||
|
||
### Deployer Contract | ||
The Deployer Contract is a simple wrapper that allows the Issuance and DID contracts to be deployed and initialized through one function, requiring the user to sign a single transaction instead of two. | ||
For more details, please refer to the open source [LICENSE][license]. | ||
|
||
## Contracts Workflow | ||
The diagram bellow illustrates how the smart contracts manage the credential issuance, revocation, display, and verification processes. | ||
<br/> | ||
|
||
![Chaincerts - Contracts Workflow](https://i.imgur.com/NpaBjsT.jpg) | ||
# Smart Contracts | ||
Chaincerts utilizes [Decentralized Identifiers (DIDs)][w3c-did-core-spec] and [Verifiable Credentials (VCs)][w3c-vcs-spec] to establish a secure and interoperable infrastructure for managing digital identities and credentials within the Stellar and Soroban ecosystems. | ||
<br/> | ||
|
||
## Development | ||
![smart-contracts-workflow](https://github.com/kommitters/chaincerts-smart-contracts/assets/1649973/230a708b-7270-4f0c-bf91-53b397a8771a) | ||
|
||
### Pre-requirements | ||
In order to utilize the contracts, it is necessary to have Rust and Soroban installed. The installation process is outlined in the Soroban setup documentation, which can be accessed at [Soroban setup][soroban-setup]. | ||
<br/> | ||
|
||
### Setup | ||
1. Clone the repository: | ||
``` | ||
git clone [email protected]:kommitters/chaincerts-smart-contracts.git | ||
``` | ||
## Decentralized Identifiers (DIDs) | ||
The DID smart contract strictly adheres to the [W3C DID specification][w3c-did-core-spec] and is a foundational component within the verifiable credential ecosystem. It empowers individuals and issuers to establish and manage their self-sovereign identities on the Stellar blockchain. | ||
|
||
2. Build the project and install the dependencies: | ||
``` | ||
cd chaincerts-smart-contracts | ||
cargo build | ||
``` | ||
[**DID smart contract code**][did-repo] | ||
|
||
3. Run tests: | ||
``` | ||
cargo test -- --show-output | ||
``` | ||
<br/> | ||
|
||
### Deployment | ||
1. Build the smart contracts: | ||
``` | ||
cargo build --target wasm32-unknown-unknown --release | ||
``` | ||
## Verifiable Credentials Issuance | ||
The Verifiable Credentials (VCs) Issuance smart contract establishes the rules for issuing, transferring, and revoking verifiable credentials. It acts as the governing framework, ensuring the secure and standardized management of on-chain verifiable credentials. | ||
|
||
2. Deploy using the Soroban CLI: | ||
``` | ||
soroban contract deploy \ | ||
--source-account SOURCE_ACCOUNT_SECRET_KEY \ | ||
--rpc-url https://rpc-futurenet.stellar.org \ | ||
--network-passphrase 'Test SDF Future Network ; October 2022' \ | ||
--wasm target/wasm32-unknown-unknown/release/issuance_contract.wasm | ||
SUCCESS | ||
SUCCESS | ||
This smart contract prioritizes security and privacy by avoiding the persistence of structured data or personal information. Data is handled exclusively in an encrypted form, with access granted only to owners through cryptographic mechanisms. This approach is particularly critical in insecure communication channels such as blockchain ledgers. For more details, refer to the [W3C KeyAgreement specification](https://www.w3.org/TR/did-core/#dfn-keyagreement). | ||
|
||
ISSUANCE_CONTRACT_ID | ||
``` | ||
[**Issuance smart contract code**][vcs-issuance-repo] | ||
|
||
``` | ||
soroban contract deploy \ | ||
--source-account SOURCE_ACCOUNT_SECRET_KEY \ | ||
--rpc-url https://rpc-futurenet.stellar.org \ | ||
--network-passphrase 'Test SDF Future Network ; October 2022' \ | ||
--wasm target/wasm32-unknown-unknown/release/did_contract.wasm | ||
SUCCESS | ||
SUCCESS | ||
<br/> | ||
|
||
WALLET_CONTRACT_ID | ||
``` | ||
## Vault: Verifiable Credentials Storage | ||
The Vault smart contract is a secure repository for safeguarding Verifiable Credentials (VCs). | ||
|
||
## Changelog | ||
Through the implementation of control access mechanisms, the smart contract authorizes issuers to deposit credentials through issuance contracts. VCs stored within the Vault utilize an encryption mechanism that prioritizes security and data privacy. | ||
|
||
Features and bug fixes are listed in the [CHANGELOG][changelog] file. | ||
[**Vault smart contract code**][vcs-storage-repo] | ||
|
||
## Code of conduct | ||
<br/> | ||
|
||
We welcome everyone to contribute. Make sure you have read the [CODE_OF_CONDUCT][coc] before. | ||
# License | ||
This software is licensed under the [Apache License 2.0][license] © kommit. | ||
|
||
## Contributing | ||
<br/> | ||
|
||
For information on how to contribute, please refer to our [CONTRIBUTING][contributing] guide. | ||
<hr/> | ||
|
||
## License | ||
[<img src="https://github.com/kommitters/chaincerts-smart-contracts/assets/1649973/d60d775f-166b-4968-89b6-8be847993f8c" width="80px" alt="kommit"/>](https://kommit.co) | ||
|
||
This library is licensed under a GNU AGPLv3 license. See [LICENSE][license] for details. | ||
<sub> | ||
|
||
## Acknowledgements | ||
[Website][kommit-website] • | ||
[Github][kommit-github] • | ||
[X][kommit-x] • | ||
[LinkedIn][kommit-linkedin] | ||
|
||
Made with 💙 by [kommitters Open Source](https://kommit.co) | ||
</sub> | ||
|
||
[chaincerts.co]: https://chaincerts.co | ||
[soroban-setup]: https://soroban.stellar.org/docs/getting-started/setup | ||
|
@@ -109,3 +77,11 @@ Made with 💙 by [kommitters Open Source](https://kommit.co) | |
[changelog]: https://github.com/kommitters/chaincerts-smart-contracts/blob/main/CHANGELOG.md | ||
[contributing]: https://github.com/kommitters/chaincerts-smart-contracts/blob/main/CONTRIBUTING.md | ||
[w3c-did-core-spec]: https://www.w3.org/TR/did-core/ | ||
[w3c-vcs-spec]:https://www.w3.org/TR/vc-data-model | ||
[did-repo]: https://github.com/kommitters/soroban-did-contract | ||
[vcs-issuance-repo]: https://github.com/kommitters/chaincerts-smart-contracts/tree/main/issuance_contract | ||
[vcs-storage-repo]: https://github.com/kommitters/chaincerts-smart-contracts/tree/main/vault_contract | ||
[kommit-website]: https://kommit.co | ||
[kommit-github]: https://github.com/kommitters | ||
[kommit-x]: https://twitter.com/kommitco | ||
[kommit-linkedin]: https://www.linkedin.com/company/kommit-co |
Submodule did_contract
added at
324010
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.