# hashrate

> Simple hashrate utils

Latest version **0.3.1** (published 2018-10-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install hashrate
pnpm add hashrate
yarn add hashrate
bun add hashrate
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.3.1 |
| Published | 2018-10-15 |
| First published | 2018-07-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=8.0 |
| Dependencies | 0 |
| Unpacked size | 197.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Allbann |
| Maintainers | allbann |

## Links

- npm: https://www.npmjs.com/package/hashrate
- Repository: https://git@github.com/jazzpool/hashrate
- Homepage: https://github.com/jazzpool/hashrate#readme
- Issues: https://github.com/jazzpool/hashrate/issues
- npm.io page: https://npm.io/package/hashrate

## Recent versions

- 0.3.1 (latest) — 2018-10-15
- 0.3.0 — 2018-09-12
- 0.2.1 — 2018-08-16
- 0.2.0 — 2018-08-13
- 0.1.1 — 2018-08-13
- 0.0.1 — 2018-07-10

## README

# hashrate [![Build Status](https://travis-ci.org/jazzpool/hashrate.svg?branch=master)](https://travis-ci.org/jazzpool/hashrate)

This is simple hashrate utils module for client and server side.

## Methods and usage

 - `hashrateToString(hashrate: number, delimeter: boolean = false, type: 'sol' | 'hash' = 'hash')` - converts hashrate number to readable string 
 - `getEstimatedMinigTime(difficulty: number, hashrate: number)` - returns estimated mining time for given difficulty and hashrate in seconds
 - `getLuck(diff: number, hashrate: number, period: number, blocks: number)` - returns calculated luck for given mining parameters
 - `getPower(hashrate: number)` - returns power of hashrate
 - `getMaxPower(hashrates: number[])` - returns max power of set of hashrates
 - `getPowerStr(power: number)` - returns string for power (1000 - KH, 100000000 - MH, etc)
 - `hashrateValueToPower(hashrate: number, power: number)` - The hashrate given to the power
 - `hashratePowerStr(hashrate: number, power: number, delimiter:  boolean | false, type: 'hash')` - get the power of hashrate 
 - `hashesToSolsZec(hashrate: number)` - returns hashrate in Sol/s for ZEC
 - `solsToHashesZec(sols: number)` - returns sols in H/s for ZEC
 - `hashrateToStringZec(hashrate: number, delimiter: boolean | false)` - converts hashrate number to readable string for ZEC

---
_Source: https://npm.io/package/hashrate · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
