This library is for sec blockchain pow mining and verification
Param | Type | Description |
---|---|---|
config | Object |
JSON format configurations for constructor |
Verify correctness of pow result
Kind: instance method of SECPow
Param | Type | Description |
---|---|---|
block | Object |
single block data |
callback | function |
callback function |
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 |
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 |
Stop the mining operation