Skip to content

Instantly share code, notes, and snippets.

View elleyeayeme's full-sized avatar

Liam McElroy elleyeayeme

  • Liam McElroy
  • Liverpool
View GitHub Profile
const { sha256 } = require('js-sha256').sha256;
class Miner {
constructor(fnHash, difficulty = 1, maxAttempts = 1000, verbose = true) {
if (difficulty <= 0 || difficulty > 5) {
throw new Error('Invalid difficulty provided');
}
this.fnHash = fnHash;
this.maxAttempts = maxAttempts;

Keybase proof

I hereby claim:

  • I am elleyeayeme on github.
  • I am elleyeayeme (https://keybase.io/elleyeayeme) on keybase.
  • I have a public key ASBTIuGwB9eg5Qz-gzZTEXwVkIP7fwUuhRArvLFE4F-hfAo

To claim this, I am signing this object: