New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

iso-did

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

iso-did

Isomorphic did core and did key tooling

latest
Source
npmnpm
Version
2.1.1
Version published
Weekly downloads
984
20.74%
Maintainers
1
Weekly downloads
 
Created
Source

iso-did NPM Version License iso-did

Isomorphic did core and did key tooling

Install

pnpm install iso-did

Usage

import { DID } from 'iso-did'

const did = DID.fromString(
  'did:example:21tDAKCERh95uGgKbJNHYp;service=agent;foo:bar=high/some/path?foo=bar#key1'
)

// did.did = 'did:example:21tDAKCERh95uGgKbJNHYp'
// did.id = '21tDAKCERh95uGgKbJNHYp'
// did.method = 'example'
// did.path = '/some/path'
// did.fragment = 'key1'
import { DIDKey } from 'iso-did/key'

const did1 = DIDKey.fromString(
  'did:key:z6MkiTBz1ymuepAQ4HEHYSF1H8quG5GLVVQR3djdX3mDooWp'
)

// did1.key = Uint8Array([1, 2, 3, 4])
// did1.code = 0xed
// did1.type = 'ED25519'

const did2 = DIDKey.fromPublicKey('ED25519', publicKeyBytes)

// did2.id = z6MkiTBz1ymuepAQ4HEHYSF1H8quG5GLVVQR3djdX3mDooWp
// did2.did = did:key:z6MkiTBz1ymuepAQ4HEHYSF1H8quG5GLVVQR3djdX3mDooWp

Docs

Check https://hugomrdias.github.io/iso-repo/modules/iso_did.html

License

MIT © Hugo Dias

Keywords

did

FAQs

Package last updated on 29 Sep 2025

Did you know?

Socket

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.

Install

Related posts