How to calculate transaction hash


Is there any way to calculate transaction hashes? The document is given here gathering-data-for-the-signature looks very complex and it’s not feasible to do it for every transaction.
Is there any straightforward way to get it? Any API or in any js or other library?

For what you need it if I can ask?

I’m sure you can do it manually but it doesn’t make sense to do it, let your wallet handle it

Yes, I’m developing the same kind of application like an explorer. For that, I want.
Can you please help?

Yes, but I want that info from api or from any function of library that it supports.

/local/chain/blocks-after (available only for local node)
returns ExplorerViewModelTransaction with hashes.

Thank You!

Can you please elaborate more on the local node? May I use this API with the node which I’ve set up?
Now I’m getting the below response,

“timeStamp”: 189019692,
“error”: “Unauthorized”,
“message”: “remote 10.29.–.-- attempted to call local /local/chain/blocks-after”,
“status”: 401

Ah, not sure, not that savvy unfortunately