Policy

GetBatchIndexAt

Returns the batch index at a given block number. The batch index is the number of a block relative to the batch it is in. For example, the first block of any batch always has an batch index of 0.

const res = await fetch("http://127.0.0.1:8648", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
  jsonrpc: "2.0",
  method: "getBatchIndexAt",
  params: [0],
  id: 1
})
});
const data = await res.json();

Parameters

PropType / Default
blockNumber
number

Returns

PropType / Default
returnValue
number

On this page