Skip to content

Latest commit

 

History

History
151 lines (102 loc) · 7.26 KB

README.md

File metadata and controls

151 lines (102 loc) · 7.26 KB

Notice: OWF VC API Implementation Adoption

The VC API implementation initially developed in this repository has been adopted by the Open Wallet Foundation. The implementation can now be found at the following repository: https://github.com/openwallet-foundation-labs/vc-api.


Energy Web Foundation Logo Elia Group Logo

EWF and Elia Group Self-Sovereign-Identity (SSI) Wallet Components

CI

Introduction

This repository provides sample Self-Sovereign-Identity (SSI) wallet components and libraries. These are currently provided for demonstration and proof-of-concept purposes. The functionality is mostly generic functionality based on cryptography and SSI standards, however the intention is that it can be used to enable more specific energy industry use cases.

These SSI wallet components are a part of the Energy Web Decentralized Operating System. For more information about SSI at EWF, see the EWF Gitbook page on SSI.

Architecture

Apps

Input-Descriptor-To-Credential App

This input-descriptor-to-credential app is a NestJs implementation of a complementary service to the vc-api app. It allows converting an input descriptor to a credential to be signed.

Libraries

DID Library

The DID generation logic is encapsulated in the did library. This potentially allows the logic to be shared between wallets of various form-factors (e.g. nodejs wallet, a web wallet, another nodejs framework, etc in the future).

Often DID generation requires the generation of a new public-private keypair. In order to rename agnostic to the key-generation and storage preferences of a particular wallet implementation, the did DID factories accept public keys in the standard format of JWK.

An abstracted process of creating a DID controlled by a asymmetric key-pair is therefore:

const key = generateKey(); // Generate a key pair and return the public key necessary to create the DID
const did = generateDID(key); // Code from ssi-did lib. Returns initial DID Document of DID, including Verification Methods

KMS Interface

Other apps/components

Switchboard

Switchboard can be used as a UI to initiate and continue a VC-API exchange. It uses iam-client-lib to accomplish this.

iam-client-lib

iam-client-lib provides SSI related functions such as interaction with EWF's Switchboard role credential definitions, credential request and issuance and connection to the ssi-hub. It can be used as a client library to this vc-api (for example, to start an exchange).

ssi-hub

ssi-hub's persistence of issued credentials, requested credentials and DID relationships could be integrated with the code in this repository.

ew-did-registry

ew-did-registry provides ssi related libraries written by Energy Web. As such, there is currently some overlap between ew-did-registry libraries and the code in this repository. For example:

The overlap was created due to the prototyping nature of this repository and will be reduced in the future.

Technology Decisions

Rationale for Spruce DIDKit

Spruce's DIDKit is used for DID generation and credential issuance & verification. The rational for DIDKit's use is that it:

  • Is written in Rust and so suitable for use in any mobile app development framework
  • Supports JSON-LD and JWT credential issuance and verification
  • Supports did:key, did:ethr, did:web
  • DIDKit (and its libraries) are open-source

Installation

This repository is a monorepo that uses Rush with the PNPM package manager.

PNPM is used for its speed and solution to NPM doppelgangers (as well as being the default option for rush). See comparison of NPM vs PNPM vs Yarn for Rush.

Requirements

PNPM is required. See installation instructions here: https://pnpm.js.org/installation/

Rush is required. See installation instructions here: https://rushjs.io/pages/intro/get_started/

Install

Use rush to install dependencies (not the package manager directly). In other words, do not run npm install or pnpm install. This is because Rush optimizes by installing all of the dependency packages in a central folder, and then uses symlinks to create the “node_modules” folder for each of the projects.

$ rush install

Build

Use rush to build.

$ rush build

Testing

To run tests across all apps and libraries in one command, a rush script has been added to ./common/config/rush/command-line.json

$ rush test

Contributing Guidelines

See contributing.md

Questions and Support

For questions and support please use the Github issues.

EW-DOS

The Energy Web Decentralized Operating System is a blockchain-based, multi-layer digital infrastructure.

The purpose of EW-DOS is to develop and deploy an open and decentralized digital operating system for the energy sector in support of a low-carbon, customer-centric energy future.

We develop blockchain technology, full-stack applications and middleware packages that facilitate participation of Distributed Energy Resources on the grid and create open market places for transparent and efficient renewable energy trading.

  • To learn about more about the EW-DOS tech stack, see our documentation.

  • For an overview of the energy-sector challenges our use cases address, go here.

For a deep-dive into the motivation and methodology behind our technical solutions, we encourage you to read our White Papers:

Connect with Energy Web

License

This project is licensed under the GNU General Public License v3.0 or later - see the LICENSE file for details