Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@biut-block/biutjs-pow

Package Overview
Dependencies
Maintainers
5
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@biut-block/biutjs-pow

biut blockchain pow lib

  • 1.0.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
5
Created
Source

JavaScript Style Guide

[JavaScript Style Guide]

SECPow

This library is for sec blockchain pow mining and verification

  • SECPow
    • new SECPow(config)
    • .verifyPOW(block, callback) => None
    • .mineLight(block, difficulty, callback) => None
    • .calcDifficulty(parentDiff, parentBlockNumber, parentTimeStamp, currentTimestamp) => Number
    • .stopMining() => None

new SECPow(config)

ParamTypeDescription
configObjectJSON format configurations for constructor

secPow.verifyPOW(block, callback) => None

Verify correctness of pow result

Kind: instance method of SECPow

ParamTypeDescription
blockObjectsingle block data
callbackfunctioncallback function

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

Light client mining function

Kind: instance method of SECPow

ParamTypeDescription
blockObjectsingle block data
difficultyIntegerdifficulty value
callbackfunctioncallback function

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

Calculate POW difficulty for next block

Kind: instance method of SECPow

ParamTypeDescription
parentDiffNumberparent block difficulty value
parentBlockNumberIntegerparent block number
parentTimeStampIntegerparent block generated timestamp
currentTimestampIntegercurrent generated timestamp

secPow.stopMining() => None

Stop the mining operation

FAQs

Package last updated on 17 May 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc