1.1.1 • Published 3 years ago

@silentcastle/did-util v1.1.1

Weekly downloads
4
License
Apache-2.0
Repository
github
Last release
3 years ago

DID Util

Contains DID-related types and utils.

Exposed:

  • DIDDocument - type for JSON representation of DID document,
  • DIDResolution - type for DIDResolution, as the thing that DID resolver responds with,
  • ParsedDID - DID URL in parsed form,
  • parse - transform DID URL string into ParsedDID,
  • IResolver - interface for generic DID Resolver,
  • NoResolutionError - error class to indicate unavailable resolution.

Installation

pnpm add @siletncastle/did-util

Usage

import { parse, ParsedDID } from "@silentcastle/did-util";
const didUrl = "did:key:z6DtMrg4Kv51UMAM8vJcCLcRywJfEB4dpHVxPCR6qm6hSV3N";
const parsed: ParsedDID = parse(didUrl);

Licence

Apache-2.0