Security News
The Unpaid Backbone of Open Source: Solo Maintainers Face Increasing Security Demands
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.
cashaddrjs-slp
Advanced tools
SLP & Bitcoin Cash cashaddr address format support for Node.js and web browsers.
JavaScript implementation for the new CashAddr address format for Bitcoin Cash and SLP.
Compliant with the original CashAddr specification which improves upon BIP 173.
Note: This is a JavaScript implementation of the CashAddr format specification. If you are looking for a general purpose Bitcoin Cash address translation library, check out the easy-to-use and well-tested BchAddr.js.
$ npm install --save cashaddrjs-slp
$ bower install --save cashaddrjs-slp
You may also download the distribution file manually and place it within your third-party scripts directory: dist/cashaddrjs-0.2.9.min.js.
const cashaddr = require('cashaddrjs');
const address = 'bitcoincash:qpm2qsznhks23z7629mms6s4cwef74vcwvy22gdx6a';
const { prefix, type, hash } = cashaddr.decode(address);
console.log(prefix); // 'bitcoincash'
console.log(type); // 'P2PKH'
console.log(hash); // Uint8Array [ 118, 160, ..., 115 ]
console.log(cashaddr.encode(prefix, type, hash)); // 'bitcoincash:qpm2qsznhks23z7629mms6s4cwef74vcwvy22gdx6a'
Note: This is a JavaScript implementation of the CashAddr format specification. If you are looking for an easy-to-use and well-tested library to translate between different formats, check out BchAddr.js.
You may include a script tag in your HTML and the cashaddr
module will be defined globally on subsequent scripts.
<html>
<head>
...
<script src="https://cdn.rawgit.com/bitcoincashjs/cashaddrjs/master/dist/cashaddrjs-0.2.9.min.js"></script>
</head>
...
</html>
$ npm run docs
Browse automatically generated jsdocs online.
FAQs
SLP & Bitcoin Cash cashaddr address format support for Node.js and web browsers.
The npm package cashaddrjs-slp receives a total of 2,532 weekly downloads. As such, cashaddrjs-slp popularity was classified as popular.
We found that cashaddrjs-slp 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.
Security News
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.
Security News
License exceptions modify the terms of open source licenses, impacting how software can be used, modified, and distributed. Developers should be aware of the legal implications of these exceptions.
Security News
A developer is accusing Tencent of violating the GPL by modifying a Python utility and changing its license to BSD, highlighting the importance of copyleft compliance.