Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ezavile/proof-of-work
Hashcash Proof of Work Algorithm
https://github.com/ezavile/proof-of-work
Last synced: 7 days ago
JSON representation
Hashcash Proof of Work Algorithm
- Host: GitHub
- URL: https://github.com/ezavile/proof-of-work
- Owner: ezavile
- Created: 2017-11-24T19:46:33.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2017-11-27T22:08:07.000Z (about 7 years ago)
- Last Synced: 2024-11-07T04:48:32.086Z (about 2 months ago)
- Language: JavaScript
- Size: 3.91 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# proof-of-work
### Getting started
#### Install
```
npm install
```#### Run
```
node index
```### Inputs
Input Name | Datatype | Example | Description
---------- | -------- | -------------- | --------
message | String | Hello, world! | The message to do the proof of work on
difficulty | Integer | 3 (recommended) | The difficulty (number of zeros that the resulting hash must have)### Outputs
Output Name | Datatype | Example
----------- | -------- | -------
PoW hash | String [hex] | 0004b5ec0e58569b916cd0e55b1253e2da19e8cf4d291108f8146c0ad5bd3810
nonce | Number | 4174
Time spent | Number [seconds] | 0.022134## Example
```bash
$ message to hash: Hello, world!
$ difficulty (3 recommended): 3
Finished after: 33.453ms
PoW Hash: 0004b5ec0e58569b916cd0e55b1253e2da19e8cf4d291108f8146c0ad5bd3810
Nonce used: 4174
```