Compact isomorphic clone of ccg security-context.
npm install @digitalbazaar/security-context

> Compact isomorphic clone of CCG's security-context.
- Background
- Install
- Usage
- Developing
- Commercial Support
- License
This is a copy of the Linked Data Security Vocabulary
context, with a refactored export to make it easier to use in the browser and
in React Native.
Requires Node.js 12+
To install via NPM:
```
npm install @digitalbazaar/security-context
`js
import secCtx from '@digitalbazaar/security-context';
// or
const secCtx = require('@digitalbazaar/security-context');
const {contexts, constants} = secCtx;
secCtx.CONTEXT_URL
// 'https://w3id.org/security/v2'
secCtx.SECURITY_CONTEXT_V1_URL
// 'https://w3id.org/security/v1'
secCtx.SECURITY_CONTEXT_V2_URL
// 'https://w3id.org/security/v2'
// get context data for a specific context
secCtx.contexts.get(secCtx.SECURITY_CONTEXT_V2_URL)
// security/v2 full context object
`
This package can be used with bundlers, such as [webpack][], in browser
applications.
The library exports the following properties:
- CONTEXT_URL and CONTEXT (it's recommended that context repositories only export one context).constants
- : A Object that maps constants to well-known context URLs. TheCONTEXT_URL
main constant may be updated from time to time to thecontexts
latest context location.
- : A Map` that maps URLs to full context data.
Commercial support for this library is available upon request from
Digital Bazaar: support@digitalbazaar.com
- BSD 3-Clause © Digital Bazaar
- See the LICENSE file for details.
[webpack]: https://webpack.js.org/