class TransactionResource {

    @ApiOperation(value = "Send private raw transaction payload")
    @ApiResponses({
        @ApiResponse(code = 200, response = SendResponse.class, message = "Send response"),
        @ApiResponse(code = 400, message = "For unknown and unknown keys")
    })
    @POST
    @Path("sendsignedtx")
    @Consumes(APPLICATION_OCTET_STREAM)
    @Produces(TEXT_PLAIN)
    public Response sendSignedTransaction(
            @HeaderParam("c11n-to") final String recipientKeys, @NotNull @Size(min = 1) final byte[] signedTransaction)
            throws UnsupportedEncodingException {


        List<PublicKey> recipients = Stream.of(recipientKeys)
            .filter(Objects::nonNull)
            .filter(s -> !Objects.equals("", s))
            .map(v -> v.split(","))
            .flatMap(Arrays::stream)
            .map(Base64.getDecoder()::decode)
            .map(PublicKey::from)
            .collect(Collectors.toList());

        com.quorum.tessera.transaction.SendSignedRequest request = com.quorum.tessera.transaction.SendSignedRequest.Builder.create()
            .withRecipients(recipients)
            .withSignedData(signedTransaction)
            .build();

        final com.quorum.tessera.transaction.SendResponse response = transactionManager.sendSignedTransaction(request);

        final String encodedTransactionHash = Base64.getEncoder().encodeToString(response.getTransactionHash().getHashBytes());

        LOGGER.debug("Encoded key: {}", encodedTransactionHash);

        URI location =
                UriBuilder.fromPath("transaction")
                        .path(URLEncoder.encode(encodedTransactionHash, StandardCharsets.UTF_8.toString()))
                        .build();

        // TODO: Quorum expects only 200 responses. When Quorum can handle a 201, change to CREATED
        return Response.status(Status.OK).entity(encodedTransactionHash).location(location).build();
    }

    public  TransactionResource(TransactionManager transactionManager);

}