Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
plc-did-resolver
Advanced tools
This library is intended to resolve PLC DIDs and retrieve an associated DID Document from the "PLC Directory"
It requires the did-resolver
library, which is the primary interface for resolving DIDs.
This DID Method is not considered "decentralized" at all, and will likely be replaced in the future.
The DID resolver takes the DID and retrieves a document from the PLC Directory associated with that DID.
A minimal DID Document might contain the following information:
{
"@context": ["https://www.w3.org/ns/did/v1", "https://w3id.org/security/suites/secp256k1-2019/v1"],
"id": "did:plc:wuyiqd25zhsut5a2gc46iqoi",
"alsoKnownAs": ["at://okaynick.bsky.social"],
"verificationMethod": [{
"id": "#atproto",
"type": "EcdsaSecp256k1VerificationKey2019",
"controller": "did:plc:wuyiqd25zhsut5a2gc46iqoi",
"publicKeyMultibase": "zQYEBzXeuTM9UR3rfvNag6L3RNAs5pQZyYPsomTsgQhsxLdEgCrPTLgFna8yqCnxPpNT7DBk6Ym3dgPKNu86vt9GR"
}],
"service": [{
"id": "#atproto_pds",
"type": "AtprotoPersonalDataServer",
"serviceEndpoint": "https://bsky.social"
}]
}
The resolver presents a simple resolver()
function that returns a ES6 Promise returning the DID document.
import { Resolver } from 'did-resolver'
import { getResolver } from 'plc-did-resolver'
const plcResolver = getResolver()
const didResolver = new Resolver({
...plcResolver
//...you can flatten multiple resolver methods into the Resolver
})
didResolver.resolve('did:plc:wuyiqd25zhsut5a2gc46iqoi').then(doc => console.log(doc))
// You can also use ES7 async/await syntax
;(async () => {
const doc = await didResolver.resolve('did:plc:wuyiqd25zhsut5a2gc46iqoi')
console.log(doc)
})();
FAQs
Resolve DID documents from PLC Directory
We found that plc-did-resolver demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.