class ValidatorApiHandler implements ValidatorApiChannel {

  @Override
  public void sendAggregateAndProof(final SignedAggregateAndProof aggregateAndProof) {
    attestationManager
        .onAttestation(ValidateableAttestation.fromSignedAggregate(aggregateAndProof))
        .finish(
            result -> {
              result.ifInvalid(
                  reason ->
                      VALIDATOR_LOGGER.producedInvalidAggregate(
                          aggregateAndProof.getMessage().getAggregate().getData().getSlot(),
                          reason));
            },
            err ->
                LOG.error(
                    "Failed to send aggregate for slot {}",
                    aggregateAndProof.getMessage().getAggregate().getData().getSlot()));
  }

  public  ValidatorApiHandler(
      final CombinedChainDataClient combinedChainDataClient,
      final SyncStateTracker syncStateTracker,
      final StateTransition stateTransition,
      final BlockFactory blockFactory,
      final AggregatingAttestationPool attestationPool,
      final AttestationManager attestationManager,
      final AttestationTopicSubscriber attestationTopicSubscriber,
      final EventBus eventBus,
      final DutyMetrics dutyMetrics,
      final PerformanceTracker performanceTracker);

}