Utility functions for AXE hashes and targets
npm install @axerunners/axe-util
Takes a hex string that contains a AXE hash as input, and returns a AXE-protocol-friendly little-endian Buffer. Throws an error if the hex string is not of length 64 (representing a 256-bit hash).
Converts the difficulty target
target to its compact representation (used in the "bits" field in block headers).
target should be a
Buffer (little-endian, the zeroes should be at the end). Returns a
Converts the compressed target integer
bits to its target hash representation. Returns a