@digitalbazaar/did-method-null

3.0.0 • Public • Published

did:null method driver (@digitalbazaar/did-method-null)

Main CI Coverage status NPM Version

A DID (Decentralized Identifier) method driver for the did-io library and for standalone use

Table of Contents

Background

See also (related specs):

A did:null method driver for the did-io client library and for standalone use.

The did:null method is used to express a DID Document representing nothing. Its format is:

did:null:null

That DID would correspond to the following DID Document:

Example DID Document

{
  "@context": [
    "https://www.w3.org/ns/did/v1"
  ],
  "id": "did:null:null"
}

Security

No known issues.

Install

Requires Node.js 14+

To install from npm:

npm install --save @digitalbazaar/did-method-null

To install locally (for development):

git clone https://github.com/digitalbazaar/did-method-null.git
cd did-method-null
npm install

Usage

generate()

To generate the did:null:null DID Document:

import {driver} from '@digitalbazaar/did-method-null';
const didNullDriver = driver();

// generate did:null:null
const {didDocument, keyPairs, methodFor} = await didNullDriver.generate();

// print the DID Document above
console.log(JSON.stringify(didDocument, null, 2));

methodFor is a convenience function that returns nothing.

get()

To get the DID Document for the did:null:null DID:

const did = 'did:null:null';
const didDocument = await didNullDriver.get({did});

(Results in the example DID Doc above).

Contribute

See the contribute file!

PRs accepted.

If editing the Readme, please conform to the standard-readme specification.

Commercial Support

Commercial support for this library is available upon request from Digital Bazaar: support@digitalbazaar.com

License

New BSD License (3-clause) © Digital Bazaar, Inc.

Package Sidebar

Install

npm i @digitalbazaar/did-method-null

Weekly Downloads

1

Version

3.0.0

License

BSD-3-Clause

Unpacked Size

8.56 kB

Total Files

5

Last publish

Collaborators

  • dlongley
  • msporny
  • davidlehn
  • mattcollier
  • gannan