hashrate
v0.3.1
Published
Simple hashrate utils
Downloads
8
Readme
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 stringgetEstimatedMinigTime(difficulty: number, hashrate: number)
- returns estimated mining time for given difficulty and hashrate in secondsgetLuck(diff: number, hashrate: number, period: number, blocks: number)
- returns calculated luck for given mining parametersgetPower(hashrate: number)
- returns power of hashrategetMaxPower(hashrates: number[])
- returns max power of set of hashratesgetPowerStr(power: number)
- returns string for power (1000 - KH, 100000000 - MH, etc)hashrateValueToPower(hashrate: number, power: number)
- The hashrate given to the powerhashratePowerStr(hashrate: number, power: number, delimiter: boolean | false, type: 'hash')
- get the power of hashratehashesToSolsZec(hashrate: number)
- returns hashrate in Sol/s for ZECsolsToHashesZec(sols: number)
- returns sols in H/s for ZEChashrateToStringZec(hashrate: number, delimiter: boolean | false)
- converts hashrate number to readable string for ZEC