diff --git a/acceptance-tests/src/test/java/tech/pegasys/pantheon/tests/acceptance/dsl/node/configuration/PantheonFactoryConfigurationBuilder.java b/acceptance-tests/src/test/java/tech/pegasys/pantheon/tests/acceptance/dsl/node/configuration/PantheonFactoryConfigurationBuilder.java index 3337181e43..ca189db161 100644 --- a/acceptance-tests/src/test/java/tech/pegasys/pantheon/tests/acceptance/dsl/node/configuration/PantheonFactoryConfigurationBuilder.java +++ b/acceptance-tests/src/test/java/tech/pegasys/pantheon/tests/acceptance/dsl/node/configuration/PantheonFactoryConfigurationBuilder.java @@ -86,6 +86,7 @@ public PantheonFactoryConfigurationBuilder jsonRpcEnabled() { public PantheonFactoryConfigurationBuilder enablePrivateTransactions( final PrivacyParameters privacyParameters) { this.jsonRpcConfiguration.addRpcApi(RpcApis.EEA); + this.jsonRpcConfiguration.addRpcApi(RpcApis.PRIV); this.privacyParameters = privacyParameters; this.privacyParameters.setEnabled(true); return this; diff --git a/ethereum/jsonrpc/src/main/java/tech/pegasys/pantheon/ethereum/jsonrpc/JsonRpcMethodsFactory.java b/ethereum/jsonrpc/src/main/java/tech/pegasys/pantheon/ethereum/jsonrpc/JsonRpcMethodsFactory.java index 445b3afc33..5fdd2d2420 100644 --- a/ethereum/jsonrpc/src/main/java/tech/pegasys/pantheon/ethereum/jsonrpc/JsonRpcMethodsFactory.java +++ b/ethereum/jsonrpc/src/main/java/tech/pegasys/pantheon/ethereum/jsonrpc/JsonRpcMethodsFactory.java @@ -331,7 +331,11 @@ blockchainQueries, new TransactionTracer(blockReplay), parameter), new EeaSendRawTransaction( blockchainQueries, privateTransactionHandler, transactionPool, parameter), new EeaGetTransactionCount(parameter, privateTransactionHandler), - new EeaGetPrivateTransaction(enclave, parameter, privacyParameters), + new EeaGetPrivateTransaction(enclave, parameter, privacyParameters)); + } + if (rpcApis.contains(RpcApis.PRIV)) { + addMethods( + enabledMethods, new PrivCreatePrivacyGroup(new Enclave(privacyParameters.getEnclaveUri()), parameter), new PrivDeletePrivacyGroup(new Enclave(privacyParameters.getEnclaveUri()), parameter), new PrivFindPrivacyGroup(new Enclave(privacyParameters.getEnclaveUri()), parameter), diff --git a/ethereum/jsonrpc/src/main/java/tech/pegasys/pantheon/ethereum/jsonrpc/RpcApis.java b/ethereum/jsonrpc/src/main/java/tech/pegasys/pantheon/ethereum/jsonrpc/RpcApis.java index 78387d16dc..3d17901110 100644 --- a/ethereum/jsonrpc/src/main/java/tech/pegasys/pantheon/ethereum/jsonrpc/RpcApis.java +++ b/ethereum/jsonrpc/src/main/java/tech/pegasys/pantheon/ethereum/jsonrpc/RpcApis.java @@ -26,6 +26,7 @@ public class RpcApis { public static final RpcApi WEB3 = new RpcApi("WEB3"); public static final RpcApi ADMIN = new RpcApi("ADMIN"); public static final RpcApi EEA = new RpcApi("EEA"); + public static final RpcApi PRIV = new RpcApi("PRIV"); public static final RpcApi TX_POOL = new RpcApi("TXPOOL"); public static final List DEFAULT_JSON_RPC_APIS = Arrays.asList(ETH, NET, WEB3); @@ -47,6 +48,8 @@ public static Optional valueOf(final String name) { return Optional.of(ADMIN); } else if (name.equals(EEA.getCliValue())) { return Optional.of(EEA); + } else if (name.equals(PRIV.getCliValue())) { + return Optional.of(PRIV); } else if (name.equals(TX_POOL.getCliValue())) { return Optional.of(TX_POOL); } else {