0

if I call Invoke of chain code, I get transaction ID in REST response. e.g.

{
  "jsonrpc": "2.0",
  "result": {
    "status": "OK",
    "message": "e00848bc-71c3-422f-b637-cbfc9d2e2042"
  },
  "id": 4
}

How can I access this transaction ID (e00848bc-71c3-422f-b637-cbfc9d2e2042 in above example) programatically in my invoke function of chaincode?

1 Answer 1

3

You can access transaction ID in Invoke function using:

stub.GetTxID()
3

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.