0

When I am making a transaction with the JS sdk to my docker sawtooth node, I am getting a response which contains only a link which shows this data:

{
  "data": [
    {
      "id": "87be1095b29372fff3b46d4f0eb0f354514208d8ef612877bae0216e70d4931f302e2b2f3741d52e22acf92c7e3f3935775b503a43f45a7297d1ce5ad76b9bb2",
      "invalid_transactions": [],
      "status": "COMMITTED"
    }
  ],
  "link": "http://localhost:8008/batch_statuses?id=87be1095b29372fff3b46d4f0eb0f354514208d8ef612877bae0216e70d4931f302e2b2f3741d52e22acf92c7e3f3935775b503a43f45a7297d1ce5ad76b9bb2"
}

Now this id appears to be the batch-id. How can I get the transaction id e.g. to make a query to get this transaction only?

solaire
  • 475
  • 5
  • 22
  • 1
    You can use `/blocks` REST-API endpoint. It list the transactions. Their ID in the output is the signed TransactionHeader value. – Frank C. Oct 20 '18 at 09:17
  • 1
    Thanks, I saw that you can also take the transaction id out of the transaction building steps. I assumed, that the id gets created from the validator, but seems like its just generated and sent from the client. – solaire Oct 21 '18 at 14:36
  • 1
    Yes, the fact that the ID is generated at submission time doesn't jump out at you in the docs. – Frank C. Oct 22 '18 at 10:35

0 Answers0