Skip to main content

isMining

Callable

  • isMining(web3Context: Web3Context<EthExecutionAPI, any>): Promise<boolean>

  • Checks whether the node is mining or not.


    Parameters

    • web3Context: Web3Context<EthExecutionAPI, any>

      (Web3Context) Web3 configuration object that contains things such as the provider, request manager, wallet, etc.

    Returns Promise<boolean>

    true if the node is mining, otherwise false.

    web3.eth.isMining().then(console.log);
    > true