2.5.0 • Published 4 years ago

nanocurrency v2.5.0

Weekly downloads
476
License
GPL-3.0
Repository
github
Last release
4 years ago

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

2.5.0

4 years ago

2.4.0

4 years ago

2.3.0

5 years ago

2.2.1

5 years ago

2.2.0

5 years ago

2.1.0

5 years ago

2.0.4

6 years ago

2.0.3

6 years ago

2.0.2

6 years ago

2.0.1

6 years ago

2.0.0

6 years ago

1.12.0

6 years ago

1.11.2

6 years ago

1.11.1

6 years ago

1.11.0

6 years ago

1.10.1

6 years ago

1.10.0

6 years ago

1.9.0

6 years ago

1.8.0

6 years ago

1.7.4

6 years ago

1.7.3

6 years ago

1.7.2

6 years ago

1.7.1

6 years ago

1.7.0

6 years ago

1.6.3

6 years ago

1.6.2

6 years ago

1.6.1

6 years ago

1.6.0

6 years ago

1.5.0

6 years ago

1.4.0

6 years ago

1.3.0

6 years ago

1.2.0

6 years ago

1.1.0

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago