Search in sources :

Example 1 with TransactionManager

use of com.quorum.tessera.transaction.TransactionManager in project tessera by ConsenSys.

the class EncodedPayloadResource method createEncodedPayload.

// hide this operation from swagger generation; the /encodedpayload/create operation is overloaded
// and must be documented in a single place
@Hidden
@POST
@Path("create")
@Consumes(APPLICATION_JSON)
@Produces(APPLICATION_JSON)
public Response createEncodedPayload(@NotNull @Valid final SendRequest sendRequest) {
    LOGGER.info("Received request for custom payload encryption");
    final PublicKey sender = Optional.ofNullable(sendRequest.getFrom()).map(base64Decoder::decode).map(PublicKey::from).orElseGet(transactionManager::defaultPublicKey);
    final List<PublicKey> recipientList = Stream.of(sendRequest).filter(sr -> Objects.nonNull(sr.getTo())).flatMap(s -> Stream.of(s.getTo())).map(base64Decoder::decode).map(PublicKey::from).collect(Collectors.toList());
    final Set<MessageHash> affectedTransactions = Stream.ofNullable(sendRequest.getAffectedContractTransactions()).flatMap(Arrays::stream).map(Base64.getDecoder()::decode).map(MessageHash::new).collect(Collectors.toSet());
    final byte[] execHash = Optional.ofNullable(sendRequest.getExecHash()).map(String::getBytes).orElse(new byte[0]);
    final com.quorum.tessera.transaction.SendRequest request = com.quorum.tessera.transaction.SendRequest.Builder.create().withRecipients(recipientList).withSender(sender).withPayload(sendRequest.getPayload()).withExecHash(execHash).withPrivacyMode(PrivacyMode.fromFlag(sendRequest.getPrivacyFlag())).withAffectedContractTransactions(affectedTransactions).build();
    final EncodedPayload encodedPayload = encodedPayloadManager.create(request);
    final Map<String, String> affectedContractTransactionMap = encodedPayload.getAffectedContractTransactions().entrySet().stream().collect(Collectors.toMap(e -> e.getKey().encodeToBase64(), e -> Base64.getEncoder().encodeToString(e.getValue().getData())));
    final PayloadEncryptResponse response = new PayloadEncryptResponse();
    response.setSenderKey(encodedPayload.getSenderKey().getKeyBytes());
    response.setCipherText(encodedPayload.getCipherText());
    response.setCipherTextNonce(encodedPayload.getCipherTextNonce().getNonceBytes());
    response.setRecipientBoxes(encodedPayload.getRecipientBoxes().stream().map(RecipientBox::getData).collect(Collectors.toList()));
    response.setRecipientNonce(encodedPayload.getRecipientNonce().getNonceBytes());
    response.setRecipientKeys(encodedPayload.getRecipientKeys().stream().map(PublicKey::getKeyBytes).collect(Collectors.toList()));
    response.setPrivacyMode(encodedPayload.getPrivacyMode().getPrivacyFlag());
    response.setAffectedContractTransactions(affectedContractTransactionMap);
    response.setExecHash(encodedPayload.getExecHash());
    return Response.ok(response).type(APPLICATION_JSON).build();
}
Also used : PublicKey(com.quorum.tessera.encryption.PublicKey) java.util(java.util) PrivacyMode(com.quorum.tessera.enclave.PrivacyMode) LoggerFactory(org.slf4j.LoggerFactory) Valid(jakarta.validation.Valid) NotNull(jakarta.validation.constraints.NotNull) RecipientBox(com.quorum.tessera.enclave.RecipientBox) Path(jakarta.ws.rs.Path) Content(io.swagger.v3.oas.annotations.media.Content) Operation(io.swagger.v3.oas.annotations.Operation) Response(jakarta.ws.rs.core.Response) ReceiveResponse(com.quorum.tessera.api.ReceiveResponse) RequestBody(io.swagger.v3.oas.annotations.parameters.RequestBody) ApiResponse(io.swagger.v3.oas.annotations.responses.ApiResponse) MIME_TYPE_JSON_2_1(com.quorum.tessera.version.MultiTenancyVersion.MIME_TYPE_JSON_2_1) Produces(jakarta.ws.rs.Produces) MessageHash(com.quorum.tessera.data.MessageHash) Schema(io.swagger.v3.oas.annotations.media.Schema) Consumes(jakarta.ws.rs.Consumes) EncodedPayload(com.quorum.tessera.enclave.EncodedPayload) Logger(org.slf4j.Logger) PayloadEncryptResponse(com.quorum.tessera.api.PayloadEncryptResponse) Hidden(io.swagger.v3.oas.annotations.Hidden) POST(jakarta.ws.rs.POST) TransactionManager(com.quorum.tessera.transaction.TransactionManager) Collectors(java.util.stream.Collectors) PayloadDecryptRequest(com.quorum.tessera.api.PayloadDecryptRequest) SendRequest(com.quorum.tessera.api.SendRequest) EncodedPayloadManager(com.quorum.tessera.transaction.EncodedPayloadManager) Stream(java.util.stream.Stream) Tag(io.swagger.v3.oas.annotations.tags.Tag) APPLICATION_JSON(jakarta.ws.rs.core.MediaType.APPLICATION_JSON) TxHash(com.quorum.tessera.enclave.TxHash) PayloadEncryptResponse(com.quorum.tessera.api.PayloadEncryptResponse) PublicKey(com.quorum.tessera.encryption.PublicKey) EncodedPayload(com.quorum.tessera.enclave.EncodedPayload) MessageHash(com.quorum.tessera.data.MessageHash) RecipientBox(com.quorum.tessera.enclave.RecipientBox) Path(jakarta.ws.rs.Path) POST(jakarta.ws.rs.POST) Consumes(jakarta.ws.rs.Consumes) Produces(jakarta.ws.rs.Produces) Hidden(io.swagger.v3.oas.annotations.Hidden)

Example 2 with TransactionManager

use of com.quorum.tessera.transaction.TransactionManager in project tessera by ConsenSys.

the class EncodedPayloadResource method createEncodedPayload21.

// path /encodedpayload/create is overloaded (application/json and
// application/vnd.tessera-2.1+json); swagger annotations cannot handle situations like this so
// this operation documents both
@POST
@Path("create")
@Operation(summary = "/encodedpayload/create", operationId = "encrypt", description = "encrypt a payload and return the result; does not store to the database or push to peers", requestBody = @RequestBody(content = { @Content(mediaType = APPLICATION_JSON, schema = @Schema(implementation = SendRequest.class)), @Content(mediaType = MIME_TYPE_JSON_2_1, schema = @Schema(implementation = SendRequest.class)) }))
@ApiResponse(responseCode = "200", description = "encrypted payload", content = { @Content(mediaType = APPLICATION_JSON, schema = @Schema(implementation = PayloadEncryptResponse.class)), @Content(mediaType = MIME_TYPE_JSON_2_1, schema = @Schema(implementation = PayloadEncryptResponse.class)) })
@Consumes(MIME_TYPE_JSON_2_1)
@Produces(MIME_TYPE_JSON_2_1)
public Response createEncodedPayload21(@NotNull @Valid final SendRequest sendRequest) {
    LOGGER.info("Received request for custom payload encryption");
    final PublicKey sender = Optional.ofNullable(sendRequest.getFrom()).map(base64Decoder::decode).map(PublicKey::from).orElseGet(transactionManager::defaultPublicKey);
    final List<PublicKey> recipientList = Stream.of(sendRequest).filter(sr -> Objects.nonNull(sr.getTo())).flatMap(s -> Stream.of(s.getTo())).map(base64Decoder::decode).map(PublicKey::from).collect(Collectors.toList());
    final Set<MessageHash> affectedTransactions = Stream.ofNullable(sendRequest.getAffectedContractTransactions()).flatMap(Arrays::stream).map(Base64.getDecoder()::decode).map(MessageHash::new).collect(Collectors.toSet());
    final byte[] execHash = Optional.ofNullable(sendRequest.getExecHash()).map(String::getBytes).orElse(new byte[0]);
    final com.quorum.tessera.transaction.SendRequest request = com.quorum.tessera.transaction.SendRequest.Builder.create().withRecipients(recipientList).withSender(sender).withPayload(sendRequest.getPayload()).withExecHash(execHash).withPrivacyMode(PrivacyMode.fromFlag(sendRequest.getPrivacyFlag())).withAffectedContractTransactions(affectedTransactions).build();
    final EncodedPayload encodedPayload = encodedPayloadManager.create(request);
    final Map<String, String> affectedContractTransactionMap = encodedPayload.getAffectedContractTransactions().entrySet().stream().collect(Collectors.toMap(e -> e.getKey().encodeToBase64(), e -> Base64.getEncoder().encodeToString(e.getValue().getData())));
    final PayloadEncryptResponse response = new PayloadEncryptResponse();
    response.setSenderKey(encodedPayload.getSenderKey().getKeyBytes());
    response.setCipherText(encodedPayload.getCipherText());
    response.setCipherTextNonce(encodedPayload.getCipherTextNonce().getNonceBytes());
    response.setRecipientBoxes(encodedPayload.getRecipientBoxes().stream().map(RecipientBox::getData).collect(Collectors.toList()));
    response.setRecipientNonce(encodedPayload.getRecipientNonce().getNonceBytes());
    response.setRecipientKeys(encodedPayload.getRecipientKeys().stream().map(PublicKey::getKeyBytes).collect(Collectors.toList()));
    response.setPrivacyMode(encodedPayload.getPrivacyMode().getPrivacyFlag());
    response.setAffectedContractTransactions(affectedContractTransactionMap);
    response.setExecHash(encodedPayload.getExecHash());
    return Response.ok(response).type(MIME_TYPE_JSON_2_1).build();
}
Also used : PublicKey(com.quorum.tessera.encryption.PublicKey) java.util(java.util) PrivacyMode(com.quorum.tessera.enclave.PrivacyMode) LoggerFactory(org.slf4j.LoggerFactory) Valid(jakarta.validation.Valid) NotNull(jakarta.validation.constraints.NotNull) RecipientBox(com.quorum.tessera.enclave.RecipientBox) Path(jakarta.ws.rs.Path) Content(io.swagger.v3.oas.annotations.media.Content) Operation(io.swagger.v3.oas.annotations.Operation) Response(jakarta.ws.rs.core.Response) ReceiveResponse(com.quorum.tessera.api.ReceiveResponse) RequestBody(io.swagger.v3.oas.annotations.parameters.RequestBody) ApiResponse(io.swagger.v3.oas.annotations.responses.ApiResponse) MIME_TYPE_JSON_2_1(com.quorum.tessera.version.MultiTenancyVersion.MIME_TYPE_JSON_2_1) Produces(jakarta.ws.rs.Produces) MessageHash(com.quorum.tessera.data.MessageHash) Schema(io.swagger.v3.oas.annotations.media.Schema) Consumes(jakarta.ws.rs.Consumes) EncodedPayload(com.quorum.tessera.enclave.EncodedPayload) Logger(org.slf4j.Logger) PayloadEncryptResponse(com.quorum.tessera.api.PayloadEncryptResponse) Hidden(io.swagger.v3.oas.annotations.Hidden) POST(jakarta.ws.rs.POST) TransactionManager(com.quorum.tessera.transaction.TransactionManager) Collectors(java.util.stream.Collectors) PayloadDecryptRequest(com.quorum.tessera.api.PayloadDecryptRequest) SendRequest(com.quorum.tessera.api.SendRequest) EncodedPayloadManager(com.quorum.tessera.transaction.EncodedPayloadManager) Stream(java.util.stream.Stream) Tag(io.swagger.v3.oas.annotations.tags.Tag) APPLICATION_JSON(jakarta.ws.rs.core.MediaType.APPLICATION_JSON) TxHash(com.quorum.tessera.enclave.TxHash) PayloadEncryptResponse(com.quorum.tessera.api.PayloadEncryptResponse) PublicKey(com.quorum.tessera.encryption.PublicKey) EncodedPayload(com.quorum.tessera.enclave.EncodedPayload) MessageHash(com.quorum.tessera.data.MessageHash) RecipientBox(com.quorum.tessera.enclave.RecipientBox) Path(jakarta.ws.rs.Path) POST(jakarta.ws.rs.POST) Consumes(jakarta.ws.rs.Consumes) Produces(jakarta.ws.rs.Produces) Operation(io.swagger.v3.oas.annotations.Operation) ApiResponse(io.swagger.v3.oas.annotations.responses.ApiResponse)

Example 3 with TransactionManager

use of com.quorum.tessera.transaction.TransactionManager in project tessera by ConsenSys.

the class TransactionResource method send.

// hide this operation from swagger generation; the /send operation is overloaded and must be
// documented in a single place
@Hidden
@POST
@Path("send")
@Consumes(APPLICATION_JSON)
@Produces(APPLICATION_JSON)
public Response send(@NotNull @Valid @PrivacyValid final SendRequest sendRequest) {
    final PublicKey sender = Optional.ofNullable(sendRequest.getFrom()).map(base64Decoder::decode).map(PublicKey::from).orElseGet(transactionManager::defaultPublicKey);
    final Optional<PrivacyGroup.Id> optionalPrivacyGroup = Optional.ofNullable(sendRequest.getPrivacyGroupId()).map(PrivacyGroup.Id::fromBase64String);
    final List<PublicKey> recipientList = optionalPrivacyGroup.map(privacyGroupManager::retrievePrivacyGroup).map(PrivacyGroup::getMembers).orElse(Stream.of(sendRequest).filter(sr -> Objects.nonNull(sr.getTo())).flatMap(s -> Stream.of(s.getTo())).map(base64Decoder::decode).map(PublicKey::from).collect(Collectors.toList()));
    final Set<MessageHash> affectedTransactions = Stream.ofNullable(sendRequest.getAffectedContractTransactions()).flatMap(Arrays::stream).map(base64Decoder::decode).map(MessageHash::new).collect(Collectors.toSet());
    final byte[] execHash = Optional.ofNullable(sendRequest.getExecHash()).map(String::getBytes).orElse(new byte[0]);
    final PrivacyMode privacyMode = PrivacyMode.fromFlag(sendRequest.getPrivacyFlag());
    final com.quorum.tessera.transaction.SendRequest.Builder requestBuilder = com.quorum.tessera.transaction.SendRequest.Builder.create().withRecipients(recipientList).withSender(sender).withPayload(sendRequest.getPayload()).withExecHash(execHash).withPrivacyMode(privacyMode).withAffectedContractTransactions(affectedTransactions);
    optionalPrivacyGroup.ifPresent(requestBuilder::withPrivacyGroupId);
    final com.quorum.tessera.transaction.SendResponse response = transactionManager.send(requestBuilder.build());
    final String encodedKey = Optional.of(response).map(com.quorum.tessera.transaction.SendResponse::getTransactionHash).map(MessageHash::getHashBytes).map(base64Encoder::encodeToString).get();
    final SendResponse sendResponse = Optional.of(response).map(com.quorum.tessera.transaction.SendResponse::getTransactionHash).map(MessageHash::getHashBytes).map(base64Encoder::encodeToString).map(messageHash -> new SendResponse(messageHash, null, null)).get();
    final URI location = UriBuilder.fromPath("transaction").path(URLEncoder.encode(encodedKey, StandardCharsets.UTF_8)).build();
    return Response.status(Response.Status.CREATED).type(APPLICATION_JSON).location(location).entity(sendResponse).build();
}
Also used : PublicKey(com.quorum.tessera.encryption.PublicKey) java.util(java.util) PrivacyMode(com.quorum.tessera.enclave.PrivacyMode) Size(jakarta.validation.constraints.Size) LoggerFactory(org.slf4j.LoggerFactory) Valid(jakarta.validation.Valid) NotNull(jakarta.validation.constraints.NotNull) PrivacyValid(com.quorum.tessera.api.constraint.PrivacyValid) Content(io.swagger.v3.oas.annotations.media.Content) Operation(io.swagger.v3.oas.annotations.Operation) Response(jakarta.ws.rs.core.Response) ApiResponse(io.swagger.v3.oas.annotations.responses.ApiResponse) URI(java.net.URI) MessageHash(com.quorum.tessera.data.MessageHash) Schema(io.swagger.v3.oas.annotations.media.Schema) Pattern(jakarta.validation.constraints.Pattern) Logger(org.slf4j.Logger) PrivacyGroup(com.quorum.tessera.enclave.PrivacyGroup) Hidden(io.swagger.v3.oas.annotations.Hidden) com.quorum.tessera.api(com.quorum.tessera.api) ExampleObject(io.swagger.v3.oas.annotations.media.ExampleObject) Predicate(java.util.function.Predicate) TransactionManager(com.quorum.tessera.transaction.TransactionManager) PrivacyGroupManager(com.quorum.tessera.privacygroup.PrivacyGroupManager) jakarta.ws.rs(jakarta.ws.rs) Collectors(java.util.stream.Collectors) StandardCharsets(java.nio.charset.StandardCharsets) ValidBase64(com.quorum.tessera.config.constraints.ValidBase64) Parameter(io.swagger.v3.oas.annotations.Parameter) ArraySchema(io.swagger.v3.oas.annotations.media.ArraySchema) URLEncoder(java.net.URLEncoder) Stream(java.util.stream.Stream) MediaType(jakarta.ws.rs.core.MediaType) UriBuilder(jakarta.ws.rs.core.UriBuilder) Tag(io.swagger.v3.oas.annotations.tags.Tag) PublicKey(com.quorum.tessera.encryption.PublicKey) PrivacyMode(com.quorum.tessera.enclave.PrivacyMode) MessageHash(com.quorum.tessera.data.MessageHash) URI(java.net.URI) Hidden(io.swagger.v3.oas.annotations.Hidden)

Example 4 with TransactionManager

use of com.quorum.tessera.transaction.TransactionManager in project tessera by ConsenSys.

the class TransactionResource method sendRaw.

@Operation(summary = "/sendraw", operationId = "encryptStoreAndSendOctetStream", description = "encrypts a payload, stores result in database, and publishes result to recipients")
@ApiResponse(responseCode = "200", description = "encrypted payload hash", content = @Content(schema = @Schema(type = "string", format = "base64", description = "encrypted payload hash")))
@POST
@Path("sendraw")
@Consumes(APPLICATION_OCTET_STREAM)
@Produces(TEXT_PLAIN)
public Response sendRaw(@HeaderParam("c11n-from") @Parameter(description = "public key identifying the server's key pair that will be used in the encryption; if not set, default used", schema = @Schema(format = "base64")) @Valid @ValidBase64 final String sender, @HeaderParam("c11n-to") @Parameter(description = "comma-separated list of recipient public keys", schema = @Schema(format = "base64")) final String recipientKeys, @Schema(description = "data to be encrypted") @NotNull @Size(min = 1) @Valid final byte[] payload) {
    final PublicKey senderKey = Optional.ofNullable(sender).filter(Predicate.not(String::isEmpty)).map(base64Decoder::decode).map(PublicKey::from).orElseGet(transactionManager::defaultPublicKey);
    final List<PublicKey> recipients = Stream.of(recipientKeys).filter(Objects::nonNull).filter(s -> !Objects.equals("", s)).map(v -> v.split(",")).flatMap(Arrays::stream).map(base64Decoder::decode).map(PublicKey::from).collect(Collectors.toList());
    final com.quorum.tessera.transaction.SendRequest request = com.quorum.tessera.transaction.SendRequest.Builder.create().withSender(senderKey).withRecipients(recipients).withPayload(payload).withPrivacyMode(PrivacyMode.STANDARD_PRIVATE).withAffectedContractTransactions(Collections.emptySet()).withExecHash(new byte[0]).build();
    final com.quorum.tessera.transaction.SendResponse sendResponse = transactionManager.send(request);
    final String encodedTransactionHash = Optional.of(sendResponse).map(com.quorum.tessera.transaction.SendResponse::getTransactionHash).map(MessageHash::getHashBytes).map(base64Encoder::encodeToString).get();
    LOGGER.debug("Encoded key: {}", encodedTransactionHash);
    URI location = UriBuilder.fromPath("transaction").path(URLEncoder.encode(encodedTransactionHash, StandardCharsets.UTF_8)).build();
    return Response.status(Response.Status.OK).entity(encodedTransactionHash).location(location).build();
}
Also used : PublicKey(com.quorum.tessera.encryption.PublicKey) java.util(java.util) PrivacyMode(com.quorum.tessera.enclave.PrivacyMode) Size(jakarta.validation.constraints.Size) LoggerFactory(org.slf4j.LoggerFactory) Valid(jakarta.validation.Valid) NotNull(jakarta.validation.constraints.NotNull) PrivacyValid(com.quorum.tessera.api.constraint.PrivacyValid) Content(io.swagger.v3.oas.annotations.media.Content) Operation(io.swagger.v3.oas.annotations.Operation) Response(jakarta.ws.rs.core.Response) ApiResponse(io.swagger.v3.oas.annotations.responses.ApiResponse) URI(java.net.URI) MessageHash(com.quorum.tessera.data.MessageHash) Schema(io.swagger.v3.oas.annotations.media.Schema) Pattern(jakarta.validation.constraints.Pattern) Logger(org.slf4j.Logger) PrivacyGroup(com.quorum.tessera.enclave.PrivacyGroup) Hidden(io.swagger.v3.oas.annotations.Hidden) com.quorum.tessera.api(com.quorum.tessera.api) ExampleObject(io.swagger.v3.oas.annotations.media.ExampleObject) Predicate(java.util.function.Predicate) TransactionManager(com.quorum.tessera.transaction.TransactionManager) PrivacyGroupManager(com.quorum.tessera.privacygroup.PrivacyGroupManager) jakarta.ws.rs(jakarta.ws.rs) Collectors(java.util.stream.Collectors) StandardCharsets(java.nio.charset.StandardCharsets) ValidBase64(com.quorum.tessera.config.constraints.ValidBase64) Parameter(io.swagger.v3.oas.annotations.Parameter) ArraySchema(io.swagger.v3.oas.annotations.media.ArraySchema) URLEncoder(java.net.URLEncoder) Stream(java.util.stream.Stream) MediaType(jakarta.ws.rs.core.MediaType) UriBuilder(jakarta.ws.rs.core.UriBuilder) Tag(io.swagger.v3.oas.annotations.tags.Tag) PublicKey(com.quorum.tessera.encryption.PublicKey) MessageHash(com.quorum.tessera.data.MessageHash) URI(java.net.URI) Operation(io.swagger.v3.oas.annotations.Operation) ApiResponse(io.swagger.v3.oas.annotations.responses.ApiResponse)

Example 5 with TransactionManager

use of com.quorum.tessera.transaction.TransactionManager in project tessera by ConsenSys.

the class TransactionResourceTest method sendSignedTransactionEmptyRecipients.

@Test
public void sendSignedTransactionEmptyRecipients() throws UnsupportedEncodingException {
    byte[] txnData = "KEY".getBytes();
    com.quorum.tessera.transaction.SendResponse sendResponse = mock(com.quorum.tessera.transaction.SendResponse.class);
    MessageHash messageHash = mock(MessageHash.class);
    when(messageHash.getHashBytes()).thenReturn(txnData);
    when(sendResponse.getTransactionHash()).thenReturn(messageHash);
    when(transactionManager.sendSignedTransaction(any(com.quorum.tessera.transaction.SendSignedRequest.class))).thenReturn(sendResponse);
    StreamingOutput streamingOutput = output -> output.write("signedTxData".getBytes());
    Response result = transactionResource.sendSignedTransactionStandard("", "signedTxData".getBytes());
    // jersey.target("sendsignedtx")
    // .request()
    // .header("c11n-to", "")
    // .post(Entity.entity(streamingOutput,
    // MediaType.APPLICATION_OCTET_STREAM_TYPE));
    assertThat(result.getStatus()).isEqualTo(200);
    assertThat(result.getEntity()).isEqualTo(Base64.getEncoder().encodeToString("KEY".getBytes()));
    verify(transactionManager).sendSignedTransaction(any(com.quorum.tessera.transaction.SendSignedRequest.class));
}
Also used : PublicKey(com.quorum.tessera.encryption.PublicKey) java.util(java.util) PrivacyMode(com.quorum.tessera.enclave.PrivacyMode) Logger(org.slf4j.Logger) com.quorum.tessera.api(com.quorum.tessera.api) Assertions.assertThat(org.assertj.core.api.Assertions.assertThat) TransactionManager(com.quorum.tessera.transaction.TransactionManager) LoggerFactory(org.slf4j.LoggerFactory) Test(org.junit.Test) PrivacyGroupManager(com.quorum.tessera.privacygroup.PrivacyGroupManager) Mockito(org.mockito.Mockito) Response(jakarta.ws.rs.core.Response) ArgumentCaptor(org.mockito.ArgumentCaptor) After(org.junit.After) MessageHash(com.quorum.tessera.data.MessageHash) StreamingOutput(jakarta.ws.rs.core.StreamingOutput) UnsupportedEncodingException(java.io.UnsupportedEncodingException) Before(org.junit.Before) Response(jakarta.ws.rs.core.Response) StreamingOutput(jakarta.ws.rs.core.StreamingOutput) MessageHash(com.quorum.tessera.data.MessageHash) Test(org.junit.Test)

Aggregations

TransactionManager (com.quorum.tessera.transaction.TransactionManager)16 Logger (org.slf4j.Logger)9 LoggerFactory (org.slf4j.LoggerFactory)9 MessageHash (com.quorum.tessera.data.MessageHash)8 PrivacyMode (com.quorum.tessera.enclave.PrivacyMode)8 PublicKey (com.quorum.tessera.encryption.PublicKey)8 PrivacyGroupManager (com.quorum.tessera.privacygroup.PrivacyGroupManager)8 Response (jakarta.ws.rs.core.Response)8 java.util (java.util)8 Stream (java.util.stream.Stream)8 Operation (io.swagger.v3.oas.annotations.Operation)7 Content (io.swagger.v3.oas.annotations.media.Content)7 Schema (io.swagger.v3.oas.annotations.media.Schema)7 ApiResponse (io.swagger.v3.oas.annotations.responses.ApiResponse)7 Tag (io.swagger.v3.oas.annotations.tags.Tag)7 Valid (jakarta.validation.Valid)7 NotNull (jakarta.validation.constraints.NotNull)7 Collectors (java.util.stream.Collectors)7 URI (java.net.URI)6 PrivacyValid (com.quorum.tessera.api.constraint.PrivacyValid)5