diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index e4caba0c..85814d04 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -67,21 +67,23 @@ jobs:
xcodebuild -version
# sudo xcode-select -s /Applications/Xcode_15.0.app
+# TODO: restore androidNode once dependant bisq2 jars get published in a public maven repo
- name: Build project
working-directory: ./bisqapps
- run: ./gradlew clean build --info
+ run: ./gradlew clean build -x androidNode:build --info
- name: Run all project tests
working-directory: ./bisqapps
- run: ./gradlew test
+ run: ./gradlew test -x androidNode:test
- name: Run androidClient Tests
working-directory: ./bisqapps
run: ./gradlew androidClient:testDebugUnitTest androidClient:connectedDebugAndroidTest
- - name: Run androidNode Tests
- working-directory: ./bisqapps
- run: ./gradlew androidNode:testDebugUnitTest androidNode:connectedDebugAndroidTest
+# TODO: restore androidNode once dependant bisq2 jars get published in a public maven repo
+# - name: Run androidNode Tests
+# working-directory: ./bisqapps
+# run: ./gradlew androidNode:testDebugUnitTest androidNode:connectedDebugAndroidTest
# TODO ios specific and run on emulator if needed
- name: Run iOS Tests
diff --git a/bisqapps/androidNode/build.gradle.kts b/bisqapps/androidNode/build.gradle.kts
index 446fe171..05145f22 100644
--- a/bisqapps/androidNode/build.gradle.kts
+++ b/bisqapps/androidNode/build.gradle.kts
@@ -1,11 +1,13 @@
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
+import com.google.protobuf.gradle.*
plugins {
alias(libs.plugins.kotlinMultiplatform)
alias(libs.plugins.androidApplication)
alias(libs.plugins.jetbrainsCompose)
alias(libs.plugins.compose.compiler)
+ alias(libs.plugins.protobuf)
}
version = project.findProperty("node.android.version") as String
@@ -24,6 +26,17 @@ kotlin {
implementation(compose.preview)
implementation(libs.androidx.activity.compose)
}
+ val androidMain by getting {
+ androidMain.dependencies {
+ implementation(compose.preview)
+ implementation(libs.androidx.activity.compose)
+ }
+ kotlin.srcDirs(
+ "src/androidMain/kotlin",
+ "${layout.buildDirectory}/generated/source/proto/debug/java",
+ "${layout.buildDirectory}/generated/source/proto/release/java"
+ )
+ }
}
}
@@ -31,6 +44,19 @@ android {
namespace = "network.bisq.mobile.node"
compileSdk = libs.versions.android.compileSdk.get().toInt()
+ sourceSets {
+ getByName("main") {
+ proto {
+ srcDir("src/androidMain/proto")
+ }
+ java.srcDirs(
+ "src/layout.buildDirectory/kotlin",
+ "${layout.buildDirectory}/generated/source/proto/debug/java",
+ "${layout.buildDirectory}/generated/source/proto/release/java"
+ )
+ }
+ }
+
defaultConfig {
applicationId = "network.bisq.mobile.node"
minSdk = libs.versions.android.node.minSdk.get().toInt()
@@ -40,9 +66,20 @@ android {
buildConfigField("String", "APP_VERSION", "\"${version}\"")
buildConfigField("String", "SHARED_VERSION", "\"${sharedVersion}\"")
}
+
+ // We don't want to use the protobuf coming in bisq2 core dependencies as we use protobuf-lite for mobile
+ configurations.all {
+ exclude(group = "com.google.protobuf", module = "protobuf-java")
+ }
+
packaging {
resources {
excludes += "/META-INF/{AL2.0,LGPL2.1}"
+ // the following exclude are needed to avoid protobuf hanging build when merging release resources for java
+ // Exclude the conflicting META-INF files
+ excludes.add("META-INF/versions/9/OSGI-INF/MANIFEST.MF")
+ excludes.add("META-INF/DEPENDENCIES")
+ pickFirsts.add("**/protobuf/**/*.class")
}
}
buildTypes {
@@ -59,9 +96,61 @@ android {
}
}
+protobuf {
+ protoc {
+ artifact = "com.google.protobuf:protoc:4.28.2"
+ }
+ plugins {
+ create("javalite") {
+ artifact = "com.google.protobuf:protoc-gen-javalite:3.0.0"
+ }
+ }
+ generateProtoTasks {
+ all().forEach { task ->
+ task.builtins {
+ create("java") {
+ option("lite")
+ }
+ }
+ }
+ }
+}
dependencies {
implementation(project(":shared:presentation"))
implementation(project(":shared:domain"))
debugImplementation(compose.uiTooling)
-}
+ // bisq2 core dependencies
+ implementation(libs.bisq.core.common) {
+ exclude(group = "com.google.protobuf", module = "protobuf-java")
+ }
+ implementation(libs.bisq.core.i18n)
+ implementation(libs.bisq.core.persistence)
+ implementation(libs.bisq.core.security)
+ // # bisq:core:network#
+ implementation(libs.bisq.core.network.network)
+ implementation(libs.bisq.core.network.network.identity)
+ implementation(libs.bisq.core.network.socks5.socket.channel)
+ implementation(libs.bisq.core.network.i2p)
+ implementation(libs.chimp.jsocks)
+ implementation(libs.failsafe)
+ implementation(libs.apache.httpcomponents.httpclient)
+ // ##### network ######
+ implementation(libs.bisq.core.identity)
+ implementation(libs.bisq.core.account)
+ implementation(libs.bisq.core.settings)
+ implementation(libs.bisq.core.bonded.roles)
+ implementation(libs.bisq.core.user)
+ implementation(libs.bisq.core.contract)
+ implementation(libs.bisq.core.offer)
+ implementation(libs.bisq.core.trade)
+ implementation(libs.bisq.core.support)
+ implementation(libs.bisq.core.application)
+ implementation(libs.bisq.core.chat)
+ implementation(libs.bisq.core.presentation)
+
+ // protobuf
+ implementation(libs.protobuf.lite)
+ implementation(libs.protobuf.gradle.plugin)
+ implementation(libs.protoc)
+}
\ No newline at end of file
diff --git a/bisqapps/androidNode/src/androidMain/proto/account.proto b/bisqapps/androidNode/src/androidMain/proto/account.proto
new file mode 100644
index 00000000..fd734be4
--- /dev/null
+++ b/bisqapps/androidNode/src/androidMain/proto/account.proto
@@ -0,0 +1,303 @@
+/*
+ * This file is part of Bisq.
+ *
+ * Bisq is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or (at
+ * your option) any later version.
+ *
+ * Bisq is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with Bisq. If not, see .
+ */
+
+syntax = "proto3";
+
+package account;
+option java_package = "bisq.mobile.account.protobuf";
+option java_multiple_files = true;
+
+import "common.proto";
+
+// ProtocolType
+enum TradeProtocolType {
+ TRADEPROTOCOLTYPE_UNSPECIFIED = 0;
+ TRADEPROTOCOLTYPE_BISQ_EASY = 1;
+ TRADEPROTOCOLTYPE_BISQ_MU_SIG = 2;
+ TRADEPROTOCOLTYPE_SUBMARINE = 3;
+ TRADEPROTOCOLTYPE_LIQUID_MU_SIG = 4;
+ TRADEPROTOCOLTYPE_BISQ_LIGHTNING = 5;
+ TRADEPROTOCOLTYPE_LIQUID_SWAP = 6;
+ TRADEPROTOCOLTYPE_BSQ_SWAP = 7;
+ TRADEPROTOCOLTYPE_LIGHTNING_ESCROW = 8;
+ TRADEPROTOCOLTYPE_MONERO_SWAP = 9;
+}
+enum LoanProtocolType {
+ LOANPROTOCOLTYPE_UNSPECIFIED = 0;
+ LOANPROTOCOLTYPE_COLLATERALIZED = 1;
+ LOANPROTOCOLTYPE_REPUTATION = 2;
+}
+message ProtocolType {
+ oneof message {
+ TradeProtocolType tradeProtocolType = 10;
+ LoanProtocolType loanProtocolType = 11;
+ }
+}
+
+// PaymentMethod
+message PaymentMethod {
+ string name = 1;
+ oneof message {
+ FiatPaymentMethod fiatPaymentMethod = 10;
+ BitcoinPaymentMethod bitcoinPaymentMethod = 11;
+ CryptoPaymentMethod cryptoPaymentMethod = 12;
+ }
+}
+message FiatPaymentMethod {
+}
+message BitcoinPaymentMethod {
+}
+message CryptoPaymentMethod {
+ string currencyCode = 1;
+}
+
+// AccountPayload
+message AccountPayload {
+ string id = 1;
+ string paymentMethodName = 2;
+ oneof message {
+ ZelleAccountPayload zelleAccountPayload = 19;
+ UserDefinedFiatAccountPayload userDefinedFiatAccountPayload = 20;
+ RevolutAccountPayload RevolutAccountPayload = 21;
+ CountryBasedAccountPayload countryBasedAccountPayload = 22;
+ FasterPaymentsAccountPayload fasterPaymentsAccountPayload = 23;
+ PayIDAccountPayload payIDAccountPayload = 24;
+ USPostalMoneyOrderAccountPayload usPostalMoneyOrderAccountPayload = 25;
+ CashByMailAccountPayload cashByMailAccountPayload = 26;
+ InteracETransferAccountPayload interacETransferAccountPayload = 27;
+ CashAppAccountPayload cashAppAccountPayload = 28;
+ }
+}
+message UserDefinedFiatAccountPayload {
+ string accountData = 2;
+}
+message RevolutAccountPayload {
+ string email = 2;
+}
+message CountryBasedAccountPayload {
+ string countryCode = 1;
+ oneof message {
+ BankAccountPayload bankAccountPayload = 2;
+ SepaAccountPayload sepaAccountPayload = 10;
+ F2FAccountPayload f2fAccountPayload = 11;
+ PixAccountPayload pixAccountPayload = 12;
+ StrikeAccountPayload strikeAccountPayload = 13;
+ AmazonGiftCardAccountPayload amazonGiftCardAccountPayload = 14;
+ UpiAccountPayload upiAccountPayload = 15;
+ BizumAccountPayload bizumAccountPayload = 16;
+ }
+}
+message SepaAccountPayload {
+ string holderName = 1;
+ string iban = 2;
+ string bic = 3;
+
+}
+
+message F2FAccountPayload {
+ string contact = 1;
+ string city = 2;
+ string extra_info = 3;
+}
+
+message AchTransferAccountPayload {
+ string holder_address = 1;
+}
+
+message NationalBankAccountPayload {
+}
+
+message BankAccountPayload {
+ string holder_name = 1;
+ string bank_name = 2;
+ string bank_id = 3;
+ string branch_id = 4;
+ string account_nr = 5;
+ string account_type = 6;
+ string holder_tax_id = 7;
+ string national_account_id = 12;
+ oneof message {
+ AchTransferAccountPayload achTransferAccountPayload = 13;
+ NationalBankAccountPayload nationalBankAccountPayload = 14;
+ CashDepositAccountPayload cashDepositAccountPayload = 15;
+ }
+}
+
+message ZelleAccountPayload {
+ string holderName = 1;
+ string emailOrMobileNr = 2;
+}
+
+message PixAccountPayload {
+ string pix_key = 1;
+}
+
+message FasterPaymentsAccountPayload {
+ string sort_code = 1;
+ string account_nr = 2;
+}
+
+message PayIDAccountPayload {
+ string bank_account_name = 1;
+ string pay_id = 2;
+}
+
+message USPostalMoneyOrderAccountPayload {
+ string postal_address = 1;
+ string holder_name = 2;
+}
+
+message CashByMailAccountPayload {
+ string postal_address = 1;
+ string contact = 2;
+ string extra_info = 3;
+}
+
+message StrikeAccountPayload {
+ string holderName = 1;
+}
+
+message InteracETransferAccountPayload {
+ string email = 1;
+ string holder_name = 2;
+ string question = 3;
+ string answer = 4;
+}
+
+message AmazonGiftCardAccountPayload {
+ string email_or_mobile_nr = 1;
+}
+
+message CashDepositAccountPayload {
+ string requirements = 1;
+}
+
+message UpiAccountPayload {
+ string virtual_payment_address = 1;
+}
+
+message BizumAccountPayload {
+ string mobileNr = 1;
+}
+
+message CashAppAccountPayload {
+ string cashTag = 1;
+}
+
+// Account
+message Account {
+ sint64 creationDate = 1;
+ string accountName = 2;
+ AccountPayload accountPayload = 3;
+ PaymentMethod paymentMethod = 4;
+ common.TradeCurrency selectedTradeCurrency = 6;
+
+ oneof message {
+ ZelleAccount zelleAccount = 19;
+ UserDefinedFiatAccount userDefinedFiatAccount = 20;
+ RevolutAccount revolutAccount = 21;
+ CountryBasedAccount countryBasedAccount = 22;
+ FasterPaymentsAccount fasterPaymentsAccount = 23;
+ PayIDAccount payIDAccount = 24;
+ USPostalMoneyOrderAccount usPostalMoneyOrderAccount = 25;
+ CashByMailAccount cashByMailAccount = 26;
+ InteracETransferAccount interacETransferAccount = 27;
+ CashAppAccount cashAppAccount = 28;
+ }
+}
+
+message UserDefinedFiatAccount {
+}
+message RevolutAccount {
+}
+message CountryBasedAccount {
+ common.Country country = 1;
+ oneof message {
+ BankAccount bankAccount = 19;
+ SepaAccount sepaAccount = 20;
+ F2FAccount f2fAccount = 21;
+ PixAccount pixAccount = 22;
+ StrikeAccount strikeAccount = 23;
+ AmazonGiftCardAccount amazonGiftCardAccount = 24;
+ UpiAccount upiAccount = 25;
+ BizumAccount bizumAccount = 26;
+ }
+}
+message SepaAccount {
+}
+
+message F2FAccount {
+}
+
+message BankAccount {
+ oneof message {
+ AchTransferAccount achTransferAccount = 1;
+ NationalBankAccount nationalBankAccount = 2;
+ CashDepositAccount cashDepositAccount = 3;
+ }
+}
+
+message AchTransferAccount {
+}
+
+message ZelleAccount {
+}
+
+message NationalBankAccount {
+}
+
+message PixAccount {
+}
+
+message FasterPaymentsAccount {
+}
+
+message PayIDAccount {
+}
+
+message USPostalMoneyOrderAccount {
+}
+
+message CashByMailAccount {
+}
+
+message StrikeAccount {
+}
+
+message InteracETransferAccount {
+}
+
+message AmazonGiftCardAccount {
+}
+
+message CashDepositAccount {
+}
+
+message UpiAccount {
+}
+
+message BizumAccount {
+}
+
+message CashAppAccount {
+}
+
+message AccountStore {
+ map accountByName = 1;
+ optional Account selectedAccount = 2;
+}
+
diff --git a/bisqapps/androidNode/src/androidMain/proto/bonded_roles.proto b/bisqapps/androidNode/src/androidMain/proto/bonded_roles.proto
new file mode 100644
index 00000000..6b68a36f
--- /dev/null
+++ b/bisqapps/androidNode/src/androidMain/proto/bonded_roles.proto
@@ -0,0 +1,131 @@
+syntax = "proto3";
+package bonded_roles;
+option java_package = "bisq.mobile.bonded_roles.protobuf";
+option java_multiple_files = true;
+import "common.proto";
+import "network_identity.proto";
+
+enum BondedRoleType {
+ BONDEDROLETYPE_UNSPECIFIED = 0;
+ BONDEDROLETYPE_MEDIATOR = 1;
+ BONDEDROLETYPE_ARBITRATOR = 2;
+ BONDEDROLETYPE_MODERATOR = 3;
+ BONDEDROLETYPE_SECURITY_MANAGER = 4;
+ BONDEDROLETYPE_RELEASE_MANAGER = 5;
+ BONDEDROLETYPE_SEED_NODE = 10;
+ BONDEDROLETYPE_ORACLE_NODE = 11;
+ BONDEDROLETYPE_EXPLORER_NODE = 12;
+ BONDEDROLETYPE_MARKET_PRICE_NODE = 13;
+}
+message AuthorizedOracleNode {
+ network.identity.NetworkId networkId = 1;
+ string profileId = 2;
+ string authorizedPublicKey = 3;
+ string bondUserName = 4;
+ string signatureBase64 = 5;
+ bool staticPublicKeysProvided = 6;
+ sint32 version = 7;
+}
+
+message BondedRoleRegistrationRequest {
+ string profileId = 1;
+ string authorizedPublicKey = 2;
+ BondedRoleType bondedRoleType = 3;
+ string bondUserName = 4;
+ string signatureBase64 = 5;
+ optional common.AddressByTransportTypeMap addressByTransportTypeMap = 6;
+ network.identity.NetworkId networkId = 7;
+ bool isCancellationRequest = 8;
+}
+
+message AuthorizedBondedRole {
+ string profileId = 1;
+ string authorizedPublicKey = 2;
+ BondedRoleType bondedRoleType = 3;
+ string bondUserName = 4;
+ string signatureBase64 = 5;
+ optional common.AddressByTransportTypeMap addressByTransportTypeMap = 6;
+ network.identity.NetworkId networkId = 7;
+ optional AuthorizedOracleNode authorizingOracleNode = 8;
+ bool staticPublicKeysProvided = 9;
+ sint32 version = 10;
+}
+
+enum AlertType {
+ ALERTTYPE_UNSPECIFIED = 0;
+ ALERTTYPE_INFO = 1;
+ ALERTTYPE_WARN = 2;
+ ALERTTYPE_EMERGENCY = 3;
+ ALERTTYPE_BAN = 4;
+}
+
+message AuthorizedAlertData {
+ string id = 1;
+ sint64 date = 2;
+ AlertType alertType = 3;
+ optional string message = 4;
+ bool haltTrading = 5;
+ bool requireVersionForTrading = 6;
+ optional string minVersion = 7;
+ optional AuthorizedBondedRole bannedRole = 8;
+ string securityManagerProfileId = 9;
+ bool staticPublicKeysProvided = 10;
+ optional string headline = 11;
+ sint32 version = 12;
+}
+
+message ReleaseNotification {
+ string id = 1;
+ sint64 date = 2;
+ bool isPreRelease = 3;
+ bool isLauncherUpdate = 4;
+ string releaseNotes = 5;
+ string versionString = 6;
+ string releaseManagerProfileId = 7;
+ bool staticPublicKeysProvided = 8;
+ sint32 version = 9;
+}
+
+message AuthorizedDifficultyAdjustmentData {
+ sint64 date = 1;
+ double difficultyAdjustmentFactor = 2;
+ string securityManagerProfileId = 3;
+ bool staticPublicKeysProvided = 4;
+ sint32 version = 5;
+}
+
+// Not used anymore since 2.1.1
+message AuthorizedMinRequiredReputationScoreData {
+ option deprecated = true;
+ sint64 date = 1;
+ sint64 minRequiredReputationScore = 2;
+ string securityManagerProfileId = 3;
+ bool staticPublicKeysProvided = 4;
+ sint32 version = 5;
+}
+
+enum MarketPriceProvider {
+ MARKETPRICEPROVIDER_UNSPECIFIED = 0;
+ MARKETPRICEPROVIDER_BISQAGGREGATE = 1;
+ MARKETPRICEPROVIDER_COINGECKO = 2;
+ MARKETPRICEPROVIDER_POLO = 3;
+ MARKETPRICEPROVIDER_BITFINEX = 4;
+ MARKETPRICEPROVIDER_OTHER = 5;
+}
+
+message MarketPrice {
+ common.PriceQuote priceQuote = 1;
+ sint64 timestamp = 2;
+ MarketPriceProvider marketPriceProvider = 3;
+}
+
+message AuthorizedMarketPriceData {
+ map marketPriceByCurrencyMap = 1;
+ bool staticPublicKeysProvided = 2;
+ sint32 version = 3;
+}
+
+message MarketPriceStore {
+ map marketPriceByCurrencyMap = 1;
+ common.Market selectedMarket = 2;
+}
diff --git a/bisqapps/androidNode/src/androidMain/proto/chat.proto b/bisqapps/androidNode/src/androidMain/proto/chat.proto
new file mode 100644
index 00000000..c687e037
--- /dev/null
+++ b/bisqapps/androidNode/src/androidMain/proto/chat.proto
@@ -0,0 +1,211 @@
+/*
+ * This file is part of Bisq.
+ *
+ * Bisq is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or (at
+ * your option) any later version.
+ *
+ * Bisq is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with Bisq. If not, see .
+ */
+
+syntax = "proto3";
+
+package chat;
+option java_package = "bisq.mobile.chat.protobuf";
+option java_multiple_files = true;
+import "common.proto";
+import "network_identity.proto";
+import "security.proto";
+import "offer.proto";
+import "user.proto";
+
+enum ChatMessageType {
+ CHATMESSAGETYPE_UNSPECIFIED = 0;
+ CHATMESSAGETYPE_TEXT = 1;
+ CHATMESSAGETYPE_LEAVE = 2;
+ CHATMESSAGETYPE_TAKE_BISQ_EASY_OFFER = 3;
+ CHATMESSAGETYPE_PROTOCOL_LOG_MESSAGE = 4;
+}
+
+enum ChatChannelNotificationType {
+ CHATCHANNELNOTIFICATIONTYPE_UNSPECIFIED = 0;
+ CHATCHANNELNOTIFICATIONTYPE_GLOBAL_DEFAULT = 1;
+ CHATCHANNELNOTIFICATIONTYPE_ALL = 2;
+ CHATCHANNELNOTIFICATIONTYPE_MENTION = 3;
+ CHATCHANNELNOTIFICATIONTYPE_OFF = 4;
+}
+
+enum ChatChannelDomain {
+ CHATCHANNELDOMAIN_UNSPECIFIED = 0;
+ CHATCHANNELDOMAIN_BISQ_EASY_OFFERBOOK = 1;
+ CHATCHANNELDOMAIN_BISQ_EASY_OPEN_TRADES = 2;
+ CHATCHANNELDOMAIN_BISQ_EASY_PRIVATE_CHAT = 3 [deprecated = true]; // Dropped in 2.1.1, all messages will fall back on domain DISCUSSION,
+ CHATCHANNELDOMAIN_DISCUSSION = 4;
+ CHATCHANNELDOMAIN_EVENTS = 5 [deprecated = true]; // Dropped in 2.1.1, all messages will fall back on domain DISCUSSION
+ CHATCHANNELDOMAIN_SUPPORT = 6;
+}
+
+message Citation {
+ string authorUserProfileId = 1;
+ string text = 2;
+}
+
+message ChatMessage {
+ string id = 1;
+ ChatChannelDomain chatChannelDomain = 2;
+ string channelId = 3;
+ optional string text = 4;
+ string authorUserProfileId = 5;
+ optional Citation citation = 6;
+ sint64 date = 7;
+ bool wasEdited = 8;
+ ChatMessageType chatMessageType = 9;
+ oneof message {
+ TwoPartyPrivateChatMessage twoPartyPrivateChatMessage = 20;
+ CommonPublicChatMessage commonPublicChatMessage = 21;
+ BisqEasyOpenTradeMessage bisqEasyOpenTradeMessage = 22;
+ BisqEasyOfferbookMessage bisqEasyOfferbookMessage = 23;
+ }
+}
+
+message ChatChannel {
+ string id = 1;
+ ChatChannelDomain chatChannelDomain = 2;
+ ChatChannelNotificationType chatChannelNotificationType = 3;
+ oneof message{
+ TwoPartyPrivateChatChannel twoPartyPrivateChatChannel = 10;
+ CommonPublicChatChannel commonPublicChatChannel = 11;
+ BisqEasyOpenTradeChannel bisqEasyOpenTradeChannel = 12;
+ BisqEasyOfferbookChannel bisqEasyOfferbookChannel = 13;
+ }
+}
+
+// TwoPartyPrivateChat
+message TwoPartyPrivateChatMessage {
+ string receiverUserProfileId = 1;
+ user.UserProfile sender = 2;
+ network.identity.NetworkId receiverNetworkId = 3;
+ repeated ChatMessageReaction chatMessageReactions = 4;
+}
+message TwoPartyPrivateChatChannel {
+ user.UserIdentity myUserIdentity = 1;
+ user.UserProfile peer = 2;
+ repeated ChatMessage chatMessages = 3;
+}
+message TwoPartyPrivateChatChannelStore {
+ repeated ChatChannel channels = 1;
+}
+
+// CommonPublicChat
+message CommonPublicChatMessage {
+}
+
+message CommonPublicChatChannel {
+ string channelTitle = 1;
+ optional string channelAdminId = 2;
+ repeated string channelModeratorIds = 3;
+ bool isVisible = 4;
+}
+message CommonPublicChatChannelStore {
+ repeated ChatChannel channels = 1;
+}
+
+// BisqEasy
+message BisqEasyOpenTradeMessage {
+ string tradeId = 1;
+ string receiverUserProfileId = 2;
+ network.identity.NetworkId receiverNetworkId = 3;
+ user.UserProfile sender = 4;
+ optional user.UserProfile mediator = 5;
+ optional offer.Offer bisqEasyOffer = 6;
+ repeated ChatMessageReaction chatMessageReactions = 7;
+}
+message BisqEasyOpenTradeChannel {
+ string tradeId = 1;
+ offer.Offer bisqEasyOffer = 2;
+ user.UserIdentity myUserIdentity = 3;
+ repeated user.UserProfile traders = 4;
+ optional user.UserProfile mediator = 5;
+ repeated ChatMessage chatMessages = 6;
+ bool isInMediation = 7;
+}
+message BisqEasyOpenTradeChannelStore {
+ repeated ChatChannel channels = 1;
+}
+
+message BisqEasyOfferbookMessage {
+ optional offer.Offer bisqEasyOffer = 1;
+}
+message BisqEasyOfferbookChannel {
+ common.Market market = 1;
+}
+message BisqEasyOfferbookChannelStore {
+ repeated ChatChannel channels = 1;
+}
+
+// ChatChannelSelection
+message ChatChannelSelectionStore {
+ optional string selectedChannelId = 1;
+}
+
+message ChatNotification {
+ string id = 1;
+ string title = 2;
+ string message = 3;
+ sint64 date = 4;
+ string chatChannelId = 5;
+ ChatChannelDomain chatChannelDomain = 6;
+ string chatMessageId = 7;
+ optional string tradeId = 8;
+ optional user.UserProfile senderUserProfile = 9;
+ optional user.UserProfile mediator = 10;
+ bool isConsumed = 11;
+}
+
+message ChatNotificationsStore {
+ repeated ChatNotification chatNotifications = 1;
+}
+
+// Reactions
+message ChatMessageReaction {
+ string id = 1;
+ string userProfileId = 2;
+ string chatChannelId = 3;
+ ChatChannelDomain chatChannelDomain = 4;
+ string chatMessageId = 5;
+ sint32 reactionId = 6;
+ sint64 date = 8;
+ oneof message {
+ CommonPublicChatMessageReaction commonPublicChatMessageReaction = 20;
+ BisqEasyOfferbookMessageReaction bisqEasyOfferbookMessageReaction = 21;
+ TwoPartyPrivateChatMessageReaction twoPartyPrivateChatMessageReaction = 22;
+ BisqEasyOpenTradeMessageReaction bisqEasyOpenTradeMessageReaction = 23;
+ }
+}
+
+message CommonPublicChatMessageReaction {
+}
+
+message BisqEasyOfferbookMessageReaction {
+}
+
+message TwoPartyPrivateChatMessageReaction {
+ string receiverUserProfileId = 1;
+ user.UserProfile sender = 2;
+ network.identity.NetworkId receiverNetworkId = 3;
+ bool isRemoved = 4;
+}
+
+message BisqEasyOpenTradeMessageReaction {
+ string receiverUserProfileId = 1;
+ user.UserProfile sender = 2;
+ network.identity.NetworkId receiverNetworkId = 3;
+ bool isRemoved = 4;
+}
diff --git a/bisqapps/androidNode/src/androidMain/proto/common.proto b/bisqapps/androidNode/src/androidMain/proto/common.proto
new file mode 100644
index 00000000..694ffd94
--- /dev/null
+++ b/bisqapps/androidNode/src/androidMain/proto/common.proto
@@ -0,0 +1,103 @@
+/*
+ * This file is part of Bisq.
+ *
+ * Bisq is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or (at
+ * your option) any later version.
+ *
+ * Bisq is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with Bisq. If not, see .
+ */
+
+syntax = "proto3";
+
+package common;
+option java_package = "bisq.mobile.common.protobuf";
+option java_multiple_files = true;
+
+message ByteArray {
+ bytes bytes = 1;
+}
+
+message Country {
+ string code = 1;
+ string name = 2;
+ Region region = 3;
+}
+
+message Region {
+ string code = 1;
+ string name = 2;
+}
+
+message CryptoCurrency {
+}
+
+message FiatCurrency {
+}
+
+message TradeCurrency {
+ string code = 1;
+ string name = 2;
+ oneof message {
+ CryptoCurrency cryptoCurrency = 10;
+ FiatCurrency fiatCurrency = 11;
+ }
+}
+
+message Market {
+ string baseCurrencyCode = 1;
+ string quoteCurrencyCode = 2;
+ string baseCurrencyName = 3;
+ string quoteCurrencyName = 4;
+}
+
+message Coin {
+}
+
+message Fiat {
+}
+
+message Monetary {
+ string id = 1;
+ sint64 value = 2;
+ string code = 3;
+ sint32 precision = 4;
+ sint32 lowPrecision = 5;
+
+ oneof message {
+ Coin coin = 10;
+ Fiat fiat = 11;
+ }
+}
+
+message PriceQuote {
+ sint64 value = 1;
+ Monetary baseSideMonetary = 2;
+ Monetary quoteSideMonetary = 3;
+}
+
+message ByteArrayMapEntry {
+ common.ByteArray key = 1;
+ common.ByteArray value = 2;
+}
+
+message StringLongPair {
+ string key = 1;
+ sint64 value = 2;
+}
+
+message Address {
+ string host = 1;
+ sint32 port = 2;
+}
+
+message AddressByTransportTypeMap {
+ map addressByTransportType = 1;
+}
diff --git a/bisqapps/androidNode/src/androidMain/proto/contract.proto b/bisqapps/androidNode/src/androidMain/proto/contract.proto
new file mode 100644
index 00000000..7cc10441
--- /dev/null
+++ b/bisqapps/androidNode/src/androidMain/proto/contract.proto
@@ -0,0 +1,98 @@
+/*
+ * This file is part of Bisq.
+ *
+ * Bisq is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or (at
+ * your option) any later version.
+ *
+ * Bisq is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with Bisq. If not, see .
+ */
+
+syntax = "proto3";
+
+package contract;
+option java_package = "bisq.mobile.contract.protobuf";
+option java_multiple_files = true;
+
+import "network_identity.proto";
+import "account.proto";
+import "offer.proto";
+import "user.proto";
+
+enum Role {
+ ROLE_UNSPECIFIED = 0;
+ ROLE_MAKER = 1;
+ ROLE_TAKER = 2;
+ ROLE_ESCROW_AGENT = 3;
+}
+
+message Party {
+ Role role = 1;
+ network.identity.NetworkId networkId = 2;
+}
+message Contract {
+ uint64 takeOfferDate = 1;
+ offer.Offer offer = 2;
+ account.TradeProtocolType tradeProtocolType = 3;
+ oneof message {
+ TwoPartyContract twoPartyContract = 10;
+ MultiPartyContract multiPartyContract = 12;
+ }
+}
+
+message TwoPartyContract {
+ Party taker = 1;
+ oneof message {
+ BisqEasyContract bisqEasyContract = 10;
+ BisqMuSigContract bisqMuSigContract = 11;
+ SubmarineContract submarineContract = 12;
+ }
+}
+
+message MultiPartyContract {
+ repeated Party parties = 1;
+}
+
+message ContractSignatureData {
+ bytes contractHash = 1;
+ bytes signature = 2;
+ bytes publicKeyBytes = 3;
+}
+message SignedTwoPartyContract {
+ Contract contract = 1;
+ ContractSignatureData makerSignatureData = 2;
+ ContractSignatureData takerSignatureData = 3;
+ oneof message {
+ SignedBisqEasyContract signedBisqEasyContract = 10;
+ }
+}
+message SignedBisqEasyContract {
+}
+
+// BisqEasy
+message BisqEasyContract {
+ uint64 baseSideAmount = 1;
+ uint64 quoteSideAmount = 2;
+ offer.PaymentMethodSpec baseSidePaymentMethodSpec = 3;
+ offer.PaymentMethodSpec quoteSidePaymentMethodSpec = 4;
+ optional user.UserProfile mediator = 12;
+ offer.PriceSpec agreedPriceSpec = 13;
+ uint64 marketPrice = 14;
+}
+
+
+// BisqMuSig
+message BisqMuSigContract {
+}
+
+
+// Submarine
+message SubmarineContract {
+}
diff --git a/bisqapps/androidNode/src/androidMain/proto/identity.proto b/bisqapps/androidNode/src/androidMain/proto/identity.proto
new file mode 100644
index 00000000..c7f55e31
--- /dev/null
+++ b/bisqapps/androidNode/src/androidMain/proto/identity.proto
@@ -0,0 +1,36 @@
+/*
+ * This file is part of Bisq.
+ *
+ * Bisq is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or (at
+ * your option) any later version.
+ *
+ * Bisq is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with Bisq. If not, see .
+ */
+
+syntax = "proto3";
+
+package identity;
+option java_package = "bisq.mobile.identity.protobuf";
+option java_multiple_files = true;
+import "network_identity.proto";
+import "security.proto";
+
+message Identity {
+ string domainId = 1;
+ network.identity.NetworkId networkId = 2;
+ security.KeyBundle keyBundle = 3;
+}
+
+message IdentityStore {
+ optional Identity defaultIdentity = 1;
+ map activeIdentityByDomainId = 2;
+ repeated Identity retired = 3;
+}
diff --git a/bisqapps/androidNode/src/androidMain/proto/network.proto b/bisqapps/androidNode/src/androidMain/proto/network.proto
new file mode 100644
index 00000000..33a0a4c2
--- /dev/null
+++ b/bisqapps/androidNode/src/androidMain/proto/network.proto
@@ -0,0 +1,396 @@
+syntax = "proto3";
+package network;
+option java_package = "bisq.mobile.network.protobuf";
+option java_multiple_files = true;
+import "common.proto";
+import "network_identity.proto";
+import "security.proto";
+import "google/protobuf/any.proto";
+
+////////////////////////////////////////////////////////////////////
+// Data
+////////////////////////////////////////////////////////////////////
+
+message NetworkLoad {
+ double load = 1;
+ double difficultyAdjustmentFactor = 2;
+}
+
+enum Feature {
+ FEATURE_UNSPECIFIED = 0;
+ FEATURE_INVENTORY_HASH_SET = 1;
+ FEATURE_INVENTORY_MINI_SKETCH = 2;
+ FEATURE_AUTHORIZATION_HASH_CASH = 3;
+ FEATURE_AUTHORIZATION_EQUI_HASH = 4;
+}
+
+message Capability {
+ common.Address address = 1;
+ repeated string supportedTransportTypes = 2;
+ repeated Feature features = 3;
+ sint32 version = 4;
+ string applicationVersion = 5;
+}
+
+enum InventoryFilterType{
+ INVENTORYFILTERTYPE_UNSPECIFIED = 0;
+ INVENTORYFILTERTYPE_HASH_SET = 1;
+ INVENTORYFILTERTYPE_MINI_SKETCH = 2;
+}
+
+message HashSetFilterEntry {
+ bytes hash = 1;
+ sint32 sequenceNumber = 2;
+}
+
+message HashSetFilter {
+ repeated HashSetFilterEntry filterEntries = 1;
+}
+
+message MiniSketchFilter {
+}
+
+message InventoryFilter {
+ InventoryFilterType inventoryFilterType = 1;
+ oneof message {
+ HashSetFilter hashSetFilter = 10;
+ MiniSketchFilter miniSketchFilter = 11;
+ }
+}
+
+message Inventory {
+ repeated DataRequest entries = 1;
+ bool maxSizeReached = 2;
+}
+
+message Peer {
+ Capability capability = 1;
+ NetworkLoad networkLoad = 2;
+ bool isOutboundConnection = 3;
+ sint64 created = 4;
+}
+
+enum AuthorizationTokenType{
+ AUTHORIZATIONTOKENTYPE_UNSPECIFIED = 0;
+ AUTHORIZATIONTOKENTYPE_HASH_CASH = 1;
+ AUTHORIZATIONTOKENTYPE_EQUI_HASH = 2;
+}
+
+message HashCashToken {
+ security.ProofOfWork proofOfWork = 1;
+ sint32 messageCounter = 2;
+}
+message EquiHashToken {
+ security.ProofOfWork proofOfWork = 1;
+ sint32 messageCounter = 2;
+}
+message AuthorizationToken {
+ AuthorizationTokenType authorizationTokenType = 1;
+
+ oneof message {
+ HashCashToken hashCashToken = 10;
+ EquiHashToken equiHashToken = 11;
+ };
+}
+
+
+////////////////////////////////////////////////////////////////////
+// NetworkMessages
+////////////////////////////////////////////////////////////////////
+
+message ConnectionHandshake {
+ message Request {
+ Capability capability = 1;
+ optional bytes addressOwnershipProof = 2;
+ NetworkLoad networkLoad = 3;
+ sint64 signatureDate = 4;
+ }
+ message Response {
+ Capability capability = 1;
+ NetworkLoad networkLoad = 2;
+ }
+}
+
+message CloseConnectionMessage {
+ string closeReason = 1;
+}
+
+message PeerExchangeRequest {
+ sint32 nonce = 1;
+ repeated Peer peers = 2;
+}
+message PeerExchangeResponse {
+ sint32 nonce = 1;
+ repeated Peer peers = 2;
+}
+
+message Ping {
+ sint32 nonce = 1;
+}
+message Pong {
+ sint32 requestNonce = 1;
+}
+
+message NetworkLoadExchangeRequest {
+ sint32 nonce = 1;
+ NetworkLoad networkLoad = 2;
+}
+
+message NetworkLoadExchangeResponse {
+ sint32 requestNonce = 1;
+ NetworkLoad networkLoad = 2;
+}
+
+message ConfidentialMessage {
+ security.ConfidentialData confidentialData = 1;
+ string receiverKeyId = 2;
+}
+
+message AckMessage {
+ string id = 1;
+}
+
+message InventoryRequest {
+ InventoryFilter inventoryFilter = 1;
+ sint32 nonce = 2;
+ sint32 version = 3;
+}
+
+message InventoryResponse {
+ Inventory inventory = 1;
+ sint32 requestNonce = 2;
+ sint32 version = 3;
+}
+
+message ExternalNetworkMessage {
+ google.protobuf.Any payload = 1;
+}
+
+
+////////////////////////////////////////////////////////////////////
+// EnvelopePayloadMessage types
+////////////////////////////////////////////////////////////////////
+
+message EnvelopePayloadMessage {
+ oneof message {
+ ConnectionHandshake.Request connectionHandshakeRequest = 1;
+ ConnectionHandshake.Response connectionHandshakeResponse = 2;
+
+ CloseConnectionMessage closeConnectionMessage = 3;
+
+ PeerExchangeRequest peerExchangeRequest = 4;
+ PeerExchangeResponse peerExchangeResponse = 5;
+
+ Ping ping = 6;
+ Pong pong = 7;
+
+ ConfidentialMessage confidentialMessage = 8;
+ AckMessage ackMessage = 9;
+
+ InventoryRequest inventoryRequest = 10;
+ InventoryResponse inventoryResponse = 11;
+
+ DataRequest dataRequest = 12;
+
+ NetworkLoadExchangeRequest networkLoadExchangeRequest = 13;
+ NetworkLoadExchangeResponse networkLoadExchangeResponse = 14;
+
+ // Wrapper for NetworkMessages defined in other modules like PrivateChatMessage which are wrapped in an Any blob
+ ExternalNetworkMessage externalNetworkMessage = 15;
+
+ ReportRequest reportRequest = 16;
+ ReportResponse reportResponse = 17;
+ }
+}
+
+
+////////////////////////////////////////////////////////////////////
+// DataRequests
+////////////////////////////////////////////////////////////////////
+
+message MetaData {
+ sint64 ttl = 1;
+ sint32 priority = 2;
+ sint32 maxMapSize = 3;
+ string className = 4;
+}
+message AuthorizedData {
+ optional bytes signature = 1;
+ bytes authorizedPublicKeyBytes = 2;
+}
+message DefaultAuthenticatedData {
+}
+message AuthenticatedData {
+ google.protobuf.Any distributedData = 1;
+ oneof message {
+ DefaultAuthenticatedData defaultAuthenticatedData = 10;
+ AuthorizedData authorizedData = 11;
+ }
+}
+message AuthenticatedSequentialData {
+ AuthenticatedData authenticatedData = 1;
+ sint32 sequenceNumber = 2;
+ bytes pubKeyHash = 3;
+ sint64 created = 4;
+}
+message AddAuthenticatedDataRequest {
+ AuthenticatedSequentialData authenticatedSequentialData = 1;
+ bytes signature = 2;
+ bytes ownerPublicKeyBytes = 3;
+}
+message RemoveAuthenticatedDataRequest {
+ MetaData metaData = 1;
+ bytes hash = 2;
+ bytes ownerPublicKeyBytes = 3;
+ sint32 sequenceNumber = 4;
+ bytes signature = 5;
+ sint64 created = 6;
+ sint32 version = 7;
+}
+message RefreshAuthenticatedDataRequest {
+ MetaData metaData = 1;
+ bytes hash = 2;
+ bytes ownerPublicKeyBytes = 3;
+ sint32 sequenceNumber = 4;
+ bytes signature = 5;
+ sint32 version = 6;
+ sint64 created = 7;
+}
+
+message MailboxData {
+ ConfidentialMessage confidentialMessage = 1;
+ MetaData metaData = 2;
+ sint32 version = 3;
+}
+message MailboxSequentialData {
+ MailboxData mailboxData = 1;
+ sint32 sequenceNumber = 2;
+ bytes senderPublicKeyHash = 3;
+ sint64 created = 4;
+ bytes receiversPubKeyBytes = 5;
+ bytes receiversPubKeyHash = 6;
+}
+message AddMailboxRequest {
+ MailboxSequentialData mailboxSequentialData = 1;
+ bytes signature = 2;
+ bytes senderPublicKeyBytes = 3;
+}
+message RemoveMailboxRequest {
+ MetaData metaData = 1;
+ bytes hash = 2;
+ bytes receiverPublicKeyBytes = 3;
+ bytes signature = 4;
+ sint64 created = 5;
+ sint32 version = 6;
+}
+
+message AddAppendOnlyDataRequest {
+ google.protobuf.Any appendOnlyData = 1;
+}
+
+////////////////////////////////////////////////////////////////////
+// DataRequest types
+////////////////////////////////////////////////////////////////////
+
+message DataRequest {
+ oneof message {
+ AddAuthenticatedDataRequest addAuthenticatedDataRequest = 1;
+ RemoveAuthenticatedDataRequest removeAuthenticatedDataRequest = 2;
+ RefreshAuthenticatedDataRequest refreshAuthenticatedDataRequest = 3;
+
+ AddMailboxRequest addMailboxRequest = 4;
+ RemoveMailboxRequest removeMailboxRequest = 5;
+
+ AddAppendOnlyDataRequest addAppendOnlyDataRequest = 6;
+ }
+}
+
+
+////////////////////////////////////////////////////////////////////
+// NetworkEnvelope
+////////////////////////////////////////////////////////////////////
+
+message NetworkEnvelope {
+ sint32 version = 1;
+ AuthorizationToken authorizationToken = 2;
+ EnvelopePayloadMessage networkMessage = 3;
+}
+
+enum MessageDeliveryStatus {
+ MESSAGEDELIVERYSTATUS_UNSPECIFIED = 0;
+ MESSAGEDELIVERYSTATUS_CONNECTING = 1;
+ MESSAGEDELIVERYSTATUS_SENT = 2;
+ MESSAGEDELIVERYSTATUS_ACK_RECEIVED = 3;
+ MESSAGEDELIVERYSTATUS_TRY_ADD_TO_MAILBOX = 4;
+ MESSAGEDELIVERYSTATUS_ADDED_TO_MAILBOX = 5;
+ MESSAGEDELIVERYSTATUS_MAILBOX_MSG_RECEIVED = 6;
+ MESSAGEDELIVERYSTATUS_FAILED = 7;
+}
+
+
+////////////////////////////////////////////////////////////////////
+// Stores
+////////////////////////////////////////////////////////////////////
+
+message DataStore {
+ message MapEntry {
+ .common.ByteArray key = 1; // The leading dot is needed to distinguish between common module and network.common
+ DataRequest value = 2;
+ }
+ repeated MapEntry mapEntries = 1;
+}
+
+message NetworkServiceStore {
+ repeated common.AddressByTransportTypeMap seedNodes = 1;
+ map networkIdByTag = 2 [deprecated = true]; // Moved to NetworkIdStore
+}
+
+message NetworkIdStore {
+ map networkIdByTag = 1;
+}
+
+message MessageDeliveryStatusStore {
+ map messageDeliveryStatusByMessageId = 1;
+ map creationDateByMessageId = 2;
+}
+
+message ResendMessageData {
+ EnvelopePayloadMessage envelopePayloadMessage = 1;
+ network.identity.NetworkId receiverNetworkId = 2;
+ security.KeyPair senderKeyPair = 3;
+ network.identity.NetworkId senderNetworkId = 4;
+ MessageDeliveryStatus messageDeliveryStatus = 5;
+ sint64 date = 6;
+}
+
+message ResendMessageStore {
+ map resendMessageDataByMessageId = 1;
+ map numResendsByMessageId = 2;
+}
+
+message PeerGroupStore {
+ repeated Peer persistedPeers = 1;
+}
+
+
+////////////////////////////////////////////////////////////////////
+// Report
+////////////////////////////////////////////////////////////////////
+
+message Report {
+ map authorizedDataPerClassName = 1;
+ map authenticatedDataPerClassName = 2;
+ map mailboxDataPerClassName = 3;
+ sint32 numConnections = 4;
+ sint32 memoryUsed = 5;
+ sint32 numThreads = 6;
+ double nodeLoad = 7;
+}
+message ReportRequest {
+ string requestId = 1;
+}
+message ReportResponse {
+ string requestId = 1;
+ Report report = 2;
+}
+
\ No newline at end of file
diff --git a/bisqapps/androidNode/src/androidMain/proto/network_identity.proto b/bisqapps/androidNode/src/androidMain/proto/network_identity.proto
new file mode 100644
index 00000000..96179bbf
--- /dev/null
+++ b/bisqapps/androidNode/src/androidMain/proto/network_identity.proto
@@ -0,0 +1,11 @@
+syntax = "proto3";
+package network.identity;
+option java_package = "bisq.mobile.network.identity.protobuf";
+option java_multiple_files = true;
+import "common.proto";
+import "security.proto";
+
+message NetworkId {
+ common.AddressByTransportTypeMap addressByNetworkTypeMap = 1;
+ security.PubKey pubKey = 2;
+}
\ No newline at end of file
diff --git a/bisqapps/androidNode/src/androidMain/proto/offer.proto b/bisqapps/androidNode/src/androidMain/proto/offer.proto
new file mode 100644
index 00000000..c690d008
--- /dev/null
+++ b/bisqapps/androidNode/src/androidMain/proto/offer.proto
@@ -0,0 +1,156 @@
+syntax = "proto3";
+package offer;
+option java_package = "bisq.mobile.offer.protobuf";
+option java_multiple_files = true;
+import "common.proto";
+import "network_identity.proto";
+import "security.proto";
+import "account.proto";
+
+enum Direction {
+ DIRECTION_UNSPECIFIED = 0;
+ DIRECTION_BUY = 1;
+ DIRECTION_SELL = 2;
+}
+
+// AmountSpec
+message BaseSideFixedAmountSpec {
+}
+message QuoteSideFixedAmountSpec {
+}
+message BaseSideRangeAmountSpec {
+}
+message QuoteSideRangeAmountSpec {
+}
+message FixedAmountSpec {
+ sint64 amount = 1;
+ oneof message {
+ BaseSideFixedAmountSpec baseSideFixedAmountSpec = 10;
+ QuoteSideFixedAmountSpec quoteSideFixedAmountSpec = 11;
+ }
+}
+message RangeAmountSpec {
+ sint64 minAmount = 1;
+ sint64 maxAmount = 2;
+ oneof message {
+ BaseSideRangeAmountSpec baseSideRangeAmountSpec = 10;
+ QuoteSideRangeAmountSpec quoteSideRangeAmountSpec = 11;
+ }
+}
+message AmountSpec {
+ oneof message {
+ FixedAmountSpec fixedAmountSpec = 1;
+ RangeAmountSpec rangeAmountSpec = 2;
+ }
+}
+
+// PriceSpec
+message FixPrice {
+ common.PriceQuote priceQuote = 1;
+}
+message FloatPrice {
+ double percentage = 1;
+}
+message MarketPrice {
+}
+message PriceSpec {
+ oneof message {
+ FixPrice fixPrice = 1;
+ FloatPrice floatPrice = 2;
+ MarketPrice marketPrice = 3;
+ }
+}
+
+message FiatPaymentMethodSpec {
+}
+
+message BitcoinPaymentMethodSpec {
+}
+
+message PaymentMethodSpec {
+ account.PaymentMethod paymentMethod = 1;
+ optional string saltedMakerAccountId = 2;
+ oneof message {
+ BitcoinPaymentMethodSpec bitcoinPaymentMethodSpec = 10;
+ FiatPaymentMethodSpec fiatPaymentMethodSpec = 11;
+ }
+}
+
+// options
+message ReputationOption {
+ uint64 requiredTotalReputationScore = 1 [deprecated = true]; // Not used anymore since 2.1.1
+}
+message TradeTermsOption {
+ string makersTradeTerms = 1;
+}
+
+message CollateralOption {
+ sint64 buyerSecurityDeposit = 1;
+ sint64 sellerSecurityDeposit = 2;
+}
+
+message FeeOption {
+ enum FeeType {
+ FEETYPE_UNSPECIFIED = 0;
+ FEETYPE_BTC = 1;
+ FEETYPE_BSQ = 2;
+ }
+ FeeType feeType = 10;
+ sint32 blockHeightAtFeePayment = 11;
+ string feeTxId = 12;
+}
+
+message FiatPaymentOption {
+ string countyCodeOfBank = 1;
+ string bankName = 2;
+}
+
+message OfferOption {
+ oneof message {
+ TradeTermsOption tradeTermsOption = 1;
+ ReputationOption reputationOption = 2;
+ CollateralOption collateralOption = 4;
+ FiatPaymentOption fiatPaymentOption = 5;
+ FeeOption feeOption = 6;
+ }
+}
+
+// Offer
+message Offer {
+ string id = 1;
+ sint64 date = 2;
+ network.identity.NetworkId makerNetworkId = 3;
+ common.Market market = 4;
+ Direction direction = 5;
+ AmountSpec amountSpec = 6;
+ PriceSpec priceSpec = 7;
+ repeated account.TradeProtocolType protocolTypes = 8;
+ repeated PaymentMethodSpec baseSidePaymentSpecs = 9;
+ repeated PaymentMethodSpec quoteSidePaymentSpecs = 10;
+ repeated OfferOption offerOptions = 11;
+ oneof message {
+ BisqEasyOffer bisqEasyOffer = 30;
+ BisqMuSigOffer bisqMuSigOffer = 31;
+ SubmarineOffer submarineOffer = 32;
+ }
+}
+
+message OfferMessage {
+ Offer offer = 1;
+}
+
+// BisqEasy
+message BisqEasyOffer {
+ repeated string supportedLanguageCodes = 1;
+}
+
+// BisqMuSig
+message BisqMuSigOffer {
+}
+message MyBisqMuSigOffersStore {
+ repeated Offer offers = 1;
+}
+
+// Submarine
+message SubmarineOffer {
+}
diff --git a/bisqapps/androidNode/src/androidMain/proto/persistence.proto b/bisqapps/androidNode/src/androidMain/proto/persistence.proto
new file mode 100644
index 00000000..13de61bb
--- /dev/null
+++ b/bisqapps/androidNode/src/androidMain/proto/persistence.proto
@@ -0,0 +1,27 @@
+/*
+ * This file is part of Bisq.
+ *
+ * Bisq is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or (at
+ * your option) any later version.
+ *
+ * Bisq is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with Bisq. If not, see .
+ */
+
+syntax = "proto3";
+
+package persistence;
+option java_package = "bisq.mobile.persistence.protobuf";
+option java_multiple_files = true;
+import "google/protobuf/any.proto";
+
+message PersistableStore {
+ google.protobuf.Any any = 1;
+}
diff --git a/bisqapps/androidNode/src/androidMain/proto/presentation.proto b/bisqapps/androidNode/src/androidMain/proto/presentation.proto
new file mode 100644
index 00000000..d717dc54
--- /dev/null
+++ b/bisqapps/androidNode/src/androidMain/proto/presentation.proto
@@ -0,0 +1,22 @@
+/*
+ * This file is part of Bisq.
+ *
+ * Bisq is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or (at
+ * your option) any later version.
+ *
+ * Bisq is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with Bisq. If not, see .
+ */
+
+syntax = "proto3";
+
+package presentation;
+option java_package = "bisq.mobile.presentation.protobuf";
+option java_multiple_files = true;
diff --git a/bisqapps/androidNode/src/androidMain/proto/security.proto b/bisqapps/androidNode/src/androidMain/proto/security.proto
new file mode 100644
index 00000000..942be0d4
--- /dev/null
+++ b/bisqapps/androidNode/src/androidMain/proto/security.proto
@@ -0,0 +1,82 @@
+/*
+ * This file is part of Bisq.
+ *
+ * Bisq is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or (at
+ * your option) any later version.
+ *
+ * Bisq is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with Bisq. If not, see .
+ */
+
+syntax = "proto3";
+
+package security;
+option java_package = "bisq.mobile.security.protobuf";
+option java_multiple_files = true;
+
+message PubKey {
+ bytes publicKey = 1;
+ string keyId = 2;
+}
+
+message ConfidentialData {
+ bytes senderPublicKey = 1;
+ bytes iv = 2;
+ bytes cipherText = 3;
+ bytes signature = 4;
+}
+
+message EncryptedData {
+ bytes iv = 1;
+ bytes cipherText = 2;
+}
+
+// Protobuf wrapper for java.security.KeyPair used by other modules
+message KeyPair {
+ bytes privateKey = 1;
+ bytes publicKey = 2;
+}
+message TorKeyPair {
+ bytes privateKey = 1;
+ bytes publicKey = 2;
+ string onionAddress = 3;
+}
+message I2PKeyPair {
+ bytes privateKey = 1;
+ bytes publicKey = 2;
+ string destination = 3;
+}
+message KeyBundle {
+ string keyId = 1;
+ KeyPair keyPair = 2;
+ TorKeyPair torKeyPair = 3;
+ /*I2PKeyPair i2PKeyPair = 4;*/
+}
+message KeyBundleStore {
+ string secretUid = 1;
+ map keyBundleById = 2;
+}
+
+message ProofOfWork {
+ bytes payload = 1;
+ sint64 counter = 2;
+ optional bytes challenge = 3;
+ double difficulty = 4;
+ bytes solution = 5;
+ sint64 duration = 6;
+}
+
+message ScryptParameters {
+ bytes salt = 1;
+ sint32 cost = 2;
+ sint32 blockSize = 3;
+ sint32 parallelization = 4;
+ sint32 keyLength = 5;
+}
diff --git a/bisqapps/androidNode/src/androidMain/proto/settings.proto b/bisqapps/androidNode/src/androidMain/proto/settings.proto
new file mode 100644
index 00000000..e145e81e
--- /dev/null
+++ b/bisqapps/androidNode/src/androidMain/proto/settings.proto
@@ -0,0 +1,67 @@
+/*
+ * This file is part of Bisq.
+ *
+ * Bisq is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or (at
+ * your option) any later version.
+ *
+ * Bisq is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with Bisq. If not, see .
+ */
+
+syntax = "proto3";
+
+package settings;
+option java_package = "bisq.mobile.settings.protobuf";
+option java_multiple_files = true;
+import "common.proto";
+
+message CookieMapEntry {
+ string key = 1;
+ string value = 2;
+ optional string subKey = 3;
+}
+message Cookie {
+ repeated CookieMapEntry cookieMapEntries = 1;
+}
+
+enum ChatNotificationType {
+ CHATNOTIFICATIONTYPE_UNSPECIFIED = 0;
+ CHATNOTIFICATIONTYPE_ALL = 1;
+ CHATNOTIFICATIONTYPE_MENTION = 2;
+ CHATNOTIFICATIONTYPE_OFF = 3;
+}
+
+message SettingsStore {
+ Cookie cookie = 1;
+ map dontShowAgainMap = 2;
+ bool useAnimations = 3;
+ common.Market selectedMarket = 4;
+ sint64 minRequiredReputationScore = 5 [deprecated = true]; // Not used anymore since 2.1.1
+ bool offersOnly = 6;
+ bool tradeRulesConfirmed = 7;
+ ChatNotificationType chatNotificationType = 8;
+ bool isTacAccepted = 9;
+ repeated string consumedAlertIds = 10;
+ bool closeMyOfferWhenTaken = 11;
+ string languageCode = 12;
+ bool preventStandbyMode = 13;
+ repeated string supportedLanguageCodes = 14;
+ double difficultyAdjustmentFactor = 15;
+ bool ignoreDiffAdjustmentFromSecManager = 16;
+ repeated common.Market favouriteMarkets = 17;
+ bool ignoreMinRequiredReputationScoreFromSecManager = 18 [deprecated = true]; // Not used anymore since 2.1.1
+ double maxTradePriceDeviation = 19;
+ bool showBuyOffers = 20;
+ bool showOfferListExpanded = 21;
+ bool showMarketSelectionListCollapsed = 22;
+ string backupLocation = 23;
+ bool showMyOffersOnly = 24;
+ double totalMaxBackupSizeInMB = 25;
+}
diff --git a/bisqapps/androidNode/src/androidMain/proto/support.proto b/bisqapps/androidNode/src/androidMain/proto/support.proto
new file mode 100644
index 00000000..dc63831a
--- /dev/null
+++ b/bisqapps/androidNode/src/androidMain/proto/support.proto
@@ -0,0 +1,40 @@
+syntax = "proto3";
+package support;
+option java_package = "bisq.mobile.support.protobuf";
+option java_multiple_files = true;
+import "user.proto";
+import "chat.proto";
+import "offer.proto";
+import "contract.proto";
+import "network.proto";
+
+message MediationRequest {
+ string tradeId = 1;
+ contract.Contract contract = 2;
+ user.UserProfile requester = 3;
+ user.UserProfile peer = 4;
+ repeated chat.ChatMessage chatMessages = 5;
+}
+message MediatorsResponse {
+ string tradeId = 1;
+}
+
+message MediationCase {
+ MediationRequest mediationRequest = 1;
+ sint64 requestDate = 2;
+ bool isClosed = 3;
+}
+message MediatorStore {
+ repeated MediationCase mediationCases = 1;
+}
+
+message ReportToModeratorMessage {
+ sint64 date = 1;
+ string reporterUserProfileId = 2;
+ user.UserProfile accusedUserProfile = 3;
+ string message = 4;
+ chat.ChatChannelDomain chatChannelDomain = 5;
+}
+message ModeratorStore {
+ repeated ReportToModeratorMessage reportToModeratorMessages = 1;
+}
diff --git a/bisqapps/androidNode/src/androidMain/proto/trade.proto b/bisqapps/androidNode/src/androidMain/proto/trade.proto
new file mode 100644
index 00000000..8468605c
--- /dev/null
+++ b/bisqapps/androidNode/src/androidMain/proto/trade.proto
@@ -0,0 +1,166 @@
+/*
+ * This file is part of Bisq.
+ *
+ * Bisq is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or (at
+ * your option) any later version.
+ *
+ * Bisq is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with Bisq. If not, see .
+ */
+
+syntax = "proto3";
+
+package trade;
+option java_package = "bisq.mobile.trade.protobuf";
+option java_multiple_files = true;
+
+import "offer.proto";
+import "network_identity.proto";
+import "contract.proto";
+import "identity.proto";
+
+message TradeParty {
+ network.identity.NetworkId networkId = 1;
+ optional contract.ContractSignatureData contractSignatureData = 2;
+ oneof message {
+ BisqEasyTradeParty bisqEasyTradeParty = 20;
+ BisqMuSigTradeParty bisqMuSigTradeParty = 21;
+ SubmarineTradeParty submarineTradeParty = 22;
+ }
+}
+
+enum TradeRole{
+ TRADEROLE_UNSPECIFIED = 0;
+ TRADEROLE_BUYER_AS_TAKER = 1;
+ TRADEROLE_BUYER_AS_MAKER = 2;
+ TRADEROLE_SELLER_AS_TAKER = 3;
+ TRADEROLE_SELLER_AS_MAKER = 4;
+}
+message Trade {
+ string state = 1;
+ string id = 2;
+ TradeRole tradeRole = 3;
+ identity.Identity myIdentity = 4;
+ optional contract.Contract contract = 5;
+ TradeParty taker = 6;
+ TradeParty maker = 7;
+ optional string errorMessage = 8;
+ optional string errorStackTrace = 9;
+ optional string peersErrorMessage = 10;
+ optional string peersErrorStackTrace = 11;
+
+ oneof message {
+ BisqEasyTrade bisqEasyTrade = 30;
+ BisqMuSigTrade bisqMuSigTrade = 31;
+ SubmarineTrade submarineTrade = 32;
+ }
+}
+message TradeMessage {
+ string id = 1;
+ string tradeId = 2;
+ string protocolVersion = 3;
+ network.identity.NetworkId sender = 4;
+ network.identity.NetworkId receiver = 5;
+ oneof message {
+ BisqEasyTradeMessage bisqEasyTradeMessage = 20;
+ SubmarineTradeMessage submarineTradeMessage = 21;
+ BisqMuSigTradeMessage bisqMuSigTradeMessage = 23;
+ }
+}
+
+// BisqEasy
+message BisqEasyTradeParty {
+}
+
+message BisqEasyTrade {
+ optional string paymentAccountData = 1;
+ optional string bitcoinPaymentData = 2;
+ optional string paymentProof = 3;
+ optional contract.Role interruptTradeInitiator = 4;
+}
+
+message BisqEasyTradeStore {
+ repeated Trade trades = 1;
+ repeated string tradeIds = 2;
+}
+
+// BisqEasy messages
+message BisqEasyTradeMessage {
+ oneof message {
+ BisqEasyTakeOfferRequest bisqEasyTakeOfferRequest = 20;
+ BisqEasyTakeOfferResponse bisqEasyTakeOfferResponse = 21;
+ BisqEasyAccountDataMessage bisqEasyAccountDataMessage = 22;
+ BisqEasyConfirmFiatSentMessage bisqEasyConfirmFiatSentMessage = 23;
+ BisqEasyBtcAddressMessage bisqEasyBtcAddressMessage = 24;
+ BisqEasyConfirmFiatReceiptMessage bisqEasyConfirmFiatReceiptMessage = 25;
+ BisqEasyConfirmBtcSentMessage bisqEasyConfirmBtcSentMessage = 26;
+ BisqEasyRejectTradeMessage bisqEasyRejectTradeMessage = 27;
+ BisqEasyCancelTradeMessage bisqEasyCancelTradeMessage = 28;
+ BisqEasyReportErrorMessage bisqEasyReportErrorMessage = 29;
+ }
+}
+message BisqEasyTakeOfferRequest {
+ contract.Contract bisqEasyContract = 1;
+ contract.ContractSignatureData contractSignatureData = 2;
+}
+message BisqEasyTakeOfferResponse {
+ contract.ContractSignatureData contractSignatureData = 1;
+}
+message BisqEasyAccountDataMessage {
+ string paymentAccountData = 1;
+ offer.Offer bisqEasyOffer = 2;
+}
+message BisqEasyConfirmFiatSentMessage {
+}
+message BisqEasyBtcAddressMessage {
+ string bitcoinPaymentData = 1;
+ offer.Offer bisqEasyOffer = 2;
+}
+message BisqEasyConfirmFiatReceiptMessage {
+}
+message BisqEasyConfirmBtcSentMessage {
+ optional string paymentProof = 1;
+}
+message BisqEasyRejectTradeMessage {
+}
+message BisqEasyCancelTradeMessage {
+}
+message BisqEasyReportErrorMessage {
+ string errorMessage = 1;
+ string stackTrace = 2;
+}
+
+
+// BisqMuSig
+message BisqMuSigTradeMessage{
+}
+message BisqMuSigTradeParty {
+}
+
+message BisqMuSigTrade {
+}
+
+message BisqMuSigTradeStore {
+ map tradeById = 1;
+}
+
+
+// Submarine
+message SubmarineTradeMessage {
+}
+message SubmarineTradeParty {
+}
+
+message SubmarineTrade {
+}
+
+message SubmarineTradeStore {
+ map tradeById = 1;
+}
diff --git a/bisqapps/androidNode/src/androidMain/proto/user.proto b/bisqapps/androidNode/src/androidMain/proto/user.proto
new file mode 100644
index 00000000..6b57032d
--- /dev/null
+++ b/bisqapps/androidNode/src/androidMain/proto/user.proto
@@ -0,0 +1,160 @@
+/*
+ * This file is part of Bisq.
+ *
+ * Bisq is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or (at
+ * your option) any later version.
+ *
+ * Bisq is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with Bisq. If not, see .
+ */
+
+syntax = "proto3";
+
+package user;
+option java_package = "bisq.mobile.user.protobuf";
+option java_multiple_files = true;
+import "network_identity.proto";
+import "security.proto";
+import "identity.proto";
+
+message UserProfile {
+ string nickName = 1;
+ network.identity.NetworkId networkId = 2;
+ security.ProofOfWork proofOfWork = 3;
+ string terms = 4;
+ string statement = 5;
+ sint32 avatarVersion = 6;
+ sint32 version = 7;
+ string applicationVersion = 8;
+}
+
+message UserIdentity {
+ identity.Identity identity = 1;
+ UserProfile userProfile = 2;
+}
+
+// Stores
+message UserIdentityStore {
+ repeated UserIdentity userIdentities = 1;
+ optional string selectedUserIdentityId = 2;
+ optional security.EncryptedData encryptedData = 3;
+ optional security.ScryptParameters scryptParameters = 4;
+ sint64 lastUserProfilePublishingDate = 5 [deprecated = true]; // Not used anymore in v2.1.0
+}
+
+message NymList {
+ repeated string nyms = 1;
+}
+
+message UserProfileStore {
+ map nymListByNickName = 1;
+ repeated string ignoredUserProfileIds = 2;
+ map userProfileById = 3;
+}
+
+message ProofOfBurnProof {
+ string txId = 1;
+ sint64 burntAmount = 2;
+ sint64 date = 3;
+}
+message BondedRoleProof {
+ string txId = 1;
+ string signature = 2;
+}
+message InvitationProof {
+ string invitationCode = 1;
+}
+
+message AccountAgeStore {
+ repeated string jsonRequests = 1;
+ sint64 lastRequested = 2;
+}
+
+message SignedWitnessStore {
+ repeated string jsonRequests = 1;
+ sint64 lastRequested = 2;
+}
+
+message ProfileAgeStore {
+ repeated string profileIds = 1;
+ sint64 lastRequested = 2;
+}
+
+message AuthorizeAccountAgeRequest {
+ string profileId = 1;
+ string hashAsHex = 2;
+ sint64 date = 3;
+ string pubKeyBase64 = 4;
+ string signatureBase64 = 5;
+}
+
+message AuthorizeSignedWitnessRequest {
+ string profileId = 1;
+ string hashAsHex = 2;
+ sint64 accountAgeWitnessDate = 3;
+ sint64 witnessSignDate = 4;
+ string pubKeyBase64 = 5;
+ string signatureBase64 = 6;
+}
+
+message AuthorizeTimestampRequest {
+ string profileId = 1;
+}
+
+message AuthorizedProofOfBurnData {
+ sint64 amount = 1;
+ sint64 blockTime = 2;
+ bytes hash = 3;
+ bool staticPublicKeysProvided = 4;
+ sint32 version = 5;
+ sint32 blockHeight = 6;
+ string txId = 7;
+}
+
+message AuthorizedBondedReputationData {
+ sint64 amount = 1;
+ sint64 blockTime = 2;
+ bytes hash = 3;
+ sint64 lockTime = 4;
+ bool staticPublicKeysProvided = 5;
+ sint32 version = 6;
+ sint32 blockHeight = 7;
+ string txId = 8;
+}
+
+message AuthorizedAccountAgeData {
+ string profileId = 1;
+ sint64 date = 2;
+ bool staticPublicKeysProvided = 3;
+ sint32 version = 4;
+}
+
+message AuthorizedSignedWitnessData {
+ string profileId = 1;
+ sint64 witnessSignDate = 2;
+ bool staticPublicKeysProvided = 3;
+ sint32 version = 4;
+}
+
+message AuthorizedTimestampData {
+ string profileId = 1;
+ sint64 date = 2;
+ bool staticPublicKeysProvided = 3;
+ sint32 version = 4;
+}
+
+message BannedUserProfileData {
+ UserProfile userProfile = 1;
+ bool staticPublicKeysProvided = 2;
+ sint32 version = 3;
+}
+message BannedUserStore {
+ repeated BannedUserProfileData bannedUserProfileDataSet = 1;
+}
diff --git a/bisqapps/build.gradle.kts b/bisqapps/build.gradle.kts
index 0158e72f..92c6c839 100644
--- a/bisqapps/build.gradle.kts
+++ b/bisqapps/build.gradle.kts
@@ -8,4 +8,6 @@ plugins {
alias(libs.plugins.compose.compiler).apply(false)
alias(libs.plugins.buildconfig).apply(false)
+
+ alias(libs.plugins.protobuf).apply(false)
}
diff --git a/bisqapps/gradle/libs.versions.toml b/bisqapps/gradle/libs.versions.toml
index eab67e54..c685ee0e 100644
--- a/bisqapps/gradle/libs.versions.toml
+++ b/bisqapps/gradle/libs.versions.toml
@@ -13,12 +13,38 @@ androidx-lifecycle = "2.8.2"
androidx-material = "1.12.0"
androidx-test-junit = "1.2.1"
androidx-test-compose-ver = "1.6.8"
+bisq-core = "2.1.2"
compose-plugin = "1.7.0"
junit = "4.13.2"
kotlin = "2.0.20"
kotlinx = "1.9.0"
kermit = "2.0.4"
buildconfig = "5.5.0"
+protobuf = "0.9.4"
+protoblite = "4.28.2"
+
+chimp-jsocks-lib = { strictly = '567e1cd6' }
+chimp-jtorctl-lib = { strictly = '9b5ba203' }
+failsafe-lib = { strictly = '3.2.4' }
+apache-commons-lang-lib = { strictly = '3.14.0' }
+apache-httpcomponents-core-lib = { strictly = '4.4.16' }
+apache-httpcomponents-httpclient-lib = { strictly = '4.5.14' } # 5.3.1 would be better but has lot of API changes
+apache-tomcat-annotations-api = { strictly = '6.0.53' }
+
+assertj-core-lib = { strictly = '3.22.0' }
+bouncycastle-lib = { strictly = '1.78.1' }
+
+glassfish-jersey-lib = { strictly = '3.1.8' }
+glassfish-jaxb-runtime-lib = { strictly = '4.0.5' }
+
+google-gson-lib = { strictly = '2.9.0' }
+google-guava-lib = { strictly = '33.2.1-jre' }
+
+grpc = { strictly = '1.61.0' }
+
+i2p-lib = { strictly = '1.8.0' }
+i2p-v2 = { strictly = '2.4.0' }
+jackson-lib = { strictly = '2.17.2' }
[libraries]
kotlin-test = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotlin" }
@@ -39,6 +65,72 @@ androidx-lifecycle-runtime-compose = { group = "org.jetbrains.androidx.lifecycle
logging-kermit = { group = "co.touchlab", name = "kermit", version.ref = "kermit" }
+protobuf-lite = { group ="com.google.protobuf", name = "protobuf-javalite", version.ref = "protoblite"}
+protobuf-gradle-plugin = { module = 'com.google.protobuf:protobuf-gradle-plugin', version.ref = 'protobuf' }
+protoc = { module = "com.google.protobuf:protoc", version.ref = "protoblite" }
+
+
+bisq-core-common = { module = "bisq:common", version.ref = "bisq-core" }
+bisq-core-security = { module = "bisq:security", version.ref = "bisq-core" }
+bisq-core-settings = { module = "bisq:settings", version.ref = "bisq-core" }
+bisq-core-support = { module = "bisq:support", version.ref = "bisq-core" }
+bisq-core-trade = { module = "bisq:trade", version.ref = "bisq-core" }
+bisq-core-user = { module = "bisq:user", version.ref = "bisq-core" }
+bisq-core-network-network = { module = "network:network", version.ref = "bisq-core" }
+bisq-core-network-network-identity = { module = "network:network-identity", version.ref = "bisq-core" }
+bisq-core-network-socks5-socket-channel = { module = "network:socks5-socket-channel", version.ref = "bisq-core" }
+bisq-core-network-i2p = { module = "network:i2p", version.ref = "bisq-core" }
+bisq-core-offer = { module = "bisq:offer", version.ref = "bisq-core" }
+bisq-core-persistence = { module = "bisq:persistence", version.ref = "bisq-core" }
+bisq-core-presentation = { module = "bisq:presentation", version.ref = "bisq-core" }
+bisq-core-account = { module = "bisq:account", version.ref = "bisq-core" }
+bisq-core-application = { module = "bisq:application", version.ref = "bisq-core" }
+bisq-core-bonded-roles = { module = "bisq:bonded-roles", version.ref = "bisq-core" }
+bisq-core-chat = { module = "bisq:chat", version.ref = "bisq-core" }
+bisq-core-contract = { module = "bisq:contract", version.ref = "bisq-core" }
+bisq-core-i18n = { module = "bisq:i18n", version.ref = "bisq-core" }
+bisq-core-identity = { module = "bisq:identity", version.ref = "bisq-core" }
+
+# bisq core transitive dependencies
+chimp-jsocks = { module = 'com.github.chimp1984:jsocks', version.ref = 'chimp-jsocks-lib' }
+chimp-jtorctl = { module = 'com.github.chimp1984:jtorctl', version.ref = 'chimp-jtorctl-lib' }
+failsafe = { module = 'dev.failsafe:failsafe', version.ref = 'failsafe-lib' }
+apache-commons-lang = { module = 'org.apache.commons:commons-lang3', version.ref = 'apache-commons-lang-lib' }
+apache-httpcomponents-core = { module = 'org.apache.httpcomponents:httpcore', version.ref = 'apache-httpcomponents-core-lib' }
+apache-httpcomponents-httpclient = { module = 'org.apache.httpcomponents:httpclient', version.ref = 'apache-httpcomponents-httpclient-lib' }
+apache-tomcat-annotations-api = { module = 'org.apache.tomcat:annotations-api', version.ref = 'apache-tomcat-annotations-api' }
+assertj-core = { module = 'org.assertj:assertj-core', version.ref = 'assertj-core-lib' }
+glassfish-jersey-jdk-http = { module = 'org.glassfish.jersey.containers:jersey-container-jdk-http', version.ref = 'glassfish-jersey-lib' }
+glassfish-jersey-json-jackson = { module = 'org.glassfish.jersey.media:jersey-media-json-jackson', version.ref = 'glassfish-jersey-lib' }
+glassfish-jersey-inject-hk2 = { module = 'org.glassfish.jersey.inject:jersey-hk2', version.ref = 'glassfish-jersey-lib' }
+glassfish-jaxb-runtime = { module = 'org.glassfish.jaxb:jaxb-runtime', version.ref = 'glassfish-jaxb-runtime-lib' }
+
+google-gson = { module = 'com.google.code.gson:gson', version.ref = 'google-gson-lib' }
+google-guava = { module = 'com.google.guava:guava', version.ref = 'google-guava-lib' }
+
+grpc-netty-shaded = { module = 'io.grpc:grpc-netty-shaded', version.ref = 'grpc' }
+grpc-protobuf = { module = 'io.grpc:grpc-protobuf', version.ref = 'grpc' }
+grpc-services = { module = 'io.grpc:grpc-services', version.ref = 'grpc' }
+grpc-stub = { module = 'io.grpc:grpc-stub', version.ref = 'grpc' }
+
+
+i2p-core = { module = 'net.i2p:i2p', version.ref = 'i2p-lib' }
+i2p-core-v2 = { module = 'net.i2p:i2p', version.ref = 'i2p-v2' }
+i2p-streaming = { module = 'net.i2p.client:streaming', version.ref = 'i2p-lib' }
+i2p-streaming-v2 = { module = 'net.i2p.client:streaming', version.ref = 'i2p-v2' }
+i2p-router = { module = 'net.i2p:router', version.ref = 'i2p-lib' }
+
+jackson-core = { module = 'com.fasterxml.jackson.core:jackson-core', version.ref = 'jackson-lib' }
+jackson-annotations = { module = 'com.fasterxml.jackson.core:jackson-annotations', version.ref = 'jackson-lib' }
+jackson-databind = { module = 'com.fasterxml.jackson.core:jackson-databind', version.ref = 'jackson-lib' }
+
+[bundles]
+glassfish-jersey = ['glassfish-jersey-jdk-http', 'glassfish-jersey-json-jackson', 'glassfish-jersey-inject-hk2', 'glassfish-jaxb-runtime']
+grpc = ['grpc-protobuf', 'grpc-services', 'grpc-stub']
+i2p = ['i2p-core', 'i2p-router', 'i2p-streaming']
+i2p-v2 = ['i2p-core-v2', 'i2p-streaming-v2']
+jackson = ['jackson-core', 'jackson-annotations', 'jackson-databind']
+
[plugins]
kotlinCocoapods = { id = "org.jetbrains.kotlin.native.cocoapods", version.ref = "kotlin" }
androidApplication = { id = "com.android.application", version.ref = "agp" }
@@ -46,4 +138,5 @@ androidLibrary = { id = "com.android.library", version.ref = "agp" }
jetbrainsCompose = { id = "org.jetbrains.compose", version.ref = "compose-plugin" }
compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
kotlinMultiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
-buildconfig = { id = "com.github.gmazzo.buildconfig", version.ref = "buildconfig" }
\ No newline at end of file
+buildconfig = { id = "com.github.gmazzo.buildconfig", version.ref = "buildconfig" }
+protobuf = { id = "com.google.protobuf", version.ref = "protobuf" }
\ No newline at end of file
diff --git a/bisqapps/settings.gradle.kts b/bisqapps/settings.gradle.kts
index 46d5abca..c5a4b494 100644
--- a/bisqapps/settings.gradle.kts
+++ b/bisqapps/settings.gradle.kts
@@ -1,16 +1,34 @@
enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")
pluginManagement {
repositories {
- google()
- gradlePluginPortal()
+ google {
+ content {
+ includeGroupByRegex("com\\.android.*")
+ includeGroupByRegex("com\\.google.*")
+ includeGroupByRegex("androidx.*")
+ }
+ }
+ mavenLocal()
mavenCentral()
+ gradlePluginPortal()
+ maven {
+ url = uri("https://jitpack.io")
+ }
}
}
dependencyResolutionManagement {
+ repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
+ // for androidNode till we get bisq-core libs published to a public repo
+ mavenLocal()
+ maven {
+ url = uri("https://jitpack.io")
+ }
+ }
+ repositories {
}
}