# @did-core/did-ld-json

> ``` npm i @did-core/did-ld-json --save ```

Latest version **0.1.1-unstable.15** (published 2021-06-30) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @did-core/did-ld-json
pnpm add @did-core/did-ld-json
yarn add @did-core/did-ld-json
bun add @did-core/did-ld-json
```

## Health

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

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.1-unstable.15 |
| Published | 2021-06-30 |
| First published | 2021-02-13 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=10 |
| Dependencies | 2 |
| Unpacked size | 246.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 9 |
| Author | Orie Steele |
| Maintainers | or13, transmute-ci |

## Links

- npm: https://www.npmjs.com/package/@did-core/did-ld-json
- Repository: https://github.com/transmute-industries/did-core
- Homepage: https://github.com/transmute-industries/did-core/tree/main/packages/did-ld-json
- Issues: https://github.com/transmute-industries/did-core/issues
- npm.io page: https://npm.io/package/@did-core/did-ld-json

## Dependencies (2)

- [jsonld-checker](https://npm.io/package/jsonld-checker.md) ^0.1.6
- [@transmute/did-context](https://npm.io/package/@transmute/did-context.md) ^0.6.1-unstable.25

## Recent versions

- 0.1.1-unstable.15 (latest) — 2021-06-30
- 0.1.1-unstable.14 — 2021-06-30
- 0.1.1-unstable.13 — 2021-05-31
- 0.1.1-unstable.12 — 2021-05-31
- 0.1.1-unstable.11 — 2021-05-19
- 0.1.1-unstable.10 — 2021-05-08
- 0.1.1-unstable.9 — 2021-02-23
- 0.1.1-unstable.8 — 2021-02-21
- 0.1.1-unstable.7 — 2021-02-21
- 0.1.1-unstable.6 — 2021-02-21
- 0.1.1-unstable.5 — 2021-02-21
- 0.1.1-unstable.4 — 2021-02-21
- 0.1.1-unstable.1 — 2021-02-13
- 0.1.1-unstable.0 — 2021-02-13
- 0.1.0 — 2021-02-13

## README

# @did-core/did-ld-json

```
npm i @did-core/did-ld-json --save
```

## Usage

```ts
import { factory, DidDocument } from '@did-core/data-model';
import { representation } from '@did-core/did-ld-json';

const didDocument: DidDocument = factory.build({
  entries: {
    '@context': [
      'https://www.w3.org/ns/did/v1',
      'https://ns.did.ai/suites/jws-2020/v1',
    ],
    id: 'did:example:123',
    verificationMethod: [
      {
        id: '#z6MktjiTVhTt2NWEYUjbqrkRVLWqJgpw85jFRmHcGrYFD7jM',
        type: 'JsonWebKey2020',
        controller: 'did:example:123',
        publicKeyJwk: {
          kty: 'OKP',
          crv: 'Ed25519',
          x: '1DrGM08j2Agl8F14fN69RexmNON2Yczq3hp47wMRilA',
        },
      },
    ],
  },
});

const representation: Buffer = await didDocument
  .addRepresentation({ 'application/did+ld+json': representation })
  .produce('application/did+ld+json');
```

---
_Source: https://npm.io/package/@did-core/did-ld-json · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
