Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
satoshi-bitcoin
Advanced tools
npm module to convert between Satoshi and Bitcoin with lightweight precision.
npm install --save satoshi-bitcoin
# OR
yarn add satoshi-bitcoin
var sb = require("satoshi-bitcoin");
sb.toSatoshi(1);
//=>100000000
sb.toBitcoin(100000000);
//=>1
<!-- package injected as "sb" -->
<script src="https://rawgit.com/dawsonbotsford/satoshi-bitcoin/master/index.bundle.js"></script>
<script>
console.log("One Satoshi equals " + sb.toBitcoin(1) + " Bitcoin");
</script>
Or download it with npm install --save satoshi-bitcoin
and reference it as:
<script src="node_modules/satoshi-bitcoin/index.bundle.js"></script>
try {
sb.toSatoshi(false); //Throws TypeError
} catch (err) {
console.log(err);
}
sb.toSatoshi(number || string)
sb.toBitcoin(number || string)
What is a Satoshi?
Why do I need a module when I can just divide or multiply by 100,000,000?
satoshi-bitcoin
uses a tiny bignum library (big.js) to ensure accurate conversions!npm test
MIT © Dawson Botsford
FAQs
Convert Satoshi <-> Bitcoin
The npm package satoshi-bitcoin receives a total of 7,450 weekly downloads. As such, satoshi-bitcoin popularity was classified as popular.
We found that satoshi-bitcoin 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
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.