Skip to content

getTransactionHashes

AxVultis edited this page Nov 12, 2022 · 2 revisions

The getTransactionHashes method returns an array of block and transaction hashes. Transaction consists of transfers. Transfer is an amount-address pair. There could be several transfers in a single transaction.

Note: if paymentId parameter is set, getTransactionHashes method returns transaction hashes of transactions that contain specified payment_id. (in the set block range). If addresses parameter is set, getTransactionHashes method returns transaction hashes of transactions that contain transfer from at least one of specified addresses. When both above-mentioned parameters are set, getTransactionHashes method returns transaction hashes of transactions that contain both specified payment_id and transfer from at least one of specified addresses.

Request Format

JSON-RPC

 {
  "jsonrpc": "2.0",
  "id": 12,
  "method": "getTransactionHashes",
  "params": {
    "blockCount": 100,
    "firstBlockIndex": 0,
    "addresses": [
      "ccx7dehAGh837bfSfo18wJ1WzeCUWnzv3D23hvR8npyhHxoa6E3WXqNgTfHaWbAYRPdUhEXXEeKeEG7okKGHA8CZ3onHHofFDJ"
    ]
  }
}

Request Details:

Argument Mandatory Description Format
addresses No Addresses to include array of strings
blockCount Yes The number of blocks to return int
blockHash No The hash of the first block to include. This field is mandatory if firstBlockIndex is not set string
firstBlockIndex No The height of the first block to include. This field is mandatory if blockHash is not set int
paymentId No A paymentId that must be used in the returned transaction hashes string

Response Format

JSON-RPC

 {
  "jsonrpc": "2.0",
  "id": 12,
  "result": {
    "items": [
      {
        "transactionHashes": [
          "957dcbf54f327846ea0c7a16b2ae8c24ba3fa8305cc3bbc6424e85e7d358b44b",
          "25bb751814dd39bf46c972bd760e7516e34200f5e5dd02fda696671e11201f78"
        ],
        "blockHash": "8a6f1cb7ed7a9db4751d7b283a0482baff20567173dbfae136c9bceb188e51c4"
      }
    ]
  }
}

Response Details:

Argument Description Format
items Contains (see table below) array

Item Details:

Argument Description Format
blockHash The hash of the block string
transactionHashes Hashes of each transaction array of strings
Clone this wiki locally