Detalhes do pacote

cit-context

digitalbazaar255BSD-3-Clause2.0.1

Concealed Id Token context for JSON-LD.

readme (leia-me)

Concealed Id Token context (cit-context)

Concealed Id Token context for JSON-LD.

Table of Contents

Background

See also (related specs):

*

Install

Requires Node.js 14+

To install via NPM:

npm install cit-context

Usage

const {
  contexts, constants, appContextMap, documentLoader
} = require('cit-context');

// use URL in a JSON-LD context
const obj = {
  "@context": [
    constants.CONTEXT_URL,
    // ...
  ],
  // ...
};

// Codec term map value for CBOR-LD
constants.CBORLD_CODEC_VALUE
// 0x15

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

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

API

The library exports two properties:

  • constants: A Object that maps constants to well-known context URLs. The main constant CONTEXT_URL may be updated from time to time to the latest context location.
  • contexts: A Map that maps URLs to full context data.
  • appContextMap: For use with cborld library.
  • documentLoader

Commercial Support

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

License

  • BSD 3-Clause © Digital Bazaar
  • See the LICENSE file for details.

changelog (log de mudanças)

cit-context ChangeLog

2.0.1 - 2024-06-18

Fixed

  • Change context @protected value to boolean.

2.0.0 - 2021-03-24

Changed

  • BREAKING: Changed CBOR-LD codec value from 0x8000 to 0x15 to match the Registry. Also renamed the constant to CBORLD_CODEC_VALUE, to match other context repos.
  • BREAKING: Renamed exported url constant from CIT_CONTEXT_URL to CONTEXT_URL, to match other repos.
  • BREAKING: Remove Ed25519Signature2020 definition from the context (it has its own context now).

1.0.2 - 2020-11-13

Changed

  • Fix concealedIdToken type definition to be multibase.

1.0.1 - 2020-10-22

Fixed

  • Add appContextMap and documentLoader to named rollup exports.

1.0.0 - 2020-09-09

Initial version.