@hiroosy/baileys-lite 0.3.3 → 0.3.5

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 (242) hide show
  1. package/WAProto/index.js +247 -113252
  2. package/WAProto/parts/ADVDeviceIdentity.part +201 -0
  3. package/WAProto/parts/ADVEncryptionType.part +6 -0
  4. package/WAProto/parts/ADVKeyIndexList.part +201 -0
  5. package/WAProto/parts/ADVSignedDeviceIdentity.part +150 -0
  6. package/WAProto/parts/ADVSignedDeviceIdentityHMAC.part +142 -0
  7. package/WAProto/parts/ADVSignedKeyIndexList.part +128 -0
  8. package/WAProto/parts/AIHomeState.part +405 -0
  9. package/WAProto/parts/AIMediaCollectionMessage.part +119 -0
  10. package/WAProto/parts/AIMediaCollectionMetadata.part +100 -0
  11. package/WAProto/parts/AIMetadataOperation.part +83 -0
  12. package/WAProto/parts/AIQueryFanout.part +133 -0
  13. package/WAProto/parts/AIRegenerateMetadata.part +112 -0
  14. package/WAProto/parts/AIRichResponseCodeMetadata.part +252 -0
  15. package/WAProto/parts/AIRichResponseContentItemsMetadata.part +354 -0
  16. package/WAProto/parts/AIRichResponseDynamicMetadata.part +172 -0
  17. package/WAProto/parts/AIRichResponseGridImageMetadata.part +114 -0
  18. package/WAProto/parts/AIRichResponseImageURL.part +119 -0
  19. package/WAProto/parts/AIRichResponseInlineImageMetadata.part +164 -0
  20. package/WAProto/parts/AIRichResponseLatexMetadata.part +346 -0
  21. package/WAProto/parts/AIRichResponseMapMetadata.part +346 -0
  22. package/WAProto/parts/AIRichResponseMessage.part +167 -0
  23. package/WAProto/parts/AIRichResponseMessageType.part +5 -0
  24. package/WAProto/parts/AIRichResponseSubMessage.part +313 -0
  25. package/WAProto/parts/AIRichResponseSubMessageType.part +13 -0
  26. package/WAProto/parts/AIRichResponseTableMetadata.part +223 -0
  27. package/WAProto/parts/AIRichResponseUnifiedResponse.part +84 -0
  28. package/WAProto/parts/AISubscriptionRequestType.part +7 -0
  29. package/WAProto/parts/AISubscriptionUpsellMetadata.part +102 -0
  30. package/WAProto/parts/AIThreadInfo.part +316 -0
  31. package/WAProto/parts/Account.part +138 -0
  32. package/WAProto/parts/ActionLink.part +100 -0
  33. package/WAProto/parts/AutoDownloadSettings.part +138 -0
  34. package/WAProto/parts/AvatarUserSettings.part +100 -0
  35. package/WAProto/parts/BizAccountLinkInfo.part +210 -0
  36. package/WAProto/parts/BizAccountPayload.part +105 -0
  37. package/WAProto/parts/BizIdentityInfo.part +298 -0
  38. package/WAProto/parts/BotAgeCollectionMetadata.part +138 -0
  39. package/WAProto/parts/BotAgentDeepLinkMetadata.part +81 -0
  40. package/WAProto/parts/BotAgentMetadata.part +83 -0
  41. package/WAProto/parts/BotCapabilityMetadata.part +437 -0
  42. package/WAProto/parts/BotCommandMetadata.part +119 -0
  43. package/WAProto/parts/BotDocumentMessageMetadata.part +100 -0
  44. package/WAProto/parts/BotFeedbackMessage.part +1366 -0
  45. package/WAProto/parts/BotGroupMetadata.part +92 -0
  46. package/WAProto/parts/BotGroupParticipantMetadata.part +81 -0
  47. package/WAProto/parts/BotImagineMetadata.part +134 -0
  48. package/WAProto/parts/BotInfrastructureDiagnostics.part +148 -0
  49. package/WAProto/parts/BotLinkedAccount.part +95 -0
  50. package/WAProto/parts/BotLinkedAccountsMetadata.part +134 -0
  51. package/WAProto/parts/BotMediaMetadata.part +229 -0
  52. package/WAProto/parts/BotMemoryFact.part +100 -0
  53. package/WAProto/parts/BotMemoryMetadata.part +141 -0
  54. package/WAProto/parts/BotMemuMetadata.part +92 -0
  55. package/WAProto/parts/BotMessageOrigin.part +95 -0
  56. package/WAProto/parts/BotMessageOriginMetadata.part +92 -0
  57. package/WAProto/parts/BotMessageSharingInfo.part +297 -0
  58. package/WAProto/parts/BotMetadata.part +934 -0
  59. package/WAProto/parts/BotMetricsEntryPoint.part +51 -0
  60. package/WAProto/parts/BotMetricsMetadata.part +341 -0
  61. package/WAProto/parts/BotMetricsThreadEntryPoint.part +8 -0
  62. package/WAProto/parts/BotModeSelectionMetadata.part +151 -0
  63. package/WAProto/parts/BotModelMetadata.part +167 -0
  64. package/WAProto/parts/BotPluginMetadata.part +379 -0
  65. package/WAProto/parts/BotProgressIndicatorMetadata.part +837 -0
  66. package/WAProto/parts/BotPromotionMessageMetadata.part +124 -0
  67. package/WAProto/parts/BotPromptSuggestion.part +100 -0
  68. package/WAProto/parts/BotPromptSuggestions.part +92 -0
  69. package/WAProto/parts/BotPttPromptMetadata.part +81 -0
  70. package/WAProto/parts/BotQuotaMetadata.part +241 -0
  71. package/WAProto/parts/BotReminderMetadata.part +232 -0
  72. package/WAProto/parts/BotRenderingConfigMetadata.part +100 -0
  73. package/WAProto/parts/BotRenderingMetadata.part +203 -0
  74. package/WAProto/parts/BotResolvedToolCallMetadata.part +100 -0
  75. package/WAProto/parts/BotSessionMetadata.part +137 -0
  76. package/WAProto/parts/BotSessionSource.part +11 -0
  77. package/WAProto/parts/BotSignatureVerificationMetadata.part +92 -0
  78. package/WAProto/parts/BotSignatureVerificationUseCaseProof.part +183 -0
  79. package/WAProto/parts/BotSourcesMetadata.part +322 -0
  80. package/WAProto/parts/BotSuggestedPromptMetadata.part +150 -0
  81. package/WAProto/parts/BotUnifiedResponseMutation.part +339 -0
  82. package/WAProto/parts/CallLogRecord.part +646 -0
  83. package/WAProto/parts/CertChain.part +392 -0
  84. package/WAProto/parts/ChatLockSettings.part +102 -0
  85. package/WAProto/parts/ChatRowOpaqueData.part +712 -0
  86. package/WAProto/parts/Citation.part +119 -0
  87. package/WAProto/parts/ClientPairingProps.part +160 -0
  88. package/WAProto/parts/ClientPayload.part +2892 -0
  89. package/WAProto/parts/CollectionName.part +9 -0
  90. package/WAProto/parts/CommentMetadata.part +102 -0
  91. package/WAProto/parts/CompanionCommitment.part +84 -0
  92. package/WAProto/parts/CompanionEphemeralIdentity.part +227 -0
  93. package/WAProto/parts/Config.part +136 -0
  94. package/WAProto/parts/ContextInfo.part +4137 -0
  95. package/WAProto/parts/Conversation.part +1472 -0
  96. package/WAProto/parts/DeviceCapabilities.part +670 -0
  97. package/WAProto/parts/DeviceConsistencyCodeMessage.part +103 -0
  98. package/WAProto/parts/DeviceListMetadata.part +306 -0
  99. package/WAProto/parts/DeviceProps.part +982 -0
  100. package/WAProto/parts/DisappearingMode.part +206 -0
  101. package/WAProto/parts/EmbeddedContent.part +100 -0
  102. package/WAProto/parts/EmbeddedMessage.part +102 -0
  103. package/WAProto/parts/EmbeddedMusic.part +370 -0
  104. package/WAProto/parts/EncryptedPairingRequest.part +106 -0
  105. package/WAProto/parts/EphemeralSetting.part +110 -0
  106. package/WAProto/parts/EventAdditionalMetadata.part +81 -0
  107. package/WAProto/parts/EventResponse.part +152 -0
  108. package/WAProto/parts/ExitCode.part +110 -0
  109. package/WAProto/parts/ExternalBlobReference.part +195 -0
  110. package/WAProto/parts/Field.part +193 -0
  111. package/WAProto/parts/ForwardedAIBotMessageInfo.part +119 -0
  112. package/WAProto/parts/GlobalSettings.part +497 -0
  113. package/WAProto/parts/GroupHistoryBundleInfo.part +141 -0
  114. package/WAProto/parts/GroupHistoryIndividualMessageInfo.part +102 -0
  115. package/WAProto/parts/GroupMention.part +100 -0
  116. package/WAProto/parts/GroupParticipant.part +142 -0
  117. package/WAProto/parts/GroupRootKeyShare.part +92 -0
  118. package/WAProto/parts/GroupRootKeyShareEntry.part +161 -0
  119. package/WAProto/parts/HandshakeMessage.part +815 -0
  120. package/WAProto/parts/HatchMetadataSync.part +132 -0
  121. package/WAProto/parts/HistorySync.part +605 -0
  122. package/WAProto/parts/HistorySyncMsg.part +112 -0
  123. package/WAProto/parts/HydratedTemplateButton.part +501 -0
  124. package/WAProto/parts/IdentityKeyPairStructure.part +106 -0
  125. package/WAProto/parts/InThreadSurveyMetadata.part +779 -0
  126. package/WAProto/parts/InlineContact.part +157 -0
  127. package/WAProto/parts/InteractiveAnnotation.part +246 -0
  128. package/WAProto/parts/InteractiveMessageAdditionalMetadata.part +81 -0
  129. package/WAProto/parts/KeepInChat.part +225 -0
  130. package/WAProto/parts/KeepType.part +6 -0
  131. package/WAProto/parts/KeyExchangeMessage.part +169 -0
  132. package/WAProto/parts/KeyId.part +84 -0
  133. package/WAProto/parts/LIDMigrationMapping.part +149 -0
  134. package/WAProto/parts/LIDMigrationMappingSyncMessage.part +84 -0
  135. package/WAProto/parts/LIDMigrationMappingSyncPayload.part +122 -0
  136. package/WAProto/parts/LegacyMessage.part +104 -0
  137. package/WAProto/parts/LimitSharing.part +177 -0
  138. package/WAProto/parts/LocalizedName.part +119 -0
  139. package/WAProto/parts/Location.part +119 -0
  140. package/WAProto/parts/MediaData.part +81 -0
  141. package/WAProto/parts/MediaDomainInfo.part +120 -0
  142. package/WAProto/parts/MediaKeyDomain.part +6 -0
  143. package/WAProto/parts/MediaNotifyMessage.part +132 -0
  144. package/WAProto/parts/MediaRetryNotification.part +170 -0
  145. package/WAProto/parts/MediaVisibility.part +6 -0
  146. package/WAProto/parts/MemberLabel.part +110 -0
  147. package/WAProto/parts/Message.part +32376 -0
  148. package/WAProto/parts/MessageAddOn.part +305 -0
  149. package/WAProto/parts/MessageAddOnContextInfo.part +113 -0
  150. package/WAProto/parts/MessageAssociation.part +235 -0
  151. package/WAProto/parts/MessageContextInfo.part +451 -0
  152. package/WAProto/parts/MessageKey.part +138 -0
  153. package/WAProto/parts/MessageSecretMessage.part +125 -0
  154. package/WAProto/parts/Money.part +129 -0
  155. package/WAProto/parts/MsgOpaqueData.part +1732 -0
  156. package/WAProto/parts/MsgRowOpaqueData.part +104 -0
  157. package/WAProto/parts/MutationProps.part +89 -0
  158. package/WAProto/parts/NoiseCertificate.part +277 -0
  159. package/WAProto/parts/NotificationMessageInfo.part +152 -0
  160. package/WAProto/parts/NotificationSettings.part +176 -0
  161. package/WAProto/parts/PairingRequest.part +128 -0
  162. package/WAProto/parts/PastParticipant.part +148 -0
  163. package/WAProto/parts/PastParticipants.part +112 -0
  164. package/WAProto/parts/PatchDebugData.part +358 -0
  165. package/WAProto/parts/PaymentBackground.part +460 -0
  166. package/WAProto/parts/PaymentInfo.part +602 -0
  167. package/WAProto/parts/PhoneNumberToLIDMapping.part +100 -0
  168. package/WAProto/parts/PhotoChange.part +125 -0
  169. package/WAProto/parts/PinInChat.part +205 -0
  170. package/WAProto/parts/Point.part +138 -0
  171. package/WAProto/parts/PollAdditionalMetadata.part +216 -0
  172. package/WAProto/parts/PollEncValue.part +106 -0
  173. package/WAProto/parts/PollUpdate.part +202 -0
  174. package/WAProto/parts/PreKeyRecordStructure.part +125 -0
  175. package/WAProto/parts/PreKeySignalMessage.part +185 -0
  176. package/WAProto/parts/PremiumMessageInfo.part +81 -0
  177. package/WAProto/parts/PrimaryEphemeralIdentity.part +106 -0
  178. package/WAProto/parts/PrivacySystemMessage.part +6 -0
  179. package/WAProto/parts/ProcessedVideo.part +266 -0
  180. package/WAProto/parts/ProloguePayload.part +105 -0
  181. package/WAProto/parts/Pushname.part +100 -0
  182. package/WAProto/parts/QuarantinedMessage.part +103 -0
  183. package/WAProto/parts/Reaction.part +169 -0
  184. package/WAProto/parts/RecentEmojiWeight.part +100 -0
  185. package/WAProto/parts/RecordStructure.part +114 -0
  186. package/WAProto/parts/Reportable.part +138 -0
  187. package/WAProto/parts/ReportingTokenInfo.part +84 -0
  188. package/WAProto/parts/ScheduledMessageMetadata.part +132 -0
  189. package/WAProto/parts/SenderKeyDistributionMessage.part +144 -0
  190. package/WAProto/parts/SenderKeyMessage.part +122 -0
  191. package/WAProto/parts/SenderKeyRecordStructure.part +92 -0
  192. package/WAProto/parts/SenderKeyStateStructure.part +469 -0
  193. package/WAProto/parts/ServerErrorReceipt.part +81 -0
  194. package/WAProto/parts/SessionStructure.part +1087 -0
  195. package/WAProto/parts/SessionTransparencyMetadata.part +132 -0
  196. package/WAProto/parts/SessionTransparencyType.part +5 -0
  197. package/WAProto/parts/SignalMessage.part +144 -0
  198. package/WAProto/parts/SignedPreKeyRecordStructure.part +176 -0
  199. package/WAProto/parts/StatusAttribution.part +1235 -0
  200. package/WAProto/parts/StatusMentionMessage.part +83 -0
  201. package/WAProto/parts/StatusPSA.part +121 -0
  202. package/WAProto/parts/StickerMetadata.part +357 -0
  203. package/WAProto/parts/SyncActionData.part +146 -0
  204. package/WAProto/parts/SyncActionValue.part +12959 -0
  205. package/WAProto/parts/SyncdIndex.part +84 -0
  206. package/WAProto/parts/SyncdMutation.part +121 -0
  207. package/WAProto/parts/SyncdMutations.part +92 -0
  208. package/WAProto/parts/SyncdPatch.part +262 -0
  209. package/WAProto/parts/SyncdRecord.part +125 -0
  210. package/WAProto/parts/SyncdSnapshot.part +157 -0
  211. package/WAProto/parts/SyncdValue.part +84 -0
  212. package/WAProto/parts/SyncdVersion.part +91 -0
  213. package/WAProto/parts/TapLinkAction.part +100 -0
  214. package/WAProto/parts/TemplateButton.part +449 -0
  215. package/WAProto/parts/ThreadID.part +126 -0
  216. package/WAProto/parts/UrlTrackingMap.part +231 -0
  217. package/WAProto/parts/UserPassword.part +399 -0
  218. package/WAProto/parts/UserReceipt.part +221 -0
  219. package/WAProto/parts/VerifiedNameCertificate.part +318 -0
  220. package/WAProto/parts/WallpaperSettings.part +119 -0
  221. package/WAProto/parts/WebFeatures.part +1870 -0
  222. package/WAProto/parts/WebLinkRenderConfig.part +5 -0
  223. package/WAProto/parts/WebMessageInfo.part +2851 -0
  224. package/WAProto/parts/WebNotificationsInfo.part +160 -0
  225. package/package.json +1 -1
  226. package/src/binary/wa-binary.js +4 -2
  227. package/src/defaults.js +2 -1
  228. package/src/foundation/cache.js +99 -24
  229. package/src/foundation/memory.js +103 -0
  230. package/src/signal/libsignal.js +1 -8
  231. package/src/signal/signal-repository.js +6 -4
  232. package/src/socket/chats.js +2 -0
  233. package/src/socket/messages-recv.js +5 -3
  234. package/src/socket/messages-send.js +2 -2
  235. package/src/socket/socket-core.js +3 -0
  236. package/src/utils/auth-state-core.js +2 -1
  237. package/src/utils/chat-sync.js +4 -0
  238. package/src/utils/media.js +13 -8
  239. package/src/utils/message-processing.js +22 -6
  240. package/src/utils/wa-protocol-core.js +6 -5
  241. package/src/wam/wam-constants.js +22 -22851
  242. package/src/wam/wam-data.json +1 -0
@@ -0,0 +1,201 @@
1
+ "use strict";
2
+ function ADVDeviceIdentity(p) {
3
+ if (p)
4
+ for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
5
+ if (p[ks[i]] != null && ks[i] !== "__proto__")
6
+ this[ks[i]] = p[ks[i]];
7
+ }
8
+ ADVDeviceIdentity.prototype.rawId = null;
9
+ ADVDeviceIdentity.prototype.timestamp = null;
10
+ ADVDeviceIdentity.prototype.keyIndex = null;
11
+ ADVDeviceIdentity.prototype.accountType = null;
12
+ ADVDeviceIdentity.prototype.deviceType = null;
13
+ let $oneOfFields;
14
+ Object.defineProperty(ADVDeviceIdentity.prototype, "_rawId", {
15
+ get: $util.oneOfGetter($oneOfFields = ["rawId"]),
16
+ set: $util.oneOfSetter($oneOfFields)
17
+ });
18
+ Object.defineProperty(ADVDeviceIdentity.prototype, "_timestamp", {
19
+ get: $util.oneOfGetter($oneOfFields = ["timestamp"]),
20
+ set: $util.oneOfSetter($oneOfFields)
21
+ });
22
+ Object.defineProperty(ADVDeviceIdentity.prototype, "_keyIndex", {
23
+ get: $util.oneOfGetter($oneOfFields = ["keyIndex"]),
24
+ set: $util.oneOfSetter($oneOfFields)
25
+ });
26
+ Object.defineProperty(ADVDeviceIdentity.prototype, "_accountType", {
27
+ get: $util.oneOfGetter($oneOfFields = ["accountType"]),
28
+ set: $util.oneOfSetter($oneOfFields)
29
+ });
30
+ Object.defineProperty(ADVDeviceIdentity.prototype, "_deviceType", {
31
+ get: $util.oneOfGetter($oneOfFields = ["deviceType"]),
32
+ set: $util.oneOfSetter($oneOfFields)
33
+ });
34
+ ADVDeviceIdentity.create = function create(properties) {
35
+ return new ADVDeviceIdentity(properties);
36
+ };
37
+ ADVDeviceIdentity.encode = function encode(m, w) {
38
+ if (!w)
39
+ w = $Writer.create();
40
+ if (m.rawId != null && Object.hasOwnProperty.call(m, "rawId"))
41
+ w.uint32(8).uint32(m.rawId);
42
+ if (m.timestamp != null && Object.hasOwnProperty.call(m, "timestamp"))
43
+ w.uint32(16).uint64(m.timestamp);
44
+ if (m.keyIndex != null && Object.hasOwnProperty.call(m, "keyIndex"))
45
+ w.uint32(24).uint32(m.keyIndex);
46
+ if (m.accountType != null && Object.hasOwnProperty.call(m, "accountType"))
47
+ w.uint32(32).int32(m.accountType);
48
+ if (m.deviceType != null && Object.hasOwnProperty.call(m, "deviceType"))
49
+ w.uint32(40).int32(m.deviceType);
50
+ return w;
51
+ };
52
+ ADVDeviceIdentity.decode = function decode(r, l, e, n) {
53
+ if (!(r instanceof $Reader))
54
+ r = $Reader.create(r);
55
+ if (n === undefined)
56
+ n = 0;
57
+ if (n > $Reader.recursionLimit)
58
+ throw Error("maximum nesting depth exceeded");
59
+ var c = l === undefined ? r.len : r.pos + l, m = new $root.proto.ADVDeviceIdentity();
60
+ while (r.pos < c) {
61
+ var t = r.uint32();
62
+ if (t === e)
63
+ break;
64
+ switch (t >>> 3) {
65
+ case 1: {
66
+ m.rawId = r.uint32();
67
+ break;
68
+ }
69
+ case 2: {
70
+ m.timestamp = r.uint64();
71
+ break;
72
+ }
73
+ case 3: {
74
+ m.keyIndex = r.uint32();
75
+ break;
76
+ }
77
+ case 4: {
78
+ m.accountType = r.int32();
79
+ break;
80
+ }
81
+ case 5: {
82
+ m.deviceType = r.int32();
83
+ break;
84
+ }
85
+ default:
86
+ r.skipType(t & 7, n);
87
+ break;
88
+ }
89
+ }
90
+ return m;
91
+ };
92
+ ADVDeviceIdentity.fromObject = function fromObject(d, n) {
93
+ if (d instanceof $root.proto.ADVDeviceIdentity)
94
+ return d;
95
+ if (n === undefined)
96
+ n = 0;
97
+ if (n > $util.recursionLimit)
98
+ throw Error("maximum nesting depth exceeded");
99
+ var m = new $root.proto.ADVDeviceIdentity();
100
+ if (d.rawId != null) {
101
+ m.rawId = d.rawId >>> 0;
102
+ }
103
+ if (d.timestamp != null) {
104
+ if ($util.Long)
105
+ (m.timestamp = $util.Long.fromValue(d.timestamp)).unsigned = true;
106
+ else if (typeof d.timestamp === "string")
107
+ m.timestamp = parseInt(d.timestamp, 10);
108
+ else if (typeof d.timestamp === "number")
109
+ m.timestamp = d.timestamp;
110
+ else if (typeof d.timestamp === "object")
111
+ m.timestamp = new $util.LongBits(d.timestamp.low >>> 0, d.timestamp.high >>> 0).toNumber(true);
112
+ }
113
+ if (d.keyIndex != null) {
114
+ m.keyIndex = d.keyIndex >>> 0;
115
+ }
116
+ switch (d.accountType) {
117
+ default:
118
+ if (typeof d.accountType === "number") {
119
+ m.accountType = d.accountType;
120
+ break;
121
+ }
122
+ break;
123
+ case "E2EE":
124
+ case 0:
125
+ m.accountType = 0;
126
+ break;
127
+ case "HOSTED":
128
+ case 1:
129
+ m.accountType = 1;
130
+ break;
131
+ case "NON_E2EE":
132
+ case 2:
133
+ m.accountType = 2;
134
+ break;
135
+ }
136
+ switch (d.deviceType) {
137
+ default:
138
+ if (typeof d.deviceType === "number") {
139
+ m.deviceType = d.deviceType;
140
+ break;
141
+ }
142
+ break;
143
+ case "E2EE":
144
+ case 0:
145
+ m.deviceType = 0;
146
+ break;
147
+ case "HOSTED":
148
+ case 1:
149
+ m.deviceType = 1;
150
+ break;
151
+ case "NON_E2EE":
152
+ case 2:
153
+ m.deviceType = 2;
154
+ break;
155
+ }
156
+ return m;
157
+ };
158
+ ADVDeviceIdentity.toObject = function toObject(m, o) {
159
+ if (!o)
160
+ o = {};
161
+ var d = {};
162
+ if (m.rawId != null && m.hasOwnProperty("rawId")) {
163
+ d.rawId = m.rawId;
164
+ if (o.oneofs)
165
+ d._rawId = "rawId";
166
+ }
167
+ if (m.timestamp != null && m.hasOwnProperty("timestamp")) {
168
+ if (typeof m.timestamp === "number")
169
+ d.timestamp = o.longs === String ? String(m.timestamp) : m.timestamp;
170
+ else
171
+ d.timestamp = o.longs === String ? longToString(m.timestamp, true) : o.longs === Number ? longToNumber(m.timestamp, true) : m.timestamp;
172
+ if (o.oneofs)
173
+ d._timestamp = "timestamp";
174
+ }
175
+ if (m.keyIndex != null && m.hasOwnProperty("keyIndex")) {
176
+ d.keyIndex = m.keyIndex;
177
+ if (o.oneofs)
178
+ d._keyIndex = "keyIndex";
179
+ }
180
+ if (m.accountType != null && m.hasOwnProperty("accountType")) {
181
+ d.accountType = o.enums === String ? $root.proto.ADVEncryptionType[m.accountType] === undefined ? m.accountType : $root.proto.ADVEncryptionType[m.accountType] : m.accountType;
182
+ if (o.oneofs)
183
+ d._accountType = "accountType";
184
+ }
185
+ if (m.deviceType != null && m.hasOwnProperty("deviceType")) {
186
+ d.deviceType = o.enums === String ? $root.proto.ADVEncryptionType[m.deviceType] === undefined ? m.deviceType : $root.proto.ADVEncryptionType[m.deviceType] : m.deviceType;
187
+ if (o.oneofs)
188
+ d._deviceType = "deviceType";
189
+ }
190
+ return d;
191
+ };
192
+ ADVDeviceIdentity.prototype.toJSON = function toJSON() {
193
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
194
+ };
195
+ ADVDeviceIdentity.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
196
+ if (typeUrlPrefix === undefined) {
197
+ typeUrlPrefix = "type.googleapis.com";
198
+ }
199
+ return typeUrlPrefix + "/proto.ADVDeviceIdentity";
200
+ };
201
+ return ADVDeviceIdentity;
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ const valuesById = {}, values = Object.create(valuesById);
3
+ values[valuesById[0] = "E2EE"] = 0;
4
+ values[valuesById[1] = "HOSTED"] = 1;
5
+ values[valuesById[2] = "NON_E2EE"] = 2;
6
+ return values;
@@ -0,0 +1,201 @@
1
+ "use strict";
2
+ function ADVKeyIndexList(p) {
3
+ this.validIndexes = [];
4
+ if (p)
5
+ for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
6
+ if (p[ks[i]] != null && ks[i] !== "__proto__")
7
+ this[ks[i]] = p[ks[i]];
8
+ }
9
+ ADVKeyIndexList.prototype.rawId = null;
10
+ ADVKeyIndexList.prototype.timestamp = null;
11
+ ADVKeyIndexList.prototype.currentIndex = null;
12
+ ADVKeyIndexList.prototype.validIndexes = $util.emptyArray;
13
+ ADVKeyIndexList.prototype.accountType = null;
14
+ let $oneOfFields;
15
+ Object.defineProperty(ADVKeyIndexList.prototype, "_rawId", {
16
+ get: $util.oneOfGetter($oneOfFields = ["rawId"]),
17
+ set: $util.oneOfSetter($oneOfFields)
18
+ });
19
+ Object.defineProperty(ADVKeyIndexList.prototype, "_timestamp", {
20
+ get: $util.oneOfGetter($oneOfFields = ["timestamp"]),
21
+ set: $util.oneOfSetter($oneOfFields)
22
+ });
23
+ Object.defineProperty(ADVKeyIndexList.prototype, "_currentIndex", {
24
+ get: $util.oneOfGetter($oneOfFields = ["currentIndex"]),
25
+ set: $util.oneOfSetter($oneOfFields)
26
+ });
27
+ Object.defineProperty(ADVKeyIndexList.prototype, "_accountType", {
28
+ get: $util.oneOfGetter($oneOfFields = ["accountType"]),
29
+ set: $util.oneOfSetter($oneOfFields)
30
+ });
31
+ ADVKeyIndexList.create = function create(properties) {
32
+ return new ADVKeyIndexList(properties);
33
+ };
34
+ ADVKeyIndexList.encode = function encode(m, w) {
35
+ if (!w)
36
+ w = $Writer.create();
37
+ if (m.rawId != null && Object.hasOwnProperty.call(m, "rawId"))
38
+ w.uint32(8).uint32(m.rawId);
39
+ if (m.timestamp != null && Object.hasOwnProperty.call(m, "timestamp"))
40
+ w.uint32(16).uint64(m.timestamp);
41
+ if (m.currentIndex != null && Object.hasOwnProperty.call(m, "currentIndex"))
42
+ w.uint32(24).uint32(m.currentIndex);
43
+ if (m.validIndexes != null && m.validIndexes.length) {
44
+ w.uint32(34).fork();
45
+ for (var i = 0; i < m.validIndexes.length; ++i)
46
+ w.uint32(m.validIndexes[i]);
47
+ w.ldelim();
48
+ }
49
+ if (m.accountType != null && Object.hasOwnProperty.call(m, "accountType"))
50
+ w.uint32(40).int32(m.accountType);
51
+ return w;
52
+ };
53
+ ADVKeyIndexList.decode = function decode(r, l, e, n) {
54
+ if (!(r instanceof $Reader))
55
+ r = $Reader.create(r);
56
+ if (n === undefined)
57
+ n = 0;
58
+ if (n > $Reader.recursionLimit)
59
+ throw Error("maximum nesting depth exceeded");
60
+ var c = l === undefined ? r.len : r.pos + l, m = new $root.proto.ADVKeyIndexList();
61
+ while (r.pos < c) {
62
+ var t = r.uint32();
63
+ if (t === e)
64
+ break;
65
+ switch (t >>> 3) {
66
+ case 1: {
67
+ m.rawId = r.uint32();
68
+ break;
69
+ }
70
+ case 2: {
71
+ m.timestamp = r.uint64();
72
+ break;
73
+ }
74
+ case 3: {
75
+ m.currentIndex = r.uint32();
76
+ break;
77
+ }
78
+ case 4: {
79
+ if (!(m.validIndexes && m.validIndexes.length))
80
+ m.validIndexes = [];
81
+ if ((t & 7) === 2) {
82
+ var c2 = r.uint32() + r.pos;
83
+ while (r.pos < c2)
84
+ m.validIndexes.push(r.uint32());
85
+ } else
86
+ m.validIndexes.push(r.uint32());
87
+ break;
88
+ }
89
+ case 5: {
90
+ m.accountType = r.int32();
91
+ break;
92
+ }
93
+ default:
94
+ r.skipType(t & 7, n);
95
+ break;
96
+ }
97
+ }
98
+ return m;
99
+ };
100
+ ADVKeyIndexList.fromObject = function fromObject(d, n) {
101
+ if (d instanceof $root.proto.ADVKeyIndexList)
102
+ return d;
103
+ if (n === undefined)
104
+ n = 0;
105
+ if (n > $util.recursionLimit)
106
+ throw Error("maximum nesting depth exceeded");
107
+ var m = new $root.proto.ADVKeyIndexList();
108
+ if (d.rawId != null) {
109
+ m.rawId = d.rawId >>> 0;
110
+ }
111
+ if (d.timestamp != null) {
112
+ if ($util.Long)
113
+ (m.timestamp = $util.Long.fromValue(d.timestamp)).unsigned = true;
114
+ else if (typeof d.timestamp === "string")
115
+ m.timestamp = parseInt(d.timestamp, 10);
116
+ else if (typeof d.timestamp === "number")
117
+ m.timestamp = d.timestamp;
118
+ else if (typeof d.timestamp === "object")
119
+ m.timestamp = new $util.LongBits(d.timestamp.low >>> 0, d.timestamp.high >>> 0).toNumber(true);
120
+ }
121
+ if (d.currentIndex != null) {
122
+ m.currentIndex = d.currentIndex >>> 0;
123
+ }
124
+ if (d.validIndexes) {
125
+ if (!Array.isArray(d.validIndexes))
126
+ throw TypeError(".proto.ADVKeyIndexList.validIndexes: array expected");
127
+ m.validIndexes = [];
128
+ for (var i = 0; i < d.validIndexes.length; ++i) {
129
+ m.validIndexes[i] = d.validIndexes[i] >>> 0;
130
+ }
131
+ }
132
+ switch (d.accountType) {
133
+ default:
134
+ if (typeof d.accountType === "number") {
135
+ m.accountType = d.accountType;
136
+ break;
137
+ }
138
+ break;
139
+ case "E2EE":
140
+ case 0:
141
+ m.accountType = 0;
142
+ break;
143
+ case "HOSTED":
144
+ case 1:
145
+ m.accountType = 1;
146
+ break;
147
+ case "NON_E2EE":
148
+ case 2:
149
+ m.accountType = 2;
150
+ break;
151
+ }
152
+ return m;
153
+ };
154
+ ADVKeyIndexList.toObject = function toObject(m, o) {
155
+ if (!o)
156
+ o = {};
157
+ var d = {};
158
+ if (o.arrays || o.defaults) {
159
+ d.validIndexes = [];
160
+ }
161
+ if (m.rawId != null && m.hasOwnProperty("rawId")) {
162
+ d.rawId = m.rawId;
163
+ if (o.oneofs)
164
+ d._rawId = "rawId";
165
+ }
166
+ if (m.timestamp != null && m.hasOwnProperty("timestamp")) {
167
+ if (typeof m.timestamp === "number")
168
+ d.timestamp = o.longs === String ? String(m.timestamp) : m.timestamp;
169
+ else
170
+ d.timestamp = o.longs === String ? longToString(m.timestamp, true) : o.longs === Number ? longToNumber(m.timestamp, true) : m.timestamp;
171
+ if (o.oneofs)
172
+ d._timestamp = "timestamp";
173
+ }
174
+ if (m.currentIndex != null && m.hasOwnProperty("currentIndex")) {
175
+ d.currentIndex = m.currentIndex;
176
+ if (o.oneofs)
177
+ d._currentIndex = "currentIndex";
178
+ }
179
+ if (m.validIndexes && m.validIndexes.length) {
180
+ d.validIndexes = [];
181
+ for (var j = 0; j < m.validIndexes.length; ++j) {
182
+ d.validIndexes[j] = m.validIndexes[j];
183
+ }
184
+ }
185
+ if (m.accountType != null && m.hasOwnProperty("accountType")) {
186
+ d.accountType = o.enums === String ? $root.proto.ADVEncryptionType[m.accountType] === undefined ? m.accountType : $root.proto.ADVEncryptionType[m.accountType] : m.accountType;
187
+ if (o.oneofs)
188
+ d._accountType = "accountType";
189
+ }
190
+ return d;
191
+ };
192
+ ADVKeyIndexList.prototype.toJSON = function toJSON() {
193
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
194
+ };
195
+ ADVKeyIndexList.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
196
+ if (typeUrlPrefix === undefined) {
197
+ typeUrlPrefix = "type.googleapis.com";
198
+ }
199
+ return typeUrlPrefix + "/proto.ADVKeyIndexList";
200
+ };
201
+ return ADVKeyIndexList;
@@ -0,0 +1,150 @@
1
+ "use strict";
2
+ function ADVSignedDeviceIdentity(p) {
3
+ if (p)
4
+ for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
5
+ if (p[ks[i]] != null && ks[i] !== "__proto__")
6
+ this[ks[i]] = p[ks[i]];
7
+ }
8
+ ADVSignedDeviceIdentity.prototype.details = null;
9
+ ADVSignedDeviceIdentity.prototype.accountSignatureKey = null;
10
+ ADVSignedDeviceIdentity.prototype.accountSignature = null;
11
+ ADVSignedDeviceIdentity.prototype.deviceSignature = null;
12
+ let $oneOfFields;
13
+ Object.defineProperty(ADVSignedDeviceIdentity.prototype, "_details", {
14
+ get: $util.oneOfGetter($oneOfFields = ["details"]),
15
+ set: $util.oneOfSetter($oneOfFields)
16
+ });
17
+ Object.defineProperty(ADVSignedDeviceIdentity.prototype, "_accountSignatureKey", {
18
+ get: $util.oneOfGetter($oneOfFields = ["accountSignatureKey"]),
19
+ set: $util.oneOfSetter($oneOfFields)
20
+ });
21
+ Object.defineProperty(ADVSignedDeviceIdentity.prototype, "_accountSignature", {
22
+ get: $util.oneOfGetter($oneOfFields = ["accountSignature"]),
23
+ set: $util.oneOfSetter($oneOfFields)
24
+ });
25
+ Object.defineProperty(ADVSignedDeviceIdentity.prototype, "_deviceSignature", {
26
+ get: $util.oneOfGetter($oneOfFields = ["deviceSignature"]),
27
+ set: $util.oneOfSetter($oneOfFields)
28
+ });
29
+ ADVSignedDeviceIdentity.create = function create(properties) {
30
+ return new ADVSignedDeviceIdentity(properties);
31
+ };
32
+ ADVSignedDeviceIdentity.encode = function encode(m, w) {
33
+ if (!w)
34
+ w = $Writer.create();
35
+ if (m.details != null && Object.hasOwnProperty.call(m, "details"))
36
+ w.uint32(10).bytes(m.details);
37
+ if (m.accountSignatureKey != null && Object.hasOwnProperty.call(m, "accountSignatureKey"))
38
+ w.uint32(18).bytes(m.accountSignatureKey);
39
+ if (m.accountSignature != null && Object.hasOwnProperty.call(m, "accountSignature"))
40
+ w.uint32(26).bytes(m.accountSignature);
41
+ if (m.deviceSignature != null && Object.hasOwnProperty.call(m, "deviceSignature"))
42
+ w.uint32(34).bytes(m.deviceSignature);
43
+ return w;
44
+ };
45
+ ADVSignedDeviceIdentity.decode = function decode(r, l, e, n) {
46
+ if (!(r instanceof $Reader))
47
+ r = $Reader.create(r);
48
+ if (n === undefined)
49
+ n = 0;
50
+ if (n > $Reader.recursionLimit)
51
+ throw Error("maximum nesting depth exceeded");
52
+ var c = l === undefined ? r.len : r.pos + l, m = new $root.proto.ADVSignedDeviceIdentity();
53
+ while (r.pos < c) {
54
+ var t = r.uint32();
55
+ if (t === e)
56
+ break;
57
+ switch (t >>> 3) {
58
+ case 1: {
59
+ m.details = r.bytes();
60
+ break;
61
+ }
62
+ case 2: {
63
+ m.accountSignatureKey = r.bytes();
64
+ break;
65
+ }
66
+ case 3: {
67
+ m.accountSignature = r.bytes();
68
+ break;
69
+ }
70
+ case 4: {
71
+ m.deviceSignature = r.bytes();
72
+ break;
73
+ }
74
+ default:
75
+ r.skipType(t & 7, n);
76
+ break;
77
+ }
78
+ }
79
+ return m;
80
+ };
81
+ ADVSignedDeviceIdentity.fromObject = function fromObject(d, n) {
82
+ if (d instanceof $root.proto.ADVSignedDeviceIdentity)
83
+ return d;
84
+ if (n === undefined)
85
+ n = 0;
86
+ if (n > $util.recursionLimit)
87
+ throw Error("maximum nesting depth exceeded");
88
+ var m = new $root.proto.ADVSignedDeviceIdentity();
89
+ if (d.details != null) {
90
+ if (typeof d.details === "string")
91
+ $util.base64.decode(d.details, m.details = $util.newBuffer($util.base64.length(d.details)), 0);
92
+ else if (d.details.length >= 0)
93
+ m.details = d.details;
94
+ }
95
+ if (d.accountSignatureKey != null) {
96
+ if (typeof d.accountSignatureKey === "string")
97
+ $util.base64.decode(d.accountSignatureKey, m.accountSignatureKey = $util.newBuffer($util.base64.length(d.accountSignatureKey)), 0);
98
+ else if (d.accountSignatureKey.length >= 0)
99
+ m.accountSignatureKey = d.accountSignatureKey;
100
+ }
101
+ if (d.accountSignature != null) {
102
+ if (typeof d.accountSignature === "string")
103
+ $util.base64.decode(d.accountSignature, m.accountSignature = $util.newBuffer($util.base64.length(d.accountSignature)), 0);
104
+ else if (d.accountSignature.length >= 0)
105
+ m.accountSignature = d.accountSignature;
106
+ }
107
+ if (d.deviceSignature != null) {
108
+ if (typeof d.deviceSignature === "string")
109
+ $util.base64.decode(d.deviceSignature, m.deviceSignature = $util.newBuffer($util.base64.length(d.deviceSignature)), 0);
110
+ else if (d.deviceSignature.length >= 0)
111
+ m.deviceSignature = d.deviceSignature;
112
+ }
113
+ return m;
114
+ };
115
+ ADVSignedDeviceIdentity.toObject = function toObject(m, o) {
116
+ if (!o)
117
+ o = {};
118
+ var d = {};
119
+ if (m.details != null && m.hasOwnProperty("details")) {
120
+ d.details = o.bytes === String ? $util.base64.encode(m.details, 0, m.details.length) : o.bytes === Array ? Array.prototype.slice.call(m.details) : m.details;
121
+ if (o.oneofs)
122
+ d._details = "details";
123
+ }
124
+ if (m.accountSignatureKey != null && m.hasOwnProperty("accountSignatureKey")) {
125
+ d.accountSignatureKey = o.bytes === String ? $util.base64.encode(m.accountSignatureKey, 0, m.accountSignatureKey.length) : o.bytes === Array ? Array.prototype.slice.call(m.accountSignatureKey) : m.accountSignatureKey;
126
+ if (o.oneofs)
127
+ d._accountSignatureKey = "accountSignatureKey";
128
+ }
129
+ if (m.accountSignature != null && m.hasOwnProperty("accountSignature")) {
130
+ d.accountSignature = o.bytes === String ? $util.base64.encode(m.accountSignature, 0, m.accountSignature.length) : o.bytes === Array ? Array.prototype.slice.call(m.accountSignature) : m.accountSignature;
131
+ if (o.oneofs)
132
+ d._accountSignature = "accountSignature";
133
+ }
134
+ if (m.deviceSignature != null && m.hasOwnProperty("deviceSignature")) {
135
+ d.deviceSignature = o.bytes === String ? $util.base64.encode(m.deviceSignature, 0, m.deviceSignature.length) : o.bytes === Array ? Array.prototype.slice.call(m.deviceSignature) : m.deviceSignature;
136
+ if (o.oneofs)
137
+ d._deviceSignature = "deviceSignature";
138
+ }
139
+ return d;
140
+ };
141
+ ADVSignedDeviceIdentity.prototype.toJSON = function toJSON() {
142
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
143
+ };
144
+ ADVSignedDeviceIdentity.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
145
+ if (typeUrlPrefix === undefined) {
146
+ typeUrlPrefix = "type.googleapis.com";
147
+ }
148
+ return typeUrlPrefix + "/proto.ADVSignedDeviceIdentity";
149
+ };
150
+ return ADVSignedDeviceIdentity;
@@ -0,0 +1,142 @@
1
+ "use strict";
2
+ function ADVSignedDeviceIdentityHMAC(p) {
3
+ if (p)
4
+ for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
5
+ if (p[ks[i]] != null && ks[i] !== "__proto__")
6
+ this[ks[i]] = p[ks[i]];
7
+ }
8
+ ADVSignedDeviceIdentityHMAC.prototype.details = null;
9
+ ADVSignedDeviceIdentityHMAC.prototype.hmac = null;
10
+ ADVSignedDeviceIdentityHMAC.prototype.accountType = null;
11
+ let $oneOfFields;
12
+ Object.defineProperty(ADVSignedDeviceIdentityHMAC.prototype, "_details", {
13
+ get: $util.oneOfGetter($oneOfFields = ["details"]),
14
+ set: $util.oneOfSetter($oneOfFields)
15
+ });
16
+ Object.defineProperty(ADVSignedDeviceIdentityHMAC.prototype, "_hmac", {
17
+ get: $util.oneOfGetter($oneOfFields = ["hmac"]),
18
+ set: $util.oneOfSetter($oneOfFields)
19
+ });
20
+ Object.defineProperty(ADVSignedDeviceIdentityHMAC.prototype, "_accountType", {
21
+ get: $util.oneOfGetter($oneOfFields = ["accountType"]),
22
+ set: $util.oneOfSetter($oneOfFields)
23
+ });
24
+ ADVSignedDeviceIdentityHMAC.create = function create(properties) {
25
+ return new ADVSignedDeviceIdentityHMAC(properties);
26
+ };
27
+ ADVSignedDeviceIdentityHMAC.encode = function encode(m, w) {
28
+ if (!w)
29
+ w = $Writer.create();
30
+ if (m.details != null && Object.hasOwnProperty.call(m, "details"))
31
+ w.uint32(10).bytes(m.details);
32
+ if (m.hmac != null && Object.hasOwnProperty.call(m, "hmac"))
33
+ w.uint32(18).bytes(m.hmac);
34
+ if (m.accountType != null && Object.hasOwnProperty.call(m, "accountType"))
35
+ w.uint32(24).int32(m.accountType);
36
+ return w;
37
+ };
38
+ ADVSignedDeviceIdentityHMAC.decode = function decode(r, l, e, n) {
39
+ if (!(r instanceof $Reader))
40
+ r = $Reader.create(r);
41
+ if (n === undefined)
42
+ n = 0;
43
+ if (n > $Reader.recursionLimit)
44
+ throw Error("maximum nesting depth exceeded");
45
+ var c = l === undefined ? r.len : r.pos + l, m = new $root.proto.ADVSignedDeviceIdentityHMAC();
46
+ while (r.pos < c) {
47
+ var t = r.uint32();
48
+ if (t === e)
49
+ break;
50
+ switch (t >>> 3) {
51
+ case 1: {
52
+ m.details = r.bytes();
53
+ break;
54
+ }
55
+ case 2: {
56
+ m.hmac = r.bytes();
57
+ break;
58
+ }
59
+ case 3: {
60
+ m.accountType = r.int32();
61
+ break;
62
+ }
63
+ default:
64
+ r.skipType(t & 7, n);
65
+ break;
66
+ }
67
+ }
68
+ return m;
69
+ };
70
+ ADVSignedDeviceIdentityHMAC.fromObject = function fromObject(d, n) {
71
+ if (d instanceof $root.proto.ADVSignedDeviceIdentityHMAC)
72
+ return d;
73
+ if (n === undefined)
74
+ n = 0;
75
+ if (n > $util.recursionLimit)
76
+ throw Error("maximum nesting depth exceeded");
77
+ var m = new $root.proto.ADVSignedDeviceIdentityHMAC();
78
+ if (d.details != null) {
79
+ if (typeof d.details === "string")
80
+ $util.base64.decode(d.details, m.details = $util.newBuffer($util.base64.length(d.details)), 0);
81
+ else if (d.details.length >= 0)
82
+ m.details = d.details;
83
+ }
84
+ if (d.hmac != null) {
85
+ if (typeof d.hmac === "string")
86
+ $util.base64.decode(d.hmac, m.hmac = $util.newBuffer($util.base64.length(d.hmac)), 0);
87
+ else if (d.hmac.length >= 0)
88
+ m.hmac = d.hmac;
89
+ }
90
+ switch (d.accountType) {
91
+ default:
92
+ if (typeof d.accountType === "number") {
93
+ m.accountType = d.accountType;
94
+ break;
95
+ }
96
+ break;
97
+ case "E2EE":
98
+ case 0:
99
+ m.accountType = 0;
100
+ break;
101
+ case "HOSTED":
102
+ case 1:
103
+ m.accountType = 1;
104
+ break;
105
+ case "NON_E2EE":
106
+ case 2:
107
+ m.accountType = 2;
108
+ break;
109
+ }
110
+ return m;
111
+ };
112
+ ADVSignedDeviceIdentityHMAC.toObject = function toObject(m, o) {
113
+ if (!o)
114
+ o = {};
115
+ var d = {};
116
+ if (m.details != null && m.hasOwnProperty("details")) {
117
+ d.details = o.bytes === String ? $util.base64.encode(m.details, 0, m.details.length) : o.bytes === Array ? Array.prototype.slice.call(m.details) : m.details;
118
+ if (o.oneofs)
119
+ d._details = "details";
120
+ }
121
+ if (m.hmac != null && m.hasOwnProperty("hmac")) {
122
+ d.hmac = o.bytes === String ? $util.base64.encode(m.hmac, 0, m.hmac.length) : o.bytes === Array ? Array.prototype.slice.call(m.hmac) : m.hmac;
123
+ if (o.oneofs)
124
+ d._hmac = "hmac";
125
+ }
126
+ if (m.accountType != null && m.hasOwnProperty("accountType")) {
127
+ d.accountType = o.enums === String ? $root.proto.ADVEncryptionType[m.accountType] === undefined ? m.accountType : $root.proto.ADVEncryptionType[m.accountType] : m.accountType;
128
+ if (o.oneofs)
129
+ d._accountType = "accountType";
130
+ }
131
+ return d;
132
+ };
133
+ ADVSignedDeviceIdentityHMAC.prototype.toJSON = function toJSON() {
134
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
135
+ };
136
+ ADVSignedDeviceIdentityHMAC.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
137
+ if (typeUrlPrefix === undefined) {
138
+ typeUrlPrefix = "type.googleapis.com";
139
+ }
140
+ return typeUrlPrefix + "/proto.ADVSignedDeviceIdentityHMAC";
141
+ };
142
+ return ADVSignedDeviceIdentityHMAC;