Search in sources :

Example 1 with EnclaveService

use of org.web3j.quorum.enclave.protocol.EnclaveService in project besu by hyperledger.

the class ContainerTests method testSetUp.

@Before
public void testSetUp() throws IOException, CipherException {
    besuEnclaveService = new EnclaveService("http://" + tesseraBesuContainer.getHost(), tesseraBesuContainer.getMappedPort(tesseraRestPort), new OkHttpClient());
    besuEnclave = new Tessera(besuEnclaveService, besuWeb3j);
    besuPollingTransactionReceiptProcessor = new PollingTransactionReceiptProcessor(besuWeb3j, 1000, 10);
    goQuorumEnclaveService = new EnclaveService("http://" + tesseraGoQuorumContainer.getHost(), tesseraGoQuorumContainer.getMappedPort(tesseraRestPort), new OkHttpClient());
    goQuorumEnclave = new Tessera(goQuorumEnclaveService, goQuorumWeb3j);
    goQuorumPollingTransactionReceiptProcessor = new PollingTransactionReceiptProcessor(goQuorumWeb3j, 1000, 10);
    credentials = loadCredentials();
}
Also used : PollingTransactionReceiptProcessor(org.web3j.tx.response.PollingTransactionReceiptProcessor) EnclaveService(org.web3j.quorum.enclave.protocol.EnclaveService) OkHttpClient(okhttp3.OkHttpClient) Tessera(org.web3j.quorum.enclave.Tessera) Before(org.junit.Before)

Example 2 with EnclaveService

use of org.web3j.quorum.enclave.protocol.EnclaveService in project quorum-acceptance-tests by ConsenSys.

the class RawContractService method buildEnclave.

private Enclave buildEnclave(QuorumNode source, Quorum client) {
    String thirdPartyURL = privacyService.thirdPartyUrl(source);
    if (thirdPartyURL.endsWith("ipc")) {
        EnclaveService enclaveService = new EnclaveService("http://localhost", 12345, getIPCHttpClient(thirdPartyURL));
        return new Constellation(enclaveService, client);
    } else {
        URI uri = URI.create(thirdPartyURL);
        String enclaveUrl = uri.getScheme() + "://" + uri.getHost();
        EnclaveService enclaveService = new EnclaveService(enclaveUrl, uri.getPort(), httpClient);
        return new Tessera(enclaveService, client);
    }
}
Also used : EnclaveService(org.web3j.quorum.enclave.protocol.EnclaveService) Constellation(org.web3j.quorum.enclave.Constellation) RlpString(org.web3j.rlp.RlpString) Tessera(org.web3j.quorum.enclave.Tessera) URI(java.net.URI)

Aggregations

Tessera (org.web3j.quorum.enclave.Tessera)2 EnclaveService (org.web3j.quorum.enclave.protocol.EnclaveService)2 URI (java.net.URI)1 OkHttpClient (okhttp3.OkHttpClient)1 Before (org.junit.Before)1 Constellation (org.web3j.quorum.enclave.Constellation)1 RlpString (org.web3j.rlp.RlpString)1 PollingTransactionReceiptProcessor (org.web3j.tx.response.PollingTransactionReceiptProcessor)1