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.
3id-test-helper
Advanced tools
A library to generate DIDs and sign Json Web Tokens (JWTs). This library is meant for running tests so that you do not need to log in to your wallet, connect to 3box and then sign JWTs.
Using npm:
$ npm install 3id-test-helper
Create the class
const DidHelper = require('3id-test-helper')
const IPFS = require('ipfs')
const ipfs = await IPFS.create()
const testHelper = new DidHelper(ipfs)
Generate DIDs
const accounts = await testHelper.generateAccounts()
When you generate accounts, you create random Ethereum private keys which are used to generate your DIDs.
You can get those private keys and hardcode them in your tests so you can reuse the same DIDs.
const privateKeys = testHelper.getPrivateKeys()
const reusedDIDs = testHelper.generateAccounts(privateKeys)
Signing Json Web Tokens (JWTs)
Important: The did you pass in must have been generated by the class. When the class generates the DIDs, it creates a signer for JWTs.
const jwt = await testHelper.createJWTFromDID(did, payload)
FAQs
Generate 3IDs and signers for testing
The npm package 3id-test-helper receives a total of 1 weekly downloads. As such, 3id-test-helper popularity was classified as not popular.
We found that 3id-test-helper 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.