
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
@adorsys-gis/did-resolver-lib
Advanced tools
A library or tool that allows applications to resolve Decentralized Identifiers (DIDs) into their corresponding DID Documents.
A lightweight Peer DID and secrets resolver for DIDComm written in TypeScript, compatible with both browser and Node.js environments.
This library supports resolving did:peer:2
identifiers to DIDDoc
instances and retrieving associated secrets from an in-memory store. Perfect for DIDComm development, testing, and simulation.
did:peer:2
formatted DIDs into DIDDoc
objectsnpm install @adorsys-gis/did-resolver-lib
# or
yarn add @adorsys-gis/did-resolver-lib
import {
PeerDIDResolver,
ExampleDIDResolver,
ExampleSecretsResolver,
} from '@adorsys-gis/did-resolver-lib';
const peerResolver = new PeerDIDResolver();
const didDoc = await peerResolver.resolve('did:peer:2...');
console.log(didDoc); // Returns DIDDoc or null
Use this if you already have DIDDocs and want to simulate DIDComm resolution:
import { DIDDoc } from 'didcomm';
const doc: DIDDoc = { /* your DIDDoc */ };
const resolver = new ExampleDIDResolver([doc]);
const result = await resolver.resolve(doc.id);
console.log(result); // DIDDoc or null
import { Secret } from 'didcomm';
const secret: Secret = { /* your secret */ };
const resolver = new ExampleSecretsResolver([secret]);
const found = await resolver.get_secret(secret.id);
console.log(found); // Secret or null
const foundIds = await resolver.find_secrets([secret.id]);
console.log(foundIds); // Array of matching IDs
import { Message } from 'didcomm';
import {
PeerDIDResolver,
ExampleDIDResolver,
ExampleSecretsResolver,
} from '@adorsys-gis/did-resolver-lib';
import { SENDER_SECRETS } from './secrets/client';
const MEDIATOR_DID = 'did:peer:2...';
const SENDER_DID = 'did:peer:2...';
const peerResolver = new PeerDIDResolver();
const mediatorDoc = await peerResolver.resolve(MEDIATOR_DID);
const senderDoc = await peerResolver.resolve(SENDER_DID);
const didResolver = new ExampleDIDResolver([mediatorDoc, senderDoc]);
const secretsResolver = new ExampleSecretsResolver(SENDER_SECRETS);
const msg = new Message({
id: '123',
type: 'https://didcomm.org/custom-protocol/1.0/message',
from: SENDER_DID,
to: [MEDIATOR_DID],
body: { hello: 'world' },
});
const [packedMessage] = await msg.pack_encrypted(
MEDIATOR_DID,
SENDER_DID,
null,
didResolver,
secretsResolver,
{ forward: false },
);
ExampleDIDResolver.ts
– In-memory DIDDoc resolverExampleSecretsResolver.ts
– In-memory secrets resolverresolver.ts
– Peer DID resolution logic for did:peer:2
resolver.test.ts
– Unit tests for DID resolution logicFAQs
A library or tool that allows applications to resolve Decentralized Identifiers (DIDs) into their corresponding DID Documents.
The npm package @adorsys-gis/did-resolver-lib receives a total of 2 weekly downloads. As such, @adorsys-gis/did-resolver-lib popularity was classified as not popular.
We found that @adorsys-gis/did-resolver-lib demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 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
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.