Skip to main content
Version: 3.5.0

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 { AvnApi, SetupMode, SigningMode } = require("avn-api");
const AVN_GATEWAY_URL = "gateway url of your chosen network";
const options = {
suri: "suri of your account",
setupMode: SetupMode.SingleUser,
signingMode: SigningMode.SuriBased,
};

const blockNumber = "1234";

async function main() {
await avnSdk.init();
const api = await avnSdk.apis();

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

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