W3C compliant DID URI parser and formatter for Node.js. Version 0.6.0 provides parsing, formatting, and validation of Decentralized Identifier URIs with support for method, identifier, path, query, fragment, and parameter components. Largely stable but with irregular updates; the project was forked from the abandoned AraBlocks repository and is now maintained separately. Differs from alternatives like did-resolver by focusing solely on URI manipulation without DID resolution logic.
npm install did-uriNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Parsing a DID URI, formatting a new DID, and using the DID class to extract query parameters.
Use const did = require('did-uri') or dynamic import('did-uri').Reconstruct the full URI using did.reference or concatenate parts manually.
Use 'parameters' object instead of 'param' string.
Run 'npm install did-uri' in your project root.
Use const did = require('did-uri') or use named imports: import { parse } from 'did-uri' (if using a bundler that supports CJS interop).Use dynamic import: const did = await import('did-uri') or switch to CommonJS.No dependency data recorded yet.