You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
# Equihash - Zcash Implementation
|
|
|
|
nodejs native binding to check for valid Equihash solutions
|
|
|
|
|
|
|
|
# Dependencies
|
|
|
|
````
|
|
|
|
sudo apt-get install build-essential libsodium-dev libboost-system-dev
|
|
|
|
````
|
|
|
|
|
|
|
|
# Usage
|
|
|
|
````javascript
|
|
|
|
var ev = require('bindings')('equihashverify.node');
|
|
|
|
|
|
|
|
var header = new Buffer(..., 'hex');
|
|
|
|
var solution = new Buffer(..., 'hex'); //do not include byte size preamble "fd4005"
|
|
|
|
|
|
|
|
ev.verify(header, solution, n, k);
|
|
|
|
//returns boolean
|
|
|
|
````
|
|
|
|
|
|
|
|
# Backward compatibility
|
|
|
|
````javascript
|
|
|
|
ev.verify(header, solution);
|
|
|
|
````
|
|
|
|
|
|
|
|
# Test Suite:
|
|
|
|
````
|
|
|
|
sudo npm install -g mocha
|
|
|
|
npm install
|
|
|
|
mocha
|
|
|
|
````
|
|
|
|
|