Kadena RPC
Overview
The /chain/{chain}/header/{blockHash}
endpoint allows querying a block header by its hash. This is useful for developers looking to verify blocks or inspect block attributes without the need for the entire block's data.
Parameters
Name | Type | Required | Description |
---|---|---|---|
apiVersion | string | Yes | Version of Kadena API "0.0" |
nodeVersion | enum | Yes | "test-singleton" "development" "mainnet01" "testnet04" |
chain | string | Yes | The specific chain ID from which to retrieve the header. |
blockHash | string | Yes | The hash of the block whose header is being requested. |
Returns
A successful call to this endpoint returns the requested block header. The header can be returned in various formats, including JSON, base64 encoded, or binary.
Request Example
curl --location 'https://api.tatum.io/v3/blockchain/node/kadena-mainnet/{api_key}/chainweb/{apiVersion}/{nodeVersion}/chain/{chain}/header/{blockHash}' \
--header 'Content-Type: application/json'
// yarn add @tatumio/tatum
import { TatumSDK, Kadena, Network } from "@tatumio/tatum";
const tatum = await TatumSDK.init<Kadena>({ network: Network.KADENA_MAINNET });
const blockHeader = await tatum.kadena.getBlockHeaderByHash({
network: {
apiVersion: "0.0",
nodeVersion: "mainnet01",
chain: "0", // Example chain ID
},
blockHash: "your_block_hash_here",
});
console.log(blockHeader);
await tatum.destroy(); // Destroy Tatum SDK - needed for stopping background jobs