getPayloadByHash

getCurrentCut

Overview

The /chain/{chain}/payload/{payloadHash} endpoint retrieves the payload data of a block for the given payload hash. This is crucial for accessing detailed information about specific transactions and operations within a block without retrieving the entire block data.

Parameters

NameTypeRequiredDescription
apiVersionstringYesVersion of Kadena API "0.0"
nodeVersionenumYes"test-singleton" "development" "mainnet01" "testnet04"
chainstringYesThe specific chain ID from which to retrieve data.
payloadHashstringYesThe hash of the payload to retrieve.

Returns

A successful call to this endpoint returns the payload data of the specified block, which includes:

FieldDescription
transactionsA list of transactions included in the block.
minerDataData about the miner who mined this block.
transactionsHashA hash of the transactions included in the block.
outputsHashA hash of the outputs from the transactions.
payloadHashThe hash of the payload itself, confirming the payload retrieved.

Request Example

curl --location 'https://api.tatum.io/v3/blockchain/node/kadena-mainnet/{api_key}/chainweb/{apiVersion}/{nodeVersion}/chain/{chain}/payload/{payloadHash}' \
--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 payload = await tatum.kadena.getPayloadByHash({
  network: {
    apiVersion: "0.0",
    nodeVersion: "mainnet01",
    chain: "0", // Example chain ID
  },
  payloadHash: "your_payload_hash_here",
});

console.log(payload);

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