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

nanocurrency

v2.5.0

Published

A toolkit for the Nano cryptocurrency, allowing you to derive keys, generate seeds, hashes, signatures, proofs of work and blocks.

Downloads

711

Readme

nanocurrency

npm version Test

A battle-tested toolkit for the Nano cryptocurrency.

If you are looking for legacy blocks, you will want the ^1.0.0 versions.

Code showcase

The documentation is available locally in docs/ or online at https://marvinroger.github.io/nanocurrency-js/packages/nanocurrency/docs/.


Features

  • Generate seeds
  • Derive secret keys, public keys and addresses
  • Hash blocks
  • Sign and verify blocks
  • Compute and test proofs of work
  • Check the format of seeds, secret keys, public keys, addresses, amounts, etc.
  • Convert Nano units
  • CLI doing all of the above

Usage

To install the library:

npm install nanocurrency
# or yarn add nanocurrency
import * as nanocurrency from 'nanocurrency'

Performance

You might be wondering how fast is the work generation. There's a pow-benchmark example in the examples/ directory. On an Intel Core i7-8550U CPU, with 100 iterations, the average computation time is 18.5s per work.

Considering you can pre-compute and cache the work prior to an actual transaction, this should be satisfying for a smooth user experience.


Contribute

Contributions are very welcome. To develop, make use of the following commands (using Yarn):

  • yarn build:dev: build the C++ code to WebAssembly and bundle the files into the dist/ directory, without optimization so that it is fast while developing. Note that you'll need to have Docker installed

  • yarn test: test the code

  • yarn lint: lint the code against JavaScript Standard Style

  • yarn generate-docs: generate the docs/ website from the JSDoc annotations


Donations

If you like the project, feel free to donate some nano:

xrb_3mrogerjhkdyj6mzf4e7aatf3xs3gp4stwc9yt9ymgasw7kr7g17t4jwwwy8