Module: mining/common

Methods

(static) double256(target) → {Number}

Convert a uint256le to a double.

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

(static) getBits(data) → {Buffer}

Get bits from target.

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

(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) rcmp(a, b) → {Number}

Compare two uint256le's.

Parameters:
Name Type Description
a Buffer
b Buffer
Source:
Returns:
Type
Number

(static) swap32(data) → {Buffer}

Swap 32 bit endianness of uint256.

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