|
1 | | -# vc-dpp-context |
| 1 | +# VC Disabled Parking Placard JSON-LD Contexts _(@digitalbazaar/vc-dpp-context)_ |
| 2 | + |
| 3 | +[](https://github.com/digitalbazaar/vc-dpp-context/actions/workflows/main.yaml) |
| 4 | +[](https://npm.im/@digitalbazaar/vc-dpp-context) |
| 5 | + |
| 6 | +> VC Disabled Parking Placard JSON-LD contexts for JavaScript. |
| 7 | +
|
| 8 | +## Table of Contents |
| 9 | + |
| 10 | +- [Background](#background) |
| 11 | +- [Security](#security) |
| 12 | +- [Install](#install) |
| 13 | +- [Usage](#usage) |
| 14 | +- [API](#api) |
| 15 | +- [Status](#status) |
| 16 | +- [Developing](#developing) |
| 17 | +- [Commercial Support](#commercial-support) |
| 18 | +- [License](#license) |
| 19 | + |
| 20 | +## Background |
| 21 | + |
| 22 | +See related specs: |
| 23 | + |
| 24 | +- VC Disabled Parking Placard |
| 25 | + - https://github.com/digitalbazaar/vc-dpp |
| 26 | + - https://digitalbazaar.github.io/vc-dpp |
| 27 | + |
| 28 | +## Security |
| 29 | + |
| 30 | +TBD |
| 31 | + |
| 32 | +## Install |
| 33 | + |
| 34 | +Requires [Node.js][] 20+ |
| 35 | + |
| 36 | +To install via [NPM][]: |
| 37 | + |
| 38 | +``` |
| 39 | +npm install @digitalbazaar/vc-dpp-context |
| 40 | +``` |
| 41 | + |
| 42 | +## Usage |
| 43 | + |
| 44 | +```js |
| 45 | +import {contexts, metadata, named} from '@digitalbazaar/vc-dpp-context'; |
| 46 | +// or |
| 47 | +const {contexts, metadata, named} = require('@digitalbazaar/vc-dpp-context'); |
| 48 | +``` |
| 49 | + |
| 50 | +The `contexts` [Map][] can be used to access individual contexts by id or load |
| 51 | +them into a JSON-LD document loader. The `metadata` [Map][] contains |
| 52 | +extra information about each context. |
| 53 | + |
| 54 | +This package can be used with bundlers, such as [webpack][], in browser |
| 55 | +applications. |
| 56 | + |
| 57 | +## API |
| 58 | + |
| 59 | +The library exports the following properties: |
| 60 | +- `contexts`: A [Map][] associating context URLs to context data. |
| 61 | +- `metadata`: A [Map][] associating context URLs to context metadata. |
| 62 | +- `named`: A [Map][] associating short package specific names to context |
| 63 | + metadata. |
| 64 | + |
| 65 | +Note that the `metadata` format is experimental and subject to change. The `id` |
| 66 | +field is expected to stay stable and can be used with the `named` Map to get a |
| 67 | +context URL for a short name such as `v1`. |
| 68 | + |
| 69 | +The context files are available in the published `contexts/` directory. The |
| 70 | +metadata has a URL for each context. Note that these files are semantically |
| 71 | +equivalent to published spec contexts but the formatting may differ such that |
| 72 | +strict file digests are not equivalent. |
| 73 | + |
| 74 | +## Status |
| 75 | + |
| 76 | +The following contexts are available as of early-2026. They track the published |
| 77 | +spec contexts. |
| 78 | + |
| 79 | +- VC Disabled Parking Placard v1rc1 context |
| 80 | + - URL: `https://w3id.org/vc-dpp/v1rc1` |
| 81 | + - Short name: `v1rc1` |
| 82 | + - Status: development |
| 83 | + |
| 84 | +## Developing |
| 85 | + |
| 86 | +Source is available at: |
| 87 | +- https://github.com/digitalbazaar/vc-dpp-context |
| 88 | + |
| 89 | +**WARNING**: The `.jsonld` files in `contexts/` are auto-generated by the `npm |
| 90 | +run build` script each time the test suite is run. |
| 91 | + |
| 92 | +DO NOT edit them directly since changes will be overwritten. |
| 93 | + |
| 94 | +Make all context changes to `lib/*.js`. |
| 95 | + |
| 96 | +## Commercial Support |
| 97 | + |
| 98 | +Commercial support for this library is available upon request from |
| 99 | + |
| 100 | + |
| 101 | +## License |
| 102 | + |
| 103 | +- Code: BSD 3-Clause © Digital Bazaar |
| 104 | +- Contexts: W3C Software and Document License |
| 105 | +- See the [LICENSE](./LICENSE.md) file for details. |
| 106 | + |
| 107 | +[Map]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map |
| 108 | +[NPM]: https://www.npmjs.com/ |
| 109 | +[Node.js]: https://nodejs.org/ |
| 110 | +[webpack]: https://webpack.js.org/ |
0 commit comments