request<T> method

Future<T> request<T>(
  1. SolanaRPCRequest<T> request, [
  2. Duration? timeout
])

Sends a JSON-RPC request to the solana node and returns the result after processing the response.

request: The JSON-RPC request to be sent. timeout: The maximum duration for waiting for the response. changed value to request class template

Implementation

Future<T> request<T>(SolanaRPCRequest<T> request, [Duration? timeout]) async {
  final response = await requestDynamic(request, timeout);
  return _fetchRequest<T>(request, response);
}