2.1.0 • Published 5 years ago

@ryanburnette/hashcash v2.1.0

Weekly downloads
55
License
ISC
Repository
github
Last release
5 years ago

hashcash

repo npm

An asynchronous implementation of hashcash for Node.js and the browser.

Usage

Require and create an instance. Pass in optional seed string. Pass in optional need string to increase complexity.

var hashcash = require('@ryanburnette/hashcash');
var h = hashcash();

Check to see if a value passes.

h.check(0).then(function(result) {
  console.log(result);
});

Do the work.

h.solve().then(function(solution) {
  console.log(solution);
});

Package

The package works as-is on Node.js and will work with webpack or rollup for packaged browser use.

For direct browser implementation, use ./dist/hashcash.js or via cdn...

<script src="https://unpkg.com/@ryanburnette/hashcash/dist/hashcash.js" />
2.1.0

5 years ago

2.0.5

5 years ago

2.0.4

6 years ago

2.0.3

6 years ago

2.0.2

6 years ago

2.0.1

6 years ago

2.0.0

6 years ago

1.0.0

6 years ago