https://github.com/chatch/credential-issuance-protocol
Identity credentials issuance prototype
https://github.com/chatch/credential-issuance-protocol
Last synced: 5 months ago
JSON representation
Identity credentials issuance prototype
- Host: GitHub
- URL: https://github.com/chatch/credential-issuance-protocol
- Owner: chatch
- Created: 2019-11-13T15:43:09.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-09-12T10:36:16.000Z (over 5 years ago)
- Last Synced: 2024-10-03T12:18:52.205Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 199 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Identity credentials issuance prototype
## Overview
A Smart contract and API for issuing credentials on the blockchain.
The smart contract has:
- a whilelist of authorised Issuers
- a list of CredentialTypes that can be issued
- a credentials register with metadata for each Credential including an ipfs hash
Credentials are:
- JSON files containing credential details and a signature from the issuer
- encrypted with the holders public key and stored on IPFS
## Build
```
> truffle compile
> npm run lint
```
## Tests
```
> truffle develop
truffle(develop)> test
api
- should encrypt a string
- should decrypt an Encrypted record
- should get and decrypt and encrypted record on IPFS
- should encrypt and push data to IPFS
Contract: Credentials
✓ should add issuer (101ms)
✓ should add a credential type (162ms)
✓ should issue a credential and getters return correct data (310ms)
adding encrypted file to ipfs
credential ipfs hash: QmcKeSRmkiHtDQTVow4injnzT6pjKFTCM1pAiBPr7uFEvR
✓ should complete full cycle of issuing credentials including read and write from IPFS (2972ms)
4 passing (4s)
4 pending
```
NOTE: api tests are not yet complete however these are called inside the Credentials contract test.