getBlockByHeight(height)

Feature
Get information about a block from a specific block number

Parameters

int | string block height

data of SuccessResponse

object block information

example

// Note: an asynchronous request.
const blockInfo = async () => {
	const blockNumber = 123;
	const info = await mitum.block.getBlockByHeight(blockNumber);

  console.log(info.data);
};
blockInfo();

// output
{
  Manifest: {
    proposed_at: '2024-06-25T05:01:52.616Z',
    states_tree: '',
    hash: '3LpZKLyfnH69WLr73E3GgkxDnuvYySCPmTWWD1o3TQ8q',
    previous: '3STp6bwfLrywqmV8ed9NU2D2DQuKwe6Cf7Z3ruCFfsvn',
    proposal: '6Dvb2yFzArRMBL8ZpoqvrhVUtmNK3p5Q3w41bC3PH3Xo',
    operations_tree: '',
    suffrage: 'CkVrbcoeDECcmUjAZ2uoyJF6JwtVgBkdhk6GzsbBWABN',
    _hint: 'digest-manifest-v0.0.1',
    height: 123
  },
  operations: 0,
  confirmed_at: '2024-06-25 05:01:55.325037965 +0000 UTC',
  proposer: 'node0sas',
  round: 0
}

Last updated