Returns a json object containing mining-related information.
miningInfo: Promise<any>
(async () => {
try {
let getMiningInfo = await bitbox.Mining.getMiningInfo();
console.log(getMiningInfo);
} catch(error) {
console.error(error)
}
})()
Returns the estimated network hashes per second based on the last n blocks. Pass in [blocks] to override # of blocks, -1 specifies since last difficulty change. Pass in [height] to estimate the network speed at the time when a certain block was found.
- nblocks
number
optional: The number of blocks, or -1 for blocks since last difficulty change. - height
number
, optional: To estimate at the time of the given height.
x Promise<number>
: Hashes per second estimated
(async () => {
try {
let getNetworkHashps = await bitbox.Mining.getNetworkHashps();
console.log(getNetworkHashps);
} catch(error) {
console.error(error)
}
})()