This method should take two params:
difficulty (number of zeros in hash)
- and
buffer of data.
The data will be concatenated with a nonce and hash will be calculated. The hash should contain the difficulty number of 0 in the beginning.
Use https://www.npmjs.com/package/worker-task-runner for parallelizing the task.