class PrivGetLogs implements JsonRpcMethod {

  @Override
  public JsonRpcResponse response(final JsonRpcRequestContext requestContext) {
    final String privacyGroupId = requestContext.getRequiredParameter(0, String.class);
    final FilterParameter filter = requestContext.getRequiredParameter(1, FilterParameter.class);

    if (!filter.isValid()) {
      return new JsonRpcErrorResponse(
          requestContext.getRequest().getId(), JsonRpcError.INVALID_PARAMS);
    }

    final List<LogWithMetadata> matchingLogs =
        filter
            .getBlockHash()
            .map(
                blockHash -> {
                  return findLogsForBlockHash(requestContext, privacyGroupId, filter, blockHash);
                })
            .orElseGet(
                () -> {
                  return findLogsForBlockRange(requestContext, privacyGroupId, filter);
                });

    return new JsonRpcSuccessResponse(
        requestContext.getRequest().getId(), new LogsResult(matchingLogs));
  }

  public  PrivGetLogs(
      final BlockchainQueries blockchainQueries,
      final PrivacyQueries privacyQueries,
      final PrivacyController privacyController,
      final EnclavePublicKeyProvider enclavePublicKeyProvider);

}