class ValidatorDataProvider {

  public SafeFuture<Optional<List<AttesterDuty>>> getAttesterDuties(
      final UInt64 epoch, final List<Integer> indexes) {
    if (indexes.isEmpty()) {
      return SafeFuture.completedFuture(Optional.of(emptyList()));
    }
    return SafeFuture.of(() -> validatorApiChannel.getAttestationDuties(epoch, indexes))
        .thenApply(
            res ->
                res.map(
                    duties ->
                        duties.stream()
                            .filter(duty -> duty.getPublicKey() != null)
                            .map(this::mapToAttesterDuties)
                            .collect(toList())));
  }

  public  ValidatorDataProvider(
      final ValidatorApiChannel validatorApiChannel,
      final BlockImporter blockImporter,
      final CombinedChainDataClient combinedChainDataClient);

}