@hansaka02/baileys 7.3.2 → 7.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (202) hide show
  1. package/README.md +247 -203
  2. package/lib/Defaults/connection.js +51 -0
  3. package/lib/Defaults/constants.js +62 -0
  4. package/lib/Defaults/history.js +17 -0
  5. package/lib/Defaults/index.js +36 -142
  6. package/lib/Defaults/media.js +48 -0
  7. package/lib/Defaults/prefix.js +18 -0
  8. package/lib/Signal/Group/group-session-builder.js +10 -42
  9. package/lib/Signal/Group/group_cipher.js +9 -6
  10. package/lib/Signal/Group/index.js +39 -53
  11. package/lib/Signal/Group/keyhelper.js +8 -41
  12. package/lib/Signal/Group/sender-chain-key.js +4 -4
  13. package/lib/Signal/Group/sender-key-distribution-message.js +5 -5
  14. package/lib/Signal/Group/sender-key-message.js +12 -8
  15. package/lib/Signal/Group/sender-key-record.js +7 -7
  16. package/lib/Signal/Group/sender-key-state.js +4 -4
  17. package/lib/Signal/Group/sender-message-key.js +2 -2
  18. package/lib/Signal/libsignal.js +45 -69
  19. package/lib/Signal/lid-mapping.js +15 -11
  20. package/lib/Socket/Client/types.js +2 -2
  21. package/lib/Socket/Client/websocket.js +16 -14
  22. package/lib/Socket/business.js +41 -32
  23. package/lib/Socket/chats.js +123 -98
  24. package/lib/Socket/community.js +50 -40
  25. package/lib/Socket/groups.js +59 -47
  26. package/lib/Socket/index.js +4 -4
  27. package/lib/Socket/messages-recv.js +219 -172
  28. package/lib/Socket/messages-send.js +187 -143
  29. package/lib/Socket/newsletter.js +61 -47
  30. package/lib/Socket/socket.js +133 -90
  31. package/lib/Socket/usync.js +6 -6
  32. package/lib/Store/index.js +27 -11
  33. package/lib/Store/make-cache-manager-store.js +14 -15
  34. package/lib/Store/make-in-memory-store.js +28 -24
  35. package/lib/Types/LabelAssociation.js +2 -2
  36. package/lib/Types/Message.js +6 -6
  37. package/lib/Types/MexUpdates.js +5 -5
  38. package/lib/Types/State.js +4 -4
  39. package/lib/Types/index.js +28 -12
  40. package/lib/Utils/auth-utils.js +28 -26
  41. package/lib/Utils/baileys-event-stream.js +68 -69
  42. package/lib/Utils/business.js +63 -53
  43. package/lib/Utils/chat-utils.js +81 -71
  44. package/lib/Utils/crypto.js +25 -45
  45. package/lib/Utils/decode-wa-message.js +319 -311
  46. package/lib/Utils/event-buffer.js +21 -22
  47. package/lib/Utils/generics.js +65 -82
  48. package/lib/Utils/history.js +21 -21
  49. package/lib/Utils/index.js +27 -13
  50. package/lib/Utils/link-preview.js +7 -30
  51. package/lib/Utils/logger.js +5 -5
  52. package/lib/Utils/lt-hash.js +3 -3
  53. package/lib/Utils/message-retry-manager.js +4 -4
  54. package/lib/Utils/messages-media.js +104 -109
  55. package/lib/Utils/messages.js +203 -171
  56. package/lib/Utils/noise-handler.js +28 -19
  57. package/lib/Utils/process-message.js +111 -96
  58. package/lib/Utils/signal.js +36 -25
  59. package/lib/Utils/use-multi-file-auth-state.js +18 -22
  60. package/lib/Utils/validate-connection.js +52 -45
  61. package/lib/WABinary/decode.js +6 -32
  62. package/lib/WABinary/encode.js +3 -29
  63. package/lib/WABinary/generic-utils.js +4 -4
  64. package/lib/WABinary/index.js +27 -11
  65. package/lib/WAM/encode.js +16 -8
  66. package/lib/WAM/index.js +27 -11
  67. package/lib/WAUSync/Protocols/USyncBotProfileProtocol.js +20 -16
  68. package/lib/WAUSync/Protocols/USyncContactProtocol.js +2 -2
  69. package/lib/WAUSync/Protocols/USyncDeviceProtocol.js +7 -4
  70. package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js +2 -2
  71. package/lib/WAUSync/Protocols/USyncLIDProtocol.js +0 -2
  72. package/lib/WAUSync/Protocols/USyncStatusProtocol.js +2 -2
  73. package/lib/WAUSync/Protocols/index.js +27 -11
  74. package/lib/WAUSync/USyncQuery.js +17 -10
  75. package/lib/WAUSync/index.js +27 -11
  76. package/lib/index.js +60 -31
  77. package/package.json +8 -14
  78. package/WAProto/AICommon/AICommon.d.ts +0 -11702
  79. package/WAProto/Adv/Adv.d.ts +0 -643
  80. package/WAProto/BotMetadata/BotMetadata.d.ts +0 -5654
  81. package/WAProto/Cert/Cert.d.ts +0 -613
  82. package/WAProto/ChatLockSettings/ChatLockSettings.d.ts +0 -476
  83. package/WAProto/CompanionReg/CompanionReg.d.ts +0 -1361
  84. package/WAProto/DeviceCapabilities/DeviceCapabilities.d.ts +0 -577
  85. package/WAProto/E2E/E2E.d.ts +0 -41724
  86. package/WAProto/Ephemeral/Ephemeral.d.ts +0 -114
  87. package/WAProto/HistorySync/HistorySync.d.ts +0 -51700
  88. package/WAProto/LidMigrationSyncPayload/LidMigrationSyncPayload.d.ts +0 -229
  89. package/WAProto/MdStorageChatRowOpaqueData/MdStorageChatRowOpaqueData.d.ts +0 -583
  90. package/WAProto/MdStorageMsgRowOpaqueData/MdStorageMsgRowOpaqueData.d.ts +0 -42897
  91. package/WAProto/MmsRetry/MmsRetry.d.ts +0 -243
  92. package/WAProto/Protocol/Protocol.d.ts +0 -270
  93. package/WAProto/Reporting/Reporting.d.ts +0 -371
  94. package/WAProto/ServerSync/ServerSync.d.ts +0 -1285
  95. package/WAProto/SignalLocalStorageProtocol/SignalLocalStorageProtocol.d.ts +0 -1868
  96. package/WAProto/SignalWhisperTextProtocol/SignalWhisperTextProtocol.d.ts +0 -767
  97. package/WAProto/StatusAttributions/StatusAttributions.d.ts +0 -1027
  98. package/WAProto/SyncAction/SyncAction.d.ts +0 -11193
  99. package/WAProto/UserPassword/UserPassword.d.ts +0 -363
  100. package/WAProto/VnameCert/VnameCert.d.ts +0 -821
  101. package/WAProto/Wa6/Wa6.d.ts +0 -2128
  102. package/WAProto/Web/Web.d.ts +0 -46383
  103. package/WAProto/index.d.ts +0 -55
  104. package/lib/Defaults/index.d.ts +0 -77
  105. package/lib/Signal/Group/ciphertext-message.d.ts +0 -9
  106. package/lib/Signal/Group/group-session-builder.d.ts +0 -17
  107. package/lib/Signal/Group/group_cipher.d.ts +0 -19
  108. package/lib/Signal/Group/index.d.ts +0 -11
  109. package/lib/Signal/Group/keyhelper.d.ts +0 -16
  110. package/lib/Signal/Group/sender-chain-key.d.ts +0 -14
  111. package/lib/Signal/Group/sender-key-distribution-message.d.ts +0 -17
  112. package/lib/Signal/Group/sender-key-message.d.ts +0 -19
  113. package/lib/Signal/Group/sender-key-name.d.ts +0 -19
  114. package/lib/Signal/Group/sender-key-record.d.ts +0 -32
  115. package/lib/Signal/Group/sender-key-state.d.ts +0 -44
  116. package/lib/Signal/Group/sender-message-key.d.ts +0 -11
  117. package/lib/Signal/libsignal.d.ts +0 -8
  118. package/lib/Signal/lid-mapping.d.ts +0 -28
  119. package/lib/Socket/Client/index.d.ts +0 -2
  120. package/lib/Socket/Client/types.d.ts +0 -16
  121. package/lib/Socket/Client/websocket.d.ts +0 -13
  122. package/lib/Socket/business.d.ts +0 -187
  123. package/lib/Socket/chats.d.ts +0 -97
  124. package/lib/Socket/community.d.ts +0 -129
  125. package/lib/Socket/groups.d.ts +0 -129
  126. package/lib/Socket/index.d.ts +0 -191
  127. package/lib/Socket/messages-recv.d.ts +0 -174
  128. package/lib/Socket/messages-send.d.ts +0 -165
  129. package/lib/Socket/newsletter.d.ts +0 -145
  130. package/lib/Socket/socket.d.ts +0 -45
  131. package/lib/Socket/usync.d.ts +0 -37
  132. package/lib/Store/index.d.ts +0 -4
  133. package/lib/Store/make-cache-manager-store.d.ts +0 -14
  134. package/lib/Store/make-in-memory-store.d.ts +0 -123
  135. package/lib/Store/make-ordered-dictionary.d.ts +0 -12
  136. package/lib/Store/object-repository.d.ts +0 -10
  137. package/lib/Types/Auth.d.ts +0 -121
  138. package/lib/Types/Bussiness.d.ts +0 -28
  139. package/lib/Types/Call.d.ts +0 -14
  140. package/lib/Types/Chat.d.ts +0 -143
  141. package/lib/Types/Contact.d.ts +0 -23
  142. package/lib/Types/Events.d.ts +0 -226
  143. package/lib/Types/GroupMetadata.d.ts +0 -66
  144. package/lib/Types/Label.d.ts +0 -48
  145. package/lib/Types/LabelAssociation.d.ts +0 -35
  146. package/lib/Types/Message.d.ts +0 -484
  147. package/lib/Types/MexUpdates.d.ts +0 -9
  148. package/lib/Types/Newsletter.d.ts +0 -109
  149. package/lib/Types/Product.d.ts +0 -92
  150. package/lib/Types/Signal.d.ts +0 -98
  151. package/lib/Types/Socket.d.ts +0 -141
  152. package/lib/Types/State.d.ts +0 -41
  153. package/lib/Types/USync.d.ts +0 -26
  154. package/lib/Types/index.d.ts +0 -80
  155. package/lib/Utils/auth-utils.d.ts +0 -21
  156. package/lib/Utils/baileys-event-stream.d.ts +0 -18
  157. package/lib/Utils/business.d.ts +0 -29
  158. package/lib/Utils/chat-utils.d.ts +0 -82
  159. package/lib/Utils/crypto.d.ts +0 -56
  160. package/lib/Utils/decode-wa-message.d.ts +0 -53
  161. package/lib/Utils/event-buffer.d.ts +0 -39
  162. package/lib/Utils/generics.d.ts +0 -117
  163. package/lib/Utils/history.d.ts +0 -23
  164. package/lib/Utils/index.d.ts +0 -20
  165. package/lib/Utils/link-preview.d.ts +0 -23
  166. package/lib/Utils/logger.d.ts +0 -13
  167. package/lib/Utils/lt-hash.d.ts +0 -14
  168. package/lib/Utils/make-mutex.d.ts +0 -9
  169. package/lib/Utils/message-retry-manager.d.ts +0 -88
  170. package/lib/Utils/messages-media.d.ts +0 -135
  171. package/lib/Utils/messages.d.ts +0 -105
  172. package/lib/Utils/noise-handler.d.ts +0 -20
  173. package/lib/Utils/process-message.d.ts +0 -49
  174. package/lib/Utils/signal.d.ts +0 -42
  175. package/lib/Utils/use-mongo-file-auth-state.d.ts +0 -6
  176. package/lib/Utils/use-mongo-file-auth-state.js +0 -84
  177. package/lib/Utils/use-multi-file-auth-state.d.ts +0 -13
  178. package/lib/Utils/use-single-file-auth-state.d.ts +0 -13
  179. package/lib/Utils/use-single-file-auth-state.js +0 -80
  180. package/lib/Utils/validate-connection.d.ts +0 -13
  181. package/lib/WABinary/constants.d.ts +0 -30
  182. package/lib/WABinary/decode.d.ts +0 -9
  183. package/lib/WABinary/encode.d.ts +0 -3
  184. package/lib/WABinary/generic-utils.d.ts +0 -28
  185. package/lib/WABinary/index.d.ts +0 -5
  186. package/lib/WABinary/jid-utils.d.ts +0 -58
  187. package/lib/WABinary/types.d.ts +0 -22
  188. package/lib/WAM/BinaryInfo.d.ts +0 -16
  189. package/lib/WAM/constants.d.ts +0 -47
  190. package/lib/WAM/encode.d.ts +0 -3
  191. package/lib/WAM/index.d.ts +0 -3
  192. package/lib/WAUSync/Protocols/USyncBotProfileProtocol.d.ts +0 -28
  193. package/lib/WAUSync/Protocols/USyncContactProtocol.d.ts +0 -10
  194. package/lib/WAUSync/Protocols/USyncDeviceProtocol.d.ts +0 -26
  195. package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.d.ts +0 -14
  196. package/lib/WAUSync/Protocols/USyncLIDProtocol.d.ts +0 -10
  197. package/lib/WAUSync/Protocols/USyncStatusProtocol.d.ts +0 -14
  198. package/lib/WAUSync/Protocols/index.d.ts +0 -6
  199. package/lib/WAUSync/USyncQuery.d.ts +0 -31
  200. package/lib/WAUSync/USyncUser.d.ts +0 -12
  201. package/lib/WAUSync/index.d.ts +0 -3
  202. package/lib/index.d.ts +0 -13
@@ -1,767 +0,0 @@
1
- import * as $protobuf from "protobufjs";
2
- import Long = require("long");
3
- /** Namespace SignalWhisperTextProtocol. */
4
- export namespace SignalWhisperTextProtocol {
5
-
6
- /** Properties of a DeviceConsistencyCodeMessage. */
7
- interface IDeviceConsistencyCodeMessage {
8
-
9
- /** DeviceConsistencyCodeMessage generation */
10
- generation?: (number|null);
11
-
12
- /** DeviceConsistencyCodeMessage signature */
13
- signature?: (Uint8Array|null);
14
- }
15
-
16
- /** Represents a DeviceConsistencyCodeMessage. */
17
- class DeviceConsistencyCodeMessage implements IDeviceConsistencyCodeMessage {
18
-
19
- /**
20
- * Constructs a new DeviceConsistencyCodeMessage.
21
- * @param [properties] Properties to set
22
- */
23
- constructor(properties?: SignalWhisperTextProtocol.IDeviceConsistencyCodeMessage);
24
-
25
- /** DeviceConsistencyCodeMessage generation. */
26
- public generation?: (number|null);
27
-
28
- /** DeviceConsistencyCodeMessage signature. */
29
- public signature?: (Uint8Array|null);
30
-
31
- /** DeviceConsistencyCodeMessage _generation. */
32
- public _generation?: "generation";
33
-
34
- /** DeviceConsistencyCodeMessage _signature. */
35
- public _signature?: "signature";
36
-
37
- /**
38
- * Creates a new DeviceConsistencyCodeMessage instance using the specified properties.
39
- * @param [properties] Properties to set
40
- * @returns DeviceConsistencyCodeMessage instance
41
- */
42
- public static create(properties?: SignalWhisperTextProtocol.IDeviceConsistencyCodeMessage): SignalWhisperTextProtocol.DeviceConsistencyCodeMessage;
43
-
44
- /**
45
- * Encodes the specified DeviceConsistencyCodeMessage message. Does not implicitly {@link SignalWhisperTextProtocol.DeviceConsistencyCodeMessage.verify|verify} messages.
46
- * @param message DeviceConsistencyCodeMessage message or plain object to encode
47
- * @param [writer] Writer to encode to
48
- * @returns Writer
49
- */
50
- public static encode(message: SignalWhisperTextProtocol.IDeviceConsistencyCodeMessage, writer?: $protobuf.Writer): $protobuf.Writer;
51
-
52
- /**
53
- * Encodes the specified DeviceConsistencyCodeMessage message, length delimited. Does not implicitly {@link SignalWhisperTextProtocol.DeviceConsistencyCodeMessage.verify|verify} messages.
54
- * @param message DeviceConsistencyCodeMessage message or plain object to encode
55
- * @param [writer] Writer to encode to
56
- * @returns Writer
57
- */
58
- public static encodeDelimited(message: SignalWhisperTextProtocol.IDeviceConsistencyCodeMessage, writer?: $protobuf.Writer): $protobuf.Writer;
59
-
60
- /**
61
- * Decodes a DeviceConsistencyCodeMessage message from the specified reader or buffer.
62
- * @param reader Reader or buffer to decode from
63
- * @param [length] Message length if known beforehand
64
- * @returns DeviceConsistencyCodeMessage
65
- * @throws {Error} If the payload is not a reader or valid buffer
66
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
67
- */
68
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): SignalWhisperTextProtocol.DeviceConsistencyCodeMessage;
69
-
70
- /**
71
- * Decodes a DeviceConsistencyCodeMessage message from the specified reader or buffer, length delimited.
72
- * @param reader Reader or buffer to decode from
73
- * @returns DeviceConsistencyCodeMessage
74
- * @throws {Error} If the payload is not a reader or valid buffer
75
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
76
- */
77
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): SignalWhisperTextProtocol.DeviceConsistencyCodeMessage;
78
-
79
- /**
80
- * Verifies a DeviceConsistencyCodeMessage message.
81
- * @param message Plain object to verify
82
- * @returns `null` if valid, otherwise the reason why it is not
83
- */
84
- public static verify(message: { [k: string]: any }): (string|null);
85
-
86
- /**
87
- * Creates a DeviceConsistencyCodeMessage message from a plain object. Also converts values to their respective internal types.
88
- * @param object Plain object
89
- * @returns DeviceConsistencyCodeMessage
90
- */
91
- public static fromObject(object: { [k: string]: any }): SignalWhisperTextProtocol.DeviceConsistencyCodeMessage;
92
-
93
- /**
94
- * Creates a plain object from a DeviceConsistencyCodeMessage message. Also converts values to other types if specified.
95
- * @param message DeviceConsistencyCodeMessage
96
- * @param [options] Conversion options
97
- * @returns Plain object
98
- */
99
- public static toObject(message: SignalWhisperTextProtocol.DeviceConsistencyCodeMessage, options?: $protobuf.IConversionOptions): { [k: string]: any };
100
-
101
- /**
102
- * Converts this DeviceConsistencyCodeMessage to JSON.
103
- * @returns JSON object
104
- */
105
- public toJSON(): { [k: string]: any };
106
-
107
- /**
108
- * Gets the default type url for DeviceConsistencyCodeMessage
109
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
110
- * @returns The default type url
111
- */
112
- public static getTypeUrl(typeUrlPrefix?: string): string;
113
- }
114
-
115
- /** Properties of a SenderKeyDistributionMessage. */
116
- interface ISenderKeyDistributionMessage {
117
-
118
- /** SenderKeyDistributionMessage id */
119
- id?: (number|null);
120
-
121
- /** SenderKeyDistributionMessage iteration */
122
- iteration?: (number|null);
123
-
124
- /** SenderKeyDistributionMessage chainKey */
125
- chainKey?: (Uint8Array|null);
126
-
127
- /** SenderKeyDistributionMessage signingKey */
128
- signingKey?: (Uint8Array|null);
129
- }
130
-
131
- /** Represents a SenderKeyDistributionMessage. */
132
- class SenderKeyDistributionMessage implements ISenderKeyDistributionMessage {
133
-
134
- /**
135
- * Constructs a new SenderKeyDistributionMessage.
136
- * @param [properties] Properties to set
137
- */
138
- constructor(properties?: SignalWhisperTextProtocol.ISenderKeyDistributionMessage);
139
-
140
- /** SenderKeyDistributionMessage id. */
141
- public id?: (number|null);
142
-
143
- /** SenderKeyDistributionMessage iteration. */
144
- public iteration?: (number|null);
145
-
146
- /** SenderKeyDistributionMessage chainKey. */
147
- public chainKey?: (Uint8Array|null);
148
-
149
- /** SenderKeyDistributionMessage signingKey. */
150
- public signingKey?: (Uint8Array|null);
151
-
152
- /** SenderKeyDistributionMessage _id. */
153
- public _id?: "id";
154
-
155
- /** SenderKeyDistributionMessage _iteration. */
156
- public _iteration?: "iteration";
157
-
158
- /** SenderKeyDistributionMessage _chainKey. */
159
- public _chainKey?: "chainKey";
160
-
161
- /** SenderKeyDistributionMessage _signingKey. */
162
- public _signingKey?: "signingKey";
163
-
164
- /**
165
- * Creates a new SenderKeyDistributionMessage instance using the specified properties.
166
- * @param [properties] Properties to set
167
- * @returns SenderKeyDistributionMessage instance
168
- */
169
- public static create(properties?: SignalWhisperTextProtocol.ISenderKeyDistributionMessage): SignalWhisperTextProtocol.SenderKeyDistributionMessage;
170
-
171
- /**
172
- * Encodes the specified SenderKeyDistributionMessage message. Does not implicitly {@link SignalWhisperTextProtocol.SenderKeyDistributionMessage.verify|verify} messages.
173
- * @param message SenderKeyDistributionMessage message or plain object to encode
174
- * @param [writer] Writer to encode to
175
- * @returns Writer
176
- */
177
- public static encode(message: SignalWhisperTextProtocol.ISenderKeyDistributionMessage, writer?: $protobuf.Writer): $protobuf.Writer;
178
-
179
- /**
180
- * Encodes the specified SenderKeyDistributionMessage message, length delimited. Does not implicitly {@link SignalWhisperTextProtocol.SenderKeyDistributionMessage.verify|verify} messages.
181
- * @param message SenderKeyDistributionMessage message or plain object to encode
182
- * @param [writer] Writer to encode to
183
- * @returns Writer
184
- */
185
- public static encodeDelimited(message: SignalWhisperTextProtocol.ISenderKeyDistributionMessage, writer?: $protobuf.Writer): $protobuf.Writer;
186
-
187
- /**
188
- * Decodes a SenderKeyDistributionMessage message from the specified reader or buffer.
189
- * @param reader Reader or buffer to decode from
190
- * @param [length] Message length if known beforehand
191
- * @returns SenderKeyDistributionMessage
192
- * @throws {Error} If the payload is not a reader or valid buffer
193
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
194
- */
195
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): SignalWhisperTextProtocol.SenderKeyDistributionMessage;
196
-
197
- /**
198
- * Decodes a SenderKeyDistributionMessage message from the specified reader or buffer, length delimited.
199
- * @param reader Reader or buffer to decode from
200
- * @returns SenderKeyDistributionMessage
201
- * @throws {Error} If the payload is not a reader or valid buffer
202
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
203
- */
204
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): SignalWhisperTextProtocol.SenderKeyDistributionMessage;
205
-
206
- /**
207
- * Verifies a SenderKeyDistributionMessage message.
208
- * @param message Plain object to verify
209
- * @returns `null` if valid, otherwise the reason why it is not
210
- */
211
- public static verify(message: { [k: string]: any }): (string|null);
212
-
213
- /**
214
- * Creates a SenderKeyDistributionMessage message from a plain object. Also converts values to their respective internal types.
215
- * @param object Plain object
216
- * @returns SenderKeyDistributionMessage
217
- */
218
- public static fromObject(object: { [k: string]: any }): SignalWhisperTextProtocol.SenderKeyDistributionMessage;
219
-
220
- /**
221
- * Creates a plain object from a SenderKeyDistributionMessage message. Also converts values to other types if specified.
222
- * @param message SenderKeyDistributionMessage
223
- * @param [options] Conversion options
224
- * @returns Plain object
225
- */
226
- public static toObject(message: SignalWhisperTextProtocol.SenderKeyDistributionMessage, options?: $protobuf.IConversionOptions): { [k: string]: any };
227
-
228
- /**
229
- * Converts this SenderKeyDistributionMessage to JSON.
230
- * @returns JSON object
231
- */
232
- public toJSON(): { [k: string]: any };
233
-
234
- /**
235
- * Gets the default type url for SenderKeyDistributionMessage
236
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
237
- * @returns The default type url
238
- */
239
- public static getTypeUrl(typeUrlPrefix?: string): string;
240
- }
241
-
242
- /** Properties of a SenderKeyMessage. */
243
- interface ISenderKeyMessage {
244
-
245
- /** SenderKeyMessage id */
246
- id?: (number|null);
247
-
248
- /** SenderKeyMessage iteration */
249
- iteration?: (number|null);
250
-
251
- /** SenderKeyMessage ciphertext */
252
- ciphertext?: (Uint8Array|null);
253
- }
254
-
255
- /** Represents a SenderKeyMessage. */
256
- class SenderKeyMessage implements ISenderKeyMessage {
257
-
258
- /**
259
- * Constructs a new SenderKeyMessage.
260
- * @param [properties] Properties to set
261
- */
262
- constructor(properties?: SignalWhisperTextProtocol.ISenderKeyMessage);
263
-
264
- /** SenderKeyMessage id. */
265
- public id?: (number|null);
266
-
267
- /** SenderKeyMessage iteration. */
268
- public iteration?: (number|null);
269
-
270
- /** SenderKeyMessage ciphertext. */
271
- public ciphertext?: (Uint8Array|null);
272
-
273
- /** SenderKeyMessage _id. */
274
- public _id?: "id";
275
-
276
- /** SenderKeyMessage _iteration. */
277
- public _iteration?: "iteration";
278
-
279
- /** SenderKeyMessage _ciphertext. */
280
- public _ciphertext?: "ciphertext";
281
-
282
- /**
283
- * Creates a new SenderKeyMessage instance using the specified properties.
284
- * @param [properties] Properties to set
285
- * @returns SenderKeyMessage instance
286
- */
287
- public static create(properties?: SignalWhisperTextProtocol.ISenderKeyMessage): SignalWhisperTextProtocol.SenderKeyMessage;
288
-
289
- /**
290
- * Encodes the specified SenderKeyMessage message. Does not implicitly {@link SignalWhisperTextProtocol.SenderKeyMessage.verify|verify} messages.
291
- * @param message SenderKeyMessage message or plain object to encode
292
- * @param [writer] Writer to encode to
293
- * @returns Writer
294
- */
295
- public static encode(message: SignalWhisperTextProtocol.ISenderKeyMessage, writer?: $protobuf.Writer): $protobuf.Writer;
296
-
297
- /**
298
- * Encodes the specified SenderKeyMessage message, length delimited. Does not implicitly {@link SignalWhisperTextProtocol.SenderKeyMessage.verify|verify} messages.
299
- * @param message SenderKeyMessage message or plain object to encode
300
- * @param [writer] Writer to encode to
301
- * @returns Writer
302
- */
303
- public static encodeDelimited(message: SignalWhisperTextProtocol.ISenderKeyMessage, writer?: $protobuf.Writer): $protobuf.Writer;
304
-
305
- /**
306
- * Decodes a SenderKeyMessage message from the specified reader or buffer.
307
- * @param reader Reader or buffer to decode from
308
- * @param [length] Message length if known beforehand
309
- * @returns SenderKeyMessage
310
- * @throws {Error} If the payload is not a reader or valid buffer
311
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
312
- */
313
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): SignalWhisperTextProtocol.SenderKeyMessage;
314
-
315
- /**
316
- * Decodes a SenderKeyMessage message from the specified reader or buffer, length delimited.
317
- * @param reader Reader or buffer to decode from
318
- * @returns SenderKeyMessage
319
- * @throws {Error} If the payload is not a reader or valid buffer
320
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
321
- */
322
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): SignalWhisperTextProtocol.SenderKeyMessage;
323
-
324
- /**
325
- * Verifies a SenderKeyMessage message.
326
- * @param message Plain object to verify
327
- * @returns `null` if valid, otherwise the reason why it is not
328
- */
329
- public static verify(message: { [k: string]: any }): (string|null);
330
-
331
- /**
332
- * Creates a SenderKeyMessage message from a plain object. Also converts values to their respective internal types.
333
- * @param object Plain object
334
- * @returns SenderKeyMessage
335
- */
336
- public static fromObject(object: { [k: string]: any }): SignalWhisperTextProtocol.SenderKeyMessage;
337
-
338
- /**
339
- * Creates a plain object from a SenderKeyMessage message. Also converts values to other types if specified.
340
- * @param message SenderKeyMessage
341
- * @param [options] Conversion options
342
- * @returns Plain object
343
- */
344
- public static toObject(message: SignalWhisperTextProtocol.SenderKeyMessage, options?: $protobuf.IConversionOptions): { [k: string]: any };
345
-
346
- /**
347
- * Converts this SenderKeyMessage to JSON.
348
- * @returns JSON object
349
- */
350
- public toJSON(): { [k: string]: any };
351
-
352
- /**
353
- * Gets the default type url for SenderKeyMessage
354
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
355
- * @returns The default type url
356
- */
357
- public static getTypeUrl(typeUrlPrefix?: string): string;
358
- }
359
-
360
- /** Properties of a KeyExchangeMessage. */
361
- interface IKeyExchangeMessage {
362
-
363
- /** KeyExchangeMessage id */
364
- id?: (number|null);
365
-
366
- /** KeyExchangeMessage baseKey */
367
- baseKey?: (Uint8Array|null);
368
-
369
- /** KeyExchangeMessage ratchetKey */
370
- ratchetKey?: (Uint8Array|null);
371
-
372
- /** KeyExchangeMessage identityKey */
373
- identityKey?: (Uint8Array|null);
374
-
375
- /** KeyExchangeMessage baseKeySignature */
376
- baseKeySignature?: (Uint8Array|null);
377
- }
378
-
379
- /** Represents a KeyExchangeMessage. */
380
- class KeyExchangeMessage implements IKeyExchangeMessage {
381
-
382
- /**
383
- * Constructs a new KeyExchangeMessage.
384
- * @param [properties] Properties to set
385
- */
386
- constructor(properties?: SignalWhisperTextProtocol.IKeyExchangeMessage);
387
-
388
- /** KeyExchangeMessage id. */
389
- public id?: (number|null);
390
-
391
- /** KeyExchangeMessage baseKey. */
392
- public baseKey?: (Uint8Array|null);
393
-
394
- /** KeyExchangeMessage ratchetKey. */
395
- public ratchetKey?: (Uint8Array|null);
396
-
397
- /** KeyExchangeMessage identityKey. */
398
- public identityKey?: (Uint8Array|null);
399
-
400
- /** KeyExchangeMessage baseKeySignature. */
401
- public baseKeySignature?: (Uint8Array|null);
402
-
403
- /** KeyExchangeMessage _id. */
404
- public _id?: "id";
405
-
406
- /** KeyExchangeMessage _baseKey. */
407
- public _baseKey?: "baseKey";
408
-
409
- /** KeyExchangeMessage _ratchetKey. */
410
- public _ratchetKey?: "ratchetKey";
411
-
412
- /** KeyExchangeMessage _identityKey. */
413
- public _identityKey?: "identityKey";
414
-
415
- /** KeyExchangeMessage _baseKeySignature. */
416
- public _baseKeySignature?: "baseKeySignature";
417
-
418
- /**
419
- * Creates a new KeyExchangeMessage instance using the specified properties.
420
- * @param [properties] Properties to set
421
- * @returns KeyExchangeMessage instance
422
- */
423
- public static create(properties?: SignalWhisperTextProtocol.IKeyExchangeMessage): SignalWhisperTextProtocol.KeyExchangeMessage;
424
-
425
- /**
426
- * Encodes the specified KeyExchangeMessage message. Does not implicitly {@link SignalWhisperTextProtocol.KeyExchangeMessage.verify|verify} messages.
427
- * @param message KeyExchangeMessage message or plain object to encode
428
- * @param [writer] Writer to encode to
429
- * @returns Writer
430
- */
431
- public static encode(message: SignalWhisperTextProtocol.IKeyExchangeMessage, writer?: $protobuf.Writer): $protobuf.Writer;
432
-
433
- /**
434
- * Encodes the specified KeyExchangeMessage message, length delimited. Does not implicitly {@link SignalWhisperTextProtocol.KeyExchangeMessage.verify|verify} messages.
435
- * @param message KeyExchangeMessage message or plain object to encode
436
- * @param [writer] Writer to encode to
437
- * @returns Writer
438
- */
439
- public static encodeDelimited(message: SignalWhisperTextProtocol.IKeyExchangeMessage, writer?: $protobuf.Writer): $protobuf.Writer;
440
-
441
- /**
442
- * Decodes a KeyExchangeMessage message from the specified reader or buffer.
443
- * @param reader Reader or buffer to decode from
444
- * @param [length] Message length if known beforehand
445
- * @returns KeyExchangeMessage
446
- * @throws {Error} If the payload is not a reader or valid buffer
447
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
448
- */
449
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): SignalWhisperTextProtocol.KeyExchangeMessage;
450
-
451
- /**
452
- * Decodes a KeyExchangeMessage message from the specified reader or buffer, length delimited.
453
- * @param reader Reader or buffer to decode from
454
- * @returns KeyExchangeMessage
455
- * @throws {Error} If the payload is not a reader or valid buffer
456
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
457
- */
458
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): SignalWhisperTextProtocol.KeyExchangeMessage;
459
-
460
- /**
461
- * Verifies a KeyExchangeMessage message.
462
- * @param message Plain object to verify
463
- * @returns `null` if valid, otherwise the reason why it is not
464
- */
465
- public static verify(message: { [k: string]: any }): (string|null);
466
-
467
- /**
468
- * Creates a KeyExchangeMessage message from a plain object. Also converts values to their respective internal types.
469
- * @param object Plain object
470
- * @returns KeyExchangeMessage
471
- */
472
- public static fromObject(object: { [k: string]: any }): SignalWhisperTextProtocol.KeyExchangeMessage;
473
-
474
- /**
475
- * Creates a plain object from a KeyExchangeMessage message. Also converts values to other types if specified.
476
- * @param message KeyExchangeMessage
477
- * @param [options] Conversion options
478
- * @returns Plain object
479
- */
480
- public static toObject(message: SignalWhisperTextProtocol.KeyExchangeMessage, options?: $protobuf.IConversionOptions): { [k: string]: any };
481
-
482
- /**
483
- * Converts this KeyExchangeMessage to JSON.
484
- * @returns JSON object
485
- */
486
- public toJSON(): { [k: string]: any };
487
-
488
- /**
489
- * Gets the default type url for KeyExchangeMessage
490
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
491
- * @returns The default type url
492
- */
493
- public static getTypeUrl(typeUrlPrefix?: string): string;
494
- }
495
-
496
- /** Properties of a PreKeySignalMessage. */
497
- interface IPreKeySignalMessage {
498
-
499
- /** PreKeySignalMessage registrationId */
500
- registrationId?: (number|null);
501
-
502
- /** PreKeySignalMessage preKeyId */
503
- preKeyId?: (number|null);
504
-
505
- /** PreKeySignalMessage signedPreKeyId */
506
- signedPreKeyId?: (number|null);
507
-
508
- /** PreKeySignalMessage baseKey */
509
- baseKey?: (Uint8Array|null);
510
-
511
- /** PreKeySignalMessage identityKey */
512
- identityKey?: (Uint8Array|null);
513
-
514
- /** PreKeySignalMessage message */
515
- message?: (Uint8Array|null);
516
- }
517
-
518
- /** Represents a PreKeySignalMessage. */
519
- class PreKeySignalMessage implements IPreKeySignalMessage {
520
-
521
- /**
522
- * Constructs a new PreKeySignalMessage.
523
- * @param [properties] Properties to set
524
- */
525
- constructor(properties?: SignalWhisperTextProtocol.IPreKeySignalMessage);
526
-
527
- /** PreKeySignalMessage registrationId. */
528
- public registrationId?: (number|null);
529
-
530
- /** PreKeySignalMessage preKeyId. */
531
- public preKeyId?: (number|null);
532
-
533
- /** PreKeySignalMessage signedPreKeyId. */
534
- public signedPreKeyId?: (number|null);
535
-
536
- /** PreKeySignalMessage baseKey. */
537
- public baseKey?: (Uint8Array|null);
538
-
539
- /** PreKeySignalMessage identityKey. */
540
- public identityKey?: (Uint8Array|null);
541
-
542
- /** PreKeySignalMessage message. */
543
- public message?: (Uint8Array|null);
544
-
545
- /** PreKeySignalMessage _registrationId. */
546
- public _registrationId?: "registrationId";
547
-
548
- /** PreKeySignalMessage _preKeyId. */
549
- public _preKeyId?: "preKeyId";
550
-
551
- /** PreKeySignalMessage _signedPreKeyId. */
552
- public _signedPreKeyId?: "signedPreKeyId";
553
-
554
- /** PreKeySignalMessage _baseKey. */
555
- public _baseKey?: "baseKey";
556
-
557
- /** PreKeySignalMessage _identityKey. */
558
- public _identityKey?: "identityKey";
559
-
560
- /** PreKeySignalMessage _message. */
561
- public _message?: "message";
562
-
563
- /**
564
- * Creates a new PreKeySignalMessage instance using the specified properties.
565
- * @param [properties] Properties to set
566
- * @returns PreKeySignalMessage instance
567
- */
568
- public static create(properties?: SignalWhisperTextProtocol.IPreKeySignalMessage): SignalWhisperTextProtocol.PreKeySignalMessage;
569
-
570
- /**
571
- * Encodes the specified PreKeySignalMessage message. Does not implicitly {@link SignalWhisperTextProtocol.PreKeySignalMessage.verify|verify} messages.
572
- * @param message PreKeySignalMessage message or plain object to encode
573
- * @param [writer] Writer to encode to
574
- * @returns Writer
575
- */
576
- public static encode(message: SignalWhisperTextProtocol.IPreKeySignalMessage, writer?: $protobuf.Writer): $protobuf.Writer;
577
-
578
- /**
579
- * Encodes the specified PreKeySignalMessage message, length delimited. Does not implicitly {@link SignalWhisperTextProtocol.PreKeySignalMessage.verify|verify} messages.
580
- * @param message PreKeySignalMessage message or plain object to encode
581
- * @param [writer] Writer to encode to
582
- * @returns Writer
583
- */
584
- public static encodeDelimited(message: SignalWhisperTextProtocol.IPreKeySignalMessage, writer?: $protobuf.Writer): $protobuf.Writer;
585
-
586
- /**
587
- * Decodes a PreKeySignalMessage message from the specified reader or buffer.
588
- * @param reader Reader or buffer to decode from
589
- * @param [length] Message length if known beforehand
590
- * @returns PreKeySignalMessage
591
- * @throws {Error} If the payload is not a reader or valid buffer
592
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
593
- */
594
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): SignalWhisperTextProtocol.PreKeySignalMessage;
595
-
596
- /**
597
- * Decodes a PreKeySignalMessage message from the specified reader or buffer, length delimited.
598
- * @param reader Reader or buffer to decode from
599
- * @returns PreKeySignalMessage
600
- * @throws {Error} If the payload is not a reader or valid buffer
601
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
602
- */
603
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): SignalWhisperTextProtocol.PreKeySignalMessage;
604
-
605
- /**
606
- * Verifies a PreKeySignalMessage message.
607
- * @param message Plain object to verify
608
- * @returns `null` if valid, otherwise the reason why it is not
609
- */
610
- public static verify(message: { [k: string]: any }): (string|null);
611
-
612
- /**
613
- * Creates a PreKeySignalMessage message from a plain object. Also converts values to their respective internal types.
614
- * @param object Plain object
615
- * @returns PreKeySignalMessage
616
- */
617
- public static fromObject(object: { [k: string]: any }): SignalWhisperTextProtocol.PreKeySignalMessage;
618
-
619
- /**
620
- * Creates a plain object from a PreKeySignalMessage message. Also converts values to other types if specified.
621
- * @param message PreKeySignalMessage
622
- * @param [options] Conversion options
623
- * @returns Plain object
624
- */
625
- public static toObject(message: SignalWhisperTextProtocol.PreKeySignalMessage, options?: $protobuf.IConversionOptions): { [k: string]: any };
626
-
627
- /**
628
- * Converts this PreKeySignalMessage to JSON.
629
- * @returns JSON object
630
- */
631
- public toJSON(): { [k: string]: any };
632
-
633
- /**
634
- * Gets the default type url for PreKeySignalMessage
635
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
636
- * @returns The default type url
637
- */
638
- public static getTypeUrl(typeUrlPrefix?: string): string;
639
- }
640
-
641
- /** Properties of a SignalMessage. */
642
- interface ISignalMessage {
643
-
644
- /** SignalMessage ratchetKey */
645
- ratchetKey?: (Uint8Array|null);
646
-
647
- /** SignalMessage counter */
648
- counter?: (number|null);
649
-
650
- /** SignalMessage previousCounter */
651
- previousCounter?: (number|null);
652
-
653
- /** SignalMessage ciphertext */
654
- ciphertext?: (Uint8Array|null);
655
- }
656
-
657
- /** Represents a SignalMessage. */
658
- class SignalMessage implements ISignalMessage {
659
-
660
- /**
661
- * Constructs a new SignalMessage.
662
- * @param [properties] Properties to set
663
- */
664
- constructor(properties?: SignalWhisperTextProtocol.ISignalMessage);
665
-
666
- /** SignalMessage ratchetKey. */
667
- public ratchetKey?: (Uint8Array|null);
668
-
669
- /** SignalMessage counter. */
670
- public counter?: (number|null);
671
-
672
- /** SignalMessage previousCounter. */
673
- public previousCounter?: (number|null);
674
-
675
- /** SignalMessage ciphertext. */
676
- public ciphertext?: (Uint8Array|null);
677
-
678
- /** SignalMessage _ratchetKey. */
679
- public _ratchetKey?: "ratchetKey";
680
-
681
- /** SignalMessage _counter. */
682
- public _counter?: "counter";
683
-
684
- /** SignalMessage _previousCounter. */
685
- public _previousCounter?: "previousCounter";
686
-
687
- /** SignalMessage _ciphertext. */
688
- public _ciphertext?: "ciphertext";
689
-
690
- /**
691
- * Creates a new SignalMessage instance using the specified properties.
692
- * @param [properties] Properties to set
693
- * @returns SignalMessage instance
694
- */
695
- public static create(properties?: SignalWhisperTextProtocol.ISignalMessage): SignalWhisperTextProtocol.SignalMessage;
696
-
697
- /**
698
- * Encodes the specified SignalMessage message. Does not implicitly {@link SignalWhisperTextProtocol.SignalMessage.verify|verify} messages.
699
- * @param message SignalMessage message or plain object to encode
700
- * @param [writer] Writer to encode to
701
- * @returns Writer
702
- */
703
- public static encode(message: SignalWhisperTextProtocol.ISignalMessage, writer?: $protobuf.Writer): $protobuf.Writer;
704
-
705
- /**
706
- * Encodes the specified SignalMessage message, length delimited. Does not implicitly {@link SignalWhisperTextProtocol.SignalMessage.verify|verify} messages.
707
- * @param message SignalMessage message or plain object to encode
708
- * @param [writer] Writer to encode to
709
- * @returns Writer
710
- */
711
- public static encodeDelimited(message: SignalWhisperTextProtocol.ISignalMessage, writer?: $protobuf.Writer): $protobuf.Writer;
712
-
713
- /**
714
- * Decodes a SignalMessage message from the specified reader or buffer.
715
- * @param reader Reader or buffer to decode from
716
- * @param [length] Message length if known beforehand
717
- * @returns SignalMessage
718
- * @throws {Error} If the payload is not a reader or valid buffer
719
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
720
- */
721
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): SignalWhisperTextProtocol.SignalMessage;
722
-
723
- /**
724
- * Decodes a SignalMessage message from the specified reader or buffer, length delimited.
725
- * @param reader Reader or buffer to decode from
726
- * @returns SignalMessage
727
- * @throws {Error} If the payload is not a reader or valid buffer
728
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
729
- */
730
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): SignalWhisperTextProtocol.SignalMessage;
731
-
732
- /**
733
- * Verifies a SignalMessage message.
734
- * @param message Plain object to verify
735
- * @returns `null` if valid, otherwise the reason why it is not
736
- */
737
- public static verify(message: { [k: string]: any }): (string|null);
738
-
739
- /**
740
- * Creates a SignalMessage message from a plain object. Also converts values to their respective internal types.
741
- * @param object Plain object
742
- * @returns SignalMessage
743
- */
744
- public static fromObject(object: { [k: string]: any }): SignalWhisperTextProtocol.SignalMessage;
745
-
746
- /**
747
- * Creates a plain object from a SignalMessage message. Also converts values to other types if specified.
748
- * @param message SignalMessage
749
- * @param [options] Conversion options
750
- * @returns Plain object
751
- */
752
- public static toObject(message: SignalWhisperTextProtocol.SignalMessage, options?: $protobuf.IConversionOptions): { [k: string]: any };
753
-
754
- /**
755
- * Converts this SignalMessage to JSON.
756
- * @returns JSON object
757
- */
758
- public toJSON(): { [k: string]: any };
759
-
760
- /**
761
- * Gets the default type url for SignalMessage
762
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
763
- * @returns The default type url
764
- */
765
- public static getTypeUrl(typeUrlPrefix?: string): string;
766
- }
767
- }