Skip to content
This repository has been archived by the owner on May 23, 2021. It is now read-only.
/ equihashjs-verify Public archive

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

Notifications You must be signed in to change notification settings

Vutov/equihashjs-verify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

equihashjs-verify

NPM Build Status

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

Installation

npm install equihashjs-verify

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

About

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published