Product
Introducing License Enforcement in Socket
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
HDC module aims to implement HDC Messages Format, which is a standard description of messages used by NodeCoin project.
To handle certificates data, just:
var Certificate = require('hdc').Certificate;
var data = fs.readFileSync('/path/to/lolcat.pub', 'utf8');
var cert = new Certificate(data);
Then, several data maybe extracted:
console.log(cert.fingerprint);
// => C73882B64B7E72237A2F460CE9CAB76D19A8651E
console.log(cert.name);
// => LoL Cat
console.log(cert.email);
// => email@example.com
console.log(cert.comment);
// => udid2;c;CAT;LOL;2000-04-19;e+43.70-079.42;0;
To handle certificates data, just:
var Amendment = require('hdc').Amendment;
var data = fs.readFileSync('/path/to/amendment', 'utf8');
var am = new Amendment(data);
if(am.error){
// Some error happened while parsing data
console.log(am.error);
}
Then, several data maybe extracted:
console.log(am.version);
// => 1
console.log(am.currency);
// => beta_brousoufs
console.log(am.number);
// => 2
console.log(am.previousHash);
// => 0F45DFDA214005250D4D2CBE4C7B91E60227B0E5
console.log(am.dividend);
// => 100
console.log(am.getNewMembers());
// => ["31A6302161AC8F5938969E85399EB3415C237F93"]
...
This software is provided under MIT license.
FAQs
NPM module implementing HDC Messages Format
The npm package hdc receives a total of 6 weekly downloads. As such, hdc popularity was classified as not popular.
We found that hdc 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.
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.
Product
We're excited to introduce Socket Optimize, a powerful CLI command to secure open source dependencies with tested, optimized package overrides.