sendAll<S, T> method

Future<List<JsonRpcResponse<T>>> sendAll<S, T>(
  1. JsonRpcMethodBuilder<S, T> builder, {
  2. bool? eagerError,
})

Makes a bulk JSON RPC HTTP method call.

Example

final builder = JsonRpcMethodBuilder();
builder.add(GetBalance(Pubkey.fromBase58('CM78CPUeXjn8o3yroDHxUtKsZZgoy4GPkPPXfouKNH12')));
builder.add(GetEpochInfo());
final result = await connection.sendAll(builder);
print(result); // [JsonRpcSuccessResponse<...>, JsonRpcSuccessResponse<EpochInfo>]

Implementation

Future<List<JsonRpcResponse<T>>> sendAll<S, T>(
  final JsonRpcMethodBuilder<S, T> builder, {
  final bool? eagerError,
}) => httpClient.sendAll(
  builder.request(commitment),
  builder.response,
  config: httpClientConfig,
  eagerError: eagerError ?? false,
);