Skip to main content
Version: 2.4

Get Summary Inclusion Data

Returns the summary range (and ethereum transaction hash if the summary is published) which includes the passed block number.

await API.query.getSummaryData(blockNumber)
important

You can get the AVN_GATEWAY_URL here.

REQUEST PARAMS

  • blockNumber [optional] - a string representing the block number to check (if none is passed the current finalized block is used).

RESULT FIELDS

  • blockNumber - the passed or current finalized block number range - 2 element array with start and end block numbers of the summary (if the block falls within a summary range).
  • ethTxHash - Ethereum transaction hash of the published summary (if the summary root has been checked in by that point).
const AVN_API = require("avn-api");
const AVN_GATEWAY_URL = "<node_url>";
const options = {
suri: "<account_suri>",
};
const API = new AVN_API(AVN_GATEWAY_URL, options);

const blockNumber = "1234"

async function main() {
await API.init();

let result = await API.query.getSummaryData(blockNumber)
console.log(result);
}

(async () => {
await main();
})();