class PrivJsonRpcMethods extends PrivacyApiGroupJsonRpcMethods {

  @Override
  protected Map<String, JsonRpcMethod> create(
      final PrivacyController privacyController,
      final EnclavePublicKeyProvider enclavePublicKeyProvider) {

    final Map<String, JsonRpcMethod> RPC_METHODS =
        mapOf(
            new PrivCall(getBlockchainQueries(), privacyController, enclavePublicKeyProvider),
            new PrivDebugGetStateRoot(
                getBlockchainQueries(), enclavePublicKeyProvider, privacyController),
            new PrivDistributeRawTransaction(
                privacyController,
                enclavePublicKeyProvider,
                getPrivacyParameters().isOnchainPrivacyGroupsEnabled()),
            new PrivGetCode(getBlockchainQueries(), privacyController, enclavePublicKeyProvider),
            new PrivGetLogs(
                getBlockchainQueries(),
                getPrivacyQueries(),
                privacyController,
                enclavePublicKeyProvider),
            new PrivGetPrivateTransaction(privacyController, enclavePublicKeyProvider),
            new PrivGetPrivacyPrecompileAddress(getPrivacyParameters()),
            new PrivGetTransactionCount(privacyController, enclavePublicKeyProvider),
            new PrivGetTransactionReceipt(
                getPrivacyParameters().getPrivateStateStorage(),
                privacyController,
                enclavePublicKeyProvider),
            new PrivGetFilterLogs(filterManager, privacyController, enclavePublicKeyProvider),
            new PrivGetFilterChanges(filterManager, privacyController, enclavePublicKeyProvider),
            new PrivNewFilter(filterManager, privacyController, enclavePublicKeyProvider),
            new PrivUninstallFilter(filterManager, privacyController, enclavePublicKeyProvider));

    if (!getPrivacyParameters().isOnchainPrivacyGroupsEnabled()) {
      final Map<String, JsonRpcMethod> OFFCHAIN_METHODS =
          mapOf(
              new PrivCreatePrivacyGroup(privacyController, enclavePublicKeyProvider),
              new PrivDeletePrivacyGroup(privacyController, enclavePublicKeyProvider),
              new PrivFindPrivacyGroup(privacyController, enclavePublicKeyProvider));
      OFFCHAIN_METHODS.forEach(
          (key, jsonRpcMethod) ->
              RPC_METHODS.merge(key, jsonRpcMethod, (oldVal, newVal) -> newVal));
    }
    return RPC_METHODS;
  }

  public  PrivJsonRpcMethods(
      final BlockchainQueries blockchainQueries,
      final ProtocolSchedule protocolSchedule,
      final TransactionPool transactionPool,
      final PrivacyParameters privacyParameters,
      final FilterManager filterManager);

}