digitalbazaar / vdl-context

Verifiable Driver's License JSON-LD Context
BSD 3-Clause "New" or "Revised" License
1 stars 0 forks source link

VDL context (vdl-context)

Build status NPM Version

VDL context for JSON-LD.

Table of Contents

Background

See also (related specs):

Install

To install via NPM:

npm install @digitalbazaar/vdl-context

Usage

// ESM
import {
  CONTEXT,
  CONTEXT_URL,
  constants,
  context
} from '@digitalbazaar/vdl-context';

// CommonJS
const ctx = require('@digitalbazaar/vdl-context');
const {
  CONTEXT,
  CONTEXT_URL,
  constants,
  context
} = ctx;

// Default context URL
CONTEXT_URL
// -> 'https://w3id.org/vdl/v1'

// Default context data
CONTEXT
// -> full context object

// Codec term map value for CBOR-LD
constants.CBORLD_VALUE
// -> 0x0

// get context data for a specific context
const data = contexts.get('https://w3id.org/vdl/v1');

This package can be used with bundlers, such as webpack, in browser applications.

API

The library exports the following properties:

Status

Developing

Source is available at:

WARNING: The .jsonld in contexts/ is auto-generated by the npm run build script, each time you run the test suite.

DO NOT edit it directly (or your changes will be quickly overwritten). Instead, make all context changes to js/context.js.

Commercial Support

Commercial support for this library is available upon request from Digital Bazaar: support@digitalbazaar.com

License