query method

Future<NdkResponse> query(
  1. Filter filter,
  2. RelaySet? relaySet, {
  3. required String name,
  4. int idleTimeout = RelaySetsEngine.DEFAULT_STREAM_IDLE_TIMEOUT,
  5. bool splitRequestsByPubKeyMappings = true,
})

Implementation

Future<NdkResponse> query(
  Filter filter,
  RelaySet? relaySet, {
  required String name,
  int idleTimeout = RelaySetsEngine.DEFAULT_STREAM_IDLE_TIMEOUT,
  bool splitRequestsByPubKeyMappings = true,
}) async {
  RequestState state = RequestState(NdkRequest.query(
      Helpers.getRandomString(10),
      name: name,
      filters: [filter],
      relaySet: relaySet));
  await _doQuery(state);
  return NdkResponse(state.id, state.stream);
}