fetchBlockHeader method
Returns a FetchBlockHeaderRes object for the block at the given blockId.
blockId is an int representing the block ID to retrieve
options is an CallOptions for runtime options with RPC
Throws an Exception if an error occurs during the RPC request.
Implementation
Future<FetchBlockHeaderRes> fetchBlockHeader({
required int blockId,
CallOptions? options,
}) async {
final FetchBlockHeaderReq request = FetchBlockHeaderReq(
blockId: getBlockIdFromInt(blockId),
);
final FetchBlockHeaderRes response = await nodeStub.fetchBlockHeader(
request,
options: options,
);
return response;
}