byoe-context
v0.5.0
Published
BYOE (Bring Your Own Encryption) JSON-LD context.
Readme
BYOE JSON-LD Context (byoe-context)
BYOE (Bring Your Own Everything) JSON-LD context.
Table of Contents
Background
See also (related specs):
Install
Requires Node.js 24+.
To install via NPM:
npm install byoe-contextThis package is ESM-only (import); it does not ship a CommonJS build.
Usage
import {
contexts,
constants,
CONTEXT_URL_V1,
CONTEXT_V1,
VOCAB_CONTEXT_URL,
CONTEXT_VOCAB_V1
} from 'byoe-context'
CONTEXT_URL_V1
// 'https://w3id.org/byoe/app-connect/v1'
// get context data for a specific context
CONTEXT_V1
// full context object
VOCAB_CONTEXT_URL
// 'https://w3id.org/byoe/v1'
CONTEXT_VOCAB_V1
// full context objectThis package can be used directly in browser applications (via bundlers such as vite or webpack).
API
The library exports the following properties:
CONTEXT_URL_V1andCONTEXT_V1: the App Connect context, served athttps://w3id.org/byoe/app-connect/v1.VOCAB_CONTEXT_URLandCONTEXT_VOCAB_V1: the BYOE vocab context, served athttps://w3id.org/byoe/v1. Defines theMultikeyCommitmentverification-method type (and itspublicKeyCommitmentproperty) used by did:webvh documents that publish hash-commitment verification methods.constants: An object that maps constants to well-known context URLs.contexts: AMapthat maps URLs to full context data.
Developing
pnpm install
pnpm testWARNING: The .jsonld in contexts/ is auto-generated by the pnpm run build
script (which runs tsc and then bin/serialize.js), each time you run the
test suite.
DO NOT edit it directly (or your changes will be quickly overwritten). Instead,
make all context changes to src/context.ts.
License
- MIT license.
