2020-01-10 18:59:01 +00:00
|
|
|
syntax = "proto3";
|
|
|
|
|
2023-06-05 11:10:26 +00:00
|
|
|
import "chat_identity.proto";
|
2022-11-30 09:41:35 +00:00
|
|
|
import "sync_settings.proto";
|
2023-01-06 12:21:14 +00:00
|
|
|
import 'application_metadata_message.proto';
|
2023-06-06 18:33:09 +00:00
|
|
|
import 'communities.proto';
|
2024-02-17 18:07:20 +00:00
|
|
|
import 'profile_showcase.proto';
|
2022-11-30 09:41:35 +00:00
|
|
|
|
2021-08-06 15:40:23 +00:00
|
|
|
option go_package = "./;protobuf";
|
2020-01-10 18:59:01 +00:00
|
|
|
package protobuf;
|
|
|
|
|
2022-11-30 09:41:35 +00:00
|
|
|
/* `FetchingBackedUpDataDetails` is used to describe how many messages a single backup data structure consists of */
|
|
|
|
message FetchingBackedUpDataDetails {
|
|
|
|
uint32 data_number = 1;
|
|
|
|
uint32 total_number = 2;
|
|
|
|
}
|
|
|
|
|
2021-10-11 15:39:52 +00:00
|
|
|
message Backup {
|
|
|
|
uint64 clock = 1;
|
|
|
|
string id = 2;
|
|
|
|
|
2022-11-30 09:41:35 +00:00
|
|
|
/* this is what we already had */
|
2021-10-11 15:39:52 +00:00
|
|
|
repeated SyncInstallationContactV2 contacts = 3;
|
2023-08-18 11:39:59 +00:00
|
|
|
repeated SyncInstallationCommunity communities = 4;
|
2022-11-30 09:41:35 +00:00
|
|
|
/* newly added details to be backed up to and fetched from waku */
|
|
|
|
FetchingBackedUpDataDetails contactsDetails = 5;
|
|
|
|
FetchingBackedUpDataDetails communitiesDetails = 6;
|
|
|
|
BackedUpProfile profile = 7;
|
|
|
|
FetchingBackedUpDataDetails profileDetails = 8;
|
|
|
|
SyncSetting setting = 9;
|
|
|
|
FetchingBackedUpDataDetails settingsDetails = 10;
|
2023-06-28 19:45:36 +00:00
|
|
|
SyncKeypair keypair = 11;
|
|
|
|
FetchingBackedUpDataDetails keypairDetails = 12;
|
2023-05-16 10:48:00 +00:00
|
|
|
SyncAccount watchOnlyAccount = 13;
|
|
|
|
FetchingBackedUpDataDetails watchOnlyAccountDetails = 14;
|
2023-10-12 21:15:05 +00:00
|
|
|
repeated SyncChat chats = 15;
|
|
|
|
FetchingBackedUpDataDetails chatsDetails = 16;
|
2021-10-11 15:39:52 +00:00
|
|
|
}
|
|
|
|
|
2022-06-24 14:06:13 +00:00
|
|
|
message MultiAccount {
|
|
|
|
string name = 1;
|
|
|
|
int64 timestamp = 2;
|
|
|
|
string identicon = 3;
|
2023-03-22 17:48:42 +00:00
|
|
|
repeated ColorHash color_hash = 4;
|
|
|
|
int64 color_id = 5;
|
2022-06-24 14:06:13 +00:00
|
|
|
string keycard_pairing = 6;
|
|
|
|
string key_uid = 7;
|
|
|
|
repeated IdentityImage images = 8;
|
2023-03-22 17:48:42 +00:00
|
|
|
string customization_color = 9;
|
2023-07-18 13:35:06 +00:00
|
|
|
uint64 customization_color_clock = 10;
|
2022-06-24 14:06:13 +00:00
|
|
|
|
2023-03-22 17:48:42 +00:00
|
|
|
message ColorHash {
|
2022-06-24 14:06:13 +00:00
|
|
|
repeated int64 index = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message IdentityImage {
|
|
|
|
string key_uid = 1;
|
|
|
|
string name = 2;
|
|
|
|
bytes payload = 3;
|
|
|
|
int64 width = 4;
|
|
|
|
int64 height = 5;
|
|
|
|
int64 filesize = 6;
|
|
|
|
int64 resize_target = 7;
|
|
|
|
uint64 clock = 8;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
message LocalPairingPayload {
|
|
|
|
repeated Key keys = 1;
|
|
|
|
MultiAccount multiaccount = 2;
|
|
|
|
string password = 3;
|
2023-06-09 06:43:51 +00:00
|
|
|
string chatKey = 4;
|
2023-06-09 13:15:28 +00:00
|
|
|
string keycardPairings = 5;
|
2022-06-24 14:06:13 +00:00
|
|
|
|
|
|
|
message Key {
|
|
|
|
string name = 1;
|
|
|
|
bytes data = 2;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-04-04 14:43:18 +00:00
|
|
|
message LocalPairingPeerHello {
|
2023-04-17 08:54:03 +00:00
|
|
|
int32 pairing_version = 1;
|
|
|
|
bytes peer_id = 2;
|
|
|
|
string device_name = 3;
|
|
|
|
string device_type = 4;
|
|
|
|
bytes signature = 5;
|
2023-04-04 14:43:18 +00:00
|
|
|
}
|
|
|
|
|
2023-08-18 11:39:59 +00:00
|
|
|
message SyncPairInstallation {
|
2020-01-10 18:59:01 +00:00
|
|
|
uint64 clock = 1;
|
|
|
|
string installation_id = 2;
|
|
|
|
string device_type = 3;
|
|
|
|
string name = 4;
|
2023-02-28 12:32:45 +00:00
|
|
|
// following fields used for local pairing
|
|
|
|
uint32 version = 5;
|
2020-01-10 18:59:01 +00:00
|
|
|
}
|
|
|
|
|
2021-09-03 08:26:05 +00:00
|
|
|
message SyncInstallationContactV2 {
|
2021-10-22 14:20:42 +00:00
|
|
|
uint64 last_updated_locally = 1;
|
2021-09-03 08:26:05 +00:00
|
|
|
string id = 2;
|
|
|
|
string profile_image = 3;
|
|
|
|
string ens_name = 4;
|
|
|
|
uint64 last_updated = 5;
|
|
|
|
repeated string system_tags = 6;
|
|
|
|
string local_nickname = 7;
|
|
|
|
bool added = 9;
|
|
|
|
bool blocked = 10;
|
|
|
|
bool muted = 11;
|
|
|
|
bool removed = 12;
|
2021-10-22 14:20:42 +00:00
|
|
|
bool has_added_us = 13;
|
2022-07-05 19:49:44 +00:00
|
|
|
int64 verification_status = 14;
|
|
|
|
int64 trust_status = 15;
|
2023-01-20 14:28:30 +00:00
|
|
|
int64 contact_request_local_state = 16;
|
|
|
|
int64 contact_request_local_clock = 17;
|
|
|
|
int64 contact_request_remote_state = 18;
|
|
|
|
int64 contact_request_remote_clock = 19;
|
2023-02-14 17:44:00 +00:00
|
|
|
string display_name = 20;
|
2021-09-03 08:26:05 +00:00
|
|
|
}
|
|
|
|
|
2020-01-10 18:59:01 +00:00
|
|
|
message SyncInstallationAccount {
|
|
|
|
uint64 clock = 1;
|
|
|
|
string profile_image = 2;
|
|
|
|
uint64 last_updated = 3;
|
|
|
|
}
|
|
|
|
|
2023-08-18 11:39:59 +00:00
|
|
|
message SyncInstallationCommunity {
|
2021-08-06 15:40:23 +00:00
|
|
|
uint64 clock = 1;
|
|
|
|
bytes id = 2;
|
2023-07-21 09:41:26 +00:00
|
|
|
// Don't sync private_key because we want to have only one control node
|
|
|
|
bytes private_key = 3 [deprecated = true];
|
2021-08-06 15:40:23 +00:00
|
|
|
bytes description = 4;
|
|
|
|
bool joined = 5;
|
|
|
|
bool verified = 6;
|
|
|
|
bool muted = 7;
|
|
|
|
repeated SyncCommunityRequestsToJoin requests_to_join = 8;
|
2022-06-01 07:55:48 +00:00
|
|
|
SyncCommunitySettings settings = 9;
|
2022-05-27 09:14:40 +00:00
|
|
|
bool encrypted = 10;
|
2022-09-20 19:57:39 +00:00
|
|
|
bool spectated = 11;
|
2024-02-21 10:54:33 +00:00
|
|
|
// Kept for backward compatibility
|
|
|
|
bytes encryption_keys_v1 = 12 [deprecated = true];
|
2023-09-21 11:16:05 +00:00
|
|
|
SyncCommunityControlNode control_node = 13;
|
2024-01-09 18:36:47 +00:00
|
|
|
int64 joined_at = 14;
|
2024-01-21 10:55:14 +00:00
|
|
|
int64 last_opened_at = 15;
|
2024-02-21 10:54:33 +00:00
|
|
|
repeated bytes encryption_keys_v2 = 16;
|
2021-08-06 15:40:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message SyncCommunityRequestsToJoin {
|
|
|
|
bytes id = 1;
|
|
|
|
string public_key = 2;
|
|
|
|
uint64 clock = 3;
|
|
|
|
string ens_name = 4;
|
|
|
|
string chat_id = 5;
|
|
|
|
bytes community_id = 6;
|
|
|
|
uint64 state = 7;
|
2023-06-06 18:33:09 +00:00
|
|
|
repeated RevealedAccount revealed_accounts = 8;
|
2021-08-06 15:40:23 +00:00
|
|
|
}
|
|
|
|
|
2023-09-21 11:16:05 +00:00
|
|
|
message SyncCommunityControlNode {
|
|
|
|
// Lamport timestamp of control node change
|
|
|
|
uint64 clock = 1;
|
|
|
|
|
|
|
|
// The device id of the control node
|
|
|
|
// Empty if there is no control node
|
|
|
|
string installation_id = 2;
|
|
|
|
}
|
|
|
|
|
2023-10-12 21:15:05 +00:00
|
|
|
message SyncChat {
|
|
|
|
string id = 1;
|
|
|
|
uint32 chat_type = 2;
|
|
|
|
string name = 3;
|
|
|
|
repeated MembershipUpdateEvents membershipUpdateEvents = 4;
|
|
|
|
bool active = 5;
|
|
|
|
uint64 clock = 6;
|
|
|
|
bool muted = 7;
|
|
|
|
}
|
|
|
|
|
|
|
|
message MembershipUpdateEvents {
|
|
|
|
uint64 clock = 1;
|
|
|
|
uint32 type = 2;
|
|
|
|
repeated string members = 3;
|
|
|
|
string name = 4;
|
|
|
|
bytes signature = 5;
|
|
|
|
string chat_id = 6;
|
|
|
|
string from = 7;
|
|
|
|
bytes raw_payload = 8;
|
|
|
|
string color = 9;
|
2023-10-17 13:24:15 +00:00
|
|
|
bytes image = 10;
|
2023-10-12 21:15:05 +00:00
|
|
|
}
|
|
|
|
|
2021-10-05 17:26:02 +00:00
|
|
|
message SyncChatRemoved {
|
|
|
|
uint64 clock = 1;
|
|
|
|
string id = 2;
|
2021-10-12 10:33:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message SyncChatMessagesRead {
|
|
|
|
uint64 clock = 1;
|
|
|
|
string id = 2;
|
2021-10-11 15:39:52 +00:00
|
|
|
}
|
2021-12-02 14:23:02 +00:00
|
|
|
|
|
|
|
message SyncActivityCenterRead {
|
|
|
|
uint64 clock = 1;
|
|
|
|
repeated bytes ids = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message SyncActivityCenterAccepted {
|
|
|
|
uint64 clock = 1;
|
|
|
|
repeated bytes ids = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message SyncActivityCenterDismissed {
|
|
|
|
uint64 clock = 1;
|
|
|
|
repeated bytes ids = 2;
|
2022-02-10 10:00:59 +00:00
|
|
|
}
|
|
|
|
|
2023-10-22 09:41:20 +00:00
|
|
|
message SyncActivityCenterDeleted {
|
|
|
|
uint64 clock = 1;
|
|
|
|
repeated bytes ids = 2;
|
2023-06-10 02:00:17 +00:00
|
|
|
}
|
|
|
|
|
2023-10-22 09:41:20 +00:00
|
|
|
message SyncActivityCenterUnread {
|
|
|
|
uint64 clock = 1;
|
|
|
|
repeated bytes ids = 2;
|
2023-06-10 02:00:17 +00:00
|
|
|
}
|
|
|
|
|
2023-10-26 04:17:18 +00:00
|
|
|
message SyncActivityCenterCommunityRequestDecision {
|
|
|
|
uint64 clock = 1;
|
|
|
|
bytes id = 2;
|
|
|
|
uint32 membership_status = 3;
|
|
|
|
enum community_request_decision {
|
|
|
|
ACCEPTED = 0;
|
|
|
|
DECLINED = 1;
|
|
|
|
}
|
|
|
|
community_request_decision decision = 4;
|
|
|
|
}
|
|
|
|
|
2022-01-17 03:42:11 +00:00
|
|
|
message SyncBookmark {
|
|
|
|
uint64 clock = 1;
|
|
|
|
string url = 2;
|
|
|
|
string name = 3;
|
|
|
|
string image_url = 4;
|
|
|
|
bool removed = 5;
|
2022-06-08 18:39:53 +00:00
|
|
|
uint64 deleted_at = 6;
|
2022-01-17 03:42:11 +00:00
|
|
|
}
|
|
|
|
|
2023-04-26 15:37:18 +00:00
|
|
|
message SyncEnsUsernameDetail {
|
|
|
|
uint64 clock = 1;
|
|
|
|
string username = 2;
|
|
|
|
uint64 chain_id = 3;
|
|
|
|
bool removed = 4;
|
|
|
|
}
|
|
|
|
|
2022-02-10 10:00:59 +00:00
|
|
|
message SyncClearHistory {
|
|
|
|
string chat_id = 1;
|
|
|
|
uint64 cleared_at = 2;
|
2022-01-06 16:35:08 +00:00
|
|
|
}
|
2022-03-24 09:35:56 +00:00
|
|
|
|
|
|
|
message SyncProfilePicture {
|
|
|
|
string name = 1;
|
|
|
|
bytes payload = 2;
|
|
|
|
uint32 width = 3;
|
2022-09-20 19:57:39 +00:00
|
|
|
uint32 height = 4;
|
2022-03-24 09:35:56 +00:00
|
|
|
uint32 file_size = 5;
|
|
|
|
uint32 resize_target = 6;
|
|
|
|
uint64 clock = 7;
|
|
|
|
}
|
|
|
|
|
|
|
|
message SyncProfilePictures {
|
|
|
|
string key_uid = 1;
|
|
|
|
repeated SyncProfilePicture pictures = 2;
|
|
|
|
}
|
2022-05-18 10:42:51 +00:00
|
|
|
|
2023-05-16 10:48:00 +00:00
|
|
|
message SyncAccount {
|
2022-05-18 10:42:51 +00:00
|
|
|
uint64 clock = 1;
|
2023-05-16 10:48:00 +00:00
|
|
|
bytes address = 2;
|
|
|
|
string key_uid = 3;
|
|
|
|
bytes public_key = 4;
|
|
|
|
string path = 5;
|
|
|
|
string name = 6;
|
2023-06-05 07:12:15 +00:00
|
|
|
string color_id = 7;
|
2023-05-16 10:48:00 +00:00
|
|
|
string emoji = 8;
|
|
|
|
bool wallet = 9;
|
|
|
|
bool chat = 10;
|
|
|
|
bool hidden = 11;
|
2022-05-18 10:42:51 +00:00
|
|
|
bool removed = 12;
|
2023-06-28 19:45:36 +00:00
|
|
|
int64 position = 13;
|
2023-07-20 13:30:23 +00:00
|
|
|
string prodPreferredChainIDs = 14;
|
|
|
|
string testPreferredChainIDs = 15;
|
2023-08-09 10:36:05 +00:00
|
|
|
string operable = 16;
|
2022-05-18 10:42:51 +00:00
|
|
|
}
|
|
|
|
|
2023-05-16 10:48:00 +00:00
|
|
|
message SyncKeypair {
|
|
|
|
uint64 clock = 1;
|
|
|
|
string key_uid = 2;
|
|
|
|
string name = 3;
|
|
|
|
string type = 4;
|
|
|
|
string derived_from = 5;
|
|
|
|
uint64 last_used_derivation_index = 6;
|
|
|
|
string synced_from = 7;
|
|
|
|
repeated SyncAccount accounts = 8;
|
2023-06-28 19:45:36 +00:00
|
|
|
repeated SyncKeycard keycards = 9;
|
|
|
|
bool removed = 10;
|
2023-09-12 12:45:32 +00:00
|
|
|
bytes keycard_pairings = 11;
|
2022-05-18 10:42:51 +00:00
|
|
|
}
|
2022-06-01 07:55:48 +00:00
|
|
|
|
2023-07-16 11:11:48 +00:00
|
|
|
// this message is used for syncing accounts positions only, for syncing any other info consider
|
|
|
|
// `SyncAccount` or `SyncKeypair` message
|
|
|
|
message SyncAccountsPositions {
|
|
|
|
uint64 clock = 1;
|
|
|
|
repeated SyncAccount accounts = 2;
|
|
|
|
}
|
|
|
|
|
2022-09-14 10:46:11 +00:00
|
|
|
message SyncSavedAddress {
|
2024-01-09 14:59:54 +00:00
|
|
|
reserved 3;
|
2023-03-06 13:26:46 +00:00
|
|
|
reserved 4;
|
2023-12-27 14:59:06 +00:00
|
|
|
bytes address = 1;
|
2022-09-14 10:46:11 +00:00
|
|
|
string name = 2;
|
2023-12-27 14:59:06 +00:00
|
|
|
bool removed = 5;
|
2022-09-14 10:46:11 +00:00
|
|
|
uint64 update_clock = 7;
|
2023-03-06 13:26:46 +00:00
|
|
|
string chain_short_names = 8;
|
|
|
|
string ens = 9;
|
2023-12-27 14:59:06 +00:00
|
|
|
bool is_test = 10;
|
|
|
|
string color = 11;
|
2022-09-14 10:46:11 +00:00
|
|
|
}
|
|
|
|
|
2022-06-01 07:55:48 +00:00
|
|
|
message SyncCommunitySettings {
|
|
|
|
uint64 clock = 1;
|
|
|
|
string community_id = 2;
|
|
|
|
bool history_archive_support_enabled = 3;
|
|
|
|
}
|
2022-07-05 19:49:44 +00:00
|
|
|
|
|
|
|
message SyncTrustedUser {
|
|
|
|
uint64 clock = 1;
|
|
|
|
string id = 2;
|
|
|
|
TrustStatus status = 3;
|
|
|
|
|
|
|
|
enum TrustStatus {
|
|
|
|
UNKNOWN = 0;
|
|
|
|
TRUSTED = 1;
|
|
|
|
UNTRUSTWORTHY = 2;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
message SyncVerificationRequest {
|
|
|
|
uint64 clock = 1;
|
|
|
|
string from = 2;
|
|
|
|
string to = 3;
|
|
|
|
string challenge = 4;
|
|
|
|
uint64 requested_at = 5;
|
|
|
|
string response = 6;
|
|
|
|
uint64 replied_at = 7;
|
|
|
|
VerificationStatus verification_status = 8;
|
2022-08-31 14:41:58 +00:00
|
|
|
string id = 9;
|
2022-07-05 19:49:44 +00:00
|
|
|
|
|
|
|
enum VerificationStatus {
|
|
|
|
UNKNOWN = 0;
|
|
|
|
PENDING = 1;
|
|
|
|
ACCEPTED = 2;
|
|
|
|
DECLINED = 3;
|
|
|
|
CANCELED = 4;
|
|
|
|
}
|
|
|
|
}
|
2022-08-07 14:25:03 +00:00
|
|
|
|
|
|
|
message SyncContactRequestDecision {
|
|
|
|
uint64 clock = 1;
|
|
|
|
string requestId = 2;
|
|
|
|
DecisionStatus decision_status = 3;
|
|
|
|
|
|
|
|
enum DecisionStatus {
|
|
|
|
ACCEPTED = 0;
|
|
|
|
DECLINED = 1;
|
|
|
|
}
|
|
|
|
}
|
2022-11-30 09:41:35 +00:00
|
|
|
|
|
|
|
/* `BackedUpProfile` is used to describe profile of logged in user */
|
|
|
|
message BackedUpProfile {
|
|
|
|
string key_uid = 1;
|
|
|
|
string display_name = 2;
|
|
|
|
uint64 display_name_clock = 3;
|
|
|
|
repeated SyncProfilePicture pictures = 4;
|
2023-06-05 11:10:26 +00:00
|
|
|
SyncSocialLinks social_links = 5;
|
2023-04-26 15:37:18 +00:00
|
|
|
repeated SyncEnsUsernameDetail ens_username_details = 6;
|
2024-02-17 18:07:20 +00:00
|
|
|
SyncProfileShowcasePreferences profile_showcase_preferences = 7;
|
2022-11-30 09:41:35 +00:00
|
|
|
}
|
2023-01-06 12:21:14 +00:00
|
|
|
|
|
|
|
message RawMessage {
|
|
|
|
bytes payload = 1;
|
|
|
|
ApplicationMetadataMessage.Type messageType = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message SyncRawMessage {
|
|
|
|
repeated RawMessage rawMessages = 1;
|
|
|
|
|
|
|
|
// we need these to be able to login
|
|
|
|
bytes subAccountsJsonBytes = 2;
|
|
|
|
bytes settingsJsonBytes = 3;
|
|
|
|
}
|
2023-02-21 12:35:26 +00:00
|
|
|
|
|
|
|
message SyncKeycard {
|
|
|
|
string uid = 1;
|
|
|
|
string name = 2;
|
|
|
|
bool locked = 3;
|
|
|
|
string key_uid = 4;
|
|
|
|
repeated bytes addresses = 5;
|
2023-07-05 12:41:58 +00:00
|
|
|
uint64 position = 6;
|
2023-02-21 12:35:26 +00:00
|
|
|
}
|
|
|
|
|
2023-06-05 11:10:26 +00:00
|
|
|
message SyncSocialLinks {
|
|
|
|
repeated SocialLink social_links = 1;
|
|
|
|
uint64 clock = 2;
|
2023-07-18 13:35:06 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message SyncAccountCustomizationColor {
|
|
|
|
uint64 updated_at = 1;
|
|
|
|
string customization_color = 2;
|
|
|
|
string key_uid = 3;
|
|
|
|
}
|
2023-12-04 10:18:05 +00:00
|
|
|
|
|
|
|
message TokenPreferences {
|
|
|
|
string key = 1;
|
|
|
|
int64 position = 2;
|
|
|
|
int64 groupPosition = 3;
|
|
|
|
bool visible = 4;
|
|
|
|
string communityId = 5;
|
|
|
|
}
|
|
|
|
|
|
|
|
message SyncTokenPreferences {
|
|
|
|
uint64 clock = 1;
|
|
|
|
bool testnet = 2;
|
|
|
|
repeated TokenPreferences preferences = 3;
|
|
|
|
}
|
2024-01-17 13:12:49 +00:00
|
|
|
|
|
|
|
message CollectiblePreferences {
|
|
|
|
int64 type = 1;
|
|
|
|
string key = 2;
|
|
|
|
int64 position = 3;
|
|
|
|
bool visible = 4;
|
|
|
|
}
|
|
|
|
|
|
|
|
message SyncCollectiblePreferences {
|
|
|
|
uint64 clock = 1;
|
|
|
|
bool testnet = 2;
|
|
|
|
repeated CollectiblePreferences preferences = 3;
|
2024-02-21 10:54:33 +00:00
|
|
|
}
|