Skip to content

Commit

Permalink
docs: update readme (#141)
Browse files Browse the repository at this point in the history
<!--
  For Work In Progress Pull Requests, please use the Draft PR feature,
see https://github.blog/2019-02-14-introducing-draft-pull-requests/ for
further details.
  
  For a timely review/response, please avoid force-pushing additional
  commits if your PR already received reviews or comments.
  
Before submitting a Pull Request, please ensure you've done the
following:
- 📖 Read the [Contributing
Guide](https://github.com/uncefact/project-vckit/blob/main/CONTRIBUTING.md).
- 📖 Read the [Code of
Conduct](https://github.com/uncefact/project-vckit/blob/main/CODE_OF_CONDUCT.md).
  - 👷‍♀️ Create small PRs. In most cases, this will be possible.
  - ✅ Provide tests for your changes.
- 📝 Use descriptive commit messages following [conventional
commits](https://www.conventionalcommits.org/en/v1.0.0/).
- 📗 Update any related documentation and include any relevant
screenshots.
-->

## What type of PR is this? (check all applicable)

- [ ] 🍕 Feature
- [ ] 🐛 Bug Fix
- [x] 📝 Documentation Update
- [ ] 🎨 Style
- [ ] 🧑‍💻 Code Refactor
- [ ] 🔥 Performance Improvements
- [ ] ✅ Test
- [ ] 🤖 Build
- [ ] 🔁 CI
- [ ] 📦 Chore (Release)
- [ ] ⏩ Revert

## Description

<!-- 
Please do not leave this blank 
This PR [adds/removes/fixes/replaces] the [feature/bug/etc]. 
-->

## Related Tickets & Documents
<!-- 
Please use this format link issue numbers: Fixes #123

https://docs.github.com/en/free-pro-team@latest/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword
-->

## Mobile & Desktop Screenshots/Recordings

<!-- Visual changes require screenshots -->


## Added tests?

- [ ] 👍 yes
- [ ] 🙅 no, because they aren't needed
- [ ] 🙋 no, because I need help

## Added to documentation?

- [x] 📜 README.md
- [ ] 📓 [vc-kit doc site](https://uncefact.github.io/vckit/)
- [ ] 📕 storybook
- [ ] 🙅 no documentation needed

## [optional] Are there any post-deployment tasks we need to perform?


<!-- note: PRs with deleted sections will be marked invalid -->
  • Loading branch information
namhoang1604 committed Aug 9, 2023
1 parent 550a2ab commit 71d85c0
Show file tree
Hide file tree
Showing 3 changed files with 163 additions and 20 deletions.
43 changes: 39 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,52 @@
# project-vckit

A reference implementation of a verifiable credentials platform for digital trade and traceability. Please review this [verifiable credentials white paper](https://unece.org/sites/default/files/2022-07/WhitePaper_VerifiableCredentials-CBT.pdf) to undertsand the business context for this work.
A reference implementation of a verifiable credentials platform for digital trade and traceability. Please review this [verifiable credentials white paper](https://unece.org/sites/default/files/2022-07/WhitePaper_VerifiableCredentials-CBT.pdf) to undertsand the business context for this work.

# Purpose

VCs exemplify a decentralsied model for high integrity digital data excahnge. There is no central data hub. Instead there is a global ecosystem of thousands or millions of issuers, verifiers, and holders. A critical success factor is to reduce the cost of entry into the ecosystem so that it is cheap, fast, and simple for new issuers and verifiers to empower their communities with high integrity digital credentials. This project aims to provide free tools and guidance to facilitate uptake.
VCs exemplify a decentralsied model for high integrity digital data excahnge. There is no central data hub. Instead there is a global ecosystem of thousands or millions of issuers, verifiers, and holders. A critical success factor is to reduce the cost of entry into the ecosystem so that it is cheap, fast, and simple for new issuers and verifiers to empower their communities with high integrity digital credentials. This project aims to provide free tools and guidance to facilitate uptake.

# Audience
# Audience

If you are an organisation that issues any kind of credential such as a permit, certificate, accreditation, license, or other "claim" of value to your community or constituency, then this project is for you. vckit provides the tools to equip your existing business systems with the ability to issue your existing credentials as high integrity, standards based, and interoperable VCs that your constituents (VC holders) can present to any party that needs to verify them.

VCs issued by vckit tooling can be verified using any mobile device camera to scan a QR code. This is important so that uptake can remain compatible with today's paper processes. There is no requirement for verifiers of credentials to adopt any new new technology in order to verify a credential. However, if you are an organisation that is likely to be verifying at scale or you wish to extract the digitial data in a credential for use in your business systems then vckit is also for you. It provides an advanced multi-protocol verification capability that can be integrated with your systems.

# Get Started

TBC once MVP release 1.0 vckit is available. We expect the first release in March 2023.
The vckit is built on top of the [Veramo](https://veramo.io/) agent framework. Veramo is a modular agent framework for creating self-sovereign identity (SSI) enabled applications. It is a great place to start if you are new to SSI. The vckit is a set of Veramo plugins that are configured to work together to provide a complete VC issuance and verification capability.

## Prerequisites

- [Node.js](https://nodejs.org/en/) version 16.x
- [pnpm](https://pnpm.io/) version 8.x

## Installation and Setup

```bash
# Install dependencies
pnpm install

# Initialize the agent configuration
pnpm vckit config

# Copy the .env.example file to .env for the demo explorer
cp packages/demo-explorer/.env.example packages/demo-explorer/.env

# Build
pnpm build
```

The `pnpm vckit config` command will create a `agent.yml` file in the root of the project. This file contains the configuration for the Veramo agent. You can edit this file to configure the agent to your needs. The default configuration is sufficient to get started.

## Start the server on local

```bash
# Start the api server
pnpm vckit server

# Start the web server
cd packages/demo-explorer && pnpm dev
```

Now you can open the demo explorer at http://localhost:3000. And you can check the api documentation at http://localhost:3332/api-docs.
135 changes: 119 additions & 16 deletions packages/cli/default/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,22 @@ constants:
- createVerifiableCredential
- createVerifiablePresentation
- verifyCredential
- verifyCredentialLD
- verifyPresentation
- createSelectiveDisclosureRequest
- getVerifiableCredentialsForSdr
- validatePresentationAgainstSdr
- renderCredential
- createVerifiableCredentialOA
- verifyCredentialOA
- encryptAndStoreData
- fetchEncryptedData
- fetchEncryptedDataByCredentialHash
- revokeCredential
- activateCredential
- checkStatus
- routeCreationVerifiableCredential
- routeVerificationCredential

# Data base
dbConnection:
Expand All @@ -80,6 +90,42 @@ dbConnection:
entities:
$require: '@veramo/data-store?t=object#Entities'

dbConnectionEncrypted:
$require: typeorm#DataSource
$args:
- type: sqlite
database:
$ref: /constants/databaseFile
synchronize: true
migrationsRun: true
migrations:
$require: '@vckit/encrypted-storage?t=object#migrations'
logging: false
entities:
$require: '@vckit/encrypted-storage?t=object#Entities'

dbConnectionRevocationList:
$require: typeorm#DataSource
$args:
- type: sqlite
database:
$ref: /constants/databaseFile
synchronize: false
migrationsRun: true
migrations:
$require: '@vckit/revocationlist?t=object#migrations'
logging: false
entities:
$require: '@vckit/revocationlist?t=object#Entities'

revocationList:
$require: '@vckit/revocationlist#RevocationStatus2020'
$args:
- revocationListPath: http://localhost:3332
bitStringLength: 8
dbConnection:
$ref: /dbConnectionRevocationList

# Server configuration
server:
baseUrl:
Expand All @@ -99,6 +145,25 @@ server:
# DID Documents
- - $require: '@vckit/remote-server?t=function#WebDidDocRouter'

- - $require: '@vckit/vc-api?t=function#HolderRouter'
- - $require: '@vckit/vc-api?t=function#IssuerRouter'
$args:
- createCredential: createVerifiableCredential
updateCredentialStatus: updateVerifiableCredentialStatus
- - $require: '@vckit/vc-api?t=function#VerifierRouter'
$args:
- verifyCredential: verifyCredential
verifyPresentation: verifyPresentation

# VC API docs path
- - /vc-api.json
- $require: '@vckit/vc-api?t=function#VCApiSchemaRouter'
$args:
- basePath: :3332

- - /vc-api-docs
- $require: '@vckit/vc-api?t=function#VCApiDocsRouter'

# API base path
- - /messaging
- $require: '@vckit/remote-server?t=function#MessagingRouter'
Expand All @@ -107,11 +172,33 @@ server:
type: DIDComm
value: https

# Encrypted storage API
- - /encrypted-storage
- $require: '@vckit/encrypted-storage?t=function#encryptedStoreRouter'

# Revocation List
- - /credentials/status/revocation-list-2020
- $require: '@vckit/revocationlist?t=function#revocationList2020Router'

# API base path
- - /agent
- $require: '@vckit/remote-server?t=function#apiKeyAuth'
# - $require: '@vckit/remote-server?t=function#apiKeyAuth'
# $args:
# - apiKey: test123

- $require: '@vckit/revocationlist?t=function#revocationList2020Middleware'
$args:
- apiKey: test123
- apiRoutes:
- /routeCreationVerifiableCredential
supportedProofFormats:
- jwt
- lds

- $require: '@vckit/encrypted-storage?t=function#encryptedStoreMiddleware'
$args:
- apiRoutes:
- /routeCreationVerifiableCredential

- $require: '@vckit/remote-server?t=function#AgentRouter'
$args:
- exposedMethods:
Expand All @@ -133,14 +220,14 @@ server:
- $require: '@vckit/remote-server?t=function#ApiDocsRouter'

# Execute during server initialization
init:
- $require: '@vckit/remote-server?t=function#createDefaultDid'
$args:
- agent:
$ref: /agent
baseUrl:
$ref: /constants/baseUrl
messagingServiceEndpoint: /messaging
# init:
# - $require: '@vckit/remote-server?t=function#createDefaultDid'
# $args:
# - agent:
# $ref: /agent
# baseUrl:
# $ref: /constants/baseUrl
# messagingServiceEndpoint: /messaging

# Message handler plugin
messageHandler:
Expand Down Expand Up @@ -219,6 +306,13 @@ keyManager:
$args:
- $ref: /constants/dbEncryptionKey

# Encrypted Storage Plugin
encryptedStorage:
$require: '@vckit/encrypted-storage#EncryptedStorage'
$args:
- dbConnection:
$ref: /dbConnectionEncrypted

# DID Manager
didManager:
$require: '@veramo/did-manager#DIDManager'
Expand Down Expand Up @@ -253,11 +347,11 @@ didManager:
$require: '@veramo/did-provider-key#KeyDIDProvider'
$args:
- defaultKms: local
did:pkh:
$require: '@veramo/did-provider-pkh#PkhDIDProvider'
$args:
- defaultKms: local
chainId: 1
# did:pkh:
# $require: '@veramo/did-provider-pkh#PkhDIDProvider'
# $args:
# - defaultKms: local
# chainId: 1

didDiscovery:
$require: '@veramo/did-discovery#DIDDiscovery'
Expand All @@ -272,11 +366,13 @@ credentialIssuerLD:
$args:
- suites:
- $require: '@veramo/credential-ld#VeramoEd25519Signature2018'
- $require: '@veramo/credential-ld#VeramoJsonWebSignature2020'
- $require: '@veramo/credential-ld#VeramoEcdsaSecp256k1RecoverySignature2020'
contextMaps:
# The LdDefaultContext is a "catch-all" for now.
- $require: '@veramo/credential-ld?t=object#LdDefaultContexts'
- $require: '@transmute/credentials-context?t=object#contexts'
- $require: '@transmute/did-context?t=object#contexts'
# others should be included here

# Renderer
Expand All @@ -302,8 +398,9 @@ agent:
- $ref: /didDiscovery
- $ref: /messageHandler
- $require: '@veramo/did-comm#DIDComm'
- $require: '@vckit/credential-router#CredentialRouter'
- $require: '@veramo/credential-w3c#CredentialPlugin'
- $require: '@vckit/credential-oa#CredentialIssuerOA'
- $require: '@vckit/credential-oa#CredentialOA'
- $ref: /credentialIssuerLD
- $require: '@veramo/credential-eip712#CredentialIssuerEIP712'
- $require: '@veramo/selective-disclosure#SelectiveDisclosure'
Expand All @@ -314,3 +411,9 @@ agent:
$args:
- $ref: /dbConnection
- $ref: /renderer
- $ref: /encryptedStorage
- $ref: /revocationList
- $require: '@veramo/credential-status#CredentialStatusPlugin'
$args:
- RevocationList2020Status:
$require: '@vckit/revocationlist?t=object#checkStatus'
5 changes: 5 additions & 0 deletions packages/demo-explorer/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
REACT_APP_ENCRYPTED_ENDPOINT="http://localhost:3332/encrypted-storage/encrypted-data"
REACT_APP_QRCODE_VERIFY_ENDPOINT="http://localhost:3000/credential-verifier"
REACT_APP_SCHEMA_URL="http://localhost:3332/open-api.json"
REACT_APP_REMOTE_AGENT_API_KEY=""
REACT_APP_DEFAULT_AGENT_ID="agentApi"

0 comments on commit 71d85c0

Please sign in to comment.