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.
hyperdrive-http
Advanced tools
Handle Hyperdrive HTTP Requests
Expects you to:
Initiate with an archive lookup function:
var onrequest = hyperdriveHttp(getArchive)
or pass a single archive:
var onrequest = hyperdriveHttp(archive)
var hyperdriveHttp = require('hyperdrive-http')
var getArchive = function (datInfo, cb) {
// find the archive to serve
var archive = cache.get(datInfo.discoveryKey)
if (!archive) {
archive = drive.createArchive(datInfo.key)
// connect to swarm, if necessary
sw.join(archive.discoveryKey)
}
cb(null, archive) // callback with your found archive
}
var onrequest = hyperdriveHttp(getArchive)
var server = http.createServer()
server.listen(8000)
server.on('request', onrequest)
Pass an archive lookup function for the first argument of hyperdriveHttp
. The function is called with datInfo
and a callback.
datInfo = {
key: archive.key,
discoveryKey: archive.discoveryKey,
filename: someFile.txt,
}
FAQs
Handle Hyper[drive|core] HTTP Requests
The npm package hyperdrive-http receives a total of 33 weekly downloads. As such, hyperdrive-http popularity was classified as not popular.
We found that hyperdrive-http demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 15 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.
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.