How transaction hash is calculated by Explorers

Hi,

If transaction hash is not available in block/at/public API, how explorers calculate it? using gathering-data-for-the-signature or any other API is available?

Is not calculated by explorers. They fetching with API. Do you need calculate hash?

Yes, I also want a transaction hash. Could you please share which API they are using?

/local/chain/blocks-after
https://nemproject.github.io/

Hi,

Thanks but I can’t access this API. An unauthorized response is giving.

{
“timeStamp”: 189280652,
“error”: “Unauthorized”,
“message”: “remote 10.29.49.123 attempted to call local /local/chain/blocks-after”,
“status”: 401
}

I’m trying with the node which we’ve set up. Can you please tell me why it’s not accessible? What is a local node means?

It means that it’s local api and can be called from localhost or local ip (nis.additionalLocalIps in config.properties)

I tried with the below cURL, but getting same for all.

curl --location --request POST ‘http://127.0.0.1:7890/local/chain/blocks-after’ --header ‘Content-Type: application/json’ --data-raw ‘{“height”:2}’

curl --location --request POST ‘http://localhost:7890/local/chain/blocks-after’ --header ‘Content-Type: application/json’ --data-raw ‘{“height”:2}’

curl --location --request POST ‘http://(machine’s IP here):7890/local/chain/blocks-after’ --header ‘Content-Type: application/json’ --data-raw ‘{“height”:2}’

What you getting exactly?
Did you set IP from which you calling API as your local IP for your node? (nis.additionalLocalIps in config.properties)

I’ll give it a try and get back to you. Thanks!