Skip to main content

Get payload with output

You can use the /payload/{payloadHash}/outputs endpoint to return the specified payload data with its output.

Request format

Use GET https://{baseURL}/chain/{chain}/payload/{payloadHash}/outputs to get payload data with output.

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 the payload for the first chain (0), the request is GET https://{baseURL}/chain/0/payload/{payloadHash}/outputs.
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. 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}/outputs return the following response codes:

  • 200 OK indicates that the request succeeded and the response body returns the payload data and output 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.
coinbase (required)stringCoinbase output 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 output JSON object.

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 request to a bootstrap node for the Kadena main network and chain id 4 with a call like this:

GET https://us-e1.chainweb.com/chainweb/0.0/mainnet01/chain/4/payload/jafDpAgMCYnAqh-hweSjA6sWCAp-ADSDzIcUKyRwkq8/outputs

This request returns a response body that looks like this:

{
"transactions": [
[
"eyJoYXNoIjoiQXFtNTRlRWNmMkQtVGJQR3FYLURIYWFkdUF0VXp5dEVqVzhLaDJ6bWlRSSIsInNpZ3MiOlt7InNpZyI6IjY5MzYwYTlhZjZmOTVkMmQ4NjhiNDA4NmQ0ZTU1NjQ3NzRhOGU5NWY0ZDZmMGM0ZGI2MmE4YTgwMmI5YWNkODczOTRmNjNkN2FiMTFkNjA2NWU1MjEzYmYwMGRkNmVhYjliMWI0MzUwODU1MTFmYmRkNmE1ZDcxMzI1YjhmZTBiIn1dLCJjbWQiOiJ7XCJwYXlsb2FkXCI6e1wiZXhlY1wiOntcImNvZGVcIjpcIihuX2JmYjc2ZWFiMzdiZjhjODQzNTlkNjU1MmExZDk2YTMwOWUwMzBiNzEuZGlhLW9yYWNsZS5zZXQtbXVsdGlwbGUtdmFsdWVzIFtcXFwiR05PL1VTRFxcXCJdIFsodGltZSBcXFwiMjAyNC0wNy0xOFQxNTozMDo0N1pcXFwiKV0gWzI1Ny41NV0pXCIsXCJkYXRhXCI6e319fSxcIm5vbmNlXCI6XCJranM6bm9uY2U6MTcyMTMxNjY0NzM0N1wiLFwic2lnbmVyc1wiOlt7XCJwdWJLZXlcIjpcIjhmOTE5NzRkMDU0M2Q4YzEzM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IsIms6MjUxZWZiMDZmM2I3OThkYmU3YmIzZjU4ZjUzNWI2N2IwYTllZDJkYTlhYTRlMjM2N2JlNGFiYzA3Y2M5MjdmYSIsMC45ODAxOTFdLCJuYW1lIjoiVFJBTlNGRVIiLCJtb2R1bGUiOnsibmFtZXNwYWNlIjpudWxsLCJuYW1lIjoiY29pbiJ9LCJtb2R1bGVIYXNoIjoia2xGa3JMZnB5TFctTTN4alZQU2RxWEVNZ3hQUEppYlJ0X0Q2cWlCd3M2cyJ9XSwibWV0YURhdGEiOm51bGwsImNvbnRpbnVhdGlvbiI6bnVsbCwidHhJZCI6NTUyMzQ4MH0"
}

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

{
"key": "i3lwc38zLkSrHDn5wj_LMFfA4VdofhTZ3crqZZ-5WJs",
"reason": "key not found"
}