dcodeindra-baileyspro 2.3.9
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.
- package/LICENSE +21 -0
- package/README.md +2534 -0
- package/WAProto/Adv/Adv.d.ts +518 -0
- package/WAProto/Adv/Adv.js +1734 -0
- package/WAProto/Adv/Adv.proto +36 -0
- package/WAProto/BotMetadata/BotMetadata.d.ts +5745 -0
- package/WAProto/BotMetadata/BotMetadata.js +16291 -0
- package/WAProto/BotMetadata/BotMetadata.proto +463 -0
- package/WAProto/Cert/Cert.d.ts +497 -0
- package/WAProto/Cert/Cert.js +1503 -0
- package/WAProto/Cert/Cert.proto +28 -0
- package/WAProto/ChatLockSettings/ChatLockSettings.d.ts +391 -0
- package/WAProto/ChatLockSettings/ChatLockSettings.js +1155 -0
- package/WAProto/ChatLockSettings/ChatLockSettings.proto +7 -0
- package/WAProto/CompanionReg/CompanionReg.d.ts +1055 -0
- package/WAProto/CompanionReg/CompanionReg.js +3532 -0
- package/WAProto/CompanionReg/CompanionReg.proto +89 -0
- package/WAProto/DeviceCapabilities/DeviceCapabilities.d.ts +187 -0
- package/WAProto/DeviceCapabilities/DeviceCapabilities.js +520 -0
- package/WAProto/DeviceCapabilities/DeviceCapabilities.proto +14 -0
- package/WAProto/E2E/E2E.d.ts +28417 -0
- package/WAProto/E2E/E2E.js +98438 -0
- package/WAProto/E2E/E2E.proto +2289 -0
- package/WAProto/Ephemeral/Ephemeral.d.ts +95 -0
- package/WAProto/Ephemeral/Ephemeral.js +269 -0
- package/WAProto/Ephemeral/Ephemeral.proto +6 -0
- package/WAProto/HistorySync/HistorySync.d.ts +40728 -0
- package/WAProto/HistorySync/HistorySync.js +142980 -0
- package/WAProto/HistorySync/HistorySync.proto +207 -0
- package/WAProto/LidMigrationSyncPayload/LidMigrationSyncPayload.d.ts +189 -0
- package/WAProto/LidMigrationSyncPayload/LidMigrationSyncPayload.js +585 -0
- package/WAProto/LidMigrationSyncPayload/LidMigrationSyncPayload.proto +11 -0
- package/WAProto/MdStorageChatRowOpaqueData/MdStorageChatRowOpaqueData.d.ts +461 -0
- package/WAProto/MdStorageChatRowOpaqueData/MdStorageChatRowOpaqueData.js +1559 -0
- package/WAProto/MdStorageChatRowOpaqueData/MdStorageChatRowOpaqueData.proto +37 -0
- package/WAProto/MdStorageMsgRowOpaqueData/MdStorageMsgRowOpaqueData.d.ts +29294 -0
- package/WAProto/MdStorageMsgRowOpaqueData/MdStorageMsgRowOpaqueData.js +101732 -0
- package/WAProto/MdStorageMsgRowOpaqueData/MdStorageMsgRowOpaqueData.proto +76 -0
- package/WAProto/MmsRetry/MmsRetry.d.ts +200 -0
- package/WAProto/MmsRetry/MmsRetry.js +586 -0
- package/WAProto/MmsRetry/MmsRetry.proto +17 -0
- package/WAProto/Protocol/Protocol.d.ts +218 -0
- package/WAProto/Protocol/Protocol.js +701 -0
- package/WAProto/Protocol/Protocol.proto +20 -0
- package/WAProto/Reporting/Reporting.d.ts +301 -0
- package/WAProto/Reporting/Reporting.js +989 -0
- package/WAProto/Reporting/Reporting.proto +19 -0
- package/WAProto/ServerSync/ServerSync.d.ts +1050 -0
- package/WAProto/ServerSync/ServerSync.js +3176 -0
- package/WAProto/ServerSync/ServerSync.proto +59 -0
- package/WAProto/SignalLocalStorageProtocol/SignalLocalStorageProtocol.d.ts +1507 -0
- package/WAProto/SignalLocalStorageProtocol/SignalLocalStorageProtocol.js +4756 -0
- package/WAProto/SignalLocalStorageProtocol/SignalLocalStorageProtocol.proto +88 -0
- package/WAProto/SignalWhisperTextProtocol/SignalWhisperTextProtocol.d.ts +617 -0
- package/WAProto/SignalWhisperTextProtocol/SignalWhisperTextProtocol.js +1940 -0
- package/WAProto/SignalWhisperTextProtocol/SignalWhisperTextProtocol.proto +38 -0
- package/WAProto/StatusAttributions/StatusAttributions.d.ts +636 -0
- package/WAProto/StatusAttributions/StatusAttributions.js +2037 -0
- package/WAProto/StatusAttributions/StatusAttributions.proto +61 -0
- package/WAProto/SyncAction/SyncAction.d.ts +7227 -0
- package/WAProto/SyncAction/SyncAction.js +22271 -0
- package/WAProto/SyncAction/SyncAction.proto +423 -0
- package/WAProto/UserPassword/UserPassword.d.ts +298 -0
- package/WAProto/UserPassword/UserPassword.js +898 -0
- package/WAProto/UserPassword/UserPassword.proto +27 -0
- package/WAProto/VnameCert/VnameCert.d.ts +658 -0
- package/WAProto/VnameCert/VnameCert.js +2225 -0
- package/WAProto/VnameCert/VnameCert.proto +60 -0
- package/WAProto/Wa6/Wa6.d.ts +1613 -0
- package/WAProto/Wa6/Wa6.js +6299 -0
- package/WAProto/Wa6/Wa6.proto +229 -0
- package/WAProto/Web/Web.d.ts +31718 -0
- package/WAProto/Web/Web.js +113402 -0
- package/WAProto/Web/Web.proto +545 -0
- package/WAProto/index.d.ts +49 -0
- package/WAProto/index.js +28 -0
- package/WASignalGroup/GroupProtocol.js +1771 -0
- package/WASignalGroup/ciphertext_message.js +10 -0
- package/WASignalGroup/group_cipher.js +103 -0
- package/WASignalGroup/group_session_builder.js +39 -0
- package/WASignalGroup/index.js +5 -0
- package/WASignalGroup/keyhelper.js +17 -0
- package/WASignalGroup/protobufs.js +2 -0
- package/WASignalGroup/queue_job.js +64 -0
- package/WASignalGroup/sender_chain_key.js +38 -0
- package/WASignalGroup/sender_key_distribution_message.js +68 -0
- package/WASignalGroup/sender_key_message.js +79 -0
- package/WASignalGroup/sender_key_name.js +59 -0
- package/WASignalGroup/sender_key_record.js +47 -0
- package/WASignalGroup/sender_key_state.js +110 -0
- package/WASignalGroup/sender_message_key.js +30 -0
- package/check-node-version.js +10 -0
- package/lib/Defaults/baileys-version.json +3 -0
- package/lib/Defaults/index.d.ts +51 -0
- package/lib/Defaults/index.js +108 -0
- package/lib/Defaults/phonenumber-mcc.json +223 -0
- package/lib/Signal/Group/ciphertext-message.d.ts +9 -0
- package/lib/Signal/Group/ciphertext-message.js +19 -0
- package/lib/Signal/Group/group-session-builder.d.ts +17 -0
- package/lib/Signal/Group/group-session-builder.js +72 -0
- package/lib/Signal/Group/group_cipher.d.ts +19 -0
- package/lib/Signal/Group/group_cipher.js +99 -0
- package/lib/Signal/Group/index.d.ts +11 -0
- package/lib/Signal/Group/index.js +61 -0
- package/lib/Signal/Group/keyhelper.d.ts +16 -0
- package/lib/Signal/Group/keyhelper.js +66 -0
- package/lib/Signal/Group/queue-job.d.ts +1 -0
- package/lib/Signal/Group/queue-job.js +64 -0
- package/lib/Signal/Group/sender-chain-key.d.ts +14 -0
- package/lib/Signal/Group/sender-chain-key.js +39 -0
- package/lib/Signal/Group/sender-key-distribution-message.d.ts +17 -0
- package/lib/Signal/Group/sender-key-distribution-message.js +71 -0
- package/lib/Signal/Group/sender-key-message.d.ts +19 -0
- package/lib/Signal/Group/sender-key-message.js +73 -0
- package/lib/Signal/Group/sender-key-name.d.ts +19 -0
- package/lib/Signal/Group/sender-key-name.js +59 -0
- package/lib/Signal/Group/sender-key-record.d.ts +32 -0
- package/lib/Signal/Group/sender-key-record.js +53 -0
- package/lib/Signal/Group/sender-key-record.ts +77 -0
- package/lib/Signal/Group/sender-key-state.d.ts +44 -0
- package/lib/Signal/Group/sender-key-state.js +104 -0
- package/lib/Signal/Group/sender-message-key.d.ts +11 -0
- package/lib/Signal/Group/sender-message-key.js +33 -0
- package/lib/Signal/libsignal.d.ts +3 -0
- package/lib/Signal/libsignal.js +153 -0
- package/lib/Socket/Client/index.d.ts +2 -0
- package/lib/Socket/Client/index.js +18 -0
- package/lib/Socket/Client/types.d.ts +15 -0
- package/lib/Socket/Client/types.js +14 -0
- package/lib/Socket/Client/websocket.d.ts +12 -0
- package/lib/Socket/Client/websocket.js +57 -0
- package/lib/Socket/business.d.ts +181 -0
- package/lib/Socket/business.js +259 -0
- package/lib/Socket/chats.d.ts +95 -0
- package/lib/Socket/chats.js +906 -0
- package/lib/Socket/community.d.ts +131 -0
- package/lib/Socket/community.js +369 -0
- package/lib/Socket/groups.d.ts +122 -0
- package/lib/Socket/groups.js +360 -0
- package/lib/Socket/index.d.ts +183 -0
- package/lib/Socket/index.js +10 -0
- package/lib/Socket/messages-recv.d.ts +170 -0
- package/lib/Socket/messages-recv.js +1074 -0
- package/lib/Socket/messages-send.d.ts +161 -0
- package/lib/Socket/messages-send.js +982 -0
- package/lib/Socket/newsletter.d.ts +140 -0
- package/lib/Socket/newsletter.js +242 -0
- package/lib/Socket/socket.d.ts +43 -0
- package/lib/Socket/socket.js +749 -0
- package/lib/Socket/usync.d.ts +36 -0
- package/lib/Socket/usync.js +71 -0
- package/lib/Store/index.d.ts +4 -0
- package/lib/Store/index.js +20 -0
- package/lib/Store/make-cache-manager-store.d.ts +13 -0
- package/lib/Store/make-cache-manager-store.js +77 -0
- package/lib/Store/make-in-memory-store.d.ts +117 -0
- package/lib/Store/make-in-memory-store.js +420 -0
- package/lib/Store/make-ordered-dictionary.d.ts +12 -0
- package/lib/Store/make-ordered-dictionary.js +83 -0
- package/lib/Store/object-repository.d.ts +10 -0
- package/lib/Store/object-repository.js +28 -0
- package/lib/Types/Auth.d.ts +103 -0
- package/lib/Types/Auth.js +2 -0
- package/lib/Types/Call.d.ts +13 -0
- package/lib/Types/Call.js +2 -0
- package/lib/Types/Chat.d.ts +115 -0
- package/lib/Types/Chat.js +6 -0
- package/lib/Types/Contact.d.ts +35 -0
- package/lib/Types/Contact.js +2 -0
- package/lib/Types/Events.d.ts +208 -0
- package/lib/Types/Events.js +2 -0
- package/lib/Types/GroupMetadata.d.ts +81 -0
- package/lib/Types/GroupMetadata.js +2 -0
- package/lib/Types/Label.d.ts +46 -0
- package/lib/Types/Label.js +28 -0
- package/lib/Types/LabelAssociation.d.ts +29 -0
- package/lib/Types/LabelAssociation.js +10 -0
- package/lib/Types/Message.d.ts +480 -0
- package/lib/Types/Message.js +9 -0
- package/lib/Types/MexUpdates.d.ts +9 -0
- package/lib/Types/MexUpdates.js +18 -0
- package/lib/Types/Newsletter.d.ts +92 -0
- package/lib/Types/Newsletter.js +33 -0
- package/lib/Types/Product.d.ts +78 -0
- package/lib/Types/Product.js +2 -0
- package/lib/Types/Signal.d.ts +57 -0
- package/lib/Types/Signal.js +2 -0
- package/lib/Types/Socket.d.ts +116 -0
- package/lib/Types/Socket.js +2 -0
- package/lib/Types/State.d.ts +27 -0
- package/lib/Types/State.js +2 -0
- package/lib/Types/USync.d.ts +25 -0
- package/lib/Types/USync.js +2 -0
- package/lib/Types/index.d.ts +70 -0
- package/lib/Types/index.js +42 -0
- package/lib/Utils/auth-utils.d.ts +18 -0
- package/lib/Utils/auth-utils.js +198 -0
- package/lib/Utils/baileys-event-stream.d.ts +16 -0
- package/lib/Utils/baileys-event-stream.js +64 -0
- package/lib/Utils/business.d.ts +22 -0
- package/lib/Utils/business.js +243 -0
- package/lib/Utils/chat-utils.d.ts +72 -0
- package/lib/Utils/chat-utils.js +762 -0
- package/lib/Utils/crypto.d.ts +40 -0
- package/lib/Utils/crypto.js +150 -0
- package/lib/Utils/decode-wa-message.d.ts +252 -0
- package/lib/Utils/decode-wa-message.js +232 -0
- package/lib/Utils/event-buffer.d.ts +35 -0
- package/lib/Utils/event-buffer.js +539 -0
- package/lib/Utils/generics.d.ts +96 -0
- package/lib/Utils/generics.js +553 -0
- package/lib/Utils/history.d.ts +29 -0
- package/lib/Utils/history.js +109 -0
- package/lib/Utils/index.d.ts +19 -0
- package/lib/Utils/index.js +35 -0
- package/lib/Utils/link-preview.d.ts +21 -0
- package/lib/Utils/link-preview.js +112 -0
- package/lib/Utils/logger.d.ts +11 -0
- package/lib/Utils/logger.js +7 -0
- package/lib/Utils/lt-hash.d.ts +12 -0
- package/lib/Utils/lt-hash.js +53 -0
- package/lib/Utils/make-mutex.d.ts +7 -0
- package/lib/Utils/make-mutex.js +45 -0
- package/lib/Utils/messages-media.d.ts +104 -0
- package/lib/Utils/messages-media.js +751 -0
- package/lib/Utils/messages.d.ts +80 -0
- package/lib/Utils/messages.js +1741 -0
- package/lib/Utils/noise-handler.d.ts +19 -0
- package/lib/Utils/noise-handler.js +150 -0
- package/lib/Utils/process-message.d.ts +41 -0
- package/lib/Utils/process-message.js +391 -0
- package/lib/Utils/signal.d.ts +33 -0
- package/lib/Utils/signal.js +154 -0
- package/lib/Utils/use-mongo-file-auth-state.d.ts +5 -0
- package/lib/Utils/use-mongo-file-auth-state.js +75 -0
- package/lib/Utils/use-multi-file-auth-state.d.ts +12 -0
- package/lib/Utils/use-multi-file-auth-state.js +123 -0
- package/lib/Utils/use-single-file-auth-state.d.ts +12 -0
- package/lib/Utils/use-single-file-auth-state.js +75 -0
- package/lib/Utils/validate-connection.d.ts +10 -0
- package/lib/Utils/validate-connection.js +174 -0
- package/lib/WABinary/constants.d.ts +27 -0
- package/lib/WABinary/constants.js +45 -0
- package/lib/WABinary/decode.d.ts +6 -0
- package/lib/WABinary/decode.js +255 -0
- package/lib/WABinary/encode.d.ts +2 -0
- package/lib/WABinary/encode.js +243 -0
- package/lib/WABinary/generic-utils.d.ts +16 -0
- package/lib/WABinary/generic-utils.js +125 -0
- package/lib/WABinary/index.d.ts +5 -0
- package/lib/WABinary/index.js +21 -0
- package/lib/WABinary/jid-utils.d.ts +34 -0
- package/lib/WABinary/jid-utils.js +73 -0
- package/lib/WABinary/types.d.ts +18 -0
- package/lib/WABinary/types.js +2 -0
- package/lib/WAM/BinaryInfo.d.ts +16 -0
- package/lib/WAM/BinaryInfo.js +14 -0
- package/lib/WAM/constants.d.ts +39 -0
- package/lib/WAM/constants.js +15362 -0
- package/lib/WAM/encode.d.ts +2 -0
- package/lib/WAM/encode.js +156 -0
- package/lib/WAM/index.d.ts +3 -0
- package/lib/WAM/index.js +19 -0
- package/lib/WAUSync/Protocols/USyncBotProfileProtocol.d.ts +25 -0
- package/lib/WAUSync/Protocols/USyncBotProfileProtocol.js +60 -0
- package/lib/WAUSync/Protocols/USyncContactProtocol.d.ts +9 -0
- package/lib/WAUSync/Protocols/USyncContactProtocol.js +32 -0
- package/lib/WAUSync/Protocols/USyncDeviceProtocol.d.ts +22 -0
- package/lib/WAUSync/Protocols/USyncDeviceProtocol.js +58 -0
- package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.d.ts +12 -0
- package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js +31 -0
- package/lib/WAUSync/Protocols/USyncLIDProtocol.d.ts +8 -0
- package/lib/WAUSync/Protocols/USyncLIDProtocol.js +26 -0
- package/lib/WAUSync/Protocols/USyncStatusProtocol.d.ts +12 -0
- package/lib/WAUSync/Protocols/USyncStatusProtocol.js +42 -0
- package/lib/WAUSync/Protocols/index.d.ts +6 -0
- package/lib/WAUSync/Protocols/index.js +22 -0
- package/lib/WAUSync/USyncQuery.d.ts +28 -0
- package/lib/WAUSync/USyncQuery.js +88 -0
- package/lib/WAUSync/USyncUser.d.ts +12 -0
- package/lib/WAUSync/USyncUser.js +27 -0
- package/lib/WAUSync/index.d.ts +3 -0
- package/lib/WAUSync/index.js +19 -0
- package/lib/index.d.ts +13 -0
- package/lib/index.js +45 -0
- package/package.json +63 -0
|
@@ -0,0 +1,1734 @@
|
|
|
1
|
+
/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/
|
|
2
|
+
"use strict";
|
|
3
|
+
var $protobuf = require("protobufjs/minimal");
|
|
4
|
+
// Common aliases
|
|
5
|
+
var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util;
|
|
6
|
+
// Exported root namespace
|
|
7
|
+
var $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {});
|
|
8
|
+
$root.Adv = (function() {
|
|
9
|
+
/**
|
|
10
|
+
* Namespace Adv.
|
|
11
|
+
* @exports Adv
|
|
12
|
+
* @namespace
|
|
13
|
+
*/
|
|
14
|
+
var Adv = {};
|
|
15
|
+
Adv.ADVSignedDeviceIdentityHMAC = (function() {
|
|
16
|
+
/**
|
|
17
|
+
* Properties of a ADVSignedDeviceIdentityHMAC.
|
|
18
|
+
* @memberof Adv
|
|
19
|
+
* @interface IADVSignedDeviceIdentityHMAC
|
|
20
|
+
* @property {Uint8Array|null} [details] ADVSignedDeviceIdentityHMAC details
|
|
21
|
+
* @property {Uint8Array|null} [hmac] ADVSignedDeviceIdentityHMAC hmac
|
|
22
|
+
* @property {Adv.ADVEncryptionType|null} [accountType] ADVSignedDeviceIdentityHMAC accountType
|
|
23
|
+
*/
|
|
24
|
+
/**
|
|
25
|
+
* Constructs a new ADVSignedDeviceIdentityHMAC.
|
|
26
|
+
* @memberof Adv
|
|
27
|
+
* @classdesc Represents a ADVSignedDeviceIdentityHMAC.
|
|
28
|
+
* @implements IADVSignedDeviceIdentityHMAC
|
|
29
|
+
* @constructor
|
|
30
|
+
* @param {Adv.IADVSignedDeviceIdentityHMAC=} [properties] Properties to set
|
|
31
|
+
*/
|
|
32
|
+
function ADVSignedDeviceIdentityHMAC(properties) {
|
|
33
|
+
if (properties)
|
|
34
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
35
|
+
if (properties[keys[i]] != null)
|
|
36
|
+
this[keys[i]] = properties[keys[i]];
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* ADVSignedDeviceIdentityHMAC details.
|
|
40
|
+
* @member {Uint8Array|null|undefined} details
|
|
41
|
+
* @memberof Adv.ADVSignedDeviceIdentityHMAC
|
|
42
|
+
* @instance
|
|
43
|
+
*/
|
|
44
|
+
ADVSignedDeviceIdentityHMAC.prototype.details = null;
|
|
45
|
+
/**
|
|
46
|
+
* ADVSignedDeviceIdentityHMAC hmac.
|
|
47
|
+
* @member {Uint8Array|null|undefined} hmac
|
|
48
|
+
* @memberof Adv.ADVSignedDeviceIdentityHMAC
|
|
49
|
+
* @instance
|
|
50
|
+
*/
|
|
51
|
+
ADVSignedDeviceIdentityHMAC.prototype.hmac = null;
|
|
52
|
+
/**
|
|
53
|
+
* ADVSignedDeviceIdentityHMAC accountType.
|
|
54
|
+
* @member {Adv.ADVEncryptionType|null|undefined} accountType
|
|
55
|
+
* @memberof Adv.ADVSignedDeviceIdentityHMAC
|
|
56
|
+
* @instance
|
|
57
|
+
*/
|
|
58
|
+
ADVSignedDeviceIdentityHMAC.prototype.accountType = null;
|
|
59
|
+
// OneOf field names bound to virtual getters and setters
|
|
60
|
+
var $oneOfFields;
|
|
61
|
+
/**
|
|
62
|
+
* ADVSignedDeviceIdentityHMAC _details.
|
|
63
|
+
* @member {"details"|undefined} _details
|
|
64
|
+
* @memberof Adv.ADVSignedDeviceIdentityHMAC
|
|
65
|
+
* @instance
|
|
66
|
+
*/
|
|
67
|
+
Object.defineProperty(ADVSignedDeviceIdentityHMAC.prototype, "_details", {
|
|
68
|
+
get: $util.oneOfGetter($oneOfFields = ["details"]),
|
|
69
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
70
|
+
});
|
|
71
|
+
/**
|
|
72
|
+
* ADVSignedDeviceIdentityHMAC _hmac.
|
|
73
|
+
* @member {"hmac"|undefined} _hmac
|
|
74
|
+
* @memberof Adv.ADVSignedDeviceIdentityHMAC
|
|
75
|
+
* @instance
|
|
76
|
+
*/
|
|
77
|
+
Object.defineProperty(ADVSignedDeviceIdentityHMAC.prototype, "_hmac", {
|
|
78
|
+
get: $util.oneOfGetter($oneOfFields = ["hmac"]),
|
|
79
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
80
|
+
});
|
|
81
|
+
/**
|
|
82
|
+
* ADVSignedDeviceIdentityHMAC _accountType.
|
|
83
|
+
* @member {"accountType"|undefined} _accountType
|
|
84
|
+
* @memberof Adv.ADVSignedDeviceIdentityHMAC
|
|
85
|
+
* @instance
|
|
86
|
+
*/
|
|
87
|
+
Object.defineProperty(ADVSignedDeviceIdentityHMAC.prototype, "_accountType", {
|
|
88
|
+
get: $util.oneOfGetter($oneOfFields = ["accountType"]),
|
|
89
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
90
|
+
});
|
|
91
|
+
/**
|
|
92
|
+
* Creates a new ADVSignedDeviceIdentityHMAC instance using the specified properties.
|
|
93
|
+
* @function create
|
|
94
|
+
* @memberof Adv.ADVSignedDeviceIdentityHMAC
|
|
95
|
+
* @static
|
|
96
|
+
* @param {Adv.IADVSignedDeviceIdentityHMAC=} [properties] Properties to set
|
|
97
|
+
* @returns {Adv.ADVSignedDeviceIdentityHMAC} ADVSignedDeviceIdentityHMAC instance
|
|
98
|
+
*/
|
|
99
|
+
ADVSignedDeviceIdentityHMAC.create = function create(properties) {
|
|
100
|
+
return new ADVSignedDeviceIdentityHMAC(properties);
|
|
101
|
+
};
|
|
102
|
+
/**
|
|
103
|
+
* Encodes the specified ADVSignedDeviceIdentityHMAC message. Does not implicitly {@link Adv.ADVSignedDeviceIdentityHMAC.verify|verify} messages.
|
|
104
|
+
* @function encode
|
|
105
|
+
* @memberof Adv.ADVSignedDeviceIdentityHMAC
|
|
106
|
+
* @static
|
|
107
|
+
* @param {Adv.IADVSignedDeviceIdentityHMAC} message ADVSignedDeviceIdentityHMAC message or plain object to encode
|
|
108
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
109
|
+
* @returns {$protobuf.Writer} Writer
|
|
110
|
+
*/
|
|
111
|
+
ADVSignedDeviceIdentityHMAC.encode = function encode(message, writer) {
|
|
112
|
+
if (!writer)
|
|
113
|
+
writer = $Writer.create();
|
|
114
|
+
if (message.details != null && Object.hasOwnProperty.call(message, "details"))
|
|
115
|
+
writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.details);
|
|
116
|
+
if (message.hmac != null && Object.hasOwnProperty.call(message, "hmac"))
|
|
117
|
+
writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.hmac);
|
|
118
|
+
if (message.accountType != null && Object.hasOwnProperty.call(message, "accountType"))
|
|
119
|
+
writer.uint32(/* id 3, wireType 0 =*/24).int32(message.accountType);
|
|
120
|
+
return writer;
|
|
121
|
+
};
|
|
122
|
+
/**
|
|
123
|
+
* Encodes the specified ADVSignedDeviceIdentityHMAC message, length delimited. Does not implicitly {@link Adv.ADVSignedDeviceIdentityHMAC.verify|verify} messages.
|
|
124
|
+
* @function encodeDelimited
|
|
125
|
+
* @memberof Adv.ADVSignedDeviceIdentityHMAC
|
|
126
|
+
* @static
|
|
127
|
+
* @param {Adv.IADVSignedDeviceIdentityHMAC} message ADVSignedDeviceIdentityHMAC message or plain object to encode
|
|
128
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
129
|
+
* @returns {$protobuf.Writer} Writer
|
|
130
|
+
*/
|
|
131
|
+
ADVSignedDeviceIdentityHMAC.encodeDelimited = function encodeDelimited(message, writer) {
|
|
132
|
+
return this.encode(message, writer).ldelim();
|
|
133
|
+
};
|
|
134
|
+
/**
|
|
135
|
+
* Decodes a ADVSignedDeviceIdentityHMAC message from the specified reader or buffer.
|
|
136
|
+
* @function decode
|
|
137
|
+
* @memberof Adv.ADVSignedDeviceIdentityHMAC
|
|
138
|
+
* @static
|
|
139
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
140
|
+
* @param {number} [length] Message length if known beforehand
|
|
141
|
+
* @returns {Adv.ADVSignedDeviceIdentityHMAC} ADVSignedDeviceIdentityHMAC
|
|
142
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
143
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
144
|
+
*/
|
|
145
|
+
ADVSignedDeviceIdentityHMAC.decode = function decode(reader, length, error) {
|
|
146
|
+
if (!(reader instanceof $Reader))
|
|
147
|
+
reader = $Reader.create(reader);
|
|
148
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.Adv.ADVSignedDeviceIdentityHMAC();
|
|
149
|
+
while (reader.pos < end) {
|
|
150
|
+
var tag = reader.uint32();
|
|
151
|
+
if (tag === error)
|
|
152
|
+
break;
|
|
153
|
+
switch (tag >>> 3) {
|
|
154
|
+
case 1: {
|
|
155
|
+
message.details = reader.bytes();
|
|
156
|
+
break;
|
|
157
|
+
}
|
|
158
|
+
case 2: {
|
|
159
|
+
message.hmac = reader.bytes();
|
|
160
|
+
break;
|
|
161
|
+
}
|
|
162
|
+
case 3: {
|
|
163
|
+
message.accountType = reader.int32();
|
|
164
|
+
break;
|
|
165
|
+
}
|
|
166
|
+
default:
|
|
167
|
+
reader.skipType(tag & 7);
|
|
168
|
+
break;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
return message;
|
|
172
|
+
};
|
|
173
|
+
/**
|
|
174
|
+
* Decodes a ADVSignedDeviceIdentityHMAC message from the specified reader or buffer, length delimited.
|
|
175
|
+
* @function decodeDelimited
|
|
176
|
+
* @memberof Adv.ADVSignedDeviceIdentityHMAC
|
|
177
|
+
* @static
|
|
178
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
179
|
+
* @returns {Adv.ADVSignedDeviceIdentityHMAC} ADVSignedDeviceIdentityHMAC
|
|
180
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
181
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
182
|
+
*/
|
|
183
|
+
ADVSignedDeviceIdentityHMAC.decodeDelimited = function decodeDelimited(reader) {
|
|
184
|
+
if (!(reader instanceof $Reader))
|
|
185
|
+
reader = new $Reader(reader);
|
|
186
|
+
return this.decode(reader, reader.uint32());
|
|
187
|
+
};
|
|
188
|
+
/**
|
|
189
|
+
* Verifies a ADVSignedDeviceIdentityHMAC message.
|
|
190
|
+
* @function verify
|
|
191
|
+
* @memberof Adv.ADVSignedDeviceIdentityHMAC
|
|
192
|
+
* @static
|
|
193
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
194
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
195
|
+
*/
|
|
196
|
+
ADVSignedDeviceIdentityHMAC.verify = function verify(message) {
|
|
197
|
+
if (typeof message !== "object" || message === null)
|
|
198
|
+
return "object expected";
|
|
199
|
+
var properties = {};
|
|
200
|
+
if (message.details != null && message.hasOwnProperty("details")) {
|
|
201
|
+
properties._details = 1;
|
|
202
|
+
if (!(message.details && typeof message.details.length === "number" || $util.isString(message.details)))
|
|
203
|
+
return "details: buffer expected";
|
|
204
|
+
}
|
|
205
|
+
if (message.hmac != null && message.hasOwnProperty("hmac")) {
|
|
206
|
+
properties._hmac = 1;
|
|
207
|
+
if (!(message.hmac && typeof message.hmac.length === "number" || $util.isString(message.hmac)))
|
|
208
|
+
return "hmac: buffer expected";
|
|
209
|
+
}
|
|
210
|
+
if (message.accountType != null && message.hasOwnProperty("accountType")) {
|
|
211
|
+
properties._accountType = 1;
|
|
212
|
+
switch (message.accountType) {
|
|
213
|
+
default:
|
|
214
|
+
return "accountType: enum value expected";
|
|
215
|
+
case 0:
|
|
216
|
+
case 1:
|
|
217
|
+
break;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
return null;
|
|
221
|
+
};
|
|
222
|
+
/**
|
|
223
|
+
* Creates a ADVSignedDeviceIdentityHMAC message from a plain object. Also converts values to their respective internal types.
|
|
224
|
+
* @function fromObject
|
|
225
|
+
* @memberof Adv.ADVSignedDeviceIdentityHMAC
|
|
226
|
+
* @static
|
|
227
|
+
* @param {Object.<string,*>} object Plain object
|
|
228
|
+
* @returns {Adv.ADVSignedDeviceIdentityHMAC} ADVSignedDeviceIdentityHMAC
|
|
229
|
+
*/
|
|
230
|
+
ADVSignedDeviceIdentityHMAC.fromObject = function fromObject(object) {
|
|
231
|
+
if (object instanceof $root.Adv.ADVSignedDeviceIdentityHMAC)
|
|
232
|
+
return object;
|
|
233
|
+
var message = new $root.Adv.ADVSignedDeviceIdentityHMAC();
|
|
234
|
+
if (object.details != null)
|
|
235
|
+
if (typeof object.details === "string")
|
|
236
|
+
$util.base64.decode(object.details, message.details = $util.newBuffer($util.base64.length(object.details)), 0);
|
|
237
|
+
else if (object.details.length >= 0)
|
|
238
|
+
message.details = object.details;
|
|
239
|
+
if (object.hmac != null)
|
|
240
|
+
if (typeof object.hmac === "string")
|
|
241
|
+
$util.base64.decode(object.hmac, message.hmac = $util.newBuffer($util.base64.length(object.hmac)), 0);
|
|
242
|
+
else if (object.hmac.length >= 0)
|
|
243
|
+
message.hmac = object.hmac;
|
|
244
|
+
switch (object.accountType) {
|
|
245
|
+
default:
|
|
246
|
+
if (typeof object.accountType === "number") {
|
|
247
|
+
message.accountType = object.accountType;
|
|
248
|
+
break;
|
|
249
|
+
}
|
|
250
|
+
break;
|
|
251
|
+
case "E2EE":
|
|
252
|
+
case 0:
|
|
253
|
+
message.accountType = 0;
|
|
254
|
+
break;
|
|
255
|
+
case "HOSTED":
|
|
256
|
+
case 1:
|
|
257
|
+
message.accountType = 1;
|
|
258
|
+
break;
|
|
259
|
+
}
|
|
260
|
+
return message;
|
|
261
|
+
};
|
|
262
|
+
/**
|
|
263
|
+
* Creates a plain object from a ADVSignedDeviceIdentityHMAC message. Also converts values to other types if specified.
|
|
264
|
+
* @function toObject
|
|
265
|
+
* @memberof Adv.ADVSignedDeviceIdentityHMAC
|
|
266
|
+
* @static
|
|
267
|
+
* @param {Adv.ADVSignedDeviceIdentityHMAC} message ADVSignedDeviceIdentityHMAC
|
|
268
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
269
|
+
* @returns {Object.<string,*>} Plain object
|
|
270
|
+
*/
|
|
271
|
+
ADVSignedDeviceIdentityHMAC.toObject = function toObject(message, options) {
|
|
272
|
+
if (!options)
|
|
273
|
+
options = {};
|
|
274
|
+
var object = {};
|
|
275
|
+
if (message.details != null && message.hasOwnProperty("details")) {
|
|
276
|
+
object.details = options.bytes === String ? $util.base64.encode(message.details, 0, message.details.length) : options.bytes === Array ? Array.prototype.slice.call(message.details) : message.details;
|
|
277
|
+
if (options.oneofs)
|
|
278
|
+
object._details = "details";
|
|
279
|
+
}
|
|
280
|
+
if (message.hmac != null && message.hasOwnProperty("hmac")) {
|
|
281
|
+
object.hmac = options.bytes === String ? $util.base64.encode(message.hmac, 0, message.hmac.length) : options.bytes === Array ? Array.prototype.slice.call(message.hmac) : message.hmac;
|
|
282
|
+
if (options.oneofs)
|
|
283
|
+
object._hmac = "hmac";
|
|
284
|
+
}
|
|
285
|
+
if (message.accountType != null && message.hasOwnProperty("accountType")) {
|
|
286
|
+
object.accountType = options.enums === String ? $root.Adv.ADVEncryptionType[message.accountType] === undefined ? message.accountType : $root.Adv.ADVEncryptionType[message.accountType] : message.accountType;
|
|
287
|
+
if (options.oneofs)
|
|
288
|
+
object._accountType = "accountType";
|
|
289
|
+
}
|
|
290
|
+
return object;
|
|
291
|
+
};
|
|
292
|
+
/**
|
|
293
|
+
* Converts this ADVSignedDeviceIdentityHMAC to JSON.
|
|
294
|
+
* @function toJSON
|
|
295
|
+
* @memberof Adv.ADVSignedDeviceIdentityHMAC
|
|
296
|
+
* @instance
|
|
297
|
+
* @returns {Object.<string,*>} JSON object
|
|
298
|
+
*/
|
|
299
|
+
ADVSignedDeviceIdentityHMAC.prototype.toJSON = function toJSON() {
|
|
300
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
301
|
+
};
|
|
302
|
+
/**
|
|
303
|
+
* Gets the default type url for ADVSignedDeviceIdentityHMAC
|
|
304
|
+
* @function getTypeUrl
|
|
305
|
+
* @memberof Adv.ADVSignedDeviceIdentityHMAC
|
|
306
|
+
* @static
|
|
307
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
308
|
+
* @returns {string} The default type url
|
|
309
|
+
*/
|
|
310
|
+
ADVSignedDeviceIdentityHMAC.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
311
|
+
if (typeUrlPrefix === undefined) {
|
|
312
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
313
|
+
}
|
|
314
|
+
return typeUrlPrefix + "/Adv.ADVSignedDeviceIdentityHMAC";
|
|
315
|
+
};
|
|
316
|
+
return ADVSignedDeviceIdentityHMAC;
|
|
317
|
+
})();
|
|
318
|
+
Adv.ADVSignedDeviceIdentity = (function() {
|
|
319
|
+
/**
|
|
320
|
+
* Properties of a ADVSignedDeviceIdentity.
|
|
321
|
+
* @memberof Adv
|
|
322
|
+
* @interface IADVSignedDeviceIdentity
|
|
323
|
+
* @property {Uint8Array|null} [details] ADVSignedDeviceIdentity details
|
|
324
|
+
* @property {Uint8Array|null} [accountSignatureKey] ADVSignedDeviceIdentity accountSignatureKey
|
|
325
|
+
* @property {Uint8Array|null} [accountSignature] ADVSignedDeviceIdentity accountSignature
|
|
326
|
+
* @property {Uint8Array|null} [deviceSignature] ADVSignedDeviceIdentity deviceSignature
|
|
327
|
+
*/
|
|
328
|
+
/**
|
|
329
|
+
* Constructs a new ADVSignedDeviceIdentity.
|
|
330
|
+
* @memberof Adv
|
|
331
|
+
* @classdesc Represents a ADVSignedDeviceIdentity.
|
|
332
|
+
* @implements IADVSignedDeviceIdentity
|
|
333
|
+
* @constructor
|
|
334
|
+
* @param {Adv.IADVSignedDeviceIdentity=} [properties] Properties to set
|
|
335
|
+
*/
|
|
336
|
+
function ADVSignedDeviceIdentity(properties) {
|
|
337
|
+
if (properties)
|
|
338
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
339
|
+
if (properties[keys[i]] != null)
|
|
340
|
+
this[keys[i]] = properties[keys[i]];
|
|
341
|
+
}
|
|
342
|
+
/**
|
|
343
|
+
* ADVSignedDeviceIdentity details.
|
|
344
|
+
* @member {Uint8Array|null|undefined} details
|
|
345
|
+
* @memberof Adv.ADVSignedDeviceIdentity
|
|
346
|
+
* @instance
|
|
347
|
+
*/
|
|
348
|
+
ADVSignedDeviceIdentity.prototype.details = null;
|
|
349
|
+
/**
|
|
350
|
+
* ADVSignedDeviceIdentity accountSignatureKey.
|
|
351
|
+
* @member {Uint8Array|null|undefined} accountSignatureKey
|
|
352
|
+
* @memberof Adv.ADVSignedDeviceIdentity
|
|
353
|
+
* @instance
|
|
354
|
+
*/
|
|
355
|
+
ADVSignedDeviceIdentity.prototype.accountSignatureKey = null;
|
|
356
|
+
/**
|
|
357
|
+
* ADVSignedDeviceIdentity accountSignature.
|
|
358
|
+
* @member {Uint8Array|null|undefined} accountSignature
|
|
359
|
+
* @memberof Adv.ADVSignedDeviceIdentity
|
|
360
|
+
* @instance
|
|
361
|
+
*/
|
|
362
|
+
ADVSignedDeviceIdentity.prototype.accountSignature = null;
|
|
363
|
+
/**
|
|
364
|
+
* ADVSignedDeviceIdentity deviceSignature.
|
|
365
|
+
* @member {Uint8Array|null|undefined} deviceSignature
|
|
366
|
+
* @memberof Adv.ADVSignedDeviceIdentity
|
|
367
|
+
* @instance
|
|
368
|
+
*/
|
|
369
|
+
ADVSignedDeviceIdentity.prototype.deviceSignature = null;
|
|
370
|
+
// OneOf field names bound to virtual getters and setters
|
|
371
|
+
var $oneOfFields;
|
|
372
|
+
/**
|
|
373
|
+
* ADVSignedDeviceIdentity _details.
|
|
374
|
+
* @member {"details"|undefined} _details
|
|
375
|
+
* @memberof Adv.ADVSignedDeviceIdentity
|
|
376
|
+
* @instance
|
|
377
|
+
*/
|
|
378
|
+
Object.defineProperty(ADVSignedDeviceIdentity.prototype, "_details", {
|
|
379
|
+
get: $util.oneOfGetter($oneOfFields = ["details"]),
|
|
380
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
381
|
+
});
|
|
382
|
+
/**
|
|
383
|
+
* ADVSignedDeviceIdentity _accountSignatureKey.
|
|
384
|
+
* @member {"accountSignatureKey"|undefined} _accountSignatureKey
|
|
385
|
+
* @memberof Adv.ADVSignedDeviceIdentity
|
|
386
|
+
* @instance
|
|
387
|
+
*/
|
|
388
|
+
Object.defineProperty(ADVSignedDeviceIdentity.prototype, "_accountSignatureKey", {
|
|
389
|
+
get: $util.oneOfGetter($oneOfFields = ["accountSignatureKey"]),
|
|
390
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
391
|
+
});
|
|
392
|
+
/**
|
|
393
|
+
* ADVSignedDeviceIdentity _accountSignature.
|
|
394
|
+
* @member {"accountSignature"|undefined} _accountSignature
|
|
395
|
+
* @memberof Adv.ADVSignedDeviceIdentity
|
|
396
|
+
* @instance
|
|
397
|
+
*/
|
|
398
|
+
Object.defineProperty(ADVSignedDeviceIdentity.prototype, "_accountSignature", {
|
|
399
|
+
get: $util.oneOfGetter($oneOfFields = ["accountSignature"]),
|
|
400
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
401
|
+
});
|
|
402
|
+
/**
|
|
403
|
+
* ADVSignedDeviceIdentity _deviceSignature.
|
|
404
|
+
* @member {"deviceSignature"|undefined} _deviceSignature
|
|
405
|
+
* @memberof Adv.ADVSignedDeviceIdentity
|
|
406
|
+
* @instance
|
|
407
|
+
*/
|
|
408
|
+
Object.defineProperty(ADVSignedDeviceIdentity.prototype, "_deviceSignature", {
|
|
409
|
+
get: $util.oneOfGetter($oneOfFields = ["deviceSignature"]),
|
|
410
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
411
|
+
});
|
|
412
|
+
/**
|
|
413
|
+
* Creates a new ADVSignedDeviceIdentity instance using the specified properties.
|
|
414
|
+
* @function create
|
|
415
|
+
* @memberof Adv.ADVSignedDeviceIdentity
|
|
416
|
+
* @static
|
|
417
|
+
* @param {Adv.IADVSignedDeviceIdentity=} [properties] Properties to set
|
|
418
|
+
* @returns {Adv.ADVSignedDeviceIdentity} ADVSignedDeviceIdentity instance
|
|
419
|
+
*/
|
|
420
|
+
ADVSignedDeviceIdentity.create = function create(properties) {
|
|
421
|
+
return new ADVSignedDeviceIdentity(properties);
|
|
422
|
+
};
|
|
423
|
+
/**
|
|
424
|
+
* Encodes the specified ADVSignedDeviceIdentity message. Does not implicitly {@link Adv.ADVSignedDeviceIdentity.verify|verify} messages.
|
|
425
|
+
* @function encode
|
|
426
|
+
* @memberof Adv.ADVSignedDeviceIdentity
|
|
427
|
+
* @static
|
|
428
|
+
* @param {Adv.IADVSignedDeviceIdentity} message ADVSignedDeviceIdentity message or plain object to encode
|
|
429
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
430
|
+
* @returns {$protobuf.Writer} Writer
|
|
431
|
+
*/
|
|
432
|
+
ADVSignedDeviceIdentity.encode = function encode(message, writer) {
|
|
433
|
+
if (!writer)
|
|
434
|
+
writer = $Writer.create();
|
|
435
|
+
if (message.details != null && Object.hasOwnProperty.call(message, "details"))
|
|
436
|
+
writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.details);
|
|
437
|
+
if (message.accountSignatureKey != null && Object.hasOwnProperty.call(message, "accountSignatureKey"))
|
|
438
|
+
writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.accountSignatureKey);
|
|
439
|
+
if (message.accountSignature != null && Object.hasOwnProperty.call(message, "accountSignature"))
|
|
440
|
+
writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.accountSignature);
|
|
441
|
+
if (message.deviceSignature != null && Object.hasOwnProperty.call(message, "deviceSignature"))
|
|
442
|
+
writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.deviceSignature);
|
|
443
|
+
return writer;
|
|
444
|
+
};
|
|
445
|
+
/**
|
|
446
|
+
* Encodes the specified ADVSignedDeviceIdentity message, length delimited. Does not implicitly {@link Adv.ADVSignedDeviceIdentity.verify|verify} messages.
|
|
447
|
+
* @function encodeDelimited
|
|
448
|
+
* @memberof Adv.ADVSignedDeviceIdentity
|
|
449
|
+
* @static
|
|
450
|
+
* @param {Adv.IADVSignedDeviceIdentity} message ADVSignedDeviceIdentity message or plain object to encode
|
|
451
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
452
|
+
* @returns {$protobuf.Writer} Writer
|
|
453
|
+
*/
|
|
454
|
+
ADVSignedDeviceIdentity.encodeDelimited = function encodeDelimited(message, writer) {
|
|
455
|
+
return this.encode(message, writer).ldelim();
|
|
456
|
+
};
|
|
457
|
+
/**
|
|
458
|
+
* Decodes a ADVSignedDeviceIdentity message from the specified reader or buffer.
|
|
459
|
+
* @function decode
|
|
460
|
+
* @memberof Adv.ADVSignedDeviceIdentity
|
|
461
|
+
* @static
|
|
462
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
463
|
+
* @param {number} [length] Message length if known beforehand
|
|
464
|
+
* @returns {Adv.ADVSignedDeviceIdentity} ADVSignedDeviceIdentity
|
|
465
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
466
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
467
|
+
*/
|
|
468
|
+
ADVSignedDeviceIdentity.decode = function decode(reader, length, error) {
|
|
469
|
+
if (!(reader instanceof $Reader))
|
|
470
|
+
reader = $Reader.create(reader);
|
|
471
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.Adv.ADVSignedDeviceIdentity();
|
|
472
|
+
while (reader.pos < end) {
|
|
473
|
+
var tag = reader.uint32();
|
|
474
|
+
if (tag === error)
|
|
475
|
+
break;
|
|
476
|
+
switch (tag >>> 3) {
|
|
477
|
+
case 1: {
|
|
478
|
+
message.details = reader.bytes();
|
|
479
|
+
break;
|
|
480
|
+
}
|
|
481
|
+
case 2: {
|
|
482
|
+
message.accountSignatureKey = reader.bytes();
|
|
483
|
+
break;
|
|
484
|
+
}
|
|
485
|
+
case 3: {
|
|
486
|
+
message.accountSignature = reader.bytes();
|
|
487
|
+
break;
|
|
488
|
+
}
|
|
489
|
+
case 4: {
|
|
490
|
+
message.deviceSignature = reader.bytes();
|
|
491
|
+
break;
|
|
492
|
+
}
|
|
493
|
+
default:
|
|
494
|
+
reader.skipType(tag & 7);
|
|
495
|
+
break;
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
return message;
|
|
499
|
+
};
|
|
500
|
+
/**
|
|
501
|
+
* Decodes a ADVSignedDeviceIdentity message from the specified reader or buffer, length delimited.
|
|
502
|
+
* @function decodeDelimited
|
|
503
|
+
* @memberof Adv.ADVSignedDeviceIdentity
|
|
504
|
+
* @static
|
|
505
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
506
|
+
* @returns {Adv.ADVSignedDeviceIdentity} ADVSignedDeviceIdentity
|
|
507
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
508
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
509
|
+
*/
|
|
510
|
+
ADVSignedDeviceIdentity.decodeDelimited = function decodeDelimited(reader) {
|
|
511
|
+
if (!(reader instanceof $Reader))
|
|
512
|
+
reader = new $Reader(reader);
|
|
513
|
+
return this.decode(reader, reader.uint32());
|
|
514
|
+
};
|
|
515
|
+
/**
|
|
516
|
+
* Verifies a ADVSignedDeviceIdentity message.
|
|
517
|
+
* @function verify
|
|
518
|
+
* @memberof Adv.ADVSignedDeviceIdentity
|
|
519
|
+
* @static
|
|
520
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
521
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
522
|
+
*/
|
|
523
|
+
ADVSignedDeviceIdentity.verify = function verify(message) {
|
|
524
|
+
if (typeof message !== "object" || message === null)
|
|
525
|
+
return "object expected";
|
|
526
|
+
var properties = {};
|
|
527
|
+
if (message.details != null && message.hasOwnProperty("details")) {
|
|
528
|
+
properties._details = 1;
|
|
529
|
+
if (!(message.details && typeof message.details.length === "number" || $util.isString(message.details)))
|
|
530
|
+
return "details: buffer expected";
|
|
531
|
+
}
|
|
532
|
+
if (message.accountSignatureKey != null && message.hasOwnProperty("accountSignatureKey")) {
|
|
533
|
+
properties._accountSignatureKey = 1;
|
|
534
|
+
if (!(message.accountSignatureKey && typeof message.accountSignatureKey.length === "number" || $util.isString(message.accountSignatureKey)))
|
|
535
|
+
return "accountSignatureKey: buffer expected";
|
|
536
|
+
}
|
|
537
|
+
if (message.accountSignature != null && message.hasOwnProperty("accountSignature")) {
|
|
538
|
+
properties._accountSignature = 1;
|
|
539
|
+
if (!(message.accountSignature && typeof message.accountSignature.length === "number" || $util.isString(message.accountSignature)))
|
|
540
|
+
return "accountSignature: buffer expected";
|
|
541
|
+
}
|
|
542
|
+
if (message.deviceSignature != null && message.hasOwnProperty("deviceSignature")) {
|
|
543
|
+
properties._deviceSignature = 1;
|
|
544
|
+
if (!(message.deviceSignature && typeof message.deviceSignature.length === "number" || $util.isString(message.deviceSignature)))
|
|
545
|
+
return "deviceSignature: buffer expected";
|
|
546
|
+
}
|
|
547
|
+
return null;
|
|
548
|
+
};
|
|
549
|
+
/**
|
|
550
|
+
* Creates a ADVSignedDeviceIdentity message from a plain object. Also converts values to their respective internal types.
|
|
551
|
+
* @function fromObject
|
|
552
|
+
* @memberof Adv.ADVSignedDeviceIdentity
|
|
553
|
+
* @static
|
|
554
|
+
* @param {Object.<string,*>} object Plain object
|
|
555
|
+
* @returns {Adv.ADVSignedDeviceIdentity} ADVSignedDeviceIdentity
|
|
556
|
+
*/
|
|
557
|
+
ADVSignedDeviceIdentity.fromObject = function fromObject(object) {
|
|
558
|
+
if (object instanceof $root.Adv.ADVSignedDeviceIdentity)
|
|
559
|
+
return object;
|
|
560
|
+
var message = new $root.Adv.ADVSignedDeviceIdentity();
|
|
561
|
+
if (object.details != null)
|
|
562
|
+
if (typeof object.details === "string")
|
|
563
|
+
$util.base64.decode(object.details, message.details = $util.newBuffer($util.base64.length(object.details)), 0);
|
|
564
|
+
else if (object.details.length >= 0)
|
|
565
|
+
message.details = object.details;
|
|
566
|
+
if (object.accountSignatureKey != null)
|
|
567
|
+
if (typeof object.accountSignatureKey === "string")
|
|
568
|
+
$util.base64.decode(object.accountSignatureKey, message.accountSignatureKey = $util.newBuffer($util.base64.length(object.accountSignatureKey)), 0);
|
|
569
|
+
else if (object.accountSignatureKey.length >= 0)
|
|
570
|
+
message.accountSignatureKey = object.accountSignatureKey;
|
|
571
|
+
if (object.accountSignature != null)
|
|
572
|
+
if (typeof object.accountSignature === "string")
|
|
573
|
+
$util.base64.decode(object.accountSignature, message.accountSignature = $util.newBuffer($util.base64.length(object.accountSignature)), 0);
|
|
574
|
+
else if (object.accountSignature.length >= 0)
|
|
575
|
+
message.accountSignature = object.accountSignature;
|
|
576
|
+
if (object.deviceSignature != null)
|
|
577
|
+
if (typeof object.deviceSignature === "string")
|
|
578
|
+
$util.base64.decode(object.deviceSignature, message.deviceSignature = $util.newBuffer($util.base64.length(object.deviceSignature)), 0);
|
|
579
|
+
else if (object.deviceSignature.length >= 0)
|
|
580
|
+
message.deviceSignature = object.deviceSignature;
|
|
581
|
+
return message;
|
|
582
|
+
};
|
|
583
|
+
/**
|
|
584
|
+
* Creates a plain object from a ADVSignedDeviceIdentity message. Also converts values to other types if specified.
|
|
585
|
+
* @function toObject
|
|
586
|
+
* @memberof Adv.ADVSignedDeviceIdentity
|
|
587
|
+
* @static
|
|
588
|
+
* @param {Adv.ADVSignedDeviceIdentity} message ADVSignedDeviceIdentity
|
|
589
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
590
|
+
* @returns {Object.<string,*>} Plain object
|
|
591
|
+
*/
|
|
592
|
+
ADVSignedDeviceIdentity.toObject = function toObject(message, options) {
|
|
593
|
+
if (!options)
|
|
594
|
+
options = {};
|
|
595
|
+
var object = {};
|
|
596
|
+
if (message.details != null && message.hasOwnProperty("details")) {
|
|
597
|
+
object.details = options.bytes === String ? $util.base64.encode(message.details, 0, message.details.length) : options.bytes === Array ? Array.prototype.slice.call(message.details) : message.details;
|
|
598
|
+
if (options.oneofs)
|
|
599
|
+
object._details = "details";
|
|
600
|
+
}
|
|
601
|
+
if (message.accountSignatureKey != null && message.hasOwnProperty("accountSignatureKey")) {
|
|
602
|
+
object.accountSignatureKey = options.bytes === String ? $util.base64.encode(message.accountSignatureKey, 0, message.accountSignatureKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.accountSignatureKey) : message.accountSignatureKey;
|
|
603
|
+
if (options.oneofs)
|
|
604
|
+
object._accountSignatureKey = "accountSignatureKey";
|
|
605
|
+
}
|
|
606
|
+
if (message.accountSignature != null && message.hasOwnProperty("accountSignature")) {
|
|
607
|
+
object.accountSignature = options.bytes === String ? $util.base64.encode(message.accountSignature, 0, message.accountSignature.length) : options.bytes === Array ? Array.prototype.slice.call(message.accountSignature) : message.accountSignature;
|
|
608
|
+
if (options.oneofs)
|
|
609
|
+
object._accountSignature = "accountSignature";
|
|
610
|
+
}
|
|
611
|
+
if (message.deviceSignature != null && message.hasOwnProperty("deviceSignature")) {
|
|
612
|
+
object.deviceSignature = options.bytes === String ? $util.base64.encode(message.deviceSignature, 0, message.deviceSignature.length) : options.bytes === Array ? Array.prototype.slice.call(message.deviceSignature) : message.deviceSignature;
|
|
613
|
+
if (options.oneofs)
|
|
614
|
+
object._deviceSignature = "deviceSignature";
|
|
615
|
+
}
|
|
616
|
+
return object;
|
|
617
|
+
};
|
|
618
|
+
/**
|
|
619
|
+
* Converts this ADVSignedDeviceIdentity to JSON.
|
|
620
|
+
* @function toJSON
|
|
621
|
+
* @memberof Adv.ADVSignedDeviceIdentity
|
|
622
|
+
* @instance
|
|
623
|
+
* @returns {Object.<string,*>} JSON object
|
|
624
|
+
*/
|
|
625
|
+
ADVSignedDeviceIdentity.prototype.toJSON = function toJSON() {
|
|
626
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
627
|
+
};
|
|
628
|
+
/**
|
|
629
|
+
* Gets the default type url for ADVSignedDeviceIdentity
|
|
630
|
+
* @function getTypeUrl
|
|
631
|
+
* @memberof Adv.ADVSignedDeviceIdentity
|
|
632
|
+
* @static
|
|
633
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
634
|
+
* @returns {string} The default type url
|
|
635
|
+
*/
|
|
636
|
+
ADVSignedDeviceIdentity.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
637
|
+
if (typeUrlPrefix === undefined) {
|
|
638
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
639
|
+
}
|
|
640
|
+
return typeUrlPrefix + "/Adv.ADVSignedDeviceIdentity";
|
|
641
|
+
};
|
|
642
|
+
return ADVSignedDeviceIdentity;
|
|
643
|
+
})();
|
|
644
|
+
Adv.ADVDeviceIdentity = (function() {
|
|
645
|
+
/**
|
|
646
|
+
* Properties of a ADVDeviceIdentity.
|
|
647
|
+
* @memberof Adv
|
|
648
|
+
* @interface IADVDeviceIdentity
|
|
649
|
+
* @property {number|null} [rawId] ADVDeviceIdentity rawId
|
|
650
|
+
* @property {number|Long|null} [timestamp] ADVDeviceIdentity timestamp
|
|
651
|
+
* @property {number|null} [keyIndex] ADVDeviceIdentity keyIndex
|
|
652
|
+
* @property {Adv.ADVEncryptionType|null} [accountType] ADVDeviceIdentity accountType
|
|
653
|
+
* @property {Adv.ADVEncryptionType|null} [deviceType] ADVDeviceIdentity deviceType
|
|
654
|
+
*/
|
|
655
|
+
/**
|
|
656
|
+
* Constructs a new ADVDeviceIdentity.
|
|
657
|
+
* @memberof Adv
|
|
658
|
+
* @classdesc Represents a ADVDeviceIdentity.
|
|
659
|
+
* @implements IADVDeviceIdentity
|
|
660
|
+
* @constructor
|
|
661
|
+
* @param {Adv.IADVDeviceIdentity=} [properties] Properties to set
|
|
662
|
+
*/
|
|
663
|
+
function ADVDeviceIdentity(properties) {
|
|
664
|
+
if (properties)
|
|
665
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
666
|
+
if (properties[keys[i]] != null)
|
|
667
|
+
this[keys[i]] = properties[keys[i]];
|
|
668
|
+
}
|
|
669
|
+
/**
|
|
670
|
+
* ADVDeviceIdentity rawId.
|
|
671
|
+
* @member {number|null|undefined} rawId
|
|
672
|
+
* @memberof Adv.ADVDeviceIdentity
|
|
673
|
+
* @instance
|
|
674
|
+
*/
|
|
675
|
+
ADVDeviceIdentity.prototype.rawId = null;
|
|
676
|
+
/**
|
|
677
|
+
* ADVDeviceIdentity timestamp.
|
|
678
|
+
* @member {number|Long|null|undefined} timestamp
|
|
679
|
+
* @memberof Adv.ADVDeviceIdentity
|
|
680
|
+
* @instance
|
|
681
|
+
*/
|
|
682
|
+
ADVDeviceIdentity.prototype.timestamp = null;
|
|
683
|
+
/**
|
|
684
|
+
* ADVDeviceIdentity keyIndex.
|
|
685
|
+
* @member {number|null|undefined} keyIndex
|
|
686
|
+
* @memberof Adv.ADVDeviceIdentity
|
|
687
|
+
* @instance
|
|
688
|
+
*/
|
|
689
|
+
ADVDeviceIdentity.prototype.keyIndex = null;
|
|
690
|
+
/**
|
|
691
|
+
* ADVDeviceIdentity accountType.
|
|
692
|
+
* @member {Adv.ADVEncryptionType|null|undefined} accountType
|
|
693
|
+
* @memberof Adv.ADVDeviceIdentity
|
|
694
|
+
* @instance
|
|
695
|
+
*/
|
|
696
|
+
ADVDeviceIdentity.prototype.accountType = null;
|
|
697
|
+
/**
|
|
698
|
+
* ADVDeviceIdentity deviceType.
|
|
699
|
+
* @member {Adv.ADVEncryptionType|null|undefined} deviceType
|
|
700
|
+
* @memberof Adv.ADVDeviceIdentity
|
|
701
|
+
* @instance
|
|
702
|
+
*/
|
|
703
|
+
ADVDeviceIdentity.prototype.deviceType = null;
|
|
704
|
+
// OneOf field names bound to virtual getters and setters
|
|
705
|
+
var $oneOfFields;
|
|
706
|
+
/**
|
|
707
|
+
* ADVDeviceIdentity _rawId.
|
|
708
|
+
* @member {"rawId"|undefined} _rawId
|
|
709
|
+
* @memberof Adv.ADVDeviceIdentity
|
|
710
|
+
* @instance
|
|
711
|
+
*/
|
|
712
|
+
Object.defineProperty(ADVDeviceIdentity.prototype, "_rawId", {
|
|
713
|
+
get: $util.oneOfGetter($oneOfFields = ["rawId"]),
|
|
714
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
715
|
+
});
|
|
716
|
+
/**
|
|
717
|
+
* ADVDeviceIdentity _timestamp.
|
|
718
|
+
* @member {"timestamp"|undefined} _timestamp
|
|
719
|
+
* @memberof Adv.ADVDeviceIdentity
|
|
720
|
+
* @instance
|
|
721
|
+
*/
|
|
722
|
+
Object.defineProperty(ADVDeviceIdentity.prototype, "_timestamp", {
|
|
723
|
+
get: $util.oneOfGetter($oneOfFields = ["timestamp"]),
|
|
724
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
725
|
+
});
|
|
726
|
+
/**
|
|
727
|
+
* ADVDeviceIdentity _keyIndex.
|
|
728
|
+
* @member {"keyIndex"|undefined} _keyIndex
|
|
729
|
+
* @memberof Adv.ADVDeviceIdentity
|
|
730
|
+
* @instance
|
|
731
|
+
*/
|
|
732
|
+
Object.defineProperty(ADVDeviceIdentity.prototype, "_keyIndex", {
|
|
733
|
+
get: $util.oneOfGetter($oneOfFields = ["keyIndex"]),
|
|
734
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
735
|
+
});
|
|
736
|
+
/**
|
|
737
|
+
* ADVDeviceIdentity _accountType.
|
|
738
|
+
* @member {"accountType"|undefined} _accountType
|
|
739
|
+
* @memberof Adv.ADVDeviceIdentity
|
|
740
|
+
* @instance
|
|
741
|
+
*/
|
|
742
|
+
Object.defineProperty(ADVDeviceIdentity.prototype, "_accountType", {
|
|
743
|
+
get: $util.oneOfGetter($oneOfFields = ["accountType"]),
|
|
744
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
745
|
+
});
|
|
746
|
+
/**
|
|
747
|
+
* ADVDeviceIdentity _deviceType.
|
|
748
|
+
* @member {"deviceType"|undefined} _deviceType
|
|
749
|
+
* @memberof Adv.ADVDeviceIdentity
|
|
750
|
+
* @instance
|
|
751
|
+
*/
|
|
752
|
+
Object.defineProperty(ADVDeviceIdentity.prototype, "_deviceType", {
|
|
753
|
+
get: $util.oneOfGetter($oneOfFields = ["deviceType"]),
|
|
754
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
755
|
+
});
|
|
756
|
+
/**
|
|
757
|
+
* Creates a new ADVDeviceIdentity instance using the specified properties.
|
|
758
|
+
* @function create
|
|
759
|
+
* @memberof Adv.ADVDeviceIdentity
|
|
760
|
+
* @static
|
|
761
|
+
* @param {Adv.IADVDeviceIdentity=} [properties] Properties to set
|
|
762
|
+
* @returns {Adv.ADVDeviceIdentity} ADVDeviceIdentity instance
|
|
763
|
+
*/
|
|
764
|
+
ADVDeviceIdentity.create = function create(properties) {
|
|
765
|
+
return new ADVDeviceIdentity(properties);
|
|
766
|
+
};
|
|
767
|
+
/**
|
|
768
|
+
* Encodes the specified ADVDeviceIdentity message. Does not implicitly {@link Adv.ADVDeviceIdentity.verify|verify} messages.
|
|
769
|
+
* @function encode
|
|
770
|
+
* @memberof Adv.ADVDeviceIdentity
|
|
771
|
+
* @static
|
|
772
|
+
* @param {Adv.IADVDeviceIdentity} message ADVDeviceIdentity message or plain object to encode
|
|
773
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
774
|
+
* @returns {$protobuf.Writer} Writer
|
|
775
|
+
*/
|
|
776
|
+
ADVDeviceIdentity.encode = function encode(message, writer) {
|
|
777
|
+
if (!writer)
|
|
778
|
+
writer = $Writer.create();
|
|
779
|
+
if (message.rawId != null && Object.hasOwnProperty.call(message, "rawId"))
|
|
780
|
+
writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.rawId);
|
|
781
|
+
if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp"))
|
|
782
|
+
writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.timestamp);
|
|
783
|
+
if (message.keyIndex != null && Object.hasOwnProperty.call(message, "keyIndex"))
|
|
784
|
+
writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.keyIndex);
|
|
785
|
+
if (message.accountType != null && Object.hasOwnProperty.call(message, "accountType"))
|
|
786
|
+
writer.uint32(/* id 4, wireType 0 =*/32).int32(message.accountType);
|
|
787
|
+
if (message.deviceType != null && Object.hasOwnProperty.call(message, "deviceType"))
|
|
788
|
+
writer.uint32(/* id 5, wireType 0 =*/40).int32(message.deviceType);
|
|
789
|
+
return writer;
|
|
790
|
+
};
|
|
791
|
+
/**
|
|
792
|
+
* Encodes the specified ADVDeviceIdentity message, length delimited. Does not implicitly {@link Adv.ADVDeviceIdentity.verify|verify} messages.
|
|
793
|
+
* @function encodeDelimited
|
|
794
|
+
* @memberof Adv.ADVDeviceIdentity
|
|
795
|
+
* @static
|
|
796
|
+
* @param {Adv.IADVDeviceIdentity} message ADVDeviceIdentity message or plain object to encode
|
|
797
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
798
|
+
* @returns {$protobuf.Writer} Writer
|
|
799
|
+
*/
|
|
800
|
+
ADVDeviceIdentity.encodeDelimited = function encodeDelimited(message, writer) {
|
|
801
|
+
return this.encode(message, writer).ldelim();
|
|
802
|
+
};
|
|
803
|
+
/**
|
|
804
|
+
* Decodes a ADVDeviceIdentity message from the specified reader or buffer.
|
|
805
|
+
* @function decode
|
|
806
|
+
* @memberof Adv.ADVDeviceIdentity
|
|
807
|
+
* @static
|
|
808
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
809
|
+
* @param {number} [length] Message length if known beforehand
|
|
810
|
+
* @returns {Adv.ADVDeviceIdentity} ADVDeviceIdentity
|
|
811
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
812
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
813
|
+
*/
|
|
814
|
+
ADVDeviceIdentity.decode = function decode(reader, length, error) {
|
|
815
|
+
if (!(reader instanceof $Reader))
|
|
816
|
+
reader = $Reader.create(reader);
|
|
817
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.Adv.ADVDeviceIdentity();
|
|
818
|
+
while (reader.pos < end) {
|
|
819
|
+
var tag = reader.uint32();
|
|
820
|
+
if (tag === error)
|
|
821
|
+
break;
|
|
822
|
+
switch (tag >>> 3) {
|
|
823
|
+
case 1: {
|
|
824
|
+
message.rawId = reader.uint32();
|
|
825
|
+
break;
|
|
826
|
+
}
|
|
827
|
+
case 2: {
|
|
828
|
+
message.timestamp = reader.uint64();
|
|
829
|
+
break;
|
|
830
|
+
}
|
|
831
|
+
case 3: {
|
|
832
|
+
message.keyIndex = reader.uint32();
|
|
833
|
+
break;
|
|
834
|
+
}
|
|
835
|
+
case 4: {
|
|
836
|
+
message.accountType = reader.int32();
|
|
837
|
+
break;
|
|
838
|
+
}
|
|
839
|
+
case 5: {
|
|
840
|
+
message.deviceType = reader.int32();
|
|
841
|
+
break;
|
|
842
|
+
}
|
|
843
|
+
default:
|
|
844
|
+
reader.skipType(tag & 7);
|
|
845
|
+
break;
|
|
846
|
+
}
|
|
847
|
+
}
|
|
848
|
+
return message;
|
|
849
|
+
};
|
|
850
|
+
/**
|
|
851
|
+
* Decodes a ADVDeviceIdentity message from the specified reader or buffer, length delimited.
|
|
852
|
+
* @function decodeDelimited
|
|
853
|
+
* @memberof Adv.ADVDeviceIdentity
|
|
854
|
+
* @static
|
|
855
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
856
|
+
* @returns {Adv.ADVDeviceIdentity} ADVDeviceIdentity
|
|
857
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
858
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
859
|
+
*/
|
|
860
|
+
ADVDeviceIdentity.decodeDelimited = function decodeDelimited(reader) {
|
|
861
|
+
if (!(reader instanceof $Reader))
|
|
862
|
+
reader = new $Reader(reader);
|
|
863
|
+
return this.decode(reader, reader.uint32());
|
|
864
|
+
};
|
|
865
|
+
/**
|
|
866
|
+
* Verifies a ADVDeviceIdentity message.
|
|
867
|
+
* @function verify
|
|
868
|
+
* @memberof Adv.ADVDeviceIdentity
|
|
869
|
+
* @static
|
|
870
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
871
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
872
|
+
*/
|
|
873
|
+
ADVDeviceIdentity.verify = function verify(message) {
|
|
874
|
+
if (typeof message !== "object" || message === null)
|
|
875
|
+
return "object expected";
|
|
876
|
+
var properties = {};
|
|
877
|
+
if (message.rawId != null && message.hasOwnProperty("rawId")) {
|
|
878
|
+
properties._rawId = 1;
|
|
879
|
+
if (!$util.isInteger(message.rawId))
|
|
880
|
+
return "rawId: integer expected";
|
|
881
|
+
}
|
|
882
|
+
if (message.timestamp != null && message.hasOwnProperty("timestamp")) {
|
|
883
|
+
properties._timestamp = 1;
|
|
884
|
+
if (!$util.isInteger(message.timestamp) && !(message.timestamp && $util.isInteger(message.timestamp.low) && $util.isInteger(message.timestamp.high)))
|
|
885
|
+
return "timestamp: integer|Long expected";
|
|
886
|
+
}
|
|
887
|
+
if (message.keyIndex != null && message.hasOwnProperty("keyIndex")) {
|
|
888
|
+
properties._keyIndex = 1;
|
|
889
|
+
if (!$util.isInteger(message.keyIndex))
|
|
890
|
+
return "keyIndex: integer expected";
|
|
891
|
+
}
|
|
892
|
+
if (message.accountType != null && message.hasOwnProperty("accountType")) {
|
|
893
|
+
properties._accountType = 1;
|
|
894
|
+
switch (message.accountType) {
|
|
895
|
+
default:
|
|
896
|
+
return "accountType: enum value expected";
|
|
897
|
+
case 0:
|
|
898
|
+
case 1:
|
|
899
|
+
break;
|
|
900
|
+
}
|
|
901
|
+
}
|
|
902
|
+
if (message.deviceType != null && message.hasOwnProperty("deviceType")) {
|
|
903
|
+
properties._deviceType = 1;
|
|
904
|
+
switch (message.deviceType) {
|
|
905
|
+
default:
|
|
906
|
+
return "deviceType: enum value expected";
|
|
907
|
+
case 0:
|
|
908
|
+
case 1:
|
|
909
|
+
break;
|
|
910
|
+
}
|
|
911
|
+
}
|
|
912
|
+
return null;
|
|
913
|
+
};
|
|
914
|
+
/**
|
|
915
|
+
* Creates a ADVDeviceIdentity message from a plain object. Also converts values to their respective internal types.
|
|
916
|
+
* @function fromObject
|
|
917
|
+
* @memberof Adv.ADVDeviceIdentity
|
|
918
|
+
* @static
|
|
919
|
+
* @param {Object.<string,*>} object Plain object
|
|
920
|
+
* @returns {Adv.ADVDeviceIdentity} ADVDeviceIdentity
|
|
921
|
+
*/
|
|
922
|
+
ADVDeviceIdentity.fromObject = function fromObject(object) {
|
|
923
|
+
if (object instanceof $root.Adv.ADVDeviceIdentity)
|
|
924
|
+
return object;
|
|
925
|
+
var message = new $root.Adv.ADVDeviceIdentity();
|
|
926
|
+
if (object.rawId != null)
|
|
927
|
+
message.rawId = object.rawId >>> 0;
|
|
928
|
+
if (object.timestamp != null)
|
|
929
|
+
if ($util.Long)
|
|
930
|
+
(message.timestamp = $util.Long.fromValue(object.timestamp)).unsigned = true;
|
|
931
|
+
else if (typeof object.timestamp === "string")
|
|
932
|
+
message.timestamp = parseInt(object.timestamp, 10);
|
|
933
|
+
else if (typeof object.timestamp === "number")
|
|
934
|
+
message.timestamp = object.timestamp;
|
|
935
|
+
else if (typeof object.timestamp === "object")
|
|
936
|
+
message.timestamp = new $util.LongBits(object.timestamp.low >>> 0, object.timestamp.high >>> 0).toNumber(true);
|
|
937
|
+
if (object.keyIndex != null)
|
|
938
|
+
message.keyIndex = object.keyIndex >>> 0;
|
|
939
|
+
switch (object.accountType) {
|
|
940
|
+
default:
|
|
941
|
+
if (typeof object.accountType === "number") {
|
|
942
|
+
message.accountType = object.accountType;
|
|
943
|
+
break;
|
|
944
|
+
}
|
|
945
|
+
break;
|
|
946
|
+
case "E2EE":
|
|
947
|
+
case 0:
|
|
948
|
+
message.accountType = 0;
|
|
949
|
+
break;
|
|
950
|
+
case "HOSTED":
|
|
951
|
+
case 1:
|
|
952
|
+
message.accountType = 1;
|
|
953
|
+
break;
|
|
954
|
+
}
|
|
955
|
+
switch (object.deviceType) {
|
|
956
|
+
default:
|
|
957
|
+
if (typeof object.deviceType === "number") {
|
|
958
|
+
message.deviceType = object.deviceType;
|
|
959
|
+
break;
|
|
960
|
+
}
|
|
961
|
+
break;
|
|
962
|
+
case "E2EE":
|
|
963
|
+
case 0:
|
|
964
|
+
message.deviceType = 0;
|
|
965
|
+
break;
|
|
966
|
+
case "HOSTED":
|
|
967
|
+
case 1:
|
|
968
|
+
message.deviceType = 1;
|
|
969
|
+
break;
|
|
970
|
+
}
|
|
971
|
+
return message;
|
|
972
|
+
};
|
|
973
|
+
/**
|
|
974
|
+
* Creates a plain object from a ADVDeviceIdentity message. Also converts values to other types if specified.
|
|
975
|
+
* @function toObject
|
|
976
|
+
* @memberof Adv.ADVDeviceIdentity
|
|
977
|
+
* @static
|
|
978
|
+
* @param {Adv.ADVDeviceIdentity} message ADVDeviceIdentity
|
|
979
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
980
|
+
* @returns {Object.<string,*>} Plain object
|
|
981
|
+
*/
|
|
982
|
+
ADVDeviceIdentity.toObject = function toObject(message, options) {
|
|
983
|
+
if (!options)
|
|
984
|
+
options = {};
|
|
985
|
+
var object = {};
|
|
986
|
+
if (message.rawId != null && message.hasOwnProperty("rawId")) {
|
|
987
|
+
object.rawId = message.rawId;
|
|
988
|
+
if (options.oneofs)
|
|
989
|
+
object._rawId = "rawId";
|
|
990
|
+
}
|
|
991
|
+
if (message.timestamp != null && message.hasOwnProperty("timestamp")) {
|
|
992
|
+
if (typeof message.timestamp === "number")
|
|
993
|
+
object.timestamp = options.longs === String ? String(message.timestamp) : message.timestamp;
|
|
994
|
+
else
|
|
995
|
+
object.timestamp = options.longs === String ? $util.Long.prototype.toString.call(message.timestamp) : options.longs === Number ? new $util.LongBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0).toNumber(true) : message.timestamp;
|
|
996
|
+
if (options.oneofs)
|
|
997
|
+
object._timestamp = "timestamp";
|
|
998
|
+
}
|
|
999
|
+
if (message.keyIndex != null && message.hasOwnProperty("keyIndex")) {
|
|
1000
|
+
object.keyIndex = message.keyIndex;
|
|
1001
|
+
if (options.oneofs)
|
|
1002
|
+
object._keyIndex = "keyIndex";
|
|
1003
|
+
}
|
|
1004
|
+
if (message.accountType != null && message.hasOwnProperty("accountType")) {
|
|
1005
|
+
object.accountType = options.enums === String ? $root.Adv.ADVEncryptionType[message.accountType] === undefined ? message.accountType : $root.Adv.ADVEncryptionType[message.accountType] : message.accountType;
|
|
1006
|
+
if (options.oneofs)
|
|
1007
|
+
object._accountType = "accountType";
|
|
1008
|
+
}
|
|
1009
|
+
if (message.deviceType != null && message.hasOwnProperty("deviceType")) {
|
|
1010
|
+
object.deviceType = options.enums === String ? $root.Adv.ADVEncryptionType[message.deviceType] === undefined ? message.deviceType : $root.Adv.ADVEncryptionType[message.deviceType] : message.deviceType;
|
|
1011
|
+
if (options.oneofs)
|
|
1012
|
+
object._deviceType = "deviceType";
|
|
1013
|
+
}
|
|
1014
|
+
return object;
|
|
1015
|
+
};
|
|
1016
|
+
/**
|
|
1017
|
+
* Converts this ADVDeviceIdentity to JSON.
|
|
1018
|
+
* @function toJSON
|
|
1019
|
+
* @memberof Adv.ADVDeviceIdentity
|
|
1020
|
+
* @instance
|
|
1021
|
+
* @returns {Object.<string,*>} JSON object
|
|
1022
|
+
*/
|
|
1023
|
+
ADVDeviceIdentity.prototype.toJSON = function toJSON() {
|
|
1024
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
1025
|
+
};
|
|
1026
|
+
/**
|
|
1027
|
+
* Gets the default type url for ADVDeviceIdentity
|
|
1028
|
+
* @function getTypeUrl
|
|
1029
|
+
* @memberof Adv.ADVDeviceIdentity
|
|
1030
|
+
* @static
|
|
1031
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
1032
|
+
* @returns {string} The default type url
|
|
1033
|
+
*/
|
|
1034
|
+
ADVDeviceIdentity.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
1035
|
+
if (typeUrlPrefix === undefined) {
|
|
1036
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
1037
|
+
}
|
|
1038
|
+
return typeUrlPrefix + "/Adv.ADVDeviceIdentity";
|
|
1039
|
+
};
|
|
1040
|
+
return ADVDeviceIdentity;
|
|
1041
|
+
})();
|
|
1042
|
+
Adv.ADVSignedKeyIndexList = (function() {
|
|
1043
|
+
/**
|
|
1044
|
+
* Properties of a ADVSignedKeyIndexList.
|
|
1045
|
+
* @memberof Adv
|
|
1046
|
+
* @interface IADVSignedKeyIndexList
|
|
1047
|
+
* @property {Uint8Array|null} [details] ADVSignedKeyIndexList details
|
|
1048
|
+
* @property {Uint8Array|null} [accountSignature] ADVSignedKeyIndexList accountSignature
|
|
1049
|
+
* @property {Uint8Array|null} [accountSignatureKey] ADVSignedKeyIndexList accountSignatureKey
|
|
1050
|
+
*/
|
|
1051
|
+
/**
|
|
1052
|
+
* Constructs a new ADVSignedKeyIndexList.
|
|
1053
|
+
* @memberof Adv
|
|
1054
|
+
* @classdesc Represents a ADVSignedKeyIndexList.
|
|
1055
|
+
* @implements IADVSignedKeyIndexList
|
|
1056
|
+
* @constructor
|
|
1057
|
+
* @param {Adv.IADVSignedKeyIndexList=} [properties] Properties to set
|
|
1058
|
+
*/
|
|
1059
|
+
function ADVSignedKeyIndexList(properties) {
|
|
1060
|
+
if (properties)
|
|
1061
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
1062
|
+
if (properties[keys[i]] != null)
|
|
1063
|
+
this[keys[i]] = properties[keys[i]];
|
|
1064
|
+
}
|
|
1065
|
+
/**
|
|
1066
|
+
* ADVSignedKeyIndexList details.
|
|
1067
|
+
* @member {Uint8Array|null|undefined} details
|
|
1068
|
+
* @memberof Adv.ADVSignedKeyIndexList
|
|
1069
|
+
* @instance
|
|
1070
|
+
*/
|
|
1071
|
+
ADVSignedKeyIndexList.prototype.details = null;
|
|
1072
|
+
/**
|
|
1073
|
+
* ADVSignedKeyIndexList accountSignature.
|
|
1074
|
+
* @member {Uint8Array|null|undefined} accountSignature
|
|
1075
|
+
* @memberof Adv.ADVSignedKeyIndexList
|
|
1076
|
+
* @instance
|
|
1077
|
+
*/
|
|
1078
|
+
ADVSignedKeyIndexList.prototype.accountSignature = null;
|
|
1079
|
+
/**
|
|
1080
|
+
* ADVSignedKeyIndexList accountSignatureKey.
|
|
1081
|
+
* @member {Uint8Array|null|undefined} accountSignatureKey
|
|
1082
|
+
* @memberof Adv.ADVSignedKeyIndexList
|
|
1083
|
+
* @instance
|
|
1084
|
+
*/
|
|
1085
|
+
ADVSignedKeyIndexList.prototype.accountSignatureKey = null;
|
|
1086
|
+
// OneOf field names bound to virtual getters and setters
|
|
1087
|
+
var $oneOfFields;
|
|
1088
|
+
/**
|
|
1089
|
+
* ADVSignedKeyIndexList _details.
|
|
1090
|
+
* @member {"details"|undefined} _details
|
|
1091
|
+
* @memberof Adv.ADVSignedKeyIndexList
|
|
1092
|
+
* @instance
|
|
1093
|
+
*/
|
|
1094
|
+
Object.defineProperty(ADVSignedKeyIndexList.prototype, "_details", {
|
|
1095
|
+
get: $util.oneOfGetter($oneOfFields = ["details"]),
|
|
1096
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
1097
|
+
});
|
|
1098
|
+
/**
|
|
1099
|
+
* ADVSignedKeyIndexList _accountSignature.
|
|
1100
|
+
* @member {"accountSignature"|undefined} _accountSignature
|
|
1101
|
+
* @memberof Adv.ADVSignedKeyIndexList
|
|
1102
|
+
* @instance
|
|
1103
|
+
*/
|
|
1104
|
+
Object.defineProperty(ADVSignedKeyIndexList.prototype, "_accountSignature", {
|
|
1105
|
+
get: $util.oneOfGetter($oneOfFields = ["accountSignature"]),
|
|
1106
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
1107
|
+
});
|
|
1108
|
+
/**
|
|
1109
|
+
* ADVSignedKeyIndexList _accountSignatureKey.
|
|
1110
|
+
* @member {"accountSignatureKey"|undefined} _accountSignatureKey
|
|
1111
|
+
* @memberof Adv.ADVSignedKeyIndexList
|
|
1112
|
+
* @instance
|
|
1113
|
+
*/
|
|
1114
|
+
Object.defineProperty(ADVSignedKeyIndexList.prototype, "_accountSignatureKey", {
|
|
1115
|
+
get: $util.oneOfGetter($oneOfFields = ["accountSignatureKey"]),
|
|
1116
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
1117
|
+
});
|
|
1118
|
+
/**
|
|
1119
|
+
* Creates a new ADVSignedKeyIndexList instance using the specified properties.
|
|
1120
|
+
* @function create
|
|
1121
|
+
* @memberof Adv.ADVSignedKeyIndexList
|
|
1122
|
+
* @static
|
|
1123
|
+
* @param {Adv.IADVSignedKeyIndexList=} [properties] Properties to set
|
|
1124
|
+
* @returns {Adv.ADVSignedKeyIndexList} ADVSignedKeyIndexList instance
|
|
1125
|
+
*/
|
|
1126
|
+
ADVSignedKeyIndexList.create = function create(properties) {
|
|
1127
|
+
return new ADVSignedKeyIndexList(properties);
|
|
1128
|
+
};
|
|
1129
|
+
/**
|
|
1130
|
+
* Encodes the specified ADVSignedKeyIndexList message. Does not implicitly {@link Adv.ADVSignedKeyIndexList.verify|verify} messages.
|
|
1131
|
+
* @function encode
|
|
1132
|
+
* @memberof Adv.ADVSignedKeyIndexList
|
|
1133
|
+
* @static
|
|
1134
|
+
* @param {Adv.IADVSignedKeyIndexList} message ADVSignedKeyIndexList message or plain object to encode
|
|
1135
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
1136
|
+
* @returns {$protobuf.Writer} Writer
|
|
1137
|
+
*/
|
|
1138
|
+
ADVSignedKeyIndexList.encode = function encode(message, writer) {
|
|
1139
|
+
if (!writer)
|
|
1140
|
+
writer = $Writer.create();
|
|
1141
|
+
if (message.details != null && Object.hasOwnProperty.call(message, "details"))
|
|
1142
|
+
writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.details);
|
|
1143
|
+
if (message.accountSignature != null && Object.hasOwnProperty.call(message, "accountSignature"))
|
|
1144
|
+
writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.accountSignature);
|
|
1145
|
+
if (message.accountSignatureKey != null && Object.hasOwnProperty.call(message, "accountSignatureKey"))
|
|
1146
|
+
writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.accountSignatureKey);
|
|
1147
|
+
return writer;
|
|
1148
|
+
};
|
|
1149
|
+
/**
|
|
1150
|
+
* Encodes the specified ADVSignedKeyIndexList message, length delimited. Does not implicitly {@link Adv.ADVSignedKeyIndexList.verify|verify} messages.
|
|
1151
|
+
* @function encodeDelimited
|
|
1152
|
+
* @memberof Adv.ADVSignedKeyIndexList
|
|
1153
|
+
* @static
|
|
1154
|
+
* @param {Adv.IADVSignedKeyIndexList} message ADVSignedKeyIndexList message or plain object to encode
|
|
1155
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
1156
|
+
* @returns {$protobuf.Writer} Writer
|
|
1157
|
+
*/
|
|
1158
|
+
ADVSignedKeyIndexList.encodeDelimited = function encodeDelimited(message, writer) {
|
|
1159
|
+
return this.encode(message, writer).ldelim();
|
|
1160
|
+
};
|
|
1161
|
+
/**
|
|
1162
|
+
* Decodes a ADVSignedKeyIndexList message from the specified reader or buffer.
|
|
1163
|
+
* @function decode
|
|
1164
|
+
* @memberof Adv.ADVSignedKeyIndexList
|
|
1165
|
+
* @static
|
|
1166
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
1167
|
+
* @param {number} [length] Message length if known beforehand
|
|
1168
|
+
* @returns {Adv.ADVSignedKeyIndexList} ADVSignedKeyIndexList
|
|
1169
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
1170
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
1171
|
+
*/
|
|
1172
|
+
ADVSignedKeyIndexList.decode = function decode(reader, length, error) {
|
|
1173
|
+
if (!(reader instanceof $Reader))
|
|
1174
|
+
reader = $Reader.create(reader);
|
|
1175
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.Adv.ADVSignedKeyIndexList();
|
|
1176
|
+
while (reader.pos < end) {
|
|
1177
|
+
var tag = reader.uint32();
|
|
1178
|
+
if (tag === error)
|
|
1179
|
+
break;
|
|
1180
|
+
switch (tag >>> 3) {
|
|
1181
|
+
case 1: {
|
|
1182
|
+
message.details = reader.bytes();
|
|
1183
|
+
break;
|
|
1184
|
+
}
|
|
1185
|
+
case 2: {
|
|
1186
|
+
message.accountSignature = reader.bytes();
|
|
1187
|
+
break;
|
|
1188
|
+
}
|
|
1189
|
+
case 3: {
|
|
1190
|
+
message.accountSignatureKey = reader.bytes();
|
|
1191
|
+
break;
|
|
1192
|
+
}
|
|
1193
|
+
default:
|
|
1194
|
+
reader.skipType(tag & 7);
|
|
1195
|
+
break;
|
|
1196
|
+
}
|
|
1197
|
+
}
|
|
1198
|
+
return message;
|
|
1199
|
+
};
|
|
1200
|
+
/**
|
|
1201
|
+
* Decodes a ADVSignedKeyIndexList message from the specified reader or buffer, length delimited.
|
|
1202
|
+
* @function decodeDelimited
|
|
1203
|
+
* @memberof Adv.ADVSignedKeyIndexList
|
|
1204
|
+
* @static
|
|
1205
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
1206
|
+
* @returns {Adv.ADVSignedKeyIndexList} ADVSignedKeyIndexList
|
|
1207
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
1208
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
1209
|
+
*/
|
|
1210
|
+
ADVSignedKeyIndexList.decodeDelimited = function decodeDelimited(reader) {
|
|
1211
|
+
if (!(reader instanceof $Reader))
|
|
1212
|
+
reader = new $Reader(reader);
|
|
1213
|
+
return this.decode(reader, reader.uint32());
|
|
1214
|
+
};
|
|
1215
|
+
/**
|
|
1216
|
+
* Verifies a ADVSignedKeyIndexList message.
|
|
1217
|
+
* @function verify
|
|
1218
|
+
* @memberof Adv.ADVSignedKeyIndexList
|
|
1219
|
+
* @static
|
|
1220
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
1221
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
1222
|
+
*/
|
|
1223
|
+
ADVSignedKeyIndexList.verify = function verify(message) {
|
|
1224
|
+
if (typeof message !== "object" || message === null)
|
|
1225
|
+
return "object expected";
|
|
1226
|
+
var properties = {};
|
|
1227
|
+
if (message.details != null && message.hasOwnProperty("details")) {
|
|
1228
|
+
properties._details = 1;
|
|
1229
|
+
if (!(message.details && typeof message.details.length === "number" || $util.isString(message.details)))
|
|
1230
|
+
return "details: buffer expected";
|
|
1231
|
+
}
|
|
1232
|
+
if (message.accountSignature != null && message.hasOwnProperty("accountSignature")) {
|
|
1233
|
+
properties._accountSignature = 1;
|
|
1234
|
+
if (!(message.accountSignature && typeof message.accountSignature.length === "number" || $util.isString(message.accountSignature)))
|
|
1235
|
+
return "accountSignature: buffer expected";
|
|
1236
|
+
}
|
|
1237
|
+
if (message.accountSignatureKey != null && message.hasOwnProperty("accountSignatureKey")) {
|
|
1238
|
+
properties._accountSignatureKey = 1;
|
|
1239
|
+
if (!(message.accountSignatureKey && typeof message.accountSignatureKey.length === "number" || $util.isString(message.accountSignatureKey)))
|
|
1240
|
+
return "accountSignatureKey: buffer expected";
|
|
1241
|
+
}
|
|
1242
|
+
return null;
|
|
1243
|
+
};
|
|
1244
|
+
/**
|
|
1245
|
+
* Creates a ADVSignedKeyIndexList message from a plain object. Also converts values to their respective internal types.
|
|
1246
|
+
* @function fromObject
|
|
1247
|
+
* @memberof Adv.ADVSignedKeyIndexList
|
|
1248
|
+
* @static
|
|
1249
|
+
* @param {Object.<string,*>} object Plain object
|
|
1250
|
+
* @returns {Adv.ADVSignedKeyIndexList} ADVSignedKeyIndexList
|
|
1251
|
+
*/
|
|
1252
|
+
ADVSignedKeyIndexList.fromObject = function fromObject(object) {
|
|
1253
|
+
if (object instanceof $root.Adv.ADVSignedKeyIndexList)
|
|
1254
|
+
return object;
|
|
1255
|
+
var message = new $root.Adv.ADVSignedKeyIndexList();
|
|
1256
|
+
if (object.details != null)
|
|
1257
|
+
if (typeof object.details === "string")
|
|
1258
|
+
$util.base64.decode(object.details, message.details = $util.newBuffer($util.base64.length(object.details)), 0);
|
|
1259
|
+
else if (object.details.length >= 0)
|
|
1260
|
+
message.details = object.details;
|
|
1261
|
+
if (object.accountSignature != null)
|
|
1262
|
+
if (typeof object.accountSignature === "string")
|
|
1263
|
+
$util.base64.decode(object.accountSignature, message.accountSignature = $util.newBuffer($util.base64.length(object.accountSignature)), 0);
|
|
1264
|
+
else if (object.accountSignature.length >= 0)
|
|
1265
|
+
message.accountSignature = object.accountSignature;
|
|
1266
|
+
if (object.accountSignatureKey != null)
|
|
1267
|
+
if (typeof object.accountSignatureKey === "string")
|
|
1268
|
+
$util.base64.decode(object.accountSignatureKey, message.accountSignatureKey = $util.newBuffer($util.base64.length(object.accountSignatureKey)), 0);
|
|
1269
|
+
else if (object.accountSignatureKey.length >= 0)
|
|
1270
|
+
message.accountSignatureKey = object.accountSignatureKey;
|
|
1271
|
+
return message;
|
|
1272
|
+
};
|
|
1273
|
+
/**
|
|
1274
|
+
* Creates a plain object from a ADVSignedKeyIndexList message. Also converts values to other types if specified.
|
|
1275
|
+
* @function toObject
|
|
1276
|
+
* @memberof Adv.ADVSignedKeyIndexList
|
|
1277
|
+
* @static
|
|
1278
|
+
* @param {Adv.ADVSignedKeyIndexList} message ADVSignedKeyIndexList
|
|
1279
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
1280
|
+
* @returns {Object.<string,*>} Plain object
|
|
1281
|
+
*/
|
|
1282
|
+
ADVSignedKeyIndexList.toObject = function toObject(message, options) {
|
|
1283
|
+
if (!options)
|
|
1284
|
+
options = {};
|
|
1285
|
+
var object = {};
|
|
1286
|
+
if (message.details != null && message.hasOwnProperty("details")) {
|
|
1287
|
+
object.details = options.bytes === String ? $util.base64.encode(message.details, 0, message.details.length) : options.bytes === Array ? Array.prototype.slice.call(message.details) : message.details;
|
|
1288
|
+
if (options.oneofs)
|
|
1289
|
+
object._details = "details";
|
|
1290
|
+
}
|
|
1291
|
+
if (message.accountSignature != null && message.hasOwnProperty("accountSignature")) {
|
|
1292
|
+
object.accountSignature = options.bytes === String ? $util.base64.encode(message.accountSignature, 0, message.accountSignature.length) : options.bytes === Array ? Array.prototype.slice.call(message.accountSignature) : message.accountSignature;
|
|
1293
|
+
if (options.oneofs)
|
|
1294
|
+
object._accountSignature = "accountSignature";
|
|
1295
|
+
}
|
|
1296
|
+
if (message.accountSignatureKey != null && message.hasOwnProperty("accountSignatureKey")) {
|
|
1297
|
+
object.accountSignatureKey = options.bytes === String ? $util.base64.encode(message.accountSignatureKey, 0, message.accountSignatureKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.accountSignatureKey) : message.accountSignatureKey;
|
|
1298
|
+
if (options.oneofs)
|
|
1299
|
+
object._accountSignatureKey = "accountSignatureKey";
|
|
1300
|
+
}
|
|
1301
|
+
return object;
|
|
1302
|
+
};
|
|
1303
|
+
/**
|
|
1304
|
+
* Converts this ADVSignedKeyIndexList to JSON.
|
|
1305
|
+
* @function toJSON
|
|
1306
|
+
* @memberof Adv.ADVSignedKeyIndexList
|
|
1307
|
+
* @instance
|
|
1308
|
+
* @returns {Object.<string,*>} JSON object
|
|
1309
|
+
*/
|
|
1310
|
+
ADVSignedKeyIndexList.prototype.toJSON = function toJSON() {
|
|
1311
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
1312
|
+
};
|
|
1313
|
+
/**
|
|
1314
|
+
* Gets the default type url for ADVSignedKeyIndexList
|
|
1315
|
+
* @function getTypeUrl
|
|
1316
|
+
* @memberof Adv.ADVSignedKeyIndexList
|
|
1317
|
+
* @static
|
|
1318
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
1319
|
+
* @returns {string} The default type url
|
|
1320
|
+
*/
|
|
1321
|
+
ADVSignedKeyIndexList.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
1322
|
+
if (typeUrlPrefix === undefined) {
|
|
1323
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
1324
|
+
}
|
|
1325
|
+
return typeUrlPrefix + "/Adv.ADVSignedKeyIndexList";
|
|
1326
|
+
};
|
|
1327
|
+
return ADVSignedKeyIndexList;
|
|
1328
|
+
})();
|
|
1329
|
+
Adv.ADVKeyIndexList = (function() {
|
|
1330
|
+
/**
|
|
1331
|
+
* Properties of a ADVKeyIndexList.
|
|
1332
|
+
* @memberof Adv
|
|
1333
|
+
* @interface IADVKeyIndexList
|
|
1334
|
+
* @property {number|null} [rawId] ADVKeyIndexList rawId
|
|
1335
|
+
* @property {number|Long|null} [timestamp] ADVKeyIndexList timestamp
|
|
1336
|
+
* @property {number|null} [currentIndex] ADVKeyIndexList currentIndex
|
|
1337
|
+
* @property {Array.<number>|null} [validIndexes] ADVKeyIndexList validIndexes
|
|
1338
|
+
* @property {Adv.ADVEncryptionType|null} [accountType] ADVKeyIndexList accountType
|
|
1339
|
+
*/
|
|
1340
|
+
/**
|
|
1341
|
+
* Constructs a new ADVKeyIndexList.
|
|
1342
|
+
* @memberof Adv
|
|
1343
|
+
* @classdesc Represents a ADVKeyIndexList.
|
|
1344
|
+
* @implements IADVKeyIndexList
|
|
1345
|
+
* @constructor
|
|
1346
|
+
* @param {Adv.IADVKeyIndexList=} [properties] Properties to set
|
|
1347
|
+
*/
|
|
1348
|
+
function ADVKeyIndexList(properties) {
|
|
1349
|
+
this.validIndexes = [];
|
|
1350
|
+
if (properties)
|
|
1351
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
1352
|
+
if (properties[keys[i]] != null)
|
|
1353
|
+
this[keys[i]] = properties[keys[i]];
|
|
1354
|
+
}
|
|
1355
|
+
/**
|
|
1356
|
+
* ADVKeyIndexList rawId.
|
|
1357
|
+
* @member {number|null|undefined} rawId
|
|
1358
|
+
* @memberof Adv.ADVKeyIndexList
|
|
1359
|
+
* @instance
|
|
1360
|
+
*/
|
|
1361
|
+
ADVKeyIndexList.prototype.rawId = null;
|
|
1362
|
+
/**
|
|
1363
|
+
* ADVKeyIndexList timestamp.
|
|
1364
|
+
* @member {number|Long|null|undefined} timestamp
|
|
1365
|
+
* @memberof Adv.ADVKeyIndexList
|
|
1366
|
+
* @instance
|
|
1367
|
+
*/
|
|
1368
|
+
ADVKeyIndexList.prototype.timestamp = null;
|
|
1369
|
+
/**
|
|
1370
|
+
* ADVKeyIndexList currentIndex.
|
|
1371
|
+
* @member {number|null|undefined} currentIndex
|
|
1372
|
+
* @memberof Adv.ADVKeyIndexList
|
|
1373
|
+
* @instance
|
|
1374
|
+
*/
|
|
1375
|
+
ADVKeyIndexList.prototype.currentIndex = null;
|
|
1376
|
+
/**
|
|
1377
|
+
* ADVKeyIndexList validIndexes.
|
|
1378
|
+
* @member {Array.<number>} validIndexes
|
|
1379
|
+
* @memberof Adv.ADVKeyIndexList
|
|
1380
|
+
* @instance
|
|
1381
|
+
*/
|
|
1382
|
+
ADVKeyIndexList.prototype.validIndexes = $util.emptyArray;
|
|
1383
|
+
/**
|
|
1384
|
+
* ADVKeyIndexList accountType.
|
|
1385
|
+
* @member {Adv.ADVEncryptionType|null|undefined} accountType
|
|
1386
|
+
* @memberof Adv.ADVKeyIndexList
|
|
1387
|
+
* @instance
|
|
1388
|
+
*/
|
|
1389
|
+
ADVKeyIndexList.prototype.accountType = null;
|
|
1390
|
+
// OneOf field names bound to virtual getters and setters
|
|
1391
|
+
var $oneOfFields;
|
|
1392
|
+
/**
|
|
1393
|
+
* ADVKeyIndexList _rawId.
|
|
1394
|
+
* @member {"rawId"|undefined} _rawId
|
|
1395
|
+
* @memberof Adv.ADVKeyIndexList
|
|
1396
|
+
* @instance
|
|
1397
|
+
*/
|
|
1398
|
+
Object.defineProperty(ADVKeyIndexList.prototype, "_rawId", {
|
|
1399
|
+
get: $util.oneOfGetter($oneOfFields = ["rawId"]),
|
|
1400
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
1401
|
+
});
|
|
1402
|
+
/**
|
|
1403
|
+
* ADVKeyIndexList _timestamp.
|
|
1404
|
+
* @member {"timestamp"|undefined} _timestamp
|
|
1405
|
+
* @memberof Adv.ADVKeyIndexList
|
|
1406
|
+
* @instance
|
|
1407
|
+
*/
|
|
1408
|
+
Object.defineProperty(ADVKeyIndexList.prototype, "_timestamp", {
|
|
1409
|
+
get: $util.oneOfGetter($oneOfFields = ["timestamp"]),
|
|
1410
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
1411
|
+
});
|
|
1412
|
+
/**
|
|
1413
|
+
* ADVKeyIndexList _currentIndex.
|
|
1414
|
+
* @member {"currentIndex"|undefined} _currentIndex
|
|
1415
|
+
* @memberof Adv.ADVKeyIndexList
|
|
1416
|
+
* @instance
|
|
1417
|
+
*/
|
|
1418
|
+
Object.defineProperty(ADVKeyIndexList.prototype, "_currentIndex", {
|
|
1419
|
+
get: $util.oneOfGetter($oneOfFields = ["currentIndex"]),
|
|
1420
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
1421
|
+
});
|
|
1422
|
+
/**
|
|
1423
|
+
* ADVKeyIndexList _accountType.
|
|
1424
|
+
* @member {"accountType"|undefined} _accountType
|
|
1425
|
+
* @memberof Adv.ADVKeyIndexList
|
|
1426
|
+
* @instance
|
|
1427
|
+
*/
|
|
1428
|
+
Object.defineProperty(ADVKeyIndexList.prototype, "_accountType", {
|
|
1429
|
+
get: $util.oneOfGetter($oneOfFields = ["accountType"]),
|
|
1430
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
1431
|
+
});
|
|
1432
|
+
/**
|
|
1433
|
+
* Creates a new ADVKeyIndexList instance using the specified properties.
|
|
1434
|
+
* @function create
|
|
1435
|
+
* @memberof Adv.ADVKeyIndexList
|
|
1436
|
+
* @static
|
|
1437
|
+
* @param {Adv.IADVKeyIndexList=} [properties] Properties to set
|
|
1438
|
+
* @returns {Adv.ADVKeyIndexList} ADVKeyIndexList instance
|
|
1439
|
+
*/
|
|
1440
|
+
ADVKeyIndexList.create = function create(properties) {
|
|
1441
|
+
return new ADVKeyIndexList(properties);
|
|
1442
|
+
};
|
|
1443
|
+
/**
|
|
1444
|
+
* Encodes the specified ADVKeyIndexList message. Does not implicitly {@link Adv.ADVKeyIndexList.verify|verify} messages.
|
|
1445
|
+
* @function encode
|
|
1446
|
+
* @memberof Adv.ADVKeyIndexList
|
|
1447
|
+
* @static
|
|
1448
|
+
* @param {Adv.IADVKeyIndexList} message ADVKeyIndexList message or plain object to encode
|
|
1449
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
1450
|
+
* @returns {$protobuf.Writer} Writer
|
|
1451
|
+
*/
|
|
1452
|
+
ADVKeyIndexList.encode = function encode(message, writer) {
|
|
1453
|
+
if (!writer)
|
|
1454
|
+
writer = $Writer.create();
|
|
1455
|
+
if (message.rawId != null && Object.hasOwnProperty.call(message, "rawId"))
|
|
1456
|
+
writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.rawId);
|
|
1457
|
+
if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp"))
|
|
1458
|
+
writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.timestamp);
|
|
1459
|
+
if (message.currentIndex != null && Object.hasOwnProperty.call(message, "currentIndex"))
|
|
1460
|
+
writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.currentIndex);
|
|
1461
|
+
if (message.validIndexes != null && message.validIndexes.length) {
|
|
1462
|
+
writer.uint32(/* id 4, wireType 2 =*/34).fork();
|
|
1463
|
+
for (var i = 0; i < message.validIndexes.length; ++i)
|
|
1464
|
+
writer.uint32(message.validIndexes[i]);
|
|
1465
|
+
writer.ldelim();
|
|
1466
|
+
}
|
|
1467
|
+
if (message.accountType != null && Object.hasOwnProperty.call(message, "accountType"))
|
|
1468
|
+
writer.uint32(/* id 5, wireType 0 =*/40).int32(message.accountType);
|
|
1469
|
+
return writer;
|
|
1470
|
+
};
|
|
1471
|
+
/**
|
|
1472
|
+
* Encodes the specified ADVKeyIndexList message, length delimited. Does not implicitly {@link Adv.ADVKeyIndexList.verify|verify} messages.
|
|
1473
|
+
* @function encodeDelimited
|
|
1474
|
+
* @memberof Adv.ADVKeyIndexList
|
|
1475
|
+
* @static
|
|
1476
|
+
* @param {Adv.IADVKeyIndexList} message ADVKeyIndexList message or plain object to encode
|
|
1477
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
1478
|
+
* @returns {$protobuf.Writer} Writer
|
|
1479
|
+
*/
|
|
1480
|
+
ADVKeyIndexList.encodeDelimited = function encodeDelimited(message, writer) {
|
|
1481
|
+
return this.encode(message, writer).ldelim();
|
|
1482
|
+
};
|
|
1483
|
+
/**
|
|
1484
|
+
* Decodes a ADVKeyIndexList message from the specified reader or buffer.
|
|
1485
|
+
* @function decode
|
|
1486
|
+
* @memberof Adv.ADVKeyIndexList
|
|
1487
|
+
* @static
|
|
1488
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
1489
|
+
* @param {number} [length] Message length if known beforehand
|
|
1490
|
+
* @returns {Adv.ADVKeyIndexList} ADVKeyIndexList
|
|
1491
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
1492
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
1493
|
+
*/
|
|
1494
|
+
ADVKeyIndexList.decode = function decode(reader, length, error) {
|
|
1495
|
+
if (!(reader instanceof $Reader))
|
|
1496
|
+
reader = $Reader.create(reader);
|
|
1497
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.Adv.ADVKeyIndexList();
|
|
1498
|
+
while (reader.pos < end) {
|
|
1499
|
+
var tag = reader.uint32();
|
|
1500
|
+
if (tag === error)
|
|
1501
|
+
break;
|
|
1502
|
+
switch (tag >>> 3) {
|
|
1503
|
+
case 1: {
|
|
1504
|
+
message.rawId = reader.uint32();
|
|
1505
|
+
break;
|
|
1506
|
+
}
|
|
1507
|
+
case 2: {
|
|
1508
|
+
message.timestamp = reader.uint64();
|
|
1509
|
+
break;
|
|
1510
|
+
}
|
|
1511
|
+
case 3: {
|
|
1512
|
+
message.currentIndex = reader.uint32();
|
|
1513
|
+
break;
|
|
1514
|
+
}
|
|
1515
|
+
case 4: {
|
|
1516
|
+
if (!(message.validIndexes && message.validIndexes.length))
|
|
1517
|
+
message.validIndexes = [];
|
|
1518
|
+
if ((tag & 7) === 2) {
|
|
1519
|
+
var end2 = reader.uint32() + reader.pos;
|
|
1520
|
+
while (reader.pos < end2)
|
|
1521
|
+
message.validIndexes.push(reader.uint32());
|
|
1522
|
+
} else
|
|
1523
|
+
message.validIndexes.push(reader.uint32());
|
|
1524
|
+
break;
|
|
1525
|
+
}
|
|
1526
|
+
case 5: {
|
|
1527
|
+
message.accountType = reader.int32();
|
|
1528
|
+
break;
|
|
1529
|
+
}
|
|
1530
|
+
default:
|
|
1531
|
+
reader.skipType(tag & 7);
|
|
1532
|
+
break;
|
|
1533
|
+
}
|
|
1534
|
+
}
|
|
1535
|
+
return message;
|
|
1536
|
+
};
|
|
1537
|
+
/**
|
|
1538
|
+
* Decodes a ADVKeyIndexList message from the specified reader or buffer, length delimited.
|
|
1539
|
+
* @function decodeDelimited
|
|
1540
|
+
* @memberof Adv.ADVKeyIndexList
|
|
1541
|
+
* @static
|
|
1542
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
1543
|
+
* @returns {Adv.ADVKeyIndexList} ADVKeyIndexList
|
|
1544
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
1545
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
1546
|
+
*/
|
|
1547
|
+
ADVKeyIndexList.decodeDelimited = function decodeDelimited(reader) {
|
|
1548
|
+
if (!(reader instanceof $Reader))
|
|
1549
|
+
reader = new $Reader(reader);
|
|
1550
|
+
return this.decode(reader, reader.uint32());
|
|
1551
|
+
};
|
|
1552
|
+
/**
|
|
1553
|
+
* Verifies a ADVKeyIndexList message.
|
|
1554
|
+
* @function verify
|
|
1555
|
+
* @memberof Adv.ADVKeyIndexList
|
|
1556
|
+
* @static
|
|
1557
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
1558
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
1559
|
+
*/
|
|
1560
|
+
ADVKeyIndexList.verify = function verify(message) {
|
|
1561
|
+
if (typeof message !== "object" || message === null)
|
|
1562
|
+
return "object expected";
|
|
1563
|
+
var properties = {};
|
|
1564
|
+
if (message.rawId != null && message.hasOwnProperty("rawId")) {
|
|
1565
|
+
properties._rawId = 1;
|
|
1566
|
+
if (!$util.isInteger(message.rawId))
|
|
1567
|
+
return "rawId: integer expected";
|
|
1568
|
+
}
|
|
1569
|
+
if (message.timestamp != null && message.hasOwnProperty("timestamp")) {
|
|
1570
|
+
properties._timestamp = 1;
|
|
1571
|
+
if (!$util.isInteger(message.timestamp) && !(message.timestamp && $util.isInteger(message.timestamp.low) && $util.isInteger(message.timestamp.high)))
|
|
1572
|
+
return "timestamp: integer|Long expected";
|
|
1573
|
+
}
|
|
1574
|
+
if (message.currentIndex != null && message.hasOwnProperty("currentIndex")) {
|
|
1575
|
+
properties._currentIndex = 1;
|
|
1576
|
+
if (!$util.isInteger(message.currentIndex))
|
|
1577
|
+
return "currentIndex: integer expected";
|
|
1578
|
+
}
|
|
1579
|
+
if (message.validIndexes != null && message.hasOwnProperty("validIndexes")) {
|
|
1580
|
+
if (!Array.isArray(message.validIndexes))
|
|
1581
|
+
return "validIndexes: array expected";
|
|
1582
|
+
for (var i = 0; i < message.validIndexes.length; ++i)
|
|
1583
|
+
if (!$util.isInteger(message.validIndexes[i]))
|
|
1584
|
+
return "validIndexes: integer[] expected";
|
|
1585
|
+
}
|
|
1586
|
+
if (message.accountType != null && message.hasOwnProperty("accountType")) {
|
|
1587
|
+
properties._accountType = 1;
|
|
1588
|
+
switch (message.accountType) {
|
|
1589
|
+
default:
|
|
1590
|
+
return "accountType: enum value expected";
|
|
1591
|
+
case 0:
|
|
1592
|
+
case 1:
|
|
1593
|
+
break;
|
|
1594
|
+
}
|
|
1595
|
+
}
|
|
1596
|
+
return null;
|
|
1597
|
+
};
|
|
1598
|
+
/**
|
|
1599
|
+
* Creates a ADVKeyIndexList message from a plain object. Also converts values to their respective internal types.
|
|
1600
|
+
* @function fromObject
|
|
1601
|
+
* @memberof Adv.ADVKeyIndexList
|
|
1602
|
+
* @static
|
|
1603
|
+
* @param {Object.<string,*>} object Plain object
|
|
1604
|
+
* @returns {Adv.ADVKeyIndexList} ADVKeyIndexList
|
|
1605
|
+
*/
|
|
1606
|
+
ADVKeyIndexList.fromObject = function fromObject(object) {
|
|
1607
|
+
if (object instanceof $root.Adv.ADVKeyIndexList)
|
|
1608
|
+
return object;
|
|
1609
|
+
var message = new $root.Adv.ADVKeyIndexList();
|
|
1610
|
+
if (object.rawId != null)
|
|
1611
|
+
message.rawId = object.rawId >>> 0;
|
|
1612
|
+
if (object.timestamp != null)
|
|
1613
|
+
if ($util.Long)
|
|
1614
|
+
(message.timestamp = $util.Long.fromValue(object.timestamp)).unsigned = true;
|
|
1615
|
+
else if (typeof object.timestamp === "string")
|
|
1616
|
+
message.timestamp = parseInt(object.timestamp, 10);
|
|
1617
|
+
else if (typeof object.timestamp === "number")
|
|
1618
|
+
message.timestamp = object.timestamp;
|
|
1619
|
+
else if (typeof object.timestamp === "object")
|
|
1620
|
+
message.timestamp = new $util.LongBits(object.timestamp.low >>> 0, object.timestamp.high >>> 0).toNumber(true);
|
|
1621
|
+
if (object.currentIndex != null)
|
|
1622
|
+
message.currentIndex = object.currentIndex >>> 0;
|
|
1623
|
+
if (object.validIndexes) {
|
|
1624
|
+
if (!Array.isArray(object.validIndexes))
|
|
1625
|
+
throw TypeError(".Adv.ADVKeyIndexList.validIndexes: array expected");
|
|
1626
|
+
message.validIndexes = [];
|
|
1627
|
+
for (var i = 0; i < object.validIndexes.length; ++i)
|
|
1628
|
+
message.validIndexes[i] = object.validIndexes[i] >>> 0;
|
|
1629
|
+
}
|
|
1630
|
+
switch (object.accountType) {
|
|
1631
|
+
default:
|
|
1632
|
+
if (typeof object.accountType === "number") {
|
|
1633
|
+
message.accountType = object.accountType;
|
|
1634
|
+
break;
|
|
1635
|
+
}
|
|
1636
|
+
break;
|
|
1637
|
+
case "E2EE":
|
|
1638
|
+
case 0:
|
|
1639
|
+
message.accountType = 0;
|
|
1640
|
+
break;
|
|
1641
|
+
case "HOSTED":
|
|
1642
|
+
case 1:
|
|
1643
|
+
message.accountType = 1;
|
|
1644
|
+
break;
|
|
1645
|
+
}
|
|
1646
|
+
return message;
|
|
1647
|
+
};
|
|
1648
|
+
/**
|
|
1649
|
+
* Creates a plain object from a ADVKeyIndexList message. Also converts values to other types if specified.
|
|
1650
|
+
* @function toObject
|
|
1651
|
+
* @memberof Adv.ADVKeyIndexList
|
|
1652
|
+
* @static
|
|
1653
|
+
* @param {Adv.ADVKeyIndexList} message ADVKeyIndexList
|
|
1654
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
1655
|
+
* @returns {Object.<string,*>} Plain object
|
|
1656
|
+
*/
|
|
1657
|
+
ADVKeyIndexList.toObject = function toObject(message, options) {
|
|
1658
|
+
if (!options)
|
|
1659
|
+
options = {};
|
|
1660
|
+
var object = {};
|
|
1661
|
+
if (options.arrays || options.defaults)
|
|
1662
|
+
object.validIndexes = [];
|
|
1663
|
+
if (message.rawId != null && message.hasOwnProperty("rawId")) {
|
|
1664
|
+
object.rawId = message.rawId;
|
|
1665
|
+
if (options.oneofs)
|
|
1666
|
+
object._rawId = "rawId";
|
|
1667
|
+
}
|
|
1668
|
+
if (message.timestamp != null && message.hasOwnProperty("timestamp")) {
|
|
1669
|
+
if (typeof message.timestamp === "number")
|
|
1670
|
+
object.timestamp = options.longs === String ? String(message.timestamp) : message.timestamp;
|
|
1671
|
+
else
|
|
1672
|
+
object.timestamp = options.longs === String ? $util.Long.prototype.toString.call(message.timestamp) : options.longs === Number ? new $util.LongBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0).toNumber(true) : message.timestamp;
|
|
1673
|
+
if (options.oneofs)
|
|
1674
|
+
object._timestamp = "timestamp";
|
|
1675
|
+
}
|
|
1676
|
+
if (message.currentIndex != null && message.hasOwnProperty("currentIndex")) {
|
|
1677
|
+
object.currentIndex = message.currentIndex;
|
|
1678
|
+
if (options.oneofs)
|
|
1679
|
+
object._currentIndex = "currentIndex";
|
|
1680
|
+
}
|
|
1681
|
+
if (message.validIndexes && message.validIndexes.length) {
|
|
1682
|
+
object.validIndexes = [];
|
|
1683
|
+
for (var j = 0; j < message.validIndexes.length; ++j)
|
|
1684
|
+
object.validIndexes[j] = message.validIndexes[j];
|
|
1685
|
+
}
|
|
1686
|
+
if (message.accountType != null && message.hasOwnProperty("accountType")) {
|
|
1687
|
+
object.accountType = options.enums === String ? $root.Adv.ADVEncryptionType[message.accountType] === undefined ? message.accountType : $root.Adv.ADVEncryptionType[message.accountType] : message.accountType;
|
|
1688
|
+
if (options.oneofs)
|
|
1689
|
+
object._accountType = "accountType";
|
|
1690
|
+
}
|
|
1691
|
+
return object;
|
|
1692
|
+
};
|
|
1693
|
+
/**
|
|
1694
|
+
* Converts this ADVKeyIndexList to JSON.
|
|
1695
|
+
* @function toJSON
|
|
1696
|
+
* @memberof Adv.ADVKeyIndexList
|
|
1697
|
+
* @instance
|
|
1698
|
+
* @returns {Object.<string,*>} JSON object
|
|
1699
|
+
*/
|
|
1700
|
+
ADVKeyIndexList.prototype.toJSON = function toJSON() {
|
|
1701
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
1702
|
+
};
|
|
1703
|
+
/**
|
|
1704
|
+
* Gets the default type url for ADVKeyIndexList
|
|
1705
|
+
* @function getTypeUrl
|
|
1706
|
+
* @memberof Adv.ADVKeyIndexList
|
|
1707
|
+
* @static
|
|
1708
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
1709
|
+
* @returns {string} The default type url
|
|
1710
|
+
*/
|
|
1711
|
+
ADVKeyIndexList.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
1712
|
+
if (typeUrlPrefix === undefined) {
|
|
1713
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
1714
|
+
}
|
|
1715
|
+
return typeUrlPrefix + "/Adv.ADVKeyIndexList";
|
|
1716
|
+
};
|
|
1717
|
+
return ADVKeyIndexList;
|
|
1718
|
+
})();
|
|
1719
|
+
/**
|
|
1720
|
+
* ADVEncryptionType enum.
|
|
1721
|
+
* @name Adv.ADVEncryptionType
|
|
1722
|
+
* @enum {number}
|
|
1723
|
+
* @property {number} E2EE=0 E2EE value
|
|
1724
|
+
* @property {number} HOSTED=1 HOSTED value
|
|
1725
|
+
*/
|
|
1726
|
+
Adv.ADVEncryptionType = (function() {
|
|
1727
|
+
var valuesById = {}, values = Object.create(valuesById);
|
|
1728
|
+
values[valuesById[0] = "E2EE"] = 0;
|
|
1729
|
+
values[valuesById[1] = "HOSTED"] = 1;
|
|
1730
|
+
return values;
|
|
1731
|
+
})();
|
|
1732
|
+
return Adv;
|
|
1733
|
+
})();
|
|
1734
|
+
module.exports = $root;
|