The getTransactionHashes method returns an array of block and transaction hashes.

back to methods summary

Input:

ArgumentMandatoryDescriptionFormatExample
addresses No Array of strings, where each string is an addressarray[“ir48V76oJqAhYpGmsJgn79Yk6vvwYhU2cDc7azm3UW8C4EyzhhEDUUQjXtrbwzwpJ6Kp2ebwHErWD9VxBVnmXBk41oDB3Lt4j”]
blockHashOnly one parameter (blockHash or firstBlockIndex) is allowed.Hash of the starting blockstring4306a17026cc3156d8dd316efe827af7ee5b64c6849a900717f13967833517f5
firstBlockIndexOnly one parameter (blockHash or firstBlockIndex) is allowed.Starting heightuint32100
blockCountYesNumber of blocks to return transaction hashes fromuint3220
paymentIdNoValid payment_idstring372209c11ea6f6563ff319285fb2625dfbcde2573d1c32a585b1898639072912

Note: if paymentId parameter is set, getTransactionHashes() method returns transaction hashes of transactions that contain specified payment_id. (in the set block range)

Note: if addresses parameter is set, getTransactionHashes() method returns transaction hashes of transactions that contain transfer from at least one of specified addresses.

Note: if 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.

Output:

ArgumentDescriptionFormat
itemsArray with blockHash, transactionHashesarray

Input example:

{  
  "params":{  
     "blockCount":10,
     "firstBlockIndex":1000,
     "addresses":[  
        "ir48V76oJqAhYpGmsJgn79Yk6vvwYhU2cDc7azm3UW8C4EyzhhEDUUQjXtrbwzwpJ6Kp2ebwHErWD9VxBVnmXBk41oDB3Lt4j"
     ]
  },
  "jsonrpc":"2.0",
  "id":"test",
  "method":"getTransactionHashes"
}

$ curl -s -X POST -d '{"params":{"blockCount":10,"firstBlockIndex":1000,"addresses":["ir48V76oJqAhYpGmsJgn79Yk6vvwYhU2cDc7azm3UW8C4EyzhhEDUUQjXtrbwzwpJ6Kp2ebwHErWD9VxBVnmXBk41oDB3Lt4j"]},"jsonrpc":"2.0","id":"test","method":"getTransactionHashes"}' localhost:14101/json_rpc | jq

Output example:

{
  "id": "test",
  "jsonrpc": "2.0",
  "result": {
    "items": [
      {
        "blockHash": "8bee40d72c4280d4c78aea25c929eaf7a33e91d1437e03549eb1dde6c4a7d17e",
        "transactionHashes": [
          "2079ed98eefdb73b8897352e832307b1a9f2211f066083483869dc6fb808b418"
        ]
      },
      {
        "blockHash": "5adf22137d4f57e610f05a8b06bd8cbb8c8a5588174f94a73804d9bb11cb27ea",
        "transactionHashes": [
          "6bf8241be99ea1360916f24b9fb75c6008d28da852b76eb638ca809c0778dfbc"
        ]
      },
      {
        "blockHash": "4ac2b7fae134b5fe9f4c995d30c694025beefbf4dad6757072165be8a27ae11f",
        "transactionHashes": [
          "12934c29acb74d1e323332f2c296c375b59af456a94f98ce9592a8baad5c0b39"
        ]
      }
    ]
  }
}

back to methods summary