equihash.node modernized node.js native addon

This package is a modern refactor of khovratovich/equihash, which has not seen updates since 2016. It borrows from digitalbazaar/equihash's native node.js addon, which has not been updated since 2017. This package reworks them to compile with the latest versions of node-gyp and g++.

usage

npm install @tacticalchihuahua/equihash
import { solve, verify } from '@tacticalchihuahua/equihash';
import { randomBytes } from 'crypto';

const N = 90;
const K = 5;

// example
async function demo() {
    const seed = randomBytes(32);
    const solution = await solve(seed, N, K);
    const valid = await verify(solution.proof, solution.nonce, N, K);

    console.log(solution); // {proof,nonce,n,k}
    console.log(valid); // true/false
}

For cryptocurrencies

  • (100/110/120, 4)
  • (108/114/120/126, 5)

For client puzzles

  • (60/70/80/90,4)
  • (90/96/102,5)

license

@tacticalchihuahua/equihash by Lily Anne Hall is marked with CC0 1.0