@hiroosy/baileys-lite 0.3.4 → 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 (225) hide show
  1. package/WAProto/index.js +231 -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
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ const valuesById = {}, values = Object.create(valuesById);
3
+ values[valuesById[0] = "COLLECTION_NAME_UNKNOWN"] = 0;
4
+ values[valuesById[1] = "REGULAR"] = 1;
5
+ values[valuesById[2] = "REGULAR_LOW"] = 2;
6
+ values[valuesById[3] = "REGULAR_HIGH"] = 3;
7
+ values[valuesById[4] = "CRITICAL_BLOCK"] = 4;
8
+ values[valuesById[5] = "CRITICAL_UNBLOCK_LOW"] = 5;
9
+ return values;
@@ -0,0 +1,102 @@
1
+ "use strict";
2
+ function CommentMetadata(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
+ CommentMetadata.prototype.commentParentKey = null;
9
+ CommentMetadata.prototype.replyCount = null;
10
+ let $oneOfFields;
11
+ Object.defineProperty(CommentMetadata.prototype, "_commentParentKey", {
12
+ get: $util.oneOfGetter($oneOfFields = ["commentParentKey"]),
13
+ set: $util.oneOfSetter($oneOfFields)
14
+ });
15
+ Object.defineProperty(CommentMetadata.prototype, "_replyCount", {
16
+ get: $util.oneOfGetter($oneOfFields = ["replyCount"]),
17
+ set: $util.oneOfSetter($oneOfFields)
18
+ });
19
+ CommentMetadata.create = function create(properties) {
20
+ return new CommentMetadata(properties);
21
+ };
22
+ CommentMetadata.encode = function encode(m, w) {
23
+ if (!w)
24
+ w = $Writer.create();
25
+ if (m.commentParentKey != null && Object.hasOwnProperty.call(m, "commentParentKey"))
26
+ $root.proto.MessageKey.encode(m.commentParentKey, w.uint32(10).fork()).ldelim();
27
+ if (m.replyCount != null && Object.hasOwnProperty.call(m, "replyCount"))
28
+ w.uint32(16).uint32(m.replyCount);
29
+ return w;
30
+ };
31
+ CommentMetadata.decode = function decode(r, l, e, n) {
32
+ if (!(r instanceof $Reader))
33
+ r = $Reader.create(r);
34
+ if (n === undefined)
35
+ n = 0;
36
+ if (n > $Reader.recursionLimit)
37
+ throw Error("maximum nesting depth exceeded");
38
+ var c = l === undefined ? r.len : r.pos + l, m = new $root.proto.CommentMetadata();
39
+ while (r.pos < c) {
40
+ var t = r.uint32();
41
+ if (t === e)
42
+ break;
43
+ switch (t >>> 3) {
44
+ case 1: {
45
+ m.commentParentKey = $root.proto.MessageKey.decode(r, r.uint32(), undefined, n + 1);
46
+ break;
47
+ }
48
+ case 2: {
49
+ m.replyCount = r.uint32();
50
+ break;
51
+ }
52
+ default:
53
+ r.skipType(t & 7, n);
54
+ break;
55
+ }
56
+ }
57
+ return m;
58
+ };
59
+ CommentMetadata.fromObject = function fromObject(d, n) {
60
+ if (d instanceof $root.proto.CommentMetadata)
61
+ return d;
62
+ if (n === undefined)
63
+ n = 0;
64
+ if (n > $util.recursionLimit)
65
+ throw Error("maximum nesting depth exceeded");
66
+ var m = new $root.proto.CommentMetadata();
67
+ if (d.commentParentKey != null) {
68
+ if (typeof d.commentParentKey !== "object")
69
+ throw TypeError(".proto.CommentMetadata.commentParentKey: object expected");
70
+ m.commentParentKey = $root.proto.MessageKey.fromObject(d.commentParentKey, n + 1);
71
+ }
72
+ if (d.replyCount != null) {
73
+ m.replyCount = d.replyCount >>> 0;
74
+ }
75
+ return m;
76
+ };
77
+ CommentMetadata.toObject = function toObject(m, o) {
78
+ if (!o)
79
+ o = {};
80
+ var d = {};
81
+ if (m.commentParentKey != null && m.hasOwnProperty("commentParentKey")) {
82
+ d.commentParentKey = $root.proto.MessageKey.toObject(m.commentParentKey, o);
83
+ if (o.oneofs)
84
+ d._commentParentKey = "commentParentKey";
85
+ }
86
+ if (m.replyCount != null && m.hasOwnProperty("replyCount")) {
87
+ d.replyCount = m.replyCount;
88
+ if (o.oneofs)
89
+ d._replyCount = "replyCount";
90
+ }
91
+ return d;
92
+ };
93
+ CommentMetadata.prototype.toJSON = function toJSON() {
94
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
95
+ };
96
+ CommentMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
97
+ if (typeUrlPrefix === undefined) {
98
+ typeUrlPrefix = "type.googleapis.com";
99
+ }
100
+ return typeUrlPrefix + "/proto.CommentMetadata";
101
+ };
102
+ return CommentMetadata;
@@ -0,0 +1,84 @@
1
+ "use strict";
2
+ function CompanionCommitment(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
+ CompanionCommitment.prototype.hash = null;
9
+ let $oneOfFields;
10
+ Object.defineProperty(CompanionCommitment.prototype, "_hash", {
11
+ get: $util.oneOfGetter($oneOfFields = ["hash"]),
12
+ set: $util.oneOfSetter($oneOfFields)
13
+ });
14
+ CompanionCommitment.create = function create(properties) {
15
+ return new CompanionCommitment(properties);
16
+ };
17
+ CompanionCommitment.encode = function encode(m, w) {
18
+ if (!w)
19
+ w = $Writer.create();
20
+ if (m.hash != null && Object.hasOwnProperty.call(m, "hash"))
21
+ w.uint32(10).bytes(m.hash);
22
+ return w;
23
+ };
24
+ CompanionCommitment.decode = function decode(r, l, e, n) {
25
+ if (!(r instanceof $Reader))
26
+ r = $Reader.create(r);
27
+ if (n === undefined)
28
+ n = 0;
29
+ if (n > $Reader.recursionLimit)
30
+ throw Error("maximum nesting depth exceeded");
31
+ var c = l === undefined ? r.len : r.pos + l, m = new $root.proto.CompanionCommitment();
32
+ while (r.pos < c) {
33
+ var t = r.uint32();
34
+ if (t === e)
35
+ break;
36
+ switch (t >>> 3) {
37
+ case 1: {
38
+ m.hash = r.bytes();
39
+ break;
40
+ }
41
+ default:
42
+ r.skipType(t & 7, n);
43
+ break;
44
+ }
45
+ }
46
+ return m;
47
+ };
48
+ CompanionCommitment.fromObject = function fromObject(d, n) {
49
+ if (d instanceof $root.proto.CompanionCommitment)
50
+ return d;
51
+ if (n === undefined)
52
+ n = 0;
53
+ if (n > $util.recursionLimit)
54
+ throw Error("maximum nesting depth exceeded");
55
+ var m = new $root.proto.CompanionCommitment();
56
+ if (d.hash != null) {
57
+ if (typeof d.hash === "string")
58
+ $util.base64.decode(d.hash, m.hash = $util.newBuffer($util.base64.length(d.hash)), 0);
59
+ else if (d.hash.length >= 0)
60
+ m.hash = d.hash;
61
+ }
62
+ return m;
63
+ };
64
+ CompanionCommitment.toObject = function toObject(m, o) {
65
+ if (!o)
66
+ o = {};
67
+ var d = {};
68
+ if (m.hash != null && m.hasOwnProperty("hash")) {
69
+ d.hash = o.bytes === String ? $util.base64.encode(m.hash, 0, m.hash.length) : o.bytes === Array ? Array.prototype.slice.call(m.hash) : m.hash;
70
+ if (o.oneofs)
71
+ d._hash = "hash";
72
+ }
73
+ return d;
74
+ };
75
+ CompanionCommitment.prototype.toJSON = function toJSON() {
76
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
77
+ };
78
+ CompanionCommitment.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
79
+ if (typeUrlPrefix === undefined) {
80
+ typeUrlPrefix = "type.googleapis.com";
81
+ }
82
+ return typeUrlPrefix + "/proto.CompanionCommitment";
83
+ };
84
+ return CompanionCommitment;
@@ -0,0 +1,227 @@
1
+ "use strict";
2
+ function CompanionEphemeralIdentity(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
+ CompanionEphemeralIdentity.prototype.publicKey = null;
9
+ CompanionEphemeralIdentity.prototype.deviceType = null;
10
+ CompanionEphemeralIdentity.prototype.ref = null;
11
+ let $oneOfFields;
12
+ Object.defineProperty(CompanionEphemeralIdentity.prototype, "_publicKey", {
13
+ get: $util.oneOfGetter($oneOfFields = ["publicKey"]),
14
+ set: $util.oneOfSetter($oneOfFields)
15
+ });
16
+ Object.defineProperty(CompanionEphemeralIdentity.prototype, "_deviceType", {
17
+ get: $util.oneOfGetter($oneOfFields = ["deviceType"]),
18
+ set: $util.oneOfSetter($oneOfFields)
19
+ });
20
+ Object.defineProperty(CompanionEphemeralIdentity.prototype, "_ref", {
21
+ get: $util.oneOfGetter($oneOfFields = ["ref"]),
22
+ set: $util.oneOfSetter($oneOfFields)
23
+ });
24
+ CompanionEphemeralIdentity.create = function create(properties) {
25
+ return new CompanionEphemeralIdentity(properties);
26
+ };
27
+ CompanionEphemeralIdentity.encode = function encode(m, w) {
28
+ if (!w)
29
+ w = $Writer.create();
30
+ if (m.publicKey != null && Object.hasOwnProperty.call(m, "publicKey"))
31
+ w.uint32(10).bytes(m.publicKey);
32
+ if (m.deviceType != null && Object.hasOwnProperty.call(m, "deviceType"))
33
+ w.uint32(16).int32(m.deviceType);
34
+ if (m.ref != null && Object.hasOwnProperty.call(m, "ref"))
35
+ w.uint32(26).string(m.ref);
36
+ return w;
37
+ };
38
+ CompanionEphemeralIdentity.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.CompanionEphemeralIdentity();
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.publicKey = r.bytes();
53
+ break;
54
+ }
55
+ case 2: {
56
+ m.deviceType = r.int32();
57
+ break;
58
+ }
59
+ case 3: {
60
+ m.ref = r.string();
61
+ break;
62
+ }
63
+ default:
64
+ r.skipType(t & 7, n);
65
+ break;
66
+ }
67
+ }
68
+ return m;
69
+ };
70
+ CompanionEphemeralIdentity.fromObject = function fromObject(d, n) {
71
+ if (d instanceof $root.proto.CompanionEphemeralIdentity)
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.CompanionEphemeralIdentity();
78
+ if (d.publicKey != null) {
79
+ if (typeof d.publicKey === "string")
80
+ $util.base64.decode(d.publicKey, m.publicKey = $util.newBuffer($util.base64.length(d.publicKey)), 0);
81
+ else if (d.publicKey.length >= 0)
82
+ m.publicKey = d.publicKey;
83
+ }
84
+ switch (d.deviceType) {
85
+ default:
86
+ if (typeof d.deviceType === "number") {
87
+ m.deviceType = d.deviceType;
88
+ break;
89
+ }
90
+ break;
91
+ case "UNKNOWN":
92
+ case 0:
93
+ m.deviceType = 0;
94
+ break;
95
+ case "CHROME":
96
+ case 1:
97
+ m.deviceType = 1;
98
+ break;
99
+ case "FIREFOX":
100
+ case 2:
101
+ m.deviceType = 2;
102
+ break;
103
+ case "IE":
104
+ case 3:
105
+ m.deviceType = 3;
106
+ break;
107
+ case "OPERA":
108
+ case 4:
109
+ m.deviceType = 4;
110
+ break;
111
+ case "SAFARI":
112
+ case 5:
113
+ m.deviceType = 5;
114
+ break;
115
+ case "EDGE":
116
+ case 6:
117
+ m.deviceType = 6;
118
+ break;
119
+ case "DESKTOP":
120
+ case 7:
121
+ m.deviceType = 7;
122
+ break;
123
+ case "IPAD":
124
+ case 8:
125
+ m.deviceType = 8;
126
+ break;
127
+ case "ANDROID_TABLET":
128
+ case 9:
129
+ m.deviceType = 9;
130
+ break;
131
+ case "OHANA":
132
+ case 10:
133
+ m.deviceType = 10;
134
+ break;
135
+ case "ALOHA":
136
+ case 11:
137
+ m.deviceType = 11;
138
+ break;
139
+ case "CATALINA":
140
+ case 12:
141
+ m.deviceType = 12;
142
+ break;
143
+ case "TCL_TV":
144
+ case 13:
145
+ m.deviceType = 13;
146
+ break;
147
+ case "IOS_PHONE":
148
+ case 14:
149
+ m.deviceType = 14;
150
+ break;
151
+ case "IOS_CATALYST":
152
+ case 15:
153
+ m.deviceType = 15;
154
+ break;
155
+ case "ANDROID_PHONE":
156
+ case 16:
157
+ m.deviceType = 16;
158
+ break;
159
+ case "ANDROID_AMBIGUOUS":
160
+ case 17:
161
+ m.deviceType = 17;
162
+ break;
163
+ case "WEAR_OS":
164
+ case 18:
165
+ m.deviceType = 18;
166
+ break;
167
+ case "AR_WRIST":
168
+ case 19:
169
+ m.deviceType = 19;
170
+ break;
171
+ case "AR_DEVICE":
172
+ case 20:
173
+ m.deviceType = 20;
174
+ break;
175
+ case "UWP":
176
+ case 21:
177
+ m.deviceType = 21;
178
+ break;
179
+ case "VR":
180
+ case 22:
181
+ m.deviceType = 22;
182
+ break;
183
+ case "CLOUD_API":
184
+ case 23:
185
+ m.deviceType = 23;
186
+ break;
187
+ case "SMARTGLASSES":
188
+ case 24:
189
+ m.deviceType = 24;
190
+ break;
191
+ }
192
+ if (d.ref != null) {
193
+ m.ref = String(d.ref);
194
+ }
195
+ return m;
196
+ };
197
+ CompanionEphemeralIdentity.toObject = function toObject(m, o) {
198
+ if (!o)
199
+ o = {};
200
+ var d = {};
201
+ if (m.publicKey != null && m.hasOwnProperty("publicKey")) {
202
+ d.publicKey = o.bytes === String ? $util.base64.encode(m.publicKey, 0, m.publicKey.length) : o.bytes === Array ? Array.prototype.slice.call(m.publicKey) : m.publicKey;
203
+ if (o.oneofs)
204
+ d._publicKey = "publicKey";
205
+ }
206
+ if (m.deviceType != null && m.hasOwnProperty("deviceType")) {
207
+ d.deviceType = o.enums === String ? $root.proto.DeviceProps.PlatformType[m.deviceType] === undefined ? m.deviceType : $root.proto.DeviceProps.PlatformType[m.deviceType] : m.deviceType;
208
+ if (o.oneofs)
209
+ d._deviceType = "deviceType";
210
+ }
211
+ if (m.ref != null && m.hasOwnProperty("ref")) {
212
+ d.ref = m.ref;
213
+ if (o.oneofs)
214
+ d._ref = "ref";
215
+ }
216
+ return d;
217
+ };
218
+ CompanionEphemeralIdentity.prototype.toJSON = function toJSON() {
219
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
220
+ };
221
+ CompanionEphemeralIdentity.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
222
+ if (typeUrlPrefix === undefined) {
223
+ typeUrlPrefix = "type.googleapis.com";
224
+ }
225
+ return typeUrlPrefix + "/proto.CompanionEphemeralIdentity";
226
+ };
227
+ return CompanionEphemeralIdentity;
@@ -0,0 +1,136 @@
1
+ "use strict";
2
+ function Config(p) {
3
+ this.field = {};
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
+ Config.prototype.field = $util.emptyObject;
10
+ Config.prototype.version = null;
11
+ let $oneOfFields;
12
+ Object.defineProperty(Config.prototype, "_version", {
13
+ get: $util.oneOfGetter($oneOfFields = ["version"]),
14
+ set: $util.oneOfSetter($oneOfFields)
15
+ });
16
+ Config.create = function create(properties) {
17
+ return new Config(properties);
18
+ };
19
+ Config.encode = function encode(m, w) {
20
+ if (!w)
21
+ w = $Writer.create();
22
+ if (m.field != null && Object.hasOwnProperty.call(m, "field")) {
23
+ for (var ks = Object.keys(m.field), i = 0; i < ks.length; ++i) {
24
+ w.uint32(10).fork().uint32(8).uint32(ks[i]);
25
+ $root.proto.Field.encode(m.field[ks[i]], w.uint32(18).fork()).ldelim().ldelim();
26
+ }
27
+ }
28
+ if (m.version != null && Object.hasOwnProperty.call(m, "version"))
29
+ w.uint32(16).uint32(m.version);
30
+ return w;
31
+ };
32
+ Config.decode = function decode(r, l, e, n) {
33
+ if (!(r instanceof $Reader))
34
+ r = $Reader.create(r);
35
+ if (n === undefined)
36
+ n = 0;
37
+ if (n > $Reader.recursionLimit)
38
+ throw Error("maximum nesting depth exceeded");
39
+ var c = l === undefined ? r.len : r.pos + l, m = new $root.proto.Config(), k, value;
40
+ while (r.pos < c) {
41
+ var t = r.uint32();
42
+ if (t === e)
43
+ break;
44
+ switch (t >>> 3) {
45
+ case 1: {
46
+ if (m.field === $util.emptyObject)
47
+ m.field = {};
48
+ var c2 = r.uint32() + r.pos;
49
+ k = 0;
50
+ value = null;
51
+ while (r.pos < c2) {
52
+ var tag2 = r.uint32();
53
+ switch (tag2 >>> 3) {
54
+ case 1:
55
+ k = r.uint32();
56
+ break;
57
+ case 2:
58
+ value = $root.proto.Field.decode(r, r.uint32(), undefined, n + 1);
59
+ break;
60
+ default:
61
+ r.skipType(tag2 & 7, n);
62
+ break;
63
+ }
64
+ }
65
+ m.field[k] = value;
66
+ break;
67
+ }
68
+ case 2: {
69
+ m.version = r.uint32();
70
+ break;
71
+ }
72
+ default:
73
+ r.skipType(t & 7, n);
74
+ break;
75
+ }
76
+ }
77
+ return m;
78
+ };
79
+ Config.fromObject = function fromObject(d, n) {
80
+ if (d instanceof $root.proto.Config)
81
+ return d;
82
+ if (n === undefined)
83
+ n = 0;
84
+ if (n > $util.recursionLimit)
85
+ throw Error("maximum nesting depth exceeded");
86
+ var m = new $root.proto.Config();
87
+ if (d.field) {
88
+ if (typeof d.field !== "object")
89
+ throw TypeError(".proto.Config.field: object expected");
90
+ m.field = {};
91
+ for (var ks = Object.keys(d.field), i = 0; i < ks.length; ++i) {
92
+ if (ks[i] === "__proto__")
93
+ $util.makeProp(m.field, ks[i]);
94
+ if (typeof d.field[ks[i]] !== "object")
95
+ throw TypeError(".proto.Config.field: object expected");
96
+ m.field[ks[i]] = $root.proto.Field.fromObject(d.field[ks[i]], n + 1);
97
+ }
98
+ }
99
+ if (d.version != null) {
100
+ m.version = d.version >>> 0;
101
+ }
102
+ return m;
103
+ };
104
+ Config.toObject = function toObject(m, o) {
105
+ if (!o)
106
+ o = {};
107
+ var d = {};
108
+ if (o.objects || o.defaults) {
109
+ d.field = {};
110
+ }
111
+ var ks2;
112
+ if (m.field && (ks2 = Object.keys(m.field)).length) {
113
+ d.field = {};
114
+ for (var j = 0; j < ks2.length; ++j) {
115
+ if (ks2[j] === "__proto__")
116
+ $util.makeProp(d.field, ks2[j]);
117
+ d.field[ks2[j]] = $root.proto.Field.toObject(m.field[ks2[j]], o);
118
+ }
119
+ }
120
+ if (m.version != null && m.hasOwnProperty("version")) {
121
+ d.version = m.version;
122
+ if (o.oneofs)
123
+ d._version = "version";
124
+ }
125
+ return d;
126
+ };
127
+ Config.prototype.toJSON = function toJSON() {
128
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
129
+ };
130
+ Config.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
131
+ if (typeUrlPrefix === undefined) {
132
+ typeUrlPrefix = "type.googleapis.com";
133
+ }
134
+ return typeUrlPrefix + "/proto.Config";
135
+ };
136
+ return Config;