Skip to content
This repository has been archived by the owner on Jan 7, 2025. It is now read-only.

Commit

Permalink
Merge pull request #102 from Altinn/havardnyboe-patch-1
Browse files Browse the repository at this point in the history
Update README files
  • Loading branch information
emilk2001 authored Aug 15, 2023
2 parents b896df7 + 97867c6 commit 3b09103
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 23 deletions.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
# summer-camp-2023
Backlog for sommercamp 2023

This is a monorepo for the technical components for the DigDir summercamp 2023.

For instructions on how to use the different components see:
- [Backend](./backend)
- [Wallet](./wallet)
41 changes: 19 additions & 22 deletions backend/README.md
Original file line number Diff line number Diff line change
@@ -1,48 +1,47 @@
<h1>Backend for Summerproject 2023</h1>
# Backend for Summerproject 2023

![Structure](./Resources/Flow.png)

<h2>Installing</h2>
## Installing

Clone the repository

```sh
$ cd .\summer-camp-2023\backend
cd .\summer-camp-2023\backend
```
install nescecary deppendencies:
Install the nescecary deppendencies:
```sh
$ npm i
npm install
```
compile:
Compile the project:
```sh
$ npx hardhat compile
npx hardhat compile
```
start the blockchain local instance:
Start the blockchain local instance:
```
$ npx hardhat node
npx hardhat node
```
Deploy the smart contracts:
```sh
$ npx hardhat run --network localhost scripts/deploy.js
npx hardhat run --network localhost scripts/deploy.js
```
Start the server:
```sh
$ node scripts/server/index.js
node scripts/server/index.js
```

<h2>The Blockchain</h2>
## The Blockchain

In this repository are the smart contracts based on EIP-712 and EIP-1812 for Structured Data Types and Verifiable Claims respectively, to perform the registration and verification process of Verifiable Credentials on-chain.

<h3>Structure</h3>
### Structure

![Structure](./Resources/structure-backend.png)


The main objective is to have a credential registry for creating Liquor liscence and knowledge test verifiable credentials. There is the CredentialRegistry whose function is to maintain the main registry. However, it is not intended to interact directly with applications.
That is why there is a contract that serves as a middleman to be able to register each type of credential, this contract is called ClaimsVerifier, and it is in charge of both registering credential hashes and verifying them by making internal calls to the CredentialRegistry.

<h3>Contracts: </h3>
### Contracts

* __CredentialRegistry:__ Master credential registry

Expand All @@ -54,7 +53,7 @@ That is why there is a contract that serves as a middleman to be able to registe

* __ICredentialRegistry:__ Interface that defines the main methods of a CredentialRegistry, as well as the metadata of each credential.

<h3>Security roles</h3>
### Security roles

The contracts make use of the OpenZeppelin Access Control System, for which two roles have been defined:

Expand All @@ -66,13 +65,11 @@ The ISSUER_ROLE should be assigned to any account that is going to register a cr

The SIGNER_ROLE should be assigned to any account that is going to sign a credential within the ClaimsVerifier contract.

<H3>Pre-requisites</H3>

NodeJS > 12.4

Etehrs @ 5.7.2
### Pre-requisites

OpenZeppelin Contracts @ 3.0.0
- NodeJS > 12.4
- Etehrs @ 5.7.2
- OpenZeppelin Contracts @ 3.0.0



Expand Down

0 comments on commit 3b09103

Please sign in to comment.