
Security News
Deno 2.6 + Socket: Supply Chain Defense In Your CLI
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.
@didtools/multidid
Advanced tools
Multidid is a representation strategy for DIDs and DID URLs that is very compact and extensible. It allows any DID method to be represented as a string of bytes. Reference [specification](https://github.com/ChainAgnostic/multidid).
Multidid is a representation strategy for DIDs and DID URLs that is very compact and extensible. It allows any DID method to be represented as a string of bytes. Reference specification.
This library is a multidid utility library to encode and decode multidids to their byte and string representation and convert from did strings to multidid representations.
npm install --save @didtools/multidid
import { Multidid } from '@didtools/multidid'
const didString = "did:key:z6MkiTBz1ymuepAQ4HEHYSF1H8quG5GLVVQR3djdX3mDooWp#z6MkiTBz1ymuepAQ4HEHYSF1H8quG5GLVVQR3djdX3mDooWp"
// Multidid instance from did string
const multidid = Multidid.fromString(didString)
// Encode to bytes
multidid.toBytes()
// Decode from bytes to multidid instance
Multidid.fromBytes(bytes)
// Encode as a multibase base16 string
const mdStr = multidid.toMultibase('base16')
console.log(mdStr)
//f9d1aed013b6a27bcceb6a42d62a3a8d02a6f0d73653215771de243a63ac048a18b59da29307a364d6b6954427a31796d75657041513448454859534631483871754735474c5656515233646a6458336d446f6f5770
// Multidid instance from base encoded string
Multidid.fromMultibase(mdStr)
// DID string from multidid
multidid.toString()
Apache-2.0 OR MIT
FAQs
Multidid is a representation strategy for DIDs and DID URLs that is very compact and extensible. It allows any DID method to be represented as a string of bytes. Reference [specification](https://github.com/ChainAgnostic/multidid).
The npm package @didtools/multidid receives a total of 5 weekly downloads. As such, @didtools/multidid popularity was classified as not popular.
We found that @didtools/multidid demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 open source maintainers collaborating on the project.
Did you know?

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.

Security News
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.

Security News
New DoS and source code exposure bugs in React Server Components and Next.js: what’s affected and how to update safely.

Security News
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.