Parameters
chainId
string
default:"starknet-sepolia"
required
Unique identifier for a blockchain network.
Request identifier used to match responses.
jsonrpc
string
default:"2.0"
required
JSON-RPC version.
method
string
default:"starknet_getBlockWithTxHashes"
required
JSON-RPC method name.
Parameters for starknet_getBlockWithTxHashes: [block_id].Parameters for starknet_getBlockWithTxHashes:params.block_id: BlockID object containing hash and number.
Returns
A block object or pending block object containing:
Pending block object containing only a subset of fields.
The hash of this block’s parent.
The time at which the block was created.
The Starknet identity of the sequencer submitting this block.
The price of L1 gas in the block.
Gas price denominated in fri.
Gas price denominated in wei.
Version of the current Starknet protocol.
Array of transaction hashes included in this block.
Confirmed block object with full block details.
The hash of this block’s parent.
The new global state root.
The time at which the block was created.
The Starknet identity of the sequencer submitting this block.
The price of L1 gas in the block.
Gas price denominated in fri.
Gas price denominated in wei.
Version of the current Starknet protocol.
Array of transaction hashes included in this block.
curl --request POST \
--url https://api.uniblock.dev/uni/v1/json-rpc?chainId=starknet-sepolia \
--header 'content-type: application/json' \
--data '{
"id": 1,
"jsonrpc": "2.0",
"method": "starknet_getBlockWithTxHashes",
"params": {
"block_id": {
"block_hash": "0x041b10c45dc3f39372f7b9409261cac9d880c5d75a5bb077d028db20b1bd76c4"
}
}
}'
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"status": "ACCEPTED_ON_L2",
"block_hash": "0x18ec1a3931bb5a286f801a950e1153bd427d6d3811591cc01e6f074615a1f76",
"parent_hash": "0x413229e9996b3025feb6b276a33249fb0ff0f92d8aeea284deb35ea4093dea2",
"block_number": 4503,
"new_root": "0xc95a878188acf408e285027bd5e7674a88529b8c65ef6c1999b3569aea8bc8",
"timestamp": 1661246333,
"sequencer_address": "0x5dcd266a80b8a5f29f04d779c6b166b80150c24f2180a75e82427242dab20a9",
"l1_gas_price": {
"price_in_wei": "0xab3d3c644"
},
"__truncated": true
}
}