🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

@digitalcredentials/dcc-context

Package Overview
Dependencies
Maintainers
7
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@digitalcredentials/dcc-context

DCC core JSON-LD context.

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
7
Created
Source

DCC Context and Schema Repo (@digitalcredentials/dcc-context)

Build status

DCC core artifacts: contexts and schemas.

Table of Contents

Background

An NPM module and JSON-LD source file for the DCC context:

https://w3id.org/dcc/v1

See also (related specs):

Install

Requires Node.js 12+

To install via NPM, add the following to your package.json dependencies:

"@digitalcredentials/dcc-context": "^1.0.0"

Usage

import dccCtx from '@digitalcredentials/dcc-context';
// or
const dccCtx = require('@digitalcredentials/dcc-context');
const {contexts, constants, appContextMap} = dccCtx;

dccCtx.CONTEXT_URL_V1
// 'https://w3id.org/dcc/v1'

// get context data for a specific context
dccCtx.CONTEXT_V1
// full context object

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

API

The library exports the following properties:

  • CONTEXT_URL_V1 and CONTEXT_V1.
  • appContextMap: For use with cborld library.

Developing

WARNING: The .json file in v1/ 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.

License

FAQs

Package last updated on 19 Jan 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts