@sec-block/secjs-pow
sec blockchain pow lib
Last updated 2 years ago by zuweihan1992 .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @sec-block/secjs-pow 
SYNC missed versions from official npm registry.

JavaScript Style Guide

[JavaScript Style Guide]

SECPow

This library is for sec blockchain pow mining and verification

new SECPow(config)

Param Type Description
config Object JSON format configurations for constructor

secPow.verifyPOW(block, callback) => None

Verify correctness of pow result

Kind: instance method of SECPow

Param Type Description
block Object single block data
callback function callback function

secPow.mineLight(block, difficulty, callback) => None

Light client mining function

Kind: instance method of SECPow

Param Type Description
block Object single block data
difficulty Integer difficulty value
callback function callback function

secPow.calcDifficulty(parentDiff, parentBlockNumber, parentTimeStamp, currentTimestamp) => Number

Calculate POW difficulty for next block

Kind: instance method of SECPow

Param Type Description
parentDiff Number parent block difficulty value
parentBlockNumber Integer parent block number
parentTimeStamp Integer parent block generated timestamp
currentTimestamp Integer current generated timestamp

secPow.stopMining() => None

Stop the mining operation

Current Tags

  • 1.0.14                                ...           latest (2 years ago)

14 Versions

  • 1.0.14                                ...           2 years ago
  • 1.0.13                                ...           2 years ago
  • 1.0.12                                ...           2 years ago
  • 1.0.11                                ...           2 years ago
  • 1.0.10                                ...           2 years ago
  • 1.0.9                                ...           2 years ago
  • 1.0.8                                ...           2 years ago
  • 1.0.7                                ...           2 years ago
  • 1.0.6                                ...           2 years ago
  • 1.0.5                                ...           2 years ago
  • 1.0.4                                ...           2 years ago
  • 1.0.3                                ...           2 years ago
  • 1.0.2                                ...           2 years ago
  • 1.0.1                                ...           2 years ago
Downloads
Today 0
This Week 1
This Month 1
Last Day 0
Last Week 1
Last Month 3
Dependencies (5)
Dev Dependencies (0)
None

Copyright 2014 - 2016 © taobao.org |