eth_getTdByNumber

Returns the total difficulty for a given block number. This method is primarily used by Heimdall to query the total difficulty of a produced block when building a milestone.

Path parameters

apiKeystringRequiredDefaults to docs-demo

Request

This endpoint expects an object.
Block numberstringRequiredformat: "^0x([1-9a-f]+[0-9a-f]*|0)$"
The block number for which to retrieve the total difficulty.

Response

An object containing the block number and its total difficulty, or null if the block is not found.
blockNumberstringformat: "^0x([1-9a-f]+[0-9a-f]*|0)$"
The block number as a hexadecimal string.
totalDifficultystringformat: "^0x([1-9a-f]+[0-9a-f]*|0)$"
The total difficulty of the block as a hexadecimal string.