nanopow-rs-node
A JavaScript wrapper for nanopow-rs to provide fast, safe, fully multithreaded Nano proof-of-work generation in Node.js.
Usage
First: Install Rust
See https://www.rustup.rs/ for instructions on installing Rust for your system.
With Node
$ yarn add nanopow-rs-node
$ yarn install
const nanopow = require('nanopow-rs-node')
let hash = 'AC101449364C84CDD7562AA724BE52757EF06BCE834C50CF610DD2949291B0D9'
const work = nanopow.generateWork(hash)
const isValid = nanopow.checkWork(hash, work)
In Electron App
Basically same as above, see https://guides.neon-bindings.com/electron-apps/
API
nanopow.generateWork(hash, maxIters)
nanopow.checkWork(hash, work)