Search in sources :

Example 1 with Constellation

use of org.web3j.quorum.enclave.Constellation 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

URI (java.net.URI)1 Constellation (org.web3j.quorum.enclave.Constellation)1 Tessera (org.web3j.quorum.enclave.Tessera)1 EnclaveService (org.web3j.quorum.enclave.protocol.EnclaveService)1 RlpString (org.web3j.rlp.RlpString)1