starknet_getBlockWithTxHashes

Get block information with transaction hashes given the block id

Parameters

  • BLOCK PARAMETER
Object NameRequiredTypeDetail
BLOCK PARAMETERString"block_hash", "block_number", "latest", "pending"
"params": [
  "block_number": 5000
]

Result

A block object.

Example

Request

curl <your-endpoint> \
    -X POST \
    -H "Content-Type: application/json" \
    -d '{
    "id": 1,
    "jsonrpc": "2.0",
    "method": "starknet_getBlockWithTxHashes",
    "params": [
        {
            "block_number": 5000
        }
    ]
}'

Return

{
    "jsonrpc": "2.0",
    "result": {
        "status": "ACCEPTED_ON_L1",
        "block_hash": "0x46396353132a86d5e024559d3a87c66ab005f5a13663ff500c6747f077f2388",
        "parent_hash": "0x79c0054853f42c623dc4f99061cbbb71fb4037f26a3f77593e30b1350256736",
        "block_number": 5000,
        "new_root": "0x327d167f9fac69c468baa2b4b2447b11c57c733860084ffb897801df3087c5f",
        "timestamp": 1663330598,
        "sequencer_address": "0x5dcd266a80b8a5f29f04d779c6b166b80150c24f2180a75e82427242dab20a9",
        "transactions": [
            "0x3fd9be6818f3543002b9e460d35033d223f51397e45bf57c5a0b6829f04cf20",
            ...
        ]
    },
    "id": 1
}
Language
Click Try It! to start a request and see the response here!