Skip to main content

Get payload

You can use the /payload endpoint to return raw block payloads in the same form as they are stored on the chain. By default, only the payload data is returned. The raw payload data is sufficient for validating the blockchain Merkle tree and to use as input to Pact for executing the Pact transactions of the block and recomputing the outputs.

You can also send requests to query the transaction outputs along with the payload data.

Request format

Use GET https://{baseURL}/chain/{chain}/payload/{payloadHash} to get the raw payload data for the specified payload hash.

Path parameters

ParameterTypeDescription
chain (required)integer >= 0Specifies the chain identifier for the chain you want to send the payload request to. Valid values are 0 to 19. For example, to get block payload for the first chain (0), the request is GET https://{baseURL}/chain/0/payload.
payloadHash (required)stringSpecifies the payload hash for the request. The block payload hash is a Base64Url-encoded string—without padding—that consists of 43 characters from the a-zA-Z0-9_- character set. For example: GpaWbHkHrCjRhY8hKE0qZ1WsBBaG3Y_zkFLV2sYumQA.

Query parameters

ParameterTypeDescription
heightinteger >= 0Height of a block. For example: height=3000000.

Responses

Requests to GET https://{baseURL}/chain/{chain}/payload/{payloadhash} return the following response codes:

  • 200 OK indicates that the request succeeded and the response body returns the payload data for the specified payload hash.
  • 404 Not Found indicates that the payload hash wasn't found.

Response header

The response header parameters are the same for all successful and unsuccessful Chainweb node requests.

ParameterTypeDescription
x-peer-addrstringSpecifies the host address and port number of the client as observed by the remote Chainweb node. The host address can be a domain name or an IP address in IPv4 or IPv6 format. For example: "10.36.1.3:42988".
x-server‑timestampinteger >= 0Specifies the clock time of the remote Chainweb node using the UNIX epoch timestamp. For example: 1618597601.
x‑chainweb‑node‑versionstringSpecifies the version of the remote Chainweb node. For example: "2.23".

Successful response schema

If the request is successful, the response returns application/json content with the following:

ParameterTypeDescription
transactions (required)Array of stringsAn array of Base64Url-encoded strings—without padding—that describe signed Pact transactions in JSON format.
minerData (required)stringMiner information is a Base64Url-encoded string—without padding—that consists of characters from the a-zA-Z0-9_- character set. This information is included as part of the payload JSON object.
transactionsHash (required)stringThe transaction hash is a SHA256 hash. The hash is a Base64Url-encoded string—without padding—that consists of 43 characters from the a-zA-Z0-9_- character set.
outputsHash (required)stringThe output hash is a SHA256 hash. The hash is a Base64Url-encoded string—without padding—that consists of 43 characters from the a-zA-Z0-9_- character set.
payloadHash (required)stringThe block payload hash is a Base64Url-encoded string—without padding—that consists of 43 characters from the a-zA-Z0-9_- character set.

Not found response schema

If there are no results matching the request criteria, the response returns the following:

ParameterTypeDescription
keystringSpecifies the base64Url-encoded block hash without padding. The block hash consists of 43 characters from the a-zA-Z0-9_- character set.
reasonstringProvides a placeholder for specifying the reason that no block hashes were found.

Examples

You can send a payload request to a bootstrap node for the Kadena test network and chain id 18 with a call like this:

GET https://us1.testnet.chainweb.com/chainweb/0.0/testnet04/chain/18/payload/BKFz8a2AZGtZQPlp2xPRfe7ohlnOuzV2NbIEB3cFwI8

The response header for this request looks like this for chainweb-node version 2.26.1:

X-Server-Timestamp: 1720805685
X-Peer-Addr: 54.86.50.139:16853
X-Chainweb-Node-Version: 2.26.1
Content-Type: application/json;charset=utf-8

The response body for this request returns the payload data. In this example, the payload data includes three transactions:

{
"transactions": [
"eyJoYXNoIjoicXl1UE00V0F3UFEyeHUtTmxZYVVNcVhzLTBmNG5mR2oyOE12YjFvclN4ayIsInNpZ3MiOlt7InNpZyI6ImMwNWI0NjU5ZTAyOWM2ZTcwNzAwNGFiZjNjMDE1OTY4YjZlMDgzZWI1YzU5YTIyMWUyYWMzMThkYTljZDlmMjdhOTliNzIwYjZkMmNjMDE1M2JkODYxYmZlY2RkZTY2YzcyNmQzOTZhNWQ4MTRiMWQ0YmZhYWNjMzdjYWQzNjBmIn1dLCJjbWQiOiJ7XCJuZXR3b3JrSWRcIjpcInRlc3RuZXQwNFwiLFwicGF5bG9hZFwiOntcImV4ZWNcIjp7XCJkYXRhXCI6e30sXCJjb2RlXCI6XCIobl9jNTE3NTY4Yjg5ZWViNWI2ZTZhYjE0NTYwZTcxMGYyODcwMzJlNjcyLmJyby1sb3R0ZXJ5LWhlbHBlcnMuYnV5LXRpY2tldC1pbi1rZGEgXFxcIms6MDQ4Y2E3MzgzY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uzV2NbIEB3cFwI8"
}

In the following example, the payload hash doesn't include any transactions:

GET https://us1.testnet.chainweb.com/chainweb/0.0/testnet04/chain/18/payload/PB4yVhQo7vosXUH9Pik2z_OyJzn_fH0ChH-WOygOKuw

The response body indicates the empty block payload like this:

{
"transactions": [],
"minerData": "eyJhY2NvdW50IjoidGVzdG4zdCIsInByZWRpY2F0ZSI6ImtleXMtYWxsIiwicHVibGljLWtleXMiOlsiZGI3NzY3OTNiZTBmY2Y4ZTc2Yzc1YmRiMzVhMzZlNjdmMjk4MTExZGM2MTQ1YzY2NjkzYjAxMzMxOTJlMjYxNiJdfQ",
"transactionsHash": "v0-mUfeOoSLCuFyKMMwoTW7-4JZHBqjqS2NNPOYBbWg",
"outputsHash": "-afV95__tCPIrMvk2yGoOxcjS4DAX0moG6gURByqf6Y",
"payloadHash": "PB4yVhQo7vosXUH9Pik2z_OyJzn_fH0ChH-WOygOKuw"
}

If there are no results matching the request criteria, the response body indicates the reason no results were found. For example:

{
"key": "k1H3DsInAPvJ0W_zPxnrpkeSNdPUT0S9U8bqDLG739w",
"reason": "key not found"
}