1

I want to fetch operation detail by hash through rpc or rest api. And I don't seed any rpc interface implemented this feature at http://tezos.gitlab.io/api/rpc.html#. I see conseilJS has this function. But its' api is const url = `${serverInfo.url}/v2/data/${platform}/${network}/${entity}`;, I can't find this method at tezos document. So, what rpc interface dose conseilJs use to get operation by hash?

1

Conseil isn't using a Tezos RPC for this. Conseil is an indexing service that is monitoring all blocks and stores data about them in a database. The conseil API then queries this database.

The only way to get the block from an operation hash is to examine the blocks and see which one has the operation you are interested in. So long as your application will remain up/on after you get the hash, you can keep polling the network for the latest block until you find the one that has your hash.

If you are building something like a mobile or a frontend app that won't always be on or the user might leave. You should use a service like conseil or similar.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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