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.
@getalby/pkgzap
Advanced tools
View funding information of your dependencies and tip them via lightning
Fetch funding details of all the dependencies used in your project and send satoshis. Uses the metadata provided by package registries to fetch information about each dependency's funding sources.
npm install pkgzap
getFundingDetails
import { getFundingDetails } from "pkgzap";
const fundingInfo = getFundingDetails();
console.log(JSON.stringify(fundingInfo, null, 2))
This defaults to fetching details in package.json
of your current directory with a depth of 1. However you can customize this as follows:
const path = "path-to-your/package.json"
const levels = 2 // depth i.e. dependencies of dependencies
const fundingInfo = getFundingDetails(path, levels);
console.log(JSON.stringify(fundingInfo, null, 2))
fetchFundingInfo
If you want to fetch the funding data from some arbitrary JSON retrieved from an API or some other source instead of a file, you can use this function
import { fetchFundingInfo } from "pkgzap";
const fundingInfo = fetchFundingInfo(packageJsonData); // depth is defaulted to 1
console.log(JSON.stringify(fundingInfo, null, 2))
You can also use this method to fetch the funding info from a file:
import { fetchFundingInfo } from "pkgzap";
const packageJsonData = await fs.promises.readFile('package.json', 'utf8');
const fundingInfo = fetchFundingInfo(JSON.parse(packageJsonData), 2);
console.log(JSON.stringify(fundingInfo, null, 2))
In your package.json
file, add the following:
"funding": {
"type": "lightning",
"url": "lightning:satoshi@getalby.com"
}
This would help pkgzap
methods to pick your lightning address when your dependency users boost you!
FAQs
View funding information of your dependencies and tip them via lightning
The npm package @getalby/pkgzap receives a total of 0 weekly downloads. As such, @getalby/pkgzap popularity was classified as not popular.
We found that @getalby/pkgzap demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 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.