equihashjs-verify-bit
    TypeScript icon, indicating that this package has built-in type declarations

    1.0.6 • Public • Published

    equihashjs-verify

    NPM Build Status

    JavaScript check for valid Equihash solutions. Ported from ZCASH on Python

    ZCASH implementation: https://github.com/zcash/zcash/blob/master/qa/rpc-tests/test_framework/equihash.py

    Installation

    npm install equihashjs-verify

    Node version: >= 10. Older versions may work but not testable because mocha dropped the support.

    Usage

    var eq = require('equihashjs-verify')
    
    var equihash = new eq.Equihash(eq.networks.bitcoingold)
    
    var header = new Buffer(..., 'hex') // include nonce in the header
    var solution = new Buffer(..., 'hex') // do not include byte size preamble "fd4005"
    
    var valid = equihash.verify(header, solution)
    //returns boolean
    var eq = require('equihashjs-verify')
    
    var equihash = new eq.Equihash(eq.networks.bitcoingold)
    
    var header = new Buffer(..., 'hex') // nonce may not be included in the header
    var solution = new Buffer(..., 'hex') // do not include byte size preamble "fd4005"
    var nonce = new Buffer(..., 'hex')
    
    var valid = equihash.verify(header, solution, nonce)
    //returns boolean

    Example:

    Verify

    Keywords

    Install

    npm i equihashjs-verify-bit

    DownloadsWeekly Downloads

    2

    Version

    1.0.6

    License

    ISC

    Unpacked Size

    90.7 kB

    Total Files

    9

    Last publish

    Collaborators

    • benjamintshi