class SlashingProtectedSigner implements Signer {

  @Override
  public SafeFuture<BLSSignature> signAttestationData(
      final AttestationData attestationData, final ForkInfo forkInfo) {
    return slashingProtector
        .maySignAttestation(
            validatorPublicKey,
            forkInfo.getGenesisValidatorsRoot(),
            attestationData.getSource().getEpoch(),
            attestationData.getTarget().getEpoch())
        .thenAccept(verifySigningAllowed(slashableAttestationMessage(attestationData)))
        .thenCompose(__ -> delegate.signAttestationData(attestationData, forkInfo));
  }

  public  SlashingProtectedSigner(
      final BLSPublicKey validatorPublicKey,
      final SlashingProtector slashingProtector,
      final Signer delegate);

}