class PartyInfoResource {

    @GET
    @Produces(MediaType.APPLICATION_JSON)
    @ApiOperation(value = "Fetch network/peer information")
    @ApiResponses({@ApiResponse(code = 200, message = "Peer/Network information", response = PartyInfo.class)})
    public Response getPartyInfo() {

        final NodeInfo current = this.discovery.getCurrent();

        final JsonArrayBuilder peersBuilder = Json.createArrayBuilder();

        partyStore.getParties().stream()
            .map(party -> Json.createObjectBuilder().add("url", party.toString()).build())
            .forEach(peersBuilder::add);

        final JsonArrayBuilder recipientBuilder = Json.createArrayBuilder();
        current.getRecipients().stream()
            .map(
                recipient ->
                    Json.createObjectBuilder()
                        .add("key", recipient.getKey().encodeToBase64())
                        .add("url", recipient.getUrl())
                        .build())
            .forEach(recipientBuilder::add);

        final String output =
            Json.createObjectBuilder()
                .add("url", current.getUrl())
                .add("peers", peersBuilder.build())
                .add("keys", recipientBuilder.build())
                .build()
                .toString();

        LOGGER.debug("Sending json {} from {}", output, current);

        return Response.status(Response.Status.OK).entity(output).build();
    }

    public  PartyInfoResource(
        final Discovery discovery,
        final PartyInfoParser partyInfoParser,
        final Client restClient,
        final Enclave enclave,
        final PayloadEncoder payloadEncoder,
        final boolean enableKeyValidation,
        final PartyStore partyStore);
    public  PartyInfoResource(
        final Discovery discovery,
        final PartyInfoParser partyInfoParser,
        final Client restClient,
        final Enclave enclave,
        final boolean enableKeyValidation);

}