Block Decoder API
What is the Block Decoder API and how do I use it?
Block Decoder is a service which allows a user to query the information stored in a Tendermint block. Tendermint is the underlying consensus mechanism and blockchain used by Vega. The user can place a http POST request to a service at the following location:
https://explorer.vega.trading/.netlify/functions/chain-explorer-api
The user must specify the URL of the Tendermint instance along with the block number they wish to decode.
For the fairground network the URL is https://n04.testnet.vega.xyz/tm/
Command line example
A user can retrieve a decoded set of transactions for a block using the following command line:
curl 'https://explorer.vega.trading/.netlify/functions/chain-explorer-api' --data-raw '{"block_height":100,"node_url":"https://n04.testnet.vega.xyz/tm/"}'
If the user requests the transactions for an empty block, the command will return null