Skip to content

getTransactionHashes

katz edited this page Aug 26, 2020 · 2 revisions

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.

Input example:

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

Output example:

 {  
   "jsonrpc":"2.0",
   "id":"test",
   "result":{  
      "items":[ 
         {  
            "transactionHashes":[  
                957dcbf54f327846ea0c7a16b2ae8c24ba3fa8305cc3bbc6424e85e7d358b44b
                25bb751814dd39bf46c972bd760e7516e34200f5e5dd02fda696671e11201f78
            ],
            "blockHash":"8a6f1cb7ed7a9db4751d7b283a0482baff20567173dbfae136c9bceb188e51c4"
         }
      ]
   }
}
Clone this wiki locally