Skip to content

This repository provides sample Self-Sovereign-Identity (SSI) wallet applications and libraries to enable these apps. These are currently provided for demonstration purposes.

License

GPL-3.0, Unknown licenses found

Licenses found

GPL-3.0
LICENSE
Unknown
license-header.txt
Notifications You must be signed in to change notification settings

energywebfoundation/ssi

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

Container Diagram

The following is a C4 Container diagram of the apps within this repository as well as related apps such as Switchboard. The diagram was generated used EnergyWeb's IcePanel.

Note that several of these apps (e.g. Switchboard, Web3 Wallet, SSI Wallet Client) are not in this repository. They are shown on the diagram for context on how the apps in this repository can be used. See the other apps/components section for more details on some of these other apps.

The diagram shows that multiple apps (Switchboard, an Elia developed apps or other apps) could act as clients to VC-API. In addition, these same client app could work with other VC-API implementions. This interoperability is made possible through conformance to the VC-API specification.

c4 container diagram

Apps

VC-API

The vc-api app is a NestJs implementation of the W3C Credentials Community Group VC API Specification.

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

About

This repository provides sample Self-Sovereign-Identity (SSI) wallet applications and libraries to enable these apps. These are currently provided for demonstration purposes.

Resources

License

GPL-3.0, Unknown licenses found

Licenses found

GPL-3.0
LICENSE
Unknown
license-header.txt

Code of conduct

Stars

Watchers

Forks