-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwa5.proto
207 lines (198 loc) · 6.56 KB
/
wa5.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
package whatsapp;
option java_package = "com.whatsapp.proto";
option optimize_for = LITE_RUNTIME;
message HandshakeMessage {
message ClientHello {
optional bytes ephemeral = 1;
optional bytes static = 2;
optional bytes payload = 3;
}
message ServerHello {
optional bytes ephemeral = 1;
optional bytes static = 2;
optional bytes payload = 3;
}
message ClientFinish {
optional bytes static = 1;
optional bytes payload = 2;
}
optional ClientHello client_hello = 2;
optional ServerHello server_hello = 3;
optional ClientFinish client_finish = 4;
}
message ClientPayload {
message UserAgent {
enum Platform {
ANDROID = 0;
IOS = 1;
WINDOWS_PHONE = 2;
BLACKBERRY = 3;
BLACKBERRYX = 4;
S40 = 5;
S60 = 6;
PYTHON_CLIENT = 7;
TIZEN = 8;
ENTERPRISE = 9;
SMB_ANDROID = 10;
KAIOS = 11;
SMB_IOS = 12;
WINDOWS = 13;
WEB = 14;
PORTAL = 15;
GREEN_ANDROID = 16;
GREEN_IPHONE = 17;
BLUE_ANDROID = 18;
BLUE_IPHONE = 19;
FBLITE_ANDROID = 20;
MLITE_ANDROID = 21;
IGLITE_ANDROID = 22;
PAGE = 23;
MACOS = 24;
OCULUS_MSG = 25;
OCULUS_CALL = 26;
MILAN = 27; // FB wearable
CAPI = 28;
}
enum ReleaseChannel {
RELEASE = 0;
BETA = 1;
ALPHA = 2;
DEBUG = 3;
}
message AppVersion {
optional uint32 primary = 1;
optional uint32 secondary = 2;
optional uint32 tertiary = 3;
optional uint32 quaternary = 4;
optional uint32 quinary = 5;
}
optional Platform platform = 1;
optional AppVersion app_version = 2;
optional string mcc = 3;
optional string mnc = 4;
optional string os_version = 5;
optional string manufacturer = 6;
optional string device = 7;
optional string os_build_number = 8;
optional string phone_id = 9;
optional ReleaseChannel release_channel = 10;
optional string locale_language_iso_639_1 = 11;
optional string locale_country_iso_3166_1_alpha_2 = 12;
optional string device_board = 13;
}
message WebInfo {
enum WebSubPlatform {
WEB_BROWSER = 0;
APP_STORE = 1;
WIN_STORE = 2;
DARWIN = 3;
WIN32 = 4;
}
message WebdPayload {
optional bool uses_participant_in_key = 1;
optional bool supports_starred_messages = 2 [deprecated=true]; // assumed to be true with web v7
optional bool supports_document_messages = 3 [deprecated=true]; // deprecated in favour of e2e_document
optional bool supports_url_messages = 4 [deprecated=true]; // true with v10
optional bool supports_media_retry = 5 [deprecated=true]; // true with v7
optional bool supports_e2e_image = 6 [deprecated=true]; // assumed to be true with web v11
optional bool supports_e2e_video = 7 [deprecated=true]; // assumed to be true with web v11
optional bool supports_e2e_audio = 8 [deprecated=true]; // assumed to be true with web v11
optional bool supports_e2e_document = 9 [deprecated=true]; // assumed to be true with web v11
optional string document_types = 10 [deprecated=true]; // web gets directly with web v12
optional bytes features = 11;
}
optional string ref_token = 1;
optional string version = 2;
optional WebdPayload webd_payload = 3;
optional WebSubPlatform web_sub_platform = 4;
}
enum IOSAppExtension {
SHARE_EXTENSION = 0;
SERVICE_EXTENSION = 1; // apns-handler
INTENTS_EXTENSION = 2; // siri-kit
}
enum ConnectReason {
PUSH = 0;
USER_ACTIVATED = 1;
SCHEDULED = 2;
ERROR_RECONNECT = 3;
NETWORK_SWITCH = 4;
PING_RECONNECT = 5;
}
enum ConnectType {
CELLULAR_UNKNOWN = 0;
WIFI_UNKNOWN = 1;
CELLULAR_EDGE = 100;
CELLULAR_IDEN = 101;
CELLULAR_UMTS = 102;
CELLULAR_EVDO = 103;
CELLULAR_GPRS = 104;
CELLULAR_HSDPA = 105;
CELLULAR_HSUPA = 106;
CELLULAR_HSPA = 107;
CELLULAR_CDMA = 108;
CELLULAR_1XRTT = 109;
CELLULAR_EHRPD = 110;
CELLULAR_LTE = 111;
CELLULAR_HSPAP = 112;
}
message DNSSource {
enum DNSResolutionMethod {
SYSTEM = 0;
GOOGLE = 1;
HARDCODED = 2;
OVERRIDE = 3;
FALLBACK = 4;
}
optional DNSResolutionMethod dns_method = 15;
optional bool app_cached = 16;
}
message DevicePairingRegistrationData {
optional bytes e_regid = 1;
optional bytes e_keytype = 2;
optional bytes e_ident = 3;
optional bytes e_skey_id = 4;
optional bytes e_skey_val = 5;
optional bytes e_skey_sig = 6;
optional bytes build_hash = 7;
optional bytes device_props = 8;
}
enum Product {
WHATSAPP = 0;
MESSENGER = 1;
}
optional uint64 username = 1; // phone number for WhatsApp, FBID for Messenger/IG
// optional bytes legacy_password = 2 [deprecated=true];
optional bool passive = 3;
// repeated ClientFeature client_features = 4 [deprecated=true];
optional UserAgent user_agent = 5;
optional WebInfo web_info = 6;
optional string push_name = 7;
// optional uint32 session_id = 8 [deprecated=true]; // replaced by 9
optional sfixed32 session_id = 9;
optional bool short_connect = 10; // Set to true by clients that are clients relying on a push system to wake them up as opposed to intending to stay connected to chatd indefinitely
// optional string connect_reason = 11; // replaced by 13
optional ConnectType connect_type = 12;
optional ConnectReason connect_reason = 13; // Requested as debugging tool
// Used only by sharded enterprise clients to list which client shards this connection will handle.
repeated int32 shards = 14;
optional DNSSource dns_source = 15; // Requested as a debugging tool - optional
optional uint32 connect_attempt_count = 16;
optional uint32 agent = 17;
optional uint32 device = 18;
// Used only for device pairing (either WA companion registration or Trust Circle device onboarding)
optional DevicePairingRegistrationData device_pairing_data = 19;
optional Product product = 20;
optional bytes fb_cat = 21; // Crypto Auth Token
optional bytes fb_user_agent = 22;
// Is this an official client? (may not be reliable)
optional bool oc = 23;
// Login counter
optional int32 lc = 24;
optional IOSAppExtension ios_app_extension = 30;
// https://www.internalfb.com/intern/wiki/Appids/
optional uint64 fb_app_id = 31;
// 128-bit UUID https://www.internalfb.com/intern/wiki/How-do-we-uniquely-identify-devices/device-id/
optional bytes fb_device_id = 32;
}
// NOTE: when you make any change, please update both wa5.proto and wa5_chatd.proto