blockchain

Get block headers (max: 20) for minHeight <= height <= maxHeight. If maxHeight does not yet exist, blocks up to the current height will be returned. If minHeight does not exist (due to pruning), earliest existing height will be used.

At most 20 items will be returned. Block headers are returned in descending order (highest first).

Parameters

  • minHeight - integer, minimum block height to return
  • maxHeight - integer, maximum block height to return

Result

Block headers, returned in descending order (highest first).

Example

Request

curl <your-tendermint-endpoint>/blockchain?minHeight=1&maxHeight=5200792

Return

{
    "jsonrpc": "2.0",
    "id": -1,
    "result": {
        "hash": "69941398218E5858206C53CDC707B07479E26E3A8B89DC7B4E09CDC6BCDFDF6E",
        "height": "11347222",
        "index": 3,
        "tx_result": {
            "code": 0,
            "data": "CisKKS9pYmMuYXBwbGljYXRpb25zLnRyYW5zZmVyLnYxLk1zZ1RyYW5zZmVy",
            "log": "[{\"events\":[{\"type\":\"coin_received\",\"attributes\":[{\"key\":\"receiver\",\"value\":\"cosmos1x54ltnyg88k0ejmk8ytwrhd3ltm84xehrnlslf\"},{\"key\":\"amount\",\"value\":\"500000uatom\"}]},{\"type\":\"coin_spent\",\"attributes\":[{\"key\":\"spender\",\"value\":\"cosmos15vcg5gp3zcpcsftavn4nr68w5zy99zvxcg2hy3\"},{\"key\":\"amount\",\"value\":\"500000uatom\"}]},{\"type\":\"ibc_transfer\",\"attributes\":[{\"key\":\"sender\",\"value\":\"cosmos15vcg5gp3zcpcsftavn4nr68w5zy99zvxcg2hy3\"},{\"key\":\"receiver\",\"value\":\"osmo15vcg5gp3zcpcsftavn4nr68w5zy99zvxsne8jr\"}]},{\"type\":\"message\",\"attributes\":[{\"key\":\"action\",\"value\":\"/ibc.applications.transfer.v1.MsgTransfer\"},{\"key\":\"sender\",\"value\":\"cosmos15vcg5gp3zcpcsftavn4nr68w5zy99zvxcg2hy3\"},{\"key\":\"module\",\"value\":\"ibc_channel\"},{\"key\":\"module\",\"value\":\"transfer\"}]},{\"type\":\"send_packet\",\"attributes\":[{\"key\":\"packet_data\",\"value\":\"{\\\"amount\\\":\\\"500000\\\",\\\"denom\\\":\\\"uatom\\\",\\\"receiver\\\":\\\"osmo15vcg5gp3zcpcsftavn4nr68w5zy99zvxsne8jr\\\",\\\"sender\\\":\\\"cosmos15vcg5gp3zcpcsftavn4nr68w5zy99zvxcg2hy3\\\"}\"},{\"key\":\"packet_data_hex\",\"value\":\"7b22616d6f756e74223a22353030303030222c2264656e6f6d223a227561746f6d222c227265636569766572223a226f736d6f3135766367356770337a63706373667461766e346e72363877357a7939397a7678736e65386a72222c2273656e646572223a22636f736d6f733135766367356770337a63706373667461766e346e72363877357a7939397a7678636732687933227d\"},{\"key\":\"packet_timeout_height\",\"value\":\"1-5247125\"},{\"key\":\"packet_timeout_timestamp\",\"value\":\"0\"},{\"key\":\"packet_sequence\",\"value\":\"1151214\"},{\"key\":\"packet_src_port\",\"value\":\"transfer\"},{\"key\":\"packet_src_channel\",\"value\":\"channel-141\"},{\"key\":\"packet_dst_port\",\"value\":\"transfer\"},{\"key\":\"packet_dst_channel\",\"value\":\"channel-0\"},{\"key\":\"packet_channel_ordering\",\"value\":\"ORDER_UNORDERED\"},{\"key\":\"packet_connection\",\"value\":\"connection-257\"}]},{\"type\":\"transfer\",\"attributes\":[{\"key\":\"recipient\",\"value\":\"cosmos1x54ltnyg88k0ejmk8ytwrhd3ltm84xehrnlslf\"},{\"key\":\"sender\",\"value\":\"cosmos15vcg5gp3zcpcsftavn4nr68w5zy99zvxcg2hy3\"},{\"key\":\"amount\",\"value\":\"500000uatom\"}]}]}]",
            "info": "",
            "gas_wanted": "450000",
            "gas_used": "95720",
            "events": [
                {
                    "type": "coin_spent",
                    "attributes": [
                        {
                            "key": "c3BlbmRlcg==",
                            "value": "Y29zbW9zMTV2Y2c1Z3AzemNwY3NmdGF2bjRucjY4dzV6eTk5enZ4Y2cyaHkz",
                            "index": true
                        },
                        {
                            "key": "YW1vdW50",
                            "value": "MTEyNTB1YXRvbQ==",
                            "index": true
                        }
                    ]
                },
                ...
                {
                    "type": "message",
                    "attributes": [
                        {
                            "key": "bW9kdWxl",
                            "value": "dHJhbnNmZXI=",
                            "index": true
                        }
                    ]
                }
            ],
            "codespace": ""
        },
        "tx": "Cr4BCrsBCikvaWJjLmFwcGxpY2F0aW9ucy50cmFuc2Zlci52MS5Nc2dUcmFuc2ZlchKNAQoIdHJhbnNmZXISC2NoYW5uZWwtMTQxGg8KBXVhdG9tEgY1MDAwMDAiLWNvc21vczE1dmNnNWdwM3pjcGNzZnRhdm40bnI2OHc1enk5OXp2eGNnMmh5Myorb3NtbzE1dmNnNWdwM3pjcGNzZnRhdm40bnI2OHc1enk5OXp2eHNuZThqcjIHCAEQlaHAAhJmCk4KRgofL2Nvc21vcy5jcnlwdG8uc2VjcDI1NmsxLlB1YktleRIjCiECWkEglW8J3mOBjr83+AE+o56gGbd2camYtfq798H8Yv0SBAoCCH8SFAoOCgV1YXRvbRIFMTEyNTAQ0LsbGkDCHCt9IvxJH9C5I2XgB0RHFC7kvG3zbXof2AQcFZg6xgqWtb7tnft6UvljaKAiugX2FZiY6U9OVR394b+XnzWk",
        "proof": {
            "root_hash": "41FADEF5F1DE0D6EF9867BE1BA773E6D52C423447F4FEDDC303BAA19373A11DD",
            "data": "Cr4BCrsBCikvaWJjLmFwcGxpY2F0aW9ucy50cmFuc2Zlci52MS5Nc2dUcmFuc2ZlchKNAQoIdHJhbnNmZXISC2NoYW5uZWwtMTQxGg8KBXVhdG9tEgY1MDAwMDAiLWNvc21vczE1dmNnNWdwM3pjcGNzZnRhdm40bnI2OHc1enk5OXp2eGNnMmh5Myorb3NtbzE1dmNnNWdwM3pjcGNzZnRhdm40bnI2OHc1enk5OXp2eHNuZThqcjIHCAEQlaHAAhJmCk4KRgofL2Nvc21vcy5jcnlwdG8uc2VjcDI1NmsxLlB1YktleRIjCiECWkEglW8J3mOBjr83+AE+o56gGbd2camYtfq798H8Yv0SBAoCCH8SFAoOCgV1YXRvbRIFMTEyNTAQ0LsbGkDCHCt9IvxJH9C5I2XgB0RHFC7kvG3zbXof2AQcFZg6xgqWtb7tnft6UvljaKAiugX2FZiY6U9OVR394b+XnzWk",
            "proof": {
                "total": "5",
                "index": "3",
                "leaf_hash": "ZDvVq9TaYbzPnf/oQdoDnvucz/vw+ahLZ5qx6t4XrmI=",
                "aunts": [
                    "ZndOYFmD5nNK+evDPmE4qsOK2bAehqIDxkKvC5cLepg=",
                    "nLL9e5cSweXpocupIJzX3kRz8yfWNhHb4/h9u2iOgaY=",
                    "qfqbSeAse08O2YCf1IoDatRiR4b8mPPsjZJMs7gMjVE="
                ]
            }
        }
    }
}