A battle-tested toolkit for the Nano cryptocurrency.
If you are looking for legacy blocks, you will want the
- 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
To install the library:
npm install nanocurrency # or yarn add nanocurrency
import * as nanocurrency from 'nanocurrency';
To install the CLI:
npm install -g nanocurrency # or yarn global add nanocurrency
You might be wondering how fast is the work generation. There's a
pow-benchmark example in the
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.
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
distdirectory, without optimization so that it is fast while developing. Note that you'll need to have Docker installed
yarn test: test the code
yarn format: format the code with Prettier
yarn generate-docs: generate the
DOCUMENTATION.mdfile from the JSDoc annotations
If you like the project, feel free to donate some nano: