diff --git a/build.gradle b/build.gradle
index 46a9d96936..ab86fc152a 100644
--- a/build.gradle
+++ b/build.gradle
@@ -328,19 +328,6 @@ configure(project(':core')) {
exclude(module: 'jackson-annotations')
}
implementation "com.google.protobuf:protobuf-java:$protobufVersion"
- implementation("io.grpc:grpc-protobuf:$grpcVersion") {
- exclude(module: 'guava')
- exclude(module: 'animal-sniffer-annotations')
- }
- implementation("io.grpc:grpc-stub:$grpcVersion") {
- exclude(module: 'guava')
- exclude(module: 'animal-sniffer-annotations')
- }
- compileOnly "javax.annotation:javax.annotation-api:$javaxAnnotationVersion"
- runtimeOnly("io.grpc:grpc-netty-shaded:$grpcVersion") {
- exclude(module: 'guava')
- exclude(module: 'animal-sniffer-annotations')
- }
compileOnly "org.projectlombok:lombok:$lombokVersion"
annotationProcessor "org.projectlombok:lombok:$lombokVersion"
@@ -577,6 +564,10 @@ configure(project(':daemon')) {
exclude(module: 'guava')
exclude(module: 'animal-sniffer-annotations')
}
+ runtimeOnly("io.grpc:grpc-netty-shaded:$grpcVersion") {
+ exclude(module: 'guava')
+ exclude(module: 'animal-sniffer-annotations')
+ }
implementation "org.slf4j:slf4j-api:$slf4jVersion"
implementation "ch.qos.logback:logback-core:$logbackVersion"
implementation "ch.qos.logback:logback-classic:$logbackVersion"
diff --git a/core/src/main/java/bisq/core/grpc/CoreApi.java b/core/src/main/java/bisq/core/api/CoreApi.java
similarity index 98%
rename from core/src/main/java/bisq/core/grpc/CoreApi.java
rename to core/src/main/java/bisq/core/api/CoreApi.java
index 88302a82d2..7041404ce5 100644
--- a/core/src/main/java/bisq/core/grpc/CoreApi.java
+++ b/core/src/main/java/bisq/core/api/CoreApi.java
@@ -15,9 +15,9 @@
* along with Bisq. If not, see .
*/
-package bisq.core.grpc;
+package bisq.core.api;
-import bisq.core.grpc.model.AddressBalanceInfo;
+import bisq.core.api.model.AddressBalanceInfo;
import bisq.core.monetary.Price;
import bisq.core.offer.Offer;
import bisq.core.offer.OfferPayload;
diff --git a/core/src/main/java/bisq/core/grpc/CoreOffersService.java b/core/src/main/java/bisq/core/api/CoreOffersService.java
similarity index 98%
rename from core/src/main/java/bisq/core/grpc/CoreOffersService.java
rename to core/src/main/java/bisq/core/api/CoreOffersService.java
index 35136ec1c5..c5fac7442a 100644
--- a/core/src/main/java/bisq/core/grpc/CoreOffersService.java
+++ b/core/src/main/java/bisq/core/api/CoreOffersService.java
@@ -15,7 +15,7 @@
* along with Bisq. If not, see .
*/
-package bisq.core.grpc;
+package bisq.core.api;
import bisq.core.monetary.Price;
import bisq.core.offer.CreateOfferService;
@@ -40,7 +40,7 @@ import lombok.extern.slf4j.Slf4j;
import static bisq.core.offer.OfferPayload.Direction.BUY;
@Slf4j
-public class CoreOffersService {
+class CoreOffersService {
private final CreateOfferService createOfferService;
private final OfferBookService offerBookService;
diff --git a/core/src/main/java/bisq/core/grpc/CorePaymentAccountsService.java b/core/src/main/java/bisq/core/api/CorePaymentAccountsService.java
similarity index 97%
rename from core/src/main/java/bisq/core/grpc/CorePaymentAccountsService.java
rename to core/src/main/java/bisq/core/api/CorePaymentAccountsService.java
index 9a7183d21a..f40c56c20d 100644
--- a/core/src/main/java/bisq/core/grpc/CorePaymentAccountsService.java
+++ b/core/src/main/java/bisq/core/api/CorePaymentAccountsService.java
@@ -15,7 +15,7 @@
* along with Bisq. If not, see .
*/
-package bisq.core.grpc;
+package bisq.core.api;
import bisq.core.account.witness.AccountAgeWitnessService;
import bisq.core.locale.FiatCurrency;
@@ -34,7 +34,7 @@ import java.util.Set;
import lombok.extern.slf4j.Slf4j;
@Slf4j
-public class CorePaymentAccountsService {
+class CorePaymentAccountsService {
private final Config config;
private final AccountAgeWitnessService accountAgeWitnessService;
diff --git a/core/src/main/java/bisq/core/grpc/CoreWalletsService.java b/core/src/main/java/bisq/core/api/CoreWalletsService.java
similarity index 99%
rename from core/src/main/java/bisq/core/grpc/CoreWalletsService.java
rename to core/src/main/java/bisq/core/api/CoreWalletsService.java
index 1d3719558b..10feea5b8e 100644
--- a/core/src/main/java/bisq/core/grpc/CoreWalletsService.java
+++ b/core/src/main/java/bisq/core/api/CoreWalletsService.java
@@ -15,13 +15,13 @@
* along with Bisq. If not, see .
*/
-package bisq.core.grpc;
+package bisq.core.api;
+import bisq.core.api.model.AddressBalanceInfo;
import bisq.core.btc.Balances;
import bisq.core.btc.model.AddressEntry;
import bisq.core.btc.wallet.BtcWalletService;
import bisq.core.btc.wallet.WalletsManager;
-import bisq.core.grpc.model.AddressBalanceInfo;
import org.bitcoinj.core.Address;
import org.bitcoinj.core.TransactionConfidence;
diff --git a/core/src/main/java/bisq/core/grpc/model/AddressBalanceInfo.java b/core/src/main/java/bisq/core/api/model/AddressBalanceInfo.java
similarity index 98%
rename from core/src/main/java/bisq/core/grpc/model/AddressBalanceInfo.java
rename to core/src/main/java/bisq/core/api/model/AddressBalanceInfo.java
index dd9ed19f90..a9da82a917 100644
--- a/core/src/main/java/bisq/core/grpc/model/AddressBalanceInfo.java
+++ b/core/src/main/java/bisq/core/api/model/AddressBalanceInfo.java
@@ -15,7 +15,7 @@
* along with Bisq. If not, see .
*/
-package bisq.core.grpc.model;
+package bisq.core.api.model;
import bisq.common.Payload;
diff --git a/core/src/main/java/bisq/core/grpc/model/OfferInfo.java b/core/src/main/java/bisq/core/api/model/OfferInfo.java
similarity index 99%
rename from core/src/main/java/bisq/core/grpc/model/OfferInfo.java
rename to core/src/main/java/bisq/core/api/model/OfferInfo.java
index 0b2dc5fe0c..fa6f0c95ea 100644
--- a/core/src/main/java/bisq/core/grpc/model/OfferInfo.java
+++ b/core/src/main/java/bisq/core/api/model/OfferInfo.java
@@ -15,7 +15,7 @@
* along with Bisq. If not, see .
*/
-package bisq.core.grpc.model;
+package bisq.core.api.model;
import bisq.common.Payload;
diff --git a/daemon/src/main/java/bisq/daemon/app/BisqDaemonMain.java b/daemon/src/main/java/bisq/daemon/app/BisqDaemonMain.java
index 64b5bcfc33..f7a5dac3d6 100644
--- a/daemon/src/main/java/bisq/daemon/app/BisqDaemonMain.java
+++ b/daemon/src/main/java/bisq/daemon/app/BisqDaemonMain.java
@@ -20,7 +20,6 @@ package bisq.daemon.app;
import bisq.core.app.BisqHeadlessAppMain;
import bisq.core.app.BisqSetup;
import bisq.core.app.CoreModule;
-import bisq.core.grpc.GrpcServer;
import bisq.common.UserThread;
import bisq.common.app.AppModule;
@@ -33,10 +32,14 @@ import java.util.concurrent.ThreadFactory;
import lombok.extern.slf4j.Slf4j;
+
+
+import bisq.daemon.grpc.GrpcServer;
+
@Slf4j
public class BisqDaemonMain extends BisqHeadlessAppMain implements BisqSetup.BisqSetupListener {
- public static void main(String[] args) {
+ public static void main(String[] args) {
new BisqDaemonMain().execute(args);
}
@@ -67,7 +70,6 @@ public class BisqDaemonMain extends BisqHeadlessAppMain implements BisqSetup.Bis
headlessApp.setGracefulShutDownHandler(this);
}
-
///////////////////////////////////////////////////////////////////////////////////////////
// We continue with a series of synchronous execution tasks
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/core/src/main/java/bisq/core/grpc/GrpcOffersService.java b/daemon/src/main/java/bisq/daemon/grpc/GrpcOffersService.java
similarity index 97%
rename from core/src/main/java/bisq/core/grpc/GrpcOffersService.java
rename to daemon/src/main/java/bisq/daemon/grpc/GrpcOffersService.java
index c0f90a8abb..8a3fa548d9 100644
--- a/core/src/main/java/bisq/core/grpc/GrpcOffersService.java
+++ b/daemon/src/main/java/bisq/daemon/grpc/GrpcOffersService.java
@@ -15,9 +15,10 @@
* along with Bisq. If not, see .
*/
-package bisq.core.grpc;
+package bisq.daemon.grpc;
-import bisq.core.grpc.model.OfferInfo;
+import bisq.core.api.CoreApi;
+import bisq.core.api.model.OfferInfo;
import bisq.core.trade.handlers.TransactionResultHandler;
import bisq.proto.grpc.CreateOfferReply;
diff --git a/core/src/main/java/bisq/core/grpc/GrpcPaymentAccountsService.java b/daemon/src/main/java/bisq/daemon/grpc/GrpcPaymentAccountsService.java
similarity index 93%
rename from core/src/main/java/bisq/core/grpc/GrpcPaymentAccountsService.java
rename to daemon/src/main/java/bisq/daemon/grpc/GrpcPaymentAccountsService.java
index 8388b85e3b..e630b30fc5 100644
--- a/core/src/main/java/bisq/core/grpc/GrpcPaymentAccountsService.java
+++ b/daemon/src/main/java/bisq/daemon/grpc/GrpcPaymentAccountsService.java
@@ -15,8 +15,9 @@
* along with Bisq. If not, see .
*/
-package bisq.core.grpc;
+package bisq.daemon.grpc;
+import bisq.core.api.CoreApi;
import bisq.core.payment.PaymentAccount;
import bisq.proto.grpc.CreatePaymentAccountReply;
@@ -32,7 +33,7 @@ import javax.inject.Inject;
import java.util.stream.Collectors;
-public class GrpcPaymentAccountsService extends PaymentAccountsGrpc.PaymentAccountsImplBase {
+class GrpcPaymentAccountsService extends PaymentAccountsGrpc.PaymentAccountsImplBase {
private final CoreApi coreApi;
diff --git a/core/src/main/java/bisq/core/grpc/GrpcServer.java b/daemon/src/main/java/bisq/daemon/grpc/GrpcServer.java
similarity index 98%
rename from core/src/main/java/bisq/core/grpc/GrpcServer.java
rename to daemon/src/main/java/bisq/daemon/grpc/GrpcServer.java
index 4b5d195a2e..a1293dfa0a 100644
--- a/core/src/main/java/bisq/core/grpc/GrpcServer.java
+++ b/daemon/src/main/java/bisq/daemon/grpc/GrpcServer.java
@@ -15,8 +15,9 @@
* along with Bisq. If not, see .
*/
-package bisq.core.grpc;
+package bisq.daemon.grpc;
+import bisq.core.api.CoreApi;
import bisq.core.trade.statistics.TradeStatistics2;
import bisq.common.config.Config;
diff --git a/core/src/main/java/bisq/core/grpc/GrpcWalletsService.java b/daemon/src/main/java/bisq/daemon/grpc/GrpcWalletsService.java
similarity index 98%
rename from core/src/main/java/bisq/core/grpc/GrpcWalletsService.java
rename to daemon/src/main/java/bisq/daemon/grpc/GrpcWalletsService.java
index f57cb69afb..04dd346023 100644
--- a/core/src/main/java/bisq/core/grpc/GrpcWalletsService.java
+++ b/daemon/src/main/java/bisq/daemon/grpc/GrpcWalletsService.java
@@ -15,9 +15,10 @@
* along with Bisq. If not, see .
*/
-package bisq.core.grpc;
+package bisq.daemon.grpc;
-import bisq.core.grpc.model.AddressBalanceInfo;
+import bisq.core.api.CoreApi;
+import bisq.core.api.model.AddressBalanceInfo;
import bisq.proto.grpc.GetAddressBalanceReply;
import bisq.proto.grpc.GetAddressBalanceRequest;
diff --git a/core/src/main/java/bisq/core/grpc/PasswordAuthInterceptor.java b/daemon/src/main/java/bisq/daemon/grpc/PasswordAuthInterceptor.java
similarity index 98%
rename from core/src/main/java/bisq/core/grpc/PasswordAuthInterceptor.java
rename to daemon/src/main/java/bisq/daemon/grpc/PasswordAuthInterceptor.java
index 291c09c594..7798857dd2 100644
--- a/core/src/main/java/bisq/core/grpc/PasswordAuthInterceptor.java
+++ b/daemon/src/main/java/bisq/daemon/grpc/PasswordAuthInterceptor.java
@@ -15,7 +15,7 @@
* along with Bisq. If not, see .
*/
-package bisq.core.grpc;
+package bisq.daemon.grpc;
import io.grpc.Metadata;
import io.grpc.ServerCall;