Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@blockcerts/did-ld-json

Package Overview
Dependencies
Maintainers
4
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@blockcerts/did-ld-json

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

  • 0.1.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
4
Created
Source

@did-core/did-ld-json

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

Usage

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');

FAQs

Package last updated on 26 Oct 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc