This repository has been archived by the owner on Sep 26, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 130
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[PAN-2825] eea send raw transaction with privacy group id (#1611)
* Add privacy group id to private transaction * Update enclave send methods to accept privacy group id * Update eea sendRawTransaction endpoint * extract privacy group id from private transaction if present * extract privateFor/privateFrom if privacy group id is not present * Fix tests * Change abstract class invocation to concrete class. * Utility method to load enclave public key
- Loading branch information
1 parent
779d995
commit 5001528
Showing
13 changed files
with
434 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
enclave/src/main/java/tech/pegasys/pantheon/enclave/types/SendRequestLegacy.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* | ||
* Copyright 2019 ConsenSys AG. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on | ||
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations under the License. | ||
*/ | ||
package tech.pegasys.pantheon.enclave.types; | ||
|
||
import java.util.List; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import com.fasterxml.jackson.annotation.JsonPropertyOrder; | ||
|
||
@JsonPropertyOrder({"payload", "from", "to"}) | ||
public class SendRequestLegacy extends SendRequest { | ||
private List<String> to; | ||
|
||
public SendRequestLegacy( | ||
@JsonProperty(value = "payload") final String payload, | ||
@JsonProperty(value = "from") final String from, | ||
@JsonProperty(value = "to") final List<String> to) { | ||
super(payload, from); | ||
this.to = to; | ||
} | ||
|
||
public List<String> getTo() { | ||
return to; | ||
} | ||
} |
34 changes: 34 additions & 0 deletions
34
enclave/src/main/java/tech/pegasys/pantheon/enclave/types/SendRequestPantheon.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/* | ||
* Copyright 2019 ConsenSys AG. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on | ||
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations under the License. | ||
*/ | ||
package tech.pegasys.pantheon.enclave.types; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import com.fasterxml.jackson.annotation.JsonPropertyOrder; | ||
|
||
@JsonPropertyOrder({"payload", "from", "privacyGroupId"}) | ||
public class SendRequestPantheon extends SendRequest { | ||
private String privacyGroupId; | ||
|
||
public SendRequestPantheon( | ||
@JsonProperty(value = "payload") final String payload, | ||
@JsonProperty(value = "from") final String from, | ||
@JsonProperty(value = "to") final String privacyGroupId) { | ||
super(payload, from); | ||
|
||
this.privacyGroupId = privacyGroupId; | ||
} | ||
|
||
public String getPrivacyGroupId() { | ||
return privacyGroupId; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.