@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,613 +0,0 @@
1
- import * as $protobuf from "protobufjs";
2
- import Long = require("long");
3
- /** Namespace Cert. */
4
- export namespace Cert {
5
-
6
- /** Properties of a CertChain. */
7
- interface ICertChain {
8
-
9
- /** CertChain leaf */
10
- leaf?: (Cert.CertChain.INoiseCertificate|null);
11
-
12
- /** CertChain intermediate */
13
- intermediate?: (Cert.CertChain.INoiseCertificate|null);
14
- }
15
-
16
- /** Represents a CertChain. */
17
- class CertChain implements ICertChain {
18
-
19
- /**
20
- * Constructs a new CertChain.
21
- * @param [properties] Properties to set
22
- */
23
- constructor(properties?: Cert.ICertChain);
24
-
25
- /** CertChain leaf. */
26
- public leaf?: (Cert.CertChain.INoiseCertificate|null);
27
-
28
- /** CertChain intermediate. */
29
- public intermediate?: (Cert.CertChain.INoiseCertificate|null);
30
-
31
- /** CertChain _leaf. */
32
- public _leaf?: "leaf";
33
-
34
- /** CertChain _intermediate. */
35
- public _intermediate?: "intermediate";
36
-
37
- /**
38
- * Creates a new CertChain instance using the specified properties.
39
- * @param [properties] Properties to set
40
- * @returns CertChain instance
41
- */
42
- public static create(properties?: Cert.ICertChain): Cert.CertChain;
43
-
44
- /**
45
- * Encodes the specified CertChain message. Does not implicitly {@link Cert.CertChain.verify|verify} messages.
46
- * @param message CertChain message or plain object to encode
47
- * @param [writer] Writer to encode to
48
- * @returns Writer
49
- */
50
- public static encode(message: Cert.ICertChain, writer?: $protobuf.Writer): $protobuf.Writer;
51
-
52
- /**
53
- * Encodes the specified CertChain message, length delimited. Does not implicitly {@link Cert.CertChain.verify|verify} messages.
54
- * @param message CertChain message or plain object to encode
55
- * @param [writer] Writer to encode to
56
- * @returns Writer
57
- */
58
- public static encodeDelimited(message: Cert.ICertChain, writer?: $protobuf.Writer): $protobuf.Writer;
59
-
60
- /**
61
- * Decodes a CertChain 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 CertChain
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): Cert.CertChain;
69
-
70
- /**
71
- * Decodes a CertChain message from the specified reader or buffer, length delimited.
72
- * @param reader Reader or buffer to decode from
73
- * @returns CertChain
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)): Cert.CertChain;
78
-
79
- /**
80
- * Verifies a CertChain 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 CertChain message from a plain object. Also converts values to their respective internal types.
88
- * @param object Plain object
89
- * @returns CertChain
90
- */
91
- public static fromObject(object: { [k: string]: any }): Cert.CertChain;
92
-
93
- /**
94
- * Creates a plain object from a CertChain message. Also converts values to other types if specified.
95
- * @param message CertChain
96
- * @param [options] Conversion options
97
- * @returns Plain object
98
- */
99
- public static toObject(message: Cert.CertChain, options?: $protobuf.IConversionOptions): { [k: string]: any };
100
-
101
- /**
102
- * Converts this CertChain to JSON.
103
- * @returns JSON object
104
- */
105
- public toJSON(): { [k: string]: any };
106
-
107
- /**
108
- * Gets the default type url for CertChain
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
- namespace CertChain {
116
-
117
- /** Properties of a NoiseCertificate. */
118
- interface INoiseCertificate {
119
-
120
- /** NoiseCertificate details */
121
- details?: (Uint8Array|null);
122
-
123
- /** NoiseCertificate signature */
124
- signature?: (Uint8Array|null);
125
- }
126
-
127
- /** Represents a NoiseCertificate. */
128
- class NoiseCertificate implements INoiseCertificate {
129
-
130
- /**
131
- * Constructs a new NoiseCertificate.
132
- * @param [properties] Properties to set
133
- */
134
- constructor(properties?: Cert.CertChain.INoiseCertificate);
135
-
136
- /** NoiseCertificate details. */
137
- public details?: (Uint8Array|null);
138
-
139
- /** NoiseCertificate signature. */
140
- public signature?: (Uint8Array|null);
141
-
142
- /** NoiseCertificate _details. */
143
- public _details?: "details";
144
-
145
- /** NoiseCertificate _signature. */
146
- public _signature?: "signature";
147
-
148
- /**
149
- * Creates a new NoiseCertificate instance using the specified properties.
150
- * @param [properties] Properties to set
151
- * @returns NoiseCertificate instance
152
- */
153
- public static create(properties?: Cert.CertChain.INoiseCertificate): Cert.CertChain.NoiseCertificate;
154
-
155
- /**
156
- * Encodes the specified NoiseCertificate message. Does not implicitly {@link Cert.CertChain.NoiseCertificate.verify|verify} messages.
157
- * @param message NoiseCertificate message or plain object to encode
158
- * @param [writer] Writer to encode to
159
- * @returns Writer
160
- */
161
- public static encode(message: Cert.CertChain.INoiseCertificate, writer?: $protobuf.Writer): $protobuf.Writer;
162
-
163
- /**
164
- * Encodes the specified NoiseCertificate message, length delimited. Does not implicitly {@link Cert.CertChain.NoiseCertificate.verify|verify} messages.
165
- * @param message NoiseCertificate message or plain object to encode
166
- * @param [writer] Writer to encode to
167
- * @returns Writer
168
- */
169
- public static encodeDelimited(message: Cert.CertChain.INoiseCertificate, writer?: $protobuf.Writer): $protobuf.Writer;
170
-
171
- /**
172
- * Decodes a NoiseCertificate message from the specified reader or buffer.
173
- * @param reader Reader or buffer to decode from
174
- * @param [length] Message length if known beforehand
175
- * @returns NoiseCertificate
176
- * @throws {Error} If the payload is not a reader or valid buffer
177
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
178
- */
179
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): Cert.CertChain.NoiseCertificate;
180
-
181
- /**
182
- * Decodes a NoiseCertificate message from the specified reader or buffer, length delimited.
183
- * @param reader Reader or buffer to decode from
184
- * @returns NoiseCertificate
185
- * @throws {Error} If the payload is not a reader or valid buffer
186
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
187
- */
188
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): Cert.CertChain.NoiseCertificate;
189
-
190
- /**
191
- * Verifies a NoiseCertificate message.
192
- * @param message Plain object to verify
193
- * @returns `null` if valid, otherwise the reason why it is not
194
- */
195
- public static verify(message: { [k: string]: any }): (string|null);
196
-
197
- /**
198
- * Creates a NoiseCertificate message from a plain object. Also converts values to their respective internal types.
199
- * @param object Plain object
200
- * @returns NoiseCertificate
201
- */
202
- public static fromObject(object: { [k: string]: any }): Cert.CertChain.NoiseCertificate;
203
-
204
- /**
205
- * Creates a plain object from a NoiseCertificate message. Also converts values to other types if specified.
206
- * @param message NoiseCertificate
207
- * @param [options] Conversion options
208
- * @returns Plain object
209
- */
210
- public static toObject(message: Cert.CertChain.NoiseCertificate, options?: $protobuf.IConversionOptions): { [k: string]: any };
211
-
212
- /**
213
- * Converts this NoiseCertificate to JSON.
214
- * @returns JSON object
215
- */
216
- public toJSON(): { [k: string]: any };
217
-
218
- /**
219
- * Gets the default type url for NoiseCertificate
220
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
221
- * @returns The default type url
222
- */
223
- public static getTypeUrl(typeUrlPrefix?: string): string;
224
- }
225
-
226
- namespace NoiseCertificate {
227
-
228
- /** Properties of a Details. */
229
- interface IDetails {
230
-
231
- /** Details serial */
232
- serial?: (number|null);
233
-
234
- /** Details issuerSerial */
235
- issuerSerial?: (number|null);
236
-
237
- /** Details key */
238
- key?: (Uint8Array|null);
239
-
240
- /** Details notBefore */
241
- notBefore?: (number|Long|null);
242
-
243
- /** Details notAfter */
244
- notAfter?: (number|Long|null);
245
- }
246
-
247
- /** Represents a Details. */
248
- class Details implements IDetails {
249
-
250
- /**
251
- * Constructs a new Details.
252
- * @param [properties] Properties to set
253
- */
254
- constructor(properties?: Cert.CertChain.NoiseCertificate.IDetails);
255
-
256
- /** Details serial. */
257
- public serial?: (number|null);
258
-
259
- /** Details issuerSerial. */
260
- public issuerSerial?: (number|null);
261
-
262
- /** Details key. */
263
- public key?: (Uint8Array|null);
264
-
265
- /** Details notBefore. */
266
- public notBefore?: (number|Long|null);
267
-
268
- /** Details notAfter. */
269
- public notAfter?: (number|Long|null);
270
-
271
- /** Details _serial. */
272
- public _serial?: "serial";
273
-
274
- /** Details _issuerSerial. */
275
- public _issuerSerial?: "issuerSerial";
276
-
277
- /** Details _key. */
278
- public _key?: "key";
279
-
280
- /** Details _notBefore. */
281
- public _notBefore?: "notBefore";
282
-
283
- /** Details _notAfter. */
284
- public _notAfter?: "notAfter";
285
-
286
- /**
287
- * Creates a new Details instance using the specified properties.
288
- * @param [properties] Properties to set
289
- * @returns Details instance
290
- */
291
- public static create(properties?: Cert.CertChain.NoiseCertificate.IDetails): Cert.CertChain.NoiseCertificate.Details;
292
-
293
- /**
294
- * Encodes the specified Details message. Does not implicitly {@link Cert.CertChain.NoiseCertificate.Details.verify|verify} messages.
295
- * @param message Details message or plain object to encode
296
- * @param [writer] Writer to encode to
297
- * @returns Writer
298
- */
299
- public static encode(message: Cert.CertChain.NoiseCertificate.IDetails, writer?: $protobuf.Writer): $protobuf.Writer;
300
-
301
- /**
302
- * Encodes the specified Details message, length delimited. Does not implicitly {@link Cert.CertChain.NoiseCertificate.Details.verify|verify} messages.
303
- * @param message Details message or plain object to encode
304
- * @param [writer] Writer to encode to
305
- * @returns Writer
306
- */
307
- public static encodeDelimited(message: Cert.CertChain.NoiseCertificate.IDetails, writer?: $protobuf.Writer): $protobuf.Writer;
308
-
309
- /**
310
- * Decodes a Details message from the specified reader or buffer.
311
- * @param reader Reader or buffer to decode from
312
- * @param [length] Message length if known beforehand
313
- * @returns Details
314
- * @throws {Error} If the payload is not a reader or valid buffer
315
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
316
- */
317
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): Cert.CertChain.NoiseCertificate.Details;
318
-
319
- /**
320
- * Decodes a Details message from the specified reader or buffer, length delimited.
321
- * @param reader Reader or buffer to decode from
322
- * @returns Details
323
- * @throws {Error} If the payload is not a reader or valid buffer
324
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
325
- */
326
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): Cert.CertChain.NoiseCertificate.Details;
327
-
328
- /**
329
- * Verifies a Details message.
330
- * @param message Plain object to verify
331
- * @returns `null` if valid, otherwise the reason why it is not
332
- */
333
- public static verify(message: { [k: string]: any }): (string|null);
334
-
335
- /**
336
- * Creates a Details message from a plain object. Also converts values to their respective internal types.
337
- * @param object Plain object
338
- * @returns Details
339
- */
340
- public static fromObject(object: { [k: string]: any }): Cert.CertChain.NoiseCertificate.Details;
341
-
342
- /**
343
- * Creates a plain object from a Details message. Also converts values to other types if specified.
344
- * @param message Details
345
- * @param [options] Conversion options
346
- * @returns Plain object
347
- */
348
- public static toObject(message: Cert.CertChain.NoiseCertificate.Details, options?: $protobuf.IConversionOptions): { [k: string]: any };
349
-
350
- /**
351
- * Converts this Details to JSON.
352
- * @returns JSON object
353
- */
354
- public toJSON(): { [k: string]: any };
355
-
356
- /**
357
- * Gets the default type url for Details
358
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
359
- * @returns The default type url
360
- */
361
- public static getTypeUrl(typeUrlPrefix?: string): string;
362
- }
363
- }
364
- }
365
-
366
- /** Properties of a NoiseCertificate. */
367
- interface INoiseCertificate {
368
-
369
- /** NoiseCertificate details */
370
- details?: (Uint8Array|null);
371
-
372
- /** NoiseCertificate signature */
373
- signature?: (Uint8Array|null);
374
- }
375
-
376
- /** Represents a NoiseCertificate. */
377
- class NoiseCertificate implements INoiseCertificate {
378
-
379
- /**
380
- * Constructs a new NoiseCertificate.
381
- * @param [properties] Properties to set
382
- */
383
- constructor(properties?: Cert.INoiseCertificate);
384
-
385
- /** NoiseCertificate details. */
386
- public details?: (Uint8Array|null);
387
-
388
- /** NoiseCertificate signature. */
389
- public signature?: (Uint8Array|null);
390
-
391
- /** NoiseCertificate _details. */
392
- public _details?: "details";
393
-
394
- /** NoiseCertificate _signature. */
395
- public _signature?: "signature";
396
-
397
- /**
398
- * Creates a new NoiseCertificate instance using the specified properties.
399
- * @param [properties] Properties to set
400
- * @returns NoiseCertificate instance
401
- */
402
- public static create(properties?: Cert.INoiseCertificate): Cert.NoiseCertificate;
403
-
404
- /**
405
- * Encodes the specified NoiseCertificate message. Does not implicitly {@link Cert.NoiseCertificate.verify|verify} messages.
406
- * @param message NoiseCertificate message or plain object to encode
407
- * @param [writer] Writer to encode to
408
- * @returns Writer
409
- */
410
- public static encode(message: Cert.INoiseCertificate, writer?: $protobuf.Writer): $protobuf.Writer;
411
-
412
- /**
413
- * Encodes the specified NoiseCertificate message, length delimited. Does not implicitly {@link Cert.NoiseCertificate.verify|verify} messages.
414
- * @param message NoiseCertificate message or plain object to encode
415
- * @param [writer] Writer to encode to
416
- * @returns Writer
417
- */
418
- public static encodeDelimited(message: Cert.INoiseCertificate, writer?: $protobuf.Writer): $protobuf.Writer;
419
-
420
- /**
421
- * Decodes a NoiseCertificate message from the specified reader or buffer.
422
- * @param reader Reader or buffer to decode from
423
- * @param [length] Message length if known beforehand
424
- * @returns NoiseCertificate
425
- * @throws {Error} If the payload is not a reader or valid buffer
426
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
427
- */
428
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): Cert.NoiseCertificate;
429
-
430
- /**
431
- * Decodes a NoiseCertificate message from the specified reader or buffer, length delimited.
432
- * @param reader Reader or buffer to decode from
433
- * @returns NoiseCertificate
434
- * @throws {Error} If the payload is not a reader or valid buffer
435
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
436
- */
437
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): Cert.NoiseCertificate;
438
-
439
- /**
440
- * Verifies a NoiseCertificate message.
441
- * @param message Plain object to verify
442
- * @returns `null` if valid, otherwise the reason why it is not
443
- */
444
- public static verify(message: { [k: string]: any }): (string|null);
445
-
446
- /**
447
- * Creates a NoiseCertificate message from a plain object. Also converts values to their respective internal types.
448
- * @param object Plain object
449
- * @returns NoiseCertificate
450
- */
451
- public static fromObject(object: { [k: string]: any }): Cert.NoiseCertificate;
452
-
453
- /**
454
- * Creates a plain object from a NoiseCertificate message. Also converts values to other types if specified.
455
- * @param message NoiseCertificate
456
- * @param [options] Conversion options
457
- * @returns Plain object
458
- */
459
- public static toObject(message: Cert.NoiseCertificate, options?: $protobuf.IConversionOptions): { [k: string]: any };
460
-
461
- /**
462
- * Converts this NoiseCertificate to JSON.
463
- * @returns JSON object
464
- */
465
- public toJSON(): { [k: string]: any };
466
-
467
- /**
468
- * Gets the default type url for NoiseCertificate
469
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
470
- * @returns The default type url
471
- */
472
- public static getTypeUrl(typeUrlPrefix?: string): string;
473
- }
474
-
475
- namespace NoiseCertificate {
476
-
477
- /** Properties of a Details. */
478
- interface IDetails {
479
-
480
- /** Details serial */
481
- serial?: (number|null);
482
-
483
- /** Details issuer */
484
- issuer?: (string|null);
485
-
486
- /** Details expires */
487
- expires?: (number|Long|null);
488
-
489
- /** Details subject */
490
- subject?: (string|null);
491
-
492
- /** Details key */
493
- key?: (Uint8Array|null);
494
- }
495
-
496
- /** Represents a Details. */
497
- class Details implements IDetails {
498
-
499
- /**
500
- * Constructs a new Details.
501
- * @param [properties] Properties to set
502
- */
503
- constructor(properties?: Cert.NoiseCertificate.IDetails);
504
-
505
- /** Details serial. */
506
- public serial?: (number|null);
507
-
508
- /** Details issuer. */
509
- public issuer?: (string|null);
510
-
511
- /** Details expires. */
512
- public expires?: (number|Long|null);
513
-
514
- /** Details subject. */
515
- public subject?: (string|null);
516
-
517
- /** Details key. */
518
- public key?: (Uint8Array|null);
519
-
520
- /** Details _serial. */
521
- public _serial?: "serial";
522
-
523
- /** Details _issuer. */
524
- public _issuer?: "issuer";
525
-
526
- /** Details _expires. */
527
- public _expires?: "expires";
528
-
529
- /** Details _subject. */
530
- public _subject?: "subject";
531
-
532
- /** Details _key. */
533
- public _key?: "key";
534
-
535
- /**
536
- * Creates a new Details instance using the specified properties.
537
- * @param [properties] Properties to set
538
- * @returns Details instance
539
- */
540
- public static create(properties?: Cert.NoiseCertificate.IDetails): Cert.NoiseCertificate.Details;
541
-
542
- /**
543
- * Encodes the specified Details message. Does not implicitly {@link Cert.NoiseCertificate.Details.verify|verify} messages.
544
- * @param message Details message or plain object to encode
545
- * @param [writer] Writer to encode to
546
- * @returns Writer
547
- */
548
- public static encode(message: Cert.NoiseCertificate.IDetails, writer?: $protobuf.Writer): $protobuf.Writer;
549
-
550
- /**
551
- * Encodes the specified Details message, length delimited. Does not implicitly {@link Cert.NoiseCertificate.Details.verify|verify} messages.
552
- * @param message Details message or plain object to encode
553
- * @param [writer] Writer to encode to
554
- * @returns Writer
555
- */
556
- public static encodeDelimited(message: Cert.NoiseCertificate.IDetails, writer?: $protobuf.Writer): $protobuf.Writer;
557
-
558
- /**
559
- * Decodes a Details message from the specified reader or buffer.
560
- * @param reader Reader or buffer to decode from
561
- * @param [length] Message length if known beforehand
562
- * @returns Details
563
- * @throws {Error} If the payload is not a reader or valid buffer
564
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
565
- */
566
- public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): Cert.NoiseCertificate.Details;
567
-
568
- /**
569
- * Decodes a Details message from the specified reader or buffer, length delimited.
570
- * @param reader Reader or buffer to decode from
571
- * @returns Details
572
- * @throws {Error} If the payload is not a reader or valid buffer
573
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
574
- */
575
- public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): Cert.NoiseCertificate.Details;
576
-
577
- /**
578
- * Verifies a Details message.
579
- * @param message Plain object to verify
580
- * @returns `null` if valid, otherwise the reason why it is not
581
- */
582
- public static verify(message: { [k: string]: any }): (string|null);
583
-
584
- /**
585
- * Creates a Details message from a plain object. Also converts values to their respective internal types.
586
- * @param object Plain object
587
- * @returns Details
588
- */
589
- public static fromObject(object: { [k: string]: any }): Cert.NoiseCertificate.Details;
590
-
591
- /**
592
- * Creates a plain object from a Details message. Also converts values to other types if specified.
593
- * @param message Details
594
- * @param [options] Conversion options
595
- * @returns Plain object
596
- */
597
- public static toObject(message: Cert.NoiseCertificate.Details, options?: $protobuf.IConversionOptions): { [k: string]: any };
598
-
599
- /**
600
- * Converts this Details to JSON.
601
- * @returns JSON object
602
- */
603
- public toJSON(): { [k: string]: any };
604
-
605
- /**
606
- * Gets the default type url for Details
607
- * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
608
- * @returns The default type url
609
- */
610
- public static getTypeUrl(typeUrlPrefix?: string): string;
611
- }
612
- }
613
- }