@silentcastle/did-util
v1.1.1
Published
DID-related types and utils
Downloads
2
Readme
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 intoParsedDID
,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);