fetchEpochData method
Returns a FetchEpochDataRes object for the given epoch
.
epoch
is an int representing the epoch to retrieve
options
is an CallOptions
for runtime options with RPC
Throws an Exception if an error occurs during the RPC request.
Implementation
Future<FetchEpochDataRes> fetchEpochData({
required int epoch,
CallOptions? options,
}) async {
final FetchEpochDataReq request = FetchEpochDataReq(
epoch: UInt64Value(value: Int64(epoch)),
);
final FetchEpochDataRes response = await nodeStub.fetchEpochData(
request,
options: options,
);
return response;
}