This forum is a read-only archive. Posting, replying and signing in are disabled.

Transaction hashes and block hash missing in JSON response

Fralgo

I am trying to retrieve Algorand transactions using the v2/blocks/{round} endpoint, but the JSON response does not contain any transaction or block hashes. Is there any way to construct these using the data in the response without using the SDKs?

scholtz

Check this out: vote-coin-indexer/computeTransactionId.ts at master · scholtz/vote-coin-indexer · GitHub

fabrice

Another solution is to query the indexer rather than the algod endpoint.
The indexer computes the transaction ID for you.

Fralgo

Unfortunately, the indexer only seems to give the previous block hash and not the current one so that doesn’t solve every issue.

fabrice

I read too fast, I thought you meant transaction ID for some reason.

You can get the current block hash as shown there: