Module: mining/common

Methods

(static) double256(target) → {Number}

Convert a uint256be to a double.

Parameters:
Name Type Description
target Buffer
Source:
Returns:
Type
Number

(static) getBits(data) → {Number}

Get bits from target.

Parameters:
Name Type Description
data Buffer
Source:
Returns:
Type
Number

(static) getDifficulty(target) → {Number}

Calculate mining difficulty from little-endian target.

Parameters:
Name Type Description
target Buffer
Source:
Returns:
Type
Number

(static) getTarget(bits) → {Buffer}

Get target from bits as a uint256le.

Parameters:
Name Type Description
bits Number
Source:
Returns:
Type
Buffer

(static) swap32(data) → {Buffer}

Swap 32 bit endianness of uint256.

Parameters:
Name Type Description
data Buffer
Source:
Returns:
Type
Buffer