Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Miner

Miner handles mining operations on a node.

export
class

Miner

extends

{Namespace}

Hierarchy

Index

Constructors

constructor

Properties

Protected client

client: RPCClient

Methods

getHashrate

  • getHashrate(): Promise<number>

isMining

  • isMining(): Promise<boolean>
  • Check whether the miner has is running

    memberof

    Miner

    Returns Promise<boolean>

numThreads

  • numThreads(): Promise<number>

setThreads

  • setThreads(num: number): Promise<number>
  • Set the number of miner threads to run.

    memberof

    Miner

    Parameters

    • num: number

    Returns Promise<number>

start

  • start(): Promise<boolean>

stop

  • stop(): Promise<boolean>