body method

Request the body (extrinsics) of a pinned block.

Parameters:

  • blockHash: The hash of the pinned block.

Returns a ChainHeadOperationResult. If isStarted, use the operationId to track the operation's progress via the event stream.

Implementation

Future<ChainHeadOperationResult> body(String blockHash) async {
  _ensureActive();
  final response = await _provider.send('chainHead_v1_body', [followSubscriptionId, blockHash]);

  if (response.error != null) {
    throw Exception(response.error.toString());
  }

  return ChainHeadOperationResult.fromJson(Map<String, dynamic>.from(response.result as Map));
}