getdifficulty

Dogecoin RPC

How to use it

// yarn add @tatumio/tatum

import { TatumSDK, Dogecoin, Network } from '@tatumio/tatum'

const tatum = await TatumSDK.init<Dogecoin>({ network: Network.DOGECOIN })

const result = await tatum.rpc.getDifficulty()

await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs

Overview

getdifficulty is a Dogecoin RPC method that returns the current mining difficulty. The mining difficulty is a measure of how difficult it is to find a new block compared to the easiest it can ever be. This method can be used to monitor the mining difficulty, which adjusts every 2016 blocks to maintain a consistent block creation rate of approximately 10 minutes per block.

Parameters

This method does not require any parameters.

Return Object

A return object is a floating-point number that represents the current mining difficulty.

JSON Examples

Request example:

{
  "jsonrpc": "2.0",
  "method": "getdifficulty",
  "id": 1
}

Response example:

{
  "result": 48712405953118.43,
  "error": null,
  "id": 1
}