GithubHelp home page GithubHelp logo

isabella232 / vc-json-schemas Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rsksmart/vc-json-schemas

0.0 0.0 0.0 54 KB

A repository of JSON Schemas for Verifiable Credentials

Home Page: https://rsksmart.github.io/vc-json-schemas/

JavaScript 76.25% HTML 23.75%

vc-json-schemas's Introduction

logo

vc-json-schemas

A repository of JSON Schemas for Verifiable Credentials

npm

The Credential Schema is a document that is used to guarantee the structure, and by extension the semantics, of the set of claims comprising a Verifiable Credential. A shared Credential Schema allows all parties to reference data in a known way1

References:

Overview

This repository contains a set of Credential Schemas. These schemes are hosted and available for use by the community. The objective is to provide a standard, reusable and extensible set of schemas that can be used over different applications enabling the portability of user's information.

For example, if a trusted service like NeverBounce verifies an email and digitally signs a Verifiable Credential complying with a standard schema, the credential can be reused as an email credential over any other application model.

Schemas

The repo

The repository has 4 important modules:

  • The credential schemas folder
  • The sample folder
  • CI linting and testing
  • CD on Github Pages

The credential schemas folder

This folder contains the schema definitions. Each schema is stored in /schema/SCHEMA_NAME/SCHEMA_VERSION/schema.json.

The definitions must be Verifiable Credentials JSON Schemas compliant with:

They must also meet:

  • Have a unique name
  • Be posted in human-readable string representation, using MDN JSON.stringify with space parameter set in 2

Pull requests must meet:

  • Do not modify or delete an existing schema
  • If schema is to be updated, create a new schema with compliant versioning

The sample folder

This folder stores sample Verifiable Credentials for each existent schema. The examples of each schema are stored in /sample/SCHEMA_NAME/SCHEMA_VERSION/sample-K.json, where k is index (starting from 1) of the sample enabling more than one sample to be stored for each schema.

The sample must:

  • Be compliant with the schema specified by the path of the file
  • If credential provides proof, it must be valid

CI linting and testing

Continuous integration is set to

  • Invalidate any schema update or deletion
  • Verify credential schemas format are valid
  • Check spacing is correct
  • Validate the samples against the corresponding schema
  • Versioning is correct

CD on Github Pages

Continuous delivery will make new schemas go live instantly. It will use Github Pages host to serve each of the credential schemas definitions approved and merged into master branch.

Changes to standards

The base schema: is the JSON Schema of the schemas. We made two changes to https://w3c-ccg.github.io/vc-json-schemas/schema/1.0/schema.json:

Enable more DID networks in method

id pattern is ^did:+(\w+:)+\w+;id=[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12};version=d+.\d+$

Changes \w+: for (\w+:)+

Made required property JSON Schema compliant

Changes

{
  "required": {
    "type": "array",
    "items": [ {
      "type": "string" } ] } }

for

{
  "required": {
    "type": "array",
    "items": {
      "type": "string" } } }

Drawbacks

Verifiable Credentials JSON Schema Specification is still a draft so we decided initially to

  • do not include cryptographic proof for these schemas - as it is not yet defined
  • do not publish them in a public ledger - as it may make this project unflexible to future changes

vc-json-schemas's People

Contributors

ilanolkies avatar dependabot[bot] avatar miltonwg avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.