getPayloadWithOutputs

Kadena RPC

Overview

The /chain/{chain}/payload/{payloadHash}/outputs endpoint retrieves the payload data along with transaction outputs for a specified payload hash. This detailed view is beneficial for users needing comprehensive transactional data for specific blocks.

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 with transaction outputs for the specified block payload hash, which includes:

FieldDescription
transactionsAn array of transactions included in the block, with their output data.
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.
coinbaseCoinbase transaction details, if applicable.

Request Example

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

console.log(payloadOutputs);

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