npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

cjdnskeys

v0.1.5

Published

Tools for manipulating cjdns public/private keys and IPv6 addresses

Downloads

49

Readme

cjdnskeys - tools for working with cjdns keys

const Cjdnskeys = require('cjdnskeys');

Cjdnskeys.keyPair() /*
{ privateKey: '378813dfecc62185ffab4d00030b55f50b54e515bfcea8b41f2bd1c2511bae03',
  publicKey: 'qgkjd0stfvk9r3j28s4gh8rgslbgx2r5xgxzxkgm5vdxqwn8xsu0.k',
  ip6: 'fcf5:c1ec:be67:9ad5:1f6c:f31b:5d74:37b0' } */

Cjdnskeys.privateToPublic("378813dfecc62185ffab4d00030b55f50b54e515bfcea8b41f2bd1c2511bae03")
// "qgkjd0stfvk9r3j28s4gh8rgslbgx2r5xgxzxkgm5vdxqwn8xsu0.k"

Cjdnskeys.publicToIp6("qgkjd0stfvk9r3j28s4gh8rgslbgx2r5xgxzxkgm5vdxqwn8xsu0.k")
// "fcf5:c1ec:be67:9ad5:1f6c:f31b:5d74:37b0"

Cjdnskeys.validate("378813dfecc62185ffab4d00030b55f50b54e515bfcea8b41f2bd1c2511bae03") // true
Cjdnskeys.validate("qgkjd0stfvk9r3j28s4gh8rgslbgx2r5xgxzxkgm5vdxqwn8xsu0.k") // true
Cjdnskeys.validate("fcf5:c1ec:be67:9ad5:1f6c:f31b:5d74:37b0") // true

Conversion Functions

const Cjdnskeys = require('cjdnskeys');

Cjdnskeys.keyStringToBytes("qgkjd0stfvk9r3j28s4gh8rgslbgx2r5xgxzxkgm5vdxqwn8xsu0.k")
// <Buffer d6 45 c8 00 ce 6d c7 74 07 14 08 13 f7 d0 75 58 2a d7 c5 2d dd f5 df a3 9b 65 b3 ...>

Cjdnskeys.keyBytesToString(new Buffer('1kXIAM5tx3QHFAgT99B1WCrXxS3d9d+jm2WzbjlFHWs=', 'base64'))
// "qgkjd0stfvk9r3j28s4gh8rgslbgx2r5xgxzxkgm5vdxqwn8xsu0.k"

Cjdnskeys.ip6StringToBytes("fcf5:c1ec:be67:9ad5:1f6c:f31b:5d74:37b0")
// <Buffer fc f5 c1 ec be 67 9a d5 1f 6c f3 1b 5d 74 37 b0>

Cjdnskeys.ip6BytesToString(new Buffer("fcf5c1ecbe679ad51f6cf31b5d7437b0", "hex"))
// "fcf5:c1ec:be67:9ad5:1f6c:f31b:5d74:37b0"

Cjdnskeys.parseNodeName('v19.0000.0000.0000.0863.2v6dt6f841hzhq2wsqwt263w2dswkt6fz82vcyxqptk88mtp8y50.k')
// { v: 19,
//   path: '0000.0000.0000.0863',
//   key: '2v6dt6f841hzhq2wsqwt263w2dswkt6fz82vcyxqptk88mtp8y50.k' }