@digitalbazaar/vc-barcodes-context v1.0.0
Verifiable Credentials Barcodes Contexts (@digitalbazaar/vc-barcodes-context)
A Verifiable Credential Barcodes JSON-LD context for JavaScript.
Table of Contents
Background
See related specs:
- Verifiable Credentials Barcodes
Security
TBD
Install
Requires Node.js 20+
To install via NPM:
npm install @digitalbazaar/vc-barcodes-contextUsage
import {contexts, metadata, named} from '@digitalbazaar/vc-barcodes-context';
// or
const {contexts, metadata, named} = require('@digitalbazaar/vc-barcodes-context');The contexts Map can be used to access individual contexts by id or load
them into a JSON-LD document loader. The metadata Map contains
extra information about each context.
This package can be used with bundlers, such as webpack, in browser applications.
API
The library exports the following properties:
contexts: A Map associating context URLs to context data.metadata: A Map associating context URLs to context metadata.named: A Map associating short package specific names to context metadata.
Note that the metadata format is experimental and subject to change. The id
field is expected to stay stable and can be used with the named Map to get a
context URL for a short name such as v1.
The context files are available in the published contexts/ directory. The
metadata has a URL for each context. Note that these files are semantically
equivalent to published spec contexts but the formatting may differ such that
strict file digests are not equivalent.
Status
The following contexts are available as of early-2025. They track the published spec contexts.
- Verifiable Credentials Barcodes v1 context
- URL:
https://w3id.org/vc-barcodes/v1 - Short name:
v1 - Status: stable
- URL:
Developing
Source is available at:
WARNING: The .jsonld files in contexts/ are auto-generated by the npm
run build script each time the test suite is run.
DO NOT edit them directly since changes will be overwritten.
Make all context changes to lib/*.js.
Commercial Support
Commercial support for this library is available upon request from Digital Bazaar: support@digitalbazaar.com
License
- Code: BSD 3-Clause © Digital Bazaar
- Contexts: W3C Software and Document License
- See the LICENSE file for details.
7 months ago