# credentials-context

> Credentials Context

Latest version **2.0.0** (published 2021-09-20) · SEE LICENSE IN LICENSE.md license · 0 weekly downloads

## Install

```sh
npm install credentials-context
pnpm add credentials-context
yarn add credentials-context
bun add credentials-context
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2021-09-20 |
| First published | 2019-07-30 |
| Weekly downloads | 0 |
| License | SEE LICENSE IN LICENSE.md |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 28.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Digital Bazaar, Inc. |
| Maintainers | davidlehn, codenamedmitri, msporny, dlongley, mattcollier, gannan |

## Links

- npm: https://www.npmjs.com/package/credentials-context
- Repository: https://github.com/digitalbazaar/credentials-context
- Homepage: https://github.com/digitalbazaar/credentials-context#readme
- Issues: https://github.com/digitalbazaar/credentials-context/issues
- npm.io page: https://npm.io/package/credentials-context

## Recent versions

- 2.0.0 (latest) — 2021-09-20
- 1.0.0 — 2019-07-30

## README

# Verifiable Credentials v1 Context _(credentials-context)_

[![NPM Version](https://img.shields.io/npm/v/credentials-context.svg?style=flat-square)](https://npm.im/credentials-context)

> A [Verifiable Credentials v1](https://github.com/w3c/vc-data-model) context library for JavaScript

This project packages the DID Context from the [Verifiable Credentials v1 spec](https://github.com/w3c/vc-data-model)
for use with [Node.js][Node.js] and web apps.

## Table of Contents

- [Security](#security)
- [Background](#background)
- [Install](#install)
- [Usage](#usage)
- [Contribute](#contribute)
- [Commercial Support](#commercial-support)
- [License](#license)

## Security

TBD

## Background

See also (related specs):

* [Verifiable Credentials Data Model v1](https://github.com/w3c/vc-data-model)

## Install

Requires [Node.js][] 8.3+

To install via [NPM][]:

```
npm install credentials-context
```

## Usage

```js
import credentialsContext from 'credentials-context';
// or
const credentialsContext = require('credentials-context');

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

// get context data for a specific context
const data = credentialsContext.CONTEXT;
// ...
```

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_V1` may be updated from time to time to the
  latest context location.
- `contexts`: A `Map` that maps URLs to full context data.

## Contribute

Note: If editing the Readme, please conform to the
[standard-readme](https://github.com/RichardLitt/standard-readme) specification.

## 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](./LICENSE.md) file for details.

[credentials-context]: https://github.com/digitalbazaar/credentials-context
[NPM]: https://www.npmjs.com/
[Node.js]: https://nodejs.org/
[webpack]: https://webpack.js.org/

---
_Source: https://npm.io/package/credentials-context · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
