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

@dashevo/dark-gravity-wave

Package Overview
Dependencies
Maintainers
12
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dashevo/dark-gravity-wave

Dark Gravity Wave difficulty retarget algorithm in JavaScript

  • 1.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
402
increased by1.26%
Maintainers
12
Weekly downloads
 
Created
Source

dark-gravity-wave-js

Build Status NPM version

Dark Gravity Wave difficulty retarget algorithm in JavaScript

Install

npm install @dashevo/dark-gravity-wave

Usage

var dgw = require('@dashevo/dark-gravity-wave');

dgw.getTarget(lastHeaders);
// -> '1be4c4d3'

API

getTarget(array)

array

Type: array

Get the difficulty. The array must contain the last 24 blocks. Arrays with length > 24 are allowed however only latest 24 will be considered. Array objects must contain timestamp and target properties (where target = the difficulty at which the block has been solved)

getTarget(array,blockTime)

array

Type: array, int (default 150)

Get the difficulty for dark-gravity-wave's other than dash's 150 second block time.

Contributing

Feel free to dive in! Open an issue or submit PRs.

License

MIT © Dash Core Group, Inc.

Keywords

FAQs

Package last updated on 20 May 2019

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