diff --git a/web/protobufs/identity-auth-structs.cjs b/web/protobufs/identity-auth-structs.cjs index 65fcba5a3..a3a58c737 100644 --- a/web/protobufs/identity-auth-structs.cjs +++ b/web/protobufs/identity-auth-structs.cjs @@ -1,3324 +1,3805 @@ // source: identity_auth.proto /** * @fileoverview * @enhanceable * @suppress {missingRequire} reports error on implicit type usages. * @suppress {messageConventions} JS Compiler reports an error if a variable or * field starts with 'MSG_' and isn't a translatable message. * @public * @generated */ // GENERATED CODE -- DO NOT EDIT! /* eslint-disable */ // @ts-nocheck var jspb = require('google-protobuf'); var goog = jspb; var global = (typeof globalThis !== 'undefined' && globalThis) || (typeof window !== 'undefined' && window) || (typeof global !== 'undefined' && global) || (typeof self !== 'undefined' && self) || (function () { return this; }).call(null) || Function('return this')(); var identity_unauth_pb = require('./identity-unauth-structs.cjs'); goog.object.extend(proto, identity_unauth_pb); +goog.exportSymbol('proto.identity.auth.EthereumIdentity', null, global); goog.exportSymbol('proto.identity.auth.FindUserIDRequest', null, global); goog.exportSymbol('proto.identity.auth.FindUserIDRequest.IdentifierCase', null, global); goog.exportSymbol('proto.identity.auth.FindUserIDResponse', null, global); goog.exportSymbol('proto.identity.auth.GetDeviceListRequest', null, global); goog.exportSymbol('proto.identity.auth.GetDeviceListResponse', null, global); +goog.exportSymbol('proto.identity.auth.Identity', null, global); +goog.exportSymbol('proto.identity.auth.Identity.IdentityInfoCase', null, global); goog.exportSymbol('proto.identity.auth.InboundKeyInfo', null, global); goog.exportSymbol('proto.identity.auth.InboundKeysForUserRequest', null, global); goog.exportSymbol('proto.identity.auth.InboundKeysForUserResponse', null, global); goog.exportSymbol('proto.identity.auth.KeyserverKeysResponse', null, global); goog.exportSymbol('proto.identity.auth.OutboundKeyInfo', null, global); goog.exportSymbol('proto.identity.auth.OutboundKeysForUserRequest', null, global); goog.exportSymbol('proto.identity.auth.OutboundKeysForUserResponse', null, global); goog.exportSymbol('proto.identity.auth.RefreshUserPrekeysRequest', null, global); goog.exportSymbol('proto.identity.auth.UpdateUserPasswordFinishRequest', null, global); goog.exportSymbol('proto.identity.auth.UpdateUserPasswordStartRequest', null, global); goog.exportSymbol('proto.identity.auth.UpdateUserPasswordStartResponse', null, global); goog.exportSymbol('proto.identity.auth.UploadOneTimeKeysRequest', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.identity.auth.EthereumIdentity = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.identity.auth.EthereumIdentity, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.identity.auth.EthereumIdentity.displayName = 'proto.identity.auth.EthereumIdentity'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.identity.auth.Identity = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.identity.auth.Identity.oneofGroups_); +}; +goog.inherits(proto.identity.auth.Identity, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.identity.auth.Identity.displayName = 'proto.identity.auth.Identity'; +} /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.identity.auth.UploadOneTimeKeysRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.identity.auth.UploadOneTimeKeysRequest.repeatedFields_, null); }; goog.inherits(proto.identity.auth.UploadOneTimeKeysRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.identity.auth.UploadOneTimeKeysRequest.displayName = 'proto.identity.auth.UploadOneTimeKeysRequest'; } /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.identity.auth.RefreshUserPrekeysRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.identity.auth.RefreshUserPrekeysRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.identity.auth.RefreshUserPrekeysRequest.displayName = 'proto.identity.auth.RefreshUserPrekeysRequest'; } /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.identity.auth.OutboundKeyInfo = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.identity.auth.OutboundKeyInfo, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.identity.auth.OutboundKeyInfo.displayName = 'proto.identity.auth.OutboundKeyInfo'; } /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.identity.auth.KeyserverKeysResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.identity.auth.KeyserverKeysResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.identity.auth.KeyserverKeysResponse.displayName = 'proto.identity.auth.KeyserverKeysResponse'; } /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.identity.auth.OutboundKeysForUserResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.identity.auth.OutboundKeysForUserResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.identity.auth.OutboundKeysForUserResponse.displayName = 'proto.identity.auth.OutboundKeysForUserResponse'; } /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.identity.auth.OutboundKeysForUserRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.identity.auth.OutboundKeysForUserRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.identity.auth.OutboundKeysForUserRequest.displayName = 'proto.identity.auth.OutboundKeysForUserRequest'; } /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.identity.auth.InboundKeyInfo = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.identity.auth.InboundKeyInfo, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.identity.auth.InboundKeyInfo.displayName = 'proto.identity.auth.InboundKeyInfo'; } /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.identity.auth.InboundKeysForUserResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.identity.auth.InboundKeysForUserResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.identity.auth.InboundKeysForUserResponse.displayName = 'proto.identity.auth.InboundKeysForUserResponse'; } /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.identity.auth.InboundKeysForUserRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.identity.auth.InboundKeysForUserRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.identity.auth.InboundKeysForUserRequest.displayName = 'proto.identity.auth.InboundKeysForUserRequest'; } /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.identity.auth.FindUserIDRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, proto.identity.auth.FindUserIDRequest.oneofGroups_); }; goog.inherits(proto.identity.auth.FindUserIDRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.identity.auth.FindUserIDRequest.displayName = 'proto.identity.auth.FindUserIDRequest'; } /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.identity.auth.FindUserIDResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.identity.auth.FindUserIDResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.identity.auth.FindUserIDResponse.displayName = 'proto.identity.auth.FindUserIDResponse'; } /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.identity.auth.UpdateUserPasswordStartRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.identity.auth.UpdateUserPasswordStartRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.identity.auth.UpdateUserPasswordStartRequest.displayName = 'proto.identity.auth.UpdateUserPasswordStartRequest'; } /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.identity.auth.UpdateUserPasswordFinishRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.identity.auth.UpdateUserPasswordFinishRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.identity.auth.UpdateUserPasswordFinishRequest.displayName = 'proto.identity.auth.UpdateUserPasswordFinishRequest'; } /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.identity.auth.UpdateUserPasswordStartResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.identity.auth.UpdateUserPasswordStartResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.identity.auth.UpdateUserPasswordStartResponse.displayName = 'proto.identity.auth.UpdateUserPasswordStartResponse'; } /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.identity.auth.GetDeviceListRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.identity.auth.GetDeviceListRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.identity.auth.GetDeviceListRequest.displayName = 'proto.identity.auth.GetDeviceListRequest'; } /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.identity.auth.GetDeviceListResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.identity.auth.GetDeviceListResponse.repeatedFields_, null); }; goog.inherits(proto.identity.auth.GetDeviceListResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.identity.auth.GetDeviceListResponse.displayName = 'proto.identity.auth.GetDeviceListResponse'; } + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.identity.auth.EthereumIdentity.prototype.toObject = function(opt_includeInstance) { + return proto.identity.auth.EthereumIdentity.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.identity.auth.EthereumIdentity} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.identity.auth.EthereumIdentity.toObject = function(includeInstance, msg) { + var f, obj = { + walletAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), + socialProof: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.identity.auth.EthereumIdentity} + */ +proto.identity.auth.EthereumIdentity.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.identity.auth.EthereumIdentity; + return proto.identity.auth.EthereumIdentity.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.identity.auth.EthereumIdentity} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.identity.auth.EthereumIdentity} + */ +proto.identity.auth.EthereumIdentity.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setWalletAddress(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setSocialProof(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.identity.auth.EthereumIdentity.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.identity.auth.EthereumIdentity.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.identity.auth.EthereumIdentity} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.identity.auth.EthereumIdentity.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getWalletAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getSocialProof(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string wallet_address = 1; + * @return {string} + */ +proto.identity.auth.EthereumIdentity.prototype.getWalletAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.identity.auth.EthereumIdentity} returns this + */ +proto.identity.auth.EthereumIdentity.prototype.setWalletAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string social_proof = 2; + * @return {string} + */ +proto.identity.auth.EthereumIdentity.prototype.getSocialProof = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.identity.auth.EthereumIdentity} returns this + */ +proto.identity.auth.EthereumIdentity.prototype.setSocialProof = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.identity.auth.Identity.oneofGroups_ = [[1,2]]; + +/** + * @enum {number} + */ +proto.identity.auth.Identity.IdentityInfoCase = { + IDENTITY_INFO_NOT_SET: 0, + USERNAME: 1, + ETH_IDENTITY: 2 +}; + +/** + * @return {proto.identity.auth.Identity.IdentityInfoCase} + */ +proto.identity.auth.Identity.prototype.getIdentityInfoCase = function() { + return /** @type {proto.identity.auth.Identity.IdentityInfoCase} */(jspb.Message.computeOneofCase(this, proto.identity.auth.Identity.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.identity.auth.Identity.prototype.toObject = function(opt_includeInstance) { + return proto.identity.auth.Identity.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.identity.auth.Identity} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.identity.auth.Identity.toObject = function(includeInstance, msg) { + var f, obj = { + username: jspb.Message.getFieldWithDefault(msg, 1, ""), + ethIdentity: (f = msg.getEthIdentity()) && proto.identity.auth.EthereumIdentity.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.identity.auth.Identity} + */ +proto.identity.auth.Identity.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.identity.auth.Identity; + return proto.identity.auth.Identity.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.identity.auth.Identity} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.identity.auth.Identity} + */ +proto.identity.auth.Identity.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setUsername(value); + break; + case 2: + var value = new proto.identity.auth.EthereumIdentity; + reader.readMessage(value,proto.identity.auth.EthereumIdentity.deserializeBinaryFromReader); + msg.setEthIdentity(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.identity.auth.Identity.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.identity.auth.Identity.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.identity.auth.Identity} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.identity.auth.Identity.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {string} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeString( + 1, + f + ); + } + f = message.getEthIdentity(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.identity.auth.EthereumIdentity.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string username = 1; + * @return {string} + */ +proto.identity.auth.Identity.prototype.getUsername = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.identity.auth.Identity} returns this + */ +proto.identity.auth.Identity.prototype.setUsername = function(value) { + return jspb.Message.setOneofField(this, 1, proto.identity.auth.Identity.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.identity.auth.Identity} returns this + */ +proto.identity.auth.Identity.prototype.clearUsername = function() { + return jspb.Message.setOneofField(this, 1, proto.identity.auth.Identity.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.identity.auth.Identity.prototype.hasUsername = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional EthereumIdentity eth_identity = 2; + * @return {?proto.identity.auth.EthereumIdentity} + */ +proto.identity.auth.Identity.prototype.getEthIdentity = function() { + return /** @type{?proto.identity.auth.EthereumIdentity} */ ( + jspb.Message.getWrapperField(this, proto.identity.auth.EthereumIdentity, 2)); +}; + + +/** + * @param {?proto.identity.auth.EthereumIdentity|undefined} value + * @return {!proto.identity.auth.Identity} returns this +*/ +proto.identity.auth.Identity.prototype.setEthIdentity = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.identity.auth.Identity.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.identity.auth.Identity} returns this + */ +proto.identity.auth.Identity.prototype.clearEthIdentity = function() { + return this.setEthIdentity(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.identity.auth.Identity.prototype.hasEthIdentity = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + /** * List of repeated fields within this message type. * @private {!Array} * @const */ proto.identity.auth.UploadOneTimeKeysRequest.repeatedFields_ = [1,2]; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: * net/proto2/compiler/js/internal/generator.cc#kKeyword. * @param {boolean=} opt_includeInstance Deprecated. whether to include the * JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @return {!Object} */ proto.identity.auth.UploadOneTimeKeysRequest.prototype.toObject = function(opt_includeInstance) { return proto.identity.auth.UploadOneTimeKeysRequest.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.identity.auth.UploadOneTimeKeysRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.identity.auth.UploadOneTimeKeysRequest.toObject = function(includeInstance, msg) { var f, obj = { contentOneTimePrekeysList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f, notifOneTimePrekeysList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.identity.auth.UploadOneTimeKeysRequest} */ proto.identity.auth.UploadOneTimeKeysRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.identity.auth.UploadOneTimeKeysRequest; return proto.identity.auth.UploadOneTimeKeysRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.identity.auth.UploadOneTimeKeysRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.identity.auth.UploadOneTimeKeysRequest} */ proto.identity.auth.UploadOneTimeKeysRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); msg.addContentOneTimePrekeys(value); break; case 2: var value = /** @type {string} */ (reader.readString()); msg.addNotifOneTimePrekeys(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.identity.auth.UploadOneTimeKeysRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.identity.auth.UploadOneTimeKeysRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.identity.auth.UploadOneTimeKeysRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.identity.auth.UploadOneTimeKeysRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getContentOneTimePrekeysList(); if (f.length > 0) { writer.writeRepeatedString( 1, f ); } f = message.getNotifOneTimePrekeysList(); if (f.length > 0) { writer.writeRepeatedString( 2, f ); } }; /** * repeated string content_one_time_prekeys = 1; * @return {!Array} */ proto.identity.auth.UploadOneTimeKeysRequest.prototype.getContentOneTimePrekeysList = function() { return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); }; /** * @param {!Array} value * @return {!proto.identity.auth.UploadOneTimeKeysRequest} returns this */ proto.identity.auth.UploadOneTimeKeysRequest.prototype.setContentOneTimePrekeysList = function(value) { return jspb.Message.setField(this, 1, value || []); }; /** * @param {string} value * @param {number=} opt_index * @return {!proto.identity.auth.UploadOneTimeKeysRequest} returns this */ proto.identity.auth.UploadOneTimeKeysRequest.prototype.addContentOneTimePrekeys = function(value, opt_index) { return jspb.Message.addToRepeatedField(this, 1, value, opt_index); }; /** * Clears the list making it empty but non-null. * @return {!proto.identity.auth.UploadOneTimeKeysRequest} returns this */ proto.identity.auth.UploadOneTimeKeysRequest.prototype.clearContentOneTimePrekeysList = function() { return this.setContentOneTimePrekeysList([]); }; /** * repeated string notif_one_time_prekeys = 2; * @return {!Array} */ proto.identity.auth.UploadOneTimeKeysRequest.prototype.getNotifOneTimePrekeysList = function() { return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); }; /** * @param {!Array} value * @return {!proto.identity.auth.UploadOneTimeKeysRequest} returns this */ proto.identity.auth.UploadOneTimeKeysRequest.prototype.setNotifOneTimePrekeysList = function(value) { return jspb.Message.setField(this, 2, value || []); }; /** * @param {string} value * @param {number=} opt_index * @return {!proto.identity.auth.UploadOneTimeKeysRequest} returns this */ proto.identity.auth.UploadOneTimeKeysRequest.prototype.addNotifOneTimePrekeys = function(value, opt_index) { return jspb.Message.addToRepeatedField(this, 2, value, opt_index); }; /** * Clears the list making it empty but non-null. * @return {!proto.identity.auth.UploadOneTimeKeysRequest} returns this */ proto.identity.auth.UploadOneTimeKeysRequest.prototype.clearNotifOneTimePrekeysList = function() { return this.setNotifOneTimePrekeysList([]); }; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: * net/proto2/compiler/js/internal/generator.cc#kKeyword. * @param {boolean=} opt_includeInstance Deprecated. whether to include the * JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @return {!Object} */ proto.identity.auth.RefreshUserPrekeysRequest.prototype.toObject = function(opt_includeInstance) { return proto.identity.auth.RefreshUserPrekeysRequest.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.identity.auth.RefreshUserPrekeysRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.identity.auth.RefreshUserPrekeysRequest.toObject = function(includeInstance, msg) { var f, obj = { newContentPrekeys: (f = msg.getNewContentPrekeys()) && identity_unauth_pb.Prekey.toObject(includeInstance, f), newNotifPrekeys: (f = msg.getNewNotifPrekeys()) && identity_unauth_pb.Prekey.toObject(includeInstance, f) }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.identity.auth.RefreshUserPrekeysRequest} */ proto.identity.auth.RefreshUserPrekeysRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.identity.auth.RefreshUserPrekeysRequest; return proto.identity.auth.RefreshUserPrekeysRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.identity.auth.RefreshUserPrekeysRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.identity.auth.RefreshUserPrekeysRequest} */ proto.identity.auth.RefreshUserPrekeysRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new identity_unauth_pb.Prekey; reader.readMessage(value,identity_unauth_pb.Prekey.deserializeBinaryFromReader); msg.setNewContentPrekeys(value); break; case 2: var value = new identity_unauth_pb.Prekey; reader.readMessage(value,identity_unauth_pb.Prekey.deserializeBinaryFromReader); msg.setNewNotifPrekeys(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.identity.auth.RefreshUserPrekeysRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.identity.auth.RefreshUserPrekeysRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.identity.auth.RefreshUserPrekeysRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.identity.auth.RefreshUserPrekeysRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getNewContentPrekeys(); if (f != null) { writer.writeMessage( 1, f, identity_unauth_pb.Prekey.serializeBinaryToWriter ); } f = message.getNewNotifPrekeys(); if (f != null) { writer.writeMessage( 2, f, identity_unauth_pb.Prekey.serializeBinaryToWriter ); } }; /** * optional identity.unauth.Prekey new_content_prekeys = 1; * @return {?proto.identity.unauth.Prekey} */ proto.identity.auth.RefreshUserPrekeysRequest.prototype.getNewContentPrekeys = function() { return /** @type{?proto.identity.unauth.Prekey} */ ( jspb.Message.getWrapperField(this, identity_unauth_pb.Prekey, 1)); }; /** * @param {?proto.identity.unauth.Prekey|undefined} value * @return {!proto.identity.auth.RefreshUserPrekeysRequest} returns this */ proto.identity.auth.RefreshUserPrekeysRequest.prototype.setNewContentPrekeys = function(value) { return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. * @return {!proto.identity.auth.RefreshUserPrekeysRequest} returns this */ proto.identity.auth.RefreshUserPrekeysRequest.prototype.clearNewContentPrekeys = function() { return this.setNewContentPrekeys(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.identity.auth.RefreshUserPrekeysRequest.prototype.hasNewContentPrekeys = function() { return jspb.Message.getField(this, 1) != null; }; /** * optional identity.unauth.Prekey new_notif_prekeys = 2; * @return {?proto.identity.unauth.Prekey} */ proto.identity.auth.RefreshUserPrekeysRequest.prototype.getNewNotifPrekeys = function() { return /** @type{?proto.identity.unauth.Prekey} */ ( jspb.Message.getWrapperField(this, identity_unauth_pb.Prekey, 2)); }; /** * @param {?proto.identity.unauth.Prekey|undefined} value * @return {!proto.identity.auth.RefreshUserPrekeysRequest} returns this */ proto.identity.auth.RefreshUserPrekeysRequest.prototype.setNewNotifPrekeys = function(value) { return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. * @return {!proto.identity.auth.RefreshUserPrekeysRequest} returns this */ proto.identity.auth.RefreshUserPrekeysRequest.prototype.clearNewNotifPrekeys = function() { return this.setNewNotifPrekeys(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.identity.auth.RefreshUserPrekeysRequest.prototype.hasNewNotifPrekeys = function() { return jspb.Message.getField(this, 2) != null; }; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: * net/proto2/compiler/js/internal/generator.cc#kKeyword. * @param {boolean=} opt_includeInstance Deprecated. whether to include the * JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @return {!Object} */ proto.identity.auth.OutboundKeyInfo.prototype.toObject = function(opt_includeInstance) { return proto.identity.auth.OutboundKeyInfo.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.identity.auth.OutboundKeyInfo} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.identity.auth.OutboundKeyInfo.toObject = function(includeInstance, msg) { var f, obj = { identityInfo: (f = msg.getIdentityInfo()) && identity_unauth_pb.IdentityKeyInfo.toObject(includeInstance, f), contentPrekey: (f = msg.getContentPrekey()) && identity_unauth_pb.Prekey.toObject(includeInstance, f), notifPrekey: (f = msg.getNotifPrekey()) && identity_unauth_pb.Prekey.toObject(includeInstance, f), oneTimeContentPrekey: jspb.Message.getFieldWithDefault(msg, 4, ""), oneTimeNotifPrekey: jspb.Message.getFieldWithDefault(msg, 5, "") }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.identity.auth.OutboundKeyInfo} */ proto.identity.auth.OutboundKeyInfo.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.identity.auth.OutboundKeyInfo; return proto.identity.auth.OutboundKeyInfo.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.identity.auth.OutboundKeyInfo} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.identity.auth.OutboundKeyInfo} */ proto.identity.auth.OutboundKeyInfo.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new identity_unauth_pb.IdentityKeyInfo; reader.readMessage(value,identity_unauth_pb.IdentityKeyInfo.deserializeBinaryFromReader); msg.setIdentityInfo(value); break; case 2: var value = new identity_unauth_pb.Prekey; reader.readMessage(value,identity_unauth_pb.Prekey.deserializeBinaryFromReader); msg.setContentPrekey(value); break; case 3: var value = new identity_unauth_pb.Prekey; reader.readMessage(value,identity_unauth_pb.Prekey.deserializeBinaryFromReader); msg.setNotifPrekey(value); break; case 4: var value = /** @type {string} */ (reader.readString()); msg.setOneTimeContentPrekey(value); break; case 5: var value = /** @type {string} */ (reader.readString()); msg.setOneTimeNotifPrekey(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.identity.auth.OutboundKeyInfo.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.identity.auth.OutboundKeyInfo.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.identity.auth.OutboundKeyInfo} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.identity.auth.OutboundKeyInfo.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getIdentityInfo(); if (f != null) { writer.writeMessage( 1, f, identity_unauth_pb.IdentityKeyInfo.serializeBinaryToWriter ); } f = message.getContentPrekey(); if (f != null) { writer.writeMessage( 2, f, identity_unauth_pb.Prekey.serializeBinaryToWriter ); } f = message.getNotifPrekey(); if (f != null) { writer.writeMessage( 3, f, identity_unauth_pb.Prekey.serializeBinaryToWriter ); } f = /** @type {string} */ (jspb.Message.getField(message, 4)); if (f != null) { writer.writeString( 4, f ); } f = /** @type {string} */ (jspb.Message.getField(message, 5)); if (f != null) { writer.writeString( 5, f ); } }; /** * optional identity.unauth.IdentityKeyInfo identity_info = 1; * @return {?proto.identity.unauth.IdentityKeyInfo} */ proto.identity.auth.OutboundKeyInfo.prototype.getIdentityInfo = function() { return /** @type{?proto.identity.unauth.IdentityKeyInfo} */ ( jspb.Message.getWrapperField(this, identity_unauth_pb.IdentityKeyInfo, 1)); }; /** * @param {?proto.identity.unauth.IdentityKeyInfo|undefined} value * @return {!proto.identity.auth.OutboundKeyInfo} returns this */ proto.identity.auth.OutboundKeyInfo.prototype.setIdentityInfo = function(value) { return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. * @return {!proto.identity.auth.OutboundKeyInfo} returns this */ proto.identity.auth.OutboundKeyInfo.prototype.clearIdentityInfo = function() { return this.setIdentityInfo(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.identity.auth.OutboundKeyInfo.prototype.hasIdentityInfo = function() { return jspb.Message.getField(this, 1) != null; }; /** * optional identity.unauth.Prekey content_prekey = 2; * @return {?proto.identity.unauth.Prekey} */ proto.identity.auth.OutboundKeyInfo.prototype.getContentPrekey = function() { return /** @type{?proto.identity.unauth.Prekey} */ ( jspb.Message.getWrapperField(this, identity_unauth_pb.Prekey, 2)); }; /** * @param {?proto.identity.unauth.Prekey|undefined} value * @return {!proto.identity.auth.OutboundKeyInfo} returns this */ proto.identity.auth.OutboundKeyInfo.prototype.setContentPrekey = function(value) { return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. * @return {!proto.identity.auth.OutboundKeyInfo} returns this */ proto.identity.auth.OutboundKeyInfo.prototype.clearContentPrekey = function() { return this.setContentPrekey(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.identity.auth.OutboundKeyInfo.prototype.hasContentPrekey = function() { return jspb.Message.getField(this, 2) != null; }; /** * optional identity.unauth.Prekey notif_prekey = 3; * @return {?proto.identity.unauth.Prekey} */ proto.identity.auth.OutboundKeyInfo.prototype.getNotifPrekey = function() { return /** @type{?proto.identity.unauth.Prekey} */ ( jspb.Message.getWrapperField(this, identity_unauth_pb.Prekey, 3)); }; /** * @param {?proto.identity.unauth.Prekey|undefined} value * @return {!proto.identity.auth.OutboundKeyInfo} returns this */ proto.identity.auth.OutboundKeyInfo.prototype.setNotifPrekey = function(value) { return jspb.Message.setWrapperField(this, 3, value); }; /** * Clears the message field making it undefined. * @return {!proto.identity.auth.OutboundKeyInfo} returns this */ proto.identity.auth.OutboundKeyInfo.prototype.clearNotifPrekey = function() { return this.setNotifPrekey(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.identity.auth.OutboundKeyInfo.prototype.hasNotifPrekey = function() { return jspb.Message.getField(this, 3) != null; }; /** * optional string one_time_content_prekey = 4; * @return {string} */ proto.identity.auth.OutboundKeyInfo.prototype.getOneTimeContentPrekey = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); }; /** * @param {string} value * @return {!proto.identity.auth.OutboundKeyInfo} returns this */ proto.identity.auth.OutboundKeyInfo.prototype.setOneTimeContentPrekey = function(value) { return jspb.Message.setField(this, 4, value); }; /** * Clears the field making it undefined. * @return {!proto.identity.auth.OutboundKeyInfo} returns this */ proto.identity.auth.OutboundKeyInfo.prototype.clearOneTimeContentPrekey = function() { return jspb.Message.setField(this, 4, undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.identity.auth.OutboundKeyInfo.prototype.hasOneTimeContentPrekey = function() { return jspb.Message.getField(this, 4) != null; }; /** * optional string one_time_notif_prekey = 5; * @return {string} */ proto.identity.auth.OutboundKeyInfo.prototype.getOneTimeNotifPrekey = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); }; /** * @param {string} value * @return {!proto.identity.auth.OutboundKeyInfo} returns this */ proto.identity.auth.OutboundKeyInfo.prototype.setOneTimeNotifPrekey = function(value) { return jspb.Message.setField(this, 5, value); }; /** * Clears the field making it undefined. * @return {!proto.identity.auth.OutboundKeyInfo} returns this */ proto.identity.auth.OutboundKeyInfo.prototype.clearOneTimeNotifPrekey = function() { return jspb.Message.setField(this, 5, undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.identity.auth.OutboundKeyInfo.prototype.hasOneTimeNotifPrekey = function() { return jspb.Message.getField(this, 5) != null; }; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: * net/proto2/compiler/js/internal/generator.cc#kKeyword. * @param {boolean=} opt_includeInstance Deprecated. whether to include the * JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @return {!Object} */ proto.identity.auth.KeyserverKeysResponse.prototype.toObject = function(opt_includeInstance) { return proto.identity.auth.KeyserverKeysResponse.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.identity.auth.KeyserverKeysResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.identity.auth.KeyserverKeysResponse.toObject = function(includeInstance, msg) { var f, obj = { keyserverInfo: (f = msg.getKeyserverInfo()) && proto.identity.auth.OutboundKeyInfo.toObject(includeInstance, f) }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.identity.auth.KeyserverKeysResponse} */ proto.identity.auth.KeyserverKeysResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.identity.auth.KeyserverKeysResponse; return proto.identity.auth.KeyserverKeysResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.identity.auth.KeyserverKeysResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.identity.auth.KeyserverKeysResponse} */ proto.identity.auth.KeyserverKeysResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new proto.identity.auth.OutboundKeyInfo; reader.readMessage(value,proto.identity.auth.OutboundKeyInfo.deserializeBinaryFromReader); msg.setKeyserverInfo(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.identity.auth.KeyserverKeysResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.identity.auth.KeyserverKeysResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.identity.auth.KeyserverKeysResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.identity.auth.KeyserverKeysResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getKeyserverInfo(); if (f != null) { writer.writeMessage( 1, f, proto.identity.auth.OutboundKeyInfo.serializeBinaryToWriter ); } }; /** * optional OutboundKeyInfo keyserver_info = 1; * @return {?proto.identity.auth.OutboundKeyInfo} */ proto.identity.auth.KeyserverKeysResponse.prototype.getKeyserverInfo = function() { return /** @type{?proto.identity.auth.OutboundKeyInfo} */ ( jspb.Message.getWrapperField(this, proto.identity.auth.OutboundKeyInfo, 1)); }; /** * @param {?proto.identity.auth.OutboundKeyInfo|undefined} value * @return {!proto.identity.auth.KeyserverKeysResponse} returns this */ proto.identity.auth.KeyserverKeysResponse.prototype.setKeyserverInfo = function(value) { return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. * @return {!proto.identity.auth.KeyserverKeysResponse} returns this */ proto.identity.auth.KeyserverKeysResponse.prototype.clearKeyserverInfo = function() { return this.setKeyserverInfo(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.identity.auth.KeyserverKeysResponse.prototype.hasKeyserverInfo = function() { return jspb.Message.getField(this, 1) != null; }; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: * net/proto2/compiler/js/internal/generator.cc#kKeyword. * @param {boolean=} opt_includeInstance Deprecated. whether to include the * JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @return {!Object} */ proto.identity.auth.OutboundKeysForUserResponse.prototype.toObject = function(opt_includeInstance) { return proto.identity.auth.OutboundKeysForUserResponse.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.identity.auth.OutboundKeysForUserResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.identity.auth.OutboundKeysForUserResponse.toObject = function(includeInstance, msg) { var f, obj = { devicesMap: (f = msg.getDevicesMap()) ? f.toObject(includeInstance, proto.identity.auth.OutboundKeyInfo.toObject) : [] }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.identity.auth.OutboundKeysForUserResponse} */ proto.identity.auth.OutboundKeysForUserResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.identity.auth.OutboundKeysForUserResponse; return proto.identity.auth.OutboundKeysForUserResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.identity.auth.OutboundKeysForUserResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.identity.auth.OutboundKeysForUserResponse} */ proto.identity.auth.OutboundKeysForUserResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = msg.getDevicesMap(); reader.readMessage(value, function(message, reader) { jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.identity.auth.OutboundKeyInfo.deserializeBinaryFromReader, "", new proto.identity.auth.OutboundKeyInfo()); }); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.identity.auth.OutboundKeysForUserResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.identity.auth.OutboundKeysForUserResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.identity.auth.OutboundKeysForUserResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.identity.auth.OutboundKeysForUserResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getDevicesMap(true); if (f && f.getLength() > 0) { f.serializeBinary(1, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.identity.auth.OutboundKeyInfo.serializeBinaryToWriter); } }; /** * map devices = 1; * @param {boolean=} opt_noLazyCreate Do not create the map if * empty, instead returning `undefined` * @return {!jspb.Map} */ proto.identity.auth.OutboundKeysForUserResponse.prototype.getDevicesMap = function(opt_noLazyCreate) { return /** @type {!jspb.Map} */ ( jspb.Message.getMapField(this, 1, opt_noLazyCreate, proto.identity.auth.OutboundKeyInfo)); }; /** * Clears values from the map. The map will be non-null. * @return {!proto.identity.auth.OutboundKeysForUserResponse} returns this */ proto.identity.auth.OutboundKeysForUserResponse.prototype.clearDevicesMap = function() { this.getDevicesMap().clear(); return this; }; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: * net/proto2/compiler/js/internal/generator.cc#kKeyword. * @param {boolean=} opt_includeInstance Deprecated. whether to include the * JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @return {!Object} */ proto.identity.auth.OutboundKeysForUserRequest.prototype.toObject = function(opt_includeInstance) { return proto.identity.auth.OutboundKeysForUserRequest.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.identity.auth.OutboundKeysForUserRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.identity.auth.OutboundKeysForUserRequest.toObject = function(includeInstance, msg) { var f, obj = { userId: jspb.Message.getFieldWithDefault(msg, 1, "") }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.identity.auth.OutboundKeysForUserRequest} */ proto.identity.auth.OutboundKeysForUserRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.identity.auth.OutboundKeysForUserRequest; return proto.identity.auth.OutboundKeysForUserRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.identity.auth.OutboundKeysForUserRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.identity.auth.OutboundKeysForUserRequest} */ proto.identity.auth.OutboundKeysForUserRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); msg.setUserId(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.identity.auth.OutboundKeysForUserRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.identity.auth.OutboundKeysForUserRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.identity.auth.OutboundKeysForUserRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.identity.auth.OutboundKeysForUserRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getUserId(); if (f.length > 0) { writer.writeString( 1, f ); } }; /** * optional string user_id = 1; * @return {string} */ proto.identity.auth.OutboundKeysForUserRequest.prototype.getUserId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.identity.auth.OutboundKeysForUserRequest} returns this */ proto.identity.auth.OutboundKeysForUserRequest.prototype.setUserId = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: * net/proto2/compiler/js/internal/generator.cc#kKeyword. * @param {boolean=} opt_includeInstance Deprecated. whether to include the * JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @return {!Object} */ proto.identity.auth.InboundKeyInfo.prototype.toObject = function(opt_includeInstance) { return proto.identity.auth.InboundKeyInfo.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.identity.auth.InboundKeyInfo} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.identity.auth.InboundKeyInfo.toObject = function(includeInstance, msg) { var f, obj = { identityInfo: (f = msg.getIdentityInfo()) && identity_unauth_pb.IdentityKeyInfo.toObject(includeInstance, f), contentPrekey: (f = msg.getContentPrekey()) && identity_unauth_pb.Prekey.toObject(includeInstance, f), notifPrekey: (f = msg.getNotifPrekey()) && identity_unauth_pb.Prekey.toObject(includeInstance, f) }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.identity.auth.InboundKeyInfo} */ proto.identity.auth.InboundKeyInfo.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.identity.auth.InboundKeyInfo; return proto.identity.auth.InboundKeyInfo.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.identity.auth.InboundKeyInfo} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.identity.auth.InboundKeyInfo} */ proto.identity.auth.InboundKeyInfo.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new identity_unauth_pb.IdentityKeyInfo; reader.readMessage(value,identity_unauth_pb.IdentityKeyInfo.deserializeBinaryFromReader); msg.setIdentityInfo(value); break; case 2: var value = new identity_unauth_pb.Prekey; reader.readMessage(value,identity_unauth_pb.Prekey.deserializeBinaryFromReader); msg.setContentPrekey(value); break; case 3: var value = new identity_unauth_pb.Prekey; reader.readMessage(value,identity_unauth_pb.Prekey.deserializeBinaryFromReader); msg.setNotifPrekey(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.identity.auth.InboundKeyInfo.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.identity.auth.InboundKeyInfo.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.identity.auth.InboundKeyInfo} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.identity.auth.InboundKeyInfo.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getIdentityInfo(); if (f != null) { writer.writeMessage( 1, f, identity_unauth_pb.IdentityKeyInfo.serializeBinaryToWriter ); } f = message.getContentPrekey(); if (f != null) { writer.writeMessage( 2, f, identity_unauth_pb.Prekey.serializeBinaryToWriter ); } f = message.getNotifPrekey(); if (f != null) { writer.writeMessage( 3, f, identity_unauth_pb.Prekey.serializeBinaryToWriter ); } }; /** * optional identity.unauth.IdentityKeyInfo identity_info = 1; * @return {?proto.identity.unauth.IdentityKeyInfo} */ proto.identity.auth.InboundKeyInfo.prototype.getIdentityInfo = function() { return /** @type{?proto.identity.unauth.IdentityKeyInfo} */ ( jspb.Message.getWrapperField(this, identity_unauth_pb.IdentityKeyInfo, 1)); }; /** * @param {?proto.identity.unauth.IdentityKeyInfo|undefined} value * @return {!proto.identity.auth.InboundKeyInfo} returns this */ proto.identity.auth.InboundKeyInfo.prototype.setIdentityInfo = function(value) { return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. * @return {!proto.identity.auth.InboundKeyInfo} returns this */ proto.identity.auth.InboundKeyInfo.prototype.clearIdentityInfo = function() { return this.setIdentityInfo(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.identity.auth.InboundKeyInfo.prototype.hasIdentityInfo = function() { return jspb.Message.getField(this, 1) != null; }; /** * optional identity.unauth.Prekey content_prekey = 2; * @return {?proto.identity.unauth.Prekey} */ proto.identity.auth.InboundKeyInfo.prototype.getContentPrekey = function() { return /** @type{?proto.identity.unauth.Prekey} */ ( jspb.Message.getWrapperField(this, identity_unauth_pb.Prekey, 2)); }; /** * @param {?proto.identity.unauth.Prekey|undefined} value * @return {!proto.identity.auth.InboundKeyInfo} returns this */ proto.identity.auth.InboundKeyInfo.prototype.setContentPrekey = function(value) { return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. * @return {!proto.identity.auth.InboundKeyInfo} returns this */ proto.identity.auth.InboundKeyInfo.prototype.clearContentPrekey = function() { return this.setContentPrekey(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.identity.auth.InboundKeyInfo.prototype.hasContentPrekey = function() { return jspb.Message.getField(this, 2) != null; }; /** * optional identity.unauth.Prekey notif_prekey = 3; * @return {?proto.identity.unauth.Prekey} */ proto.identity.auth.InboundKeyInfo.prototype.getNotifPrekey = function() { return /** @type{?proto.identity.unauth.Prekey} */ ( jspb.Message.getWrapperField(this, identity_unauth_pb.Prekey, 3)); }; /** * @param {?proto.identity.unauth.Prekey|undefined} value * @return {!proto.identity.auth.InboundKeyInfo} returns this */ proto.identity.auth.InboundKeyInfo.prototype.setNotifPrekey = function(value) { return jspb.Message.setWrapperField(this, 3, value); }; /** * Clears the message field making it undefined. * @return {!proto.identity.auth.InboundKeyInfo} returns this */ proto.identity.auth.InboundKeyInfo.prototype.clearNotifPrekey = function() { return this.setNotifPrekey(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.identity.auth.InboundKeyInfo.prototype.hasNotifPrekey = function() { return jspb.Message.getField(this, 3) != null; }; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: * net/proto2/compiler/js/internal/generator.cc#kKeyword. * @param {boolean=} opt_includeInstance Deprecated. whether to include the * JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @return {!Object} */ proto.identity.auth.InboundKeysForUserResponse.prototype.toObject = function(opt_includeInstance) { return proto.identity.auth.InboundKeysForUserResponse.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.identity.auth.InboundKeysForUserResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.identity.auth.InboundKeysForUserResponse.toObject = function(includeInstance, msg) { var f, obj = { - devicesMap: (f = msg.getDevicesMap()) ? f.toObject(includeInstance, proto.identity.auth.InboundKeyInfo.toObject) : [] + devicesMap: (f = msg.getDevicesMap()) ? f.toObject(includeInstance, proto.identity.auth.InboundKeyInfo.toObject) : [], + identity: (f = msg.getIdentity()) && proto.identity.auth.Identity.toObject(includeInstance, f) }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.identity.auth.InboundKeysForUserResponse} */ proto.identity.auth.InboundKeysForUserResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.identity.auth.InboundKeysForUserResponse; return proto.identity.auth.InboundKeysForUserResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.identity.auth.InboundKeysForUserResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.identity.auth.InboundKeysForUserResponse} */ proto.identity.auth.InboundKeysForUserResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = msg.getDevicesMap(); reader.readMessage(value, function(message, reader) { jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.identity.auth.InboundKeyInfo.deserializeBinaryFromReader, "", new proto.identity.auth.InboundKeyInfo()); }); break; + case 2: + var value = new proto.identity.auth.Identity; + reader.readMessage(value,proto.identity.auth.Identity.deserializeBinaryFromReader); + msg.setIdentity(value); + break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.identity.auth.InboundKeysForUserResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.identity.auth.InboundKeysForUserResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.identity.auth.InboundKeysForUserResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.identity.auth.InboundKeysForUserResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getDevicesMap(true); if (f && f.getLength() > 0) { f.serializeBinary(1, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.identity.auth.InboundKeyInfo.serializeBinaryToWriter); } + f = message.getIdentity(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.identity.auth.Identity.serializeBinaryToWriter + ); + } }; /** * map devices = 1; * @param {boolean=} opt_noLazyCreate Do not create the map if * empty, instead returning `undefined` * @return {!jspb.Map} */ proto.identity.auth.InboundKeysForUserResponse.prototype.getDevicesMap = function(opt_noLazyCreate) { return /** @type {!jspb.Map} */ ( jspb.Message.getMapField(this, 1, opt_noLazyCreate, proto.identity.auth.InboundKeyInfo)); }; /** * Clears values from the map. The map will be non-null. * @return {!proto.identity.auth.InboundKeysForUserResponse} returns this */ proto.identity.auth.InboundKeysForUserResponse.prototype.clearDevicesMap = function() { this.getDevicesMap().clear(); return this; }; +/** + * optional Identity identity = 2; + * @return {?proto.identity.auth.Identity} + */ +proto.identity.auth.InboundKeysForUserResponse.prototype.getIdentity = function() { + return /** @type{?proto.identity.auth.Identity} */ ( + jspb.Message.getWrapperField(this, proto.identity.auth.Identity, 2)); +}; + + +/** + * @param {?proto.identity.auth.Identity|undefined} value + * @return {!proto.identity.auth.InboundKeysForUserResponse} returns this +*/ +proto.identity.auth.InboundKeysForUserResponse.prototype.setIdentity = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.identity.auth.InboundKeysForUserResponse} returns this + */ +proto.identity.auth.InboundKeysForUserResponse.prototype.clearIdentity = function() { + return this.setIdentity(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.identity.auth.InboundKeysForUserResponse.prototype.hasIdentity = function() { + return jspb.Message.getField(this, 2) != null; +}; + + if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: * net/proto2/compiler/js/internal/generator.cc#kKeyword. * @param {boolean=} opt_includeInstance Deprecated. whether to include the * JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @return {!Object} */ proto.identity.auth.InboundKeysForUserRequest.prototype.toObject = function(opt_includeInstance) { return proto.identity.auth.InboundKeysForUserRequest.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.identity.auth.InboundKeysForUserRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.identity.auth.InboundKeysForUserRequest.toObject = function(includeInstance, msg) { var f, obj = { userId: jspb.Message.getFieldWithDefault(msg, 1, "") }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.identity.auth.InboundKeysForUserRequest} */ proto.identity.auth.InboundKeysForUserRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.identity.auth.InboundKeysForUserRequest; return proto.identity.auth.InboundKeysForUserRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.identity.auth.InboundKeysForUserRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.identity.auth.InboundKeysForUserRequest} */ proto.identity.auth.InboundKeysForUserRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); msg.setUserId(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.identity.auth.InboundKeysForUserRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.identity.auth.InboundKeysForUserRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.identity.auth.InboundKeysForUserRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.identity.auth.InboundKeysForUserRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getUserId(); if (f.length > 0) { writer.writeString( 1, f ); } }; /** * optional string user_id = 1; * @return {string} */ proto.identity.auth.InboundKeysForUserRequest.prototype.getUserId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.identity.auth.InboundKeysForUserRequest} returns this */ proto.identity.auth.InboundKeysForUserRequest.prototype.setUserId = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * Oneof group definitions for this message. Each group defines the field * numbers belonging to that group. When of these fields' value is set, all * other fields in the group are cleared. During deserialization, if multiple * fields are encountered for a group, only the last value seen will be kept. * @private {!Array>} * @const */ proto.identity.auth.FindUserIDRequest.oneofGroups_ = [[1,2]]; /** * @enum {number} */ proto.identity.auth.FindUserIDRequest.IdentifierCase = { IDENTIFIER_NOT_SET: 0, USERNAME: 1, WALLET_ADDRESS: 2 }; /** * @return {proto.identity.auth.FindUserIDRequest.IdentifierCase} */ proto.identity.auth.FindUserIDRequest.prototype.getIdentifierCase = function() { return /** @type {proto.identity.auth.FindUserIDRequest.IdentifierCase} */(jspb.Message.computeOneofCase(this, proto.identity.auth.FindUserIDRequest.oneofGroups_[0])); }; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: * net/proto2/compiler/js/internal/generator.cc#kKeyword. * @param {boolean=} opt_includeInstance Deprecated. whether to include the * JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @return {!Object} */ proto.identity.auth.FindUserIDRequest.prototype.toObject = function(opt_includeInstance) { return proto.identity.auth.FindUserIDRequest.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.identity.auth.FindUserIDRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.identity.auth.FindUserIDRequest.toObject = function(includeInstance, msg) { var f, obj = { username: jspb.Message.getFieldWithDefault(msg, 1, ""), walletAddress: jspb.Message.getFieldWithDefault(msg, 2, "") }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.identity.auth.FindUserIDRequest} */ proto.identity.auth.FindUserIDRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.identity.auth.FindUserIDRequest; return proto.identity.auth.FindUserIDRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.identity.auth.FindUserIDRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.identity.auth.FindUserIDRequest} */ proto.identity.auth.FindUserIDRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); msg.setUsername(value); break; case 2: var value = /** @type {string} */ (reader.readString()); msg.setWalletAddress(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.identity.auth.FindUserIDRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.identity.auth.FindUserIDRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.identity.auth.FindUserIDRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.identity.auth.FindUserIDRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = /** @type {string} */ (jspb.Message.getField(message, 1)); if (f != null) { writer.writeString( 1, f ); } f = /** @type {string} */ (jspb.Message.getField(message, 2)); if (f != null) { writer.writeString( 2, f ); } }; /** * optional string username = 1; * @return {string} */ proto.identity.auth.FindUserIDRequest.prototype.getUsername = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.identity.auth.FindUserIDRequest} returns this */ proto.identity.auth.FindUserIDRequest.prototype.setUsername = function(value) { return jspb.Message.setOneofField(this, 1, proto.identity.auth.FindUserIDRequest.oneofGroups_[0], value); }; /** * Clears the field making it undefined. * @return {!proto.identity.auth.FindUserIDRequest} returns this */ proto.identity.auth.FindUserIDRequest.prototype.clearUsername = function() { return jspb.Message.setOneofField(this, 1, proto.identity.auth.FindUserIDRequest.oneofGroups_[0], undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.identity.auth.FindUserIDRequest.prototype.hasUsername = function() { return jspb.Message.getField(this, 1) != null; }; /** * optional string wallet_address = 2; * @return {string} */ proto.identity.auth.FindUserIDRequest.prototype.getWalletAddress = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value * @return {!proto.identity.auth.FindUserIDRequest} returns this */ proto.identity.auth.FindUserIDRequest.prototype.setWalletAddress = function(value) { return jspb.Message.setOneofField(this, 2, proto.identity.auth.FindUserIDRequest.oneofGroups_[0], value); }; /** * Clears the field making it undefined. * @return {!proto.identity.auth.FindUserIDRequest} returns this */ proto.identity.auth.FindUserIDRequest.prototype.clearWalletAddress = function() { return jspb.Message.setOneofField(this, 2, proto.identity.auth.FindUserIDRequest.oneofGroups_[0], undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.identity.auth.FindUserIDRequest.prototype.hasWalletAddress = function() { return jspb.Message.getField(this, 2) != null; }; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: * net/proto2/compiler/js/internal/generator.cc#kKeyword. * @param {boolean=} opt_includeInstance Deprecated. whether to include the * JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @return {!Object} */ proto.identity.auth.FindUserIDResponse.prototype.toObject = function(opt_includeInstance) { return proto.identity.auth.FindUserIDResponse.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.identity.auth.FindUserIDResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.identity.auth.FindUserIDResponse.toObject = function(includeInstance, msg) { var f, obj = { userId: jspb.Message.getFieldWithDefault(msg, 1, ""), isReserved: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.identity.auth.FindUserIDResponse} */ proto.identity.auth.FindUserIDResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.identity.auth.FindUserIDResponse; return proto.identity.auth.FindUserIDResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.identity.auth.FindUserIDResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.identity.auth.FindUserIDResponse} */ proto.identity.auth.FindUserIDResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); msg.setUserId(value); break; case 2: var value = /** @type {boolean} */ (reader.readBool()); msg.setIsReserved(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.identity.auth.FindUserIDResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.identity.auth.FindUserIDResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.identity.auth.FindUserIDResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.identity.auth.FindUserIDResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = /** @type {string} */ (jspb.Message.getField(message, 1)); if (f != null) { writer.writeString( 1, f ); } f = message.getIsReserved(); if (f) { writer.writeBool( 2, f ); } }; /** * optional string user_id = 1; * @return {string} */ proto.identity.auth.FindUserIDResponse.prototype.getUserId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.identity.auth.FindUserIDResponse} returns this */ proto.identity.auth.FindUserIDResponse.prototype.setUserId = function(value) { return jspb.Message.setField(this, 1, value); }; /** * Clears the field making it undefined. * @return {!proto.identity.auth.FindUserIDResponse} returns this */ proto.identity.auth.FindUserIDResponse.prototype.clearUserId = function() { return jspb.Message.setField(this, 1, undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.identity.auth.FindUserIDResponse.prototype.hasUserId = function() { return jspb.Message.getField(this, 1) != null; }; /** * optional bool is_reserved = 2; * @return {boolean} */ proto.identity.auth.FindUserIDResponse.prototype.getIsReserved = function() { return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); }; /** * @param {boolean} value * @return {!proto.identity.auth.FindUserIDResponse} returns this */ proto.identity.auth.FindUserIDResponse.prototype.setIsReserved = function(value) { return jspb.Message.setProto3BooleanField(this, 2, value); }; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: * net/proto2/compiler/js/internal/generator.cc#kKeyword. * @param {boolean=} opt_includeInstance Deprecated. whether to include the * JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @return {!Object} */ proto.identity.auth.UpdateUserPasswordStartRequest.prototype.toObject = function(opt_includeInstance) { return proto.identity.auth.UpdateUserPasswordStartRequest.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.identity.auth.UpdateUserPasswordStartRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.identity.auth.UpdateUserPasswordStartRequest.toObject = function(includeInstance, msg) { var f, obj = { opaqueRegistrationRequest: msg.getOpaqueRegistrationRequest_asB64() }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.identity.auth.UpdateUserPasswordStartRequest} */ proto.identity.auth.UpdateUserPasswordStartRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.identity.auth.UpdateUserPasswordStartRequest; return proto.identity.auth.UpdateUserPasswordStartRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.identity.auth.UpdateUserPasswordStartRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.identity.auth.UpdateUserPasswordStartRequest} */ proto.identity.auth.UpdateUserPasswordStartRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setOpaqueRegistrationRequest(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.identity.auth.UpdateUserPasswordStartRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.identity.auth.UpdateUserPasswordStartRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.identity.auth.UpdateUserPasswordStartRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.identity.auth.UpdateUserPasswordStartRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getOpaqueRegistrationRequest_asU8(); if (f.length > 0) { writer.writeBytes( 1, f ); } }; /** * optional bytes opaque_registration_request = 1; * @return {string} */ proto.identity.auth.UpdateUserPasswordStartRequest.prototype.getOpaqueRegistrationRequest = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * optional bytes opaque_registration_request = 1; * This is a type-conversion wrapper around `getOpaqueRegistrationRequest()` * @return {string} */ proto.identity.auth.UpdateUserPasswordStartRequest.prototype.getOpaqueRegistrationRequest_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getOpaqueRegistrationRequest())); }; /** * optional bytes opaque_registration_request = 1; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getOpaqueRegistrationRequest()` * @return {!Uint8Array} */ proto.identity.auth.UpdateUserPasswordStartRequest.prototype.getOpaqueRegistrationRequest_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getOpaqueRegistrationRequest())); }; /** * @param {!(string|Uint8Array)} value * @return {!proto.identity.auth.UpdateUserPasswordStartRequest} returns this */ proto.identity.auth.UpdateUserPasswordStartRequest.prototype.setOpaqueRegistrationRequest = function(value) { return jspb.Message.setProto3BytesField(this, 1, value); }; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: * net/proto2/compiler/js/internal/generator.cc#kKeyword. * @param {boolean=} opt_includeInstance Deprecated. whether to include the * JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @return {!Object} */ proto.identity.auth.UpdateUserPasswordFinishRequest.prototype.toObject = function(opt_includeInstance) { return proto.identity.auth.UpdateUserPasswordFinishRequest.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.identity.auth.UpdateUserPasswordFinishRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.identity.auth.UpdateUserPasswordFinishRequest.toObject = function(includeInstance, msg) { var f, obj = { sessionId: jspb.Message.getFieldWithDefault(msg, 1, ""), opaqueRegistrationUpload: msg.getOpaqueRegistrationUpload_asB64() }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.identity.auth.UpdateUserPasswordFinishRequest} */ proto.identity.auth.UpdateUserPasswordFinishRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.identity.auth.UpdateUserPasswordFinishRequest; return proto.identity.auth.UpdateUserPasswordFinishRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.identity.auth.UpdateUserPasswordFinishRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.identity.auth.UpdateUserPasswordFinishRequest} */ proto.identity.auth.UpdateUserPasswordFinishRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); msg.setSessionId(value); break; case 2: var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setOpaqueRegistrationUpload(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.identity.auth.UpdateUserPasswordFinishRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.identity.auth.UpdateUserPasswordFinishRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.identity.auth.UpdateUserPasswordFinishRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.identity.auth.UpdateUserPasswordFinishRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getSessionId(); if (f.length > 0) { writer.writeString( 1, f ); } f = message.getOpaqueRegistrationUpload_asU8(); if (f.length > 0) { writer.writeBytes( 2, f ); } }; /** * optional string session_id = 1; * @return {string} */ proto.identity.auth.UpdateUserPasswordFinishRequest.prototype.getSessionId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.identity.auth.UpdateUserPasswordFinishRequest} returns this */ proto.identity.auth.UpdateUserPasswordFinishRequest.prototype.setSessionId = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * optional bytes opaque_registration_upload = 2; * @return {string} */ proto.identity.auth.UpdateUserPasswordFinishRequest.prototype.getOpaqueRegistrationUpload = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * optional bytes opaque_registration_upload = 2; * This is a type-conversion wrapper around `getOpaqueRegistrationUpload()` * @return {string} */ proto.identity.auth.UpdateUserPasswordFinishRequest.prototype.getOpaqueRegistrationUpload_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getOpaqueRegistrationUpload())); }; /** * optional bytes opaque_registration_upload = 2; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getOpaqueRegistrationUpload()` * @return {!Uint8Array} */ proto.identity.auth.UpdateUserPasswordFinishRequest.prototype.getOpaqueRegistrationUpload_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getOpaqueRegistrationUpload())); }; /** * @param {!(string|Uint8Array)} value * @return {!proto.identity.auth.UpdateUserPasswordFinishRequest} returns this */ proto.identity.auth.UpdateUserPasswordFinishRequest.prototype.setOpaqueRegistrationUpload = function(value) { return jspb.Message.setProto3BytesField(this, 2, value); }; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: * net/proto2/compiler/js/internal/generator.cc#kKeyword. * @param {boolean=} opt_includeInstance Deprecated. whether to include the * JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @return {!Object} */ proto.identity.auth.UpdateUserPasswordStartResponse.prototype.toObject = function(opt_includeInstance) { return proto.identity.auth.UpdateUserPasswordStartResponse.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.identity.auth.UpdateUserPasswordStartResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.identity.auth.UpdateUserPasswordStartResponse.toObject = function(includeInstance, msg) { var f, obj = { sessionId: jspb.Message.getFieldWithDefault(msg, 1, ""), opaqueRegistrationResponse: msg.getOpaqueRegistrationResponse_asB64() }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.identity.auth.UpdateUserPasswordStartResponse} */ proto.identity.auth.UpdateUserPasswordStartResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.identity.auth.UpdateUserPasswordStartResponse; return proto.identity.auth.UpdateUserPasswordStartResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.identity.auth.UpdateUserPasswordStartResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.identity.auth.UpdateUserPasswordStartResponse} */ proto.identity.auth.UpdateUserPasswordStartResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); msg.setSessionId(value); break; case 2: var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setOpaqueRegistrationResponse(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.identity.auth.UpdateUserPasswordStartResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.identity.auth.UpdateUserPasswordStartResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.identity.auth.UpdateUserPasswordStartResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.identity.auth.UpdateUserPasswordStartResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getSessionId(); if (f.length > 0) { writer.writeString( 1, f ); } f = message.getOpaqueRegistrationResponse_asU8(); if (f.length > 0) { writer.writeBytes( 2, f ); } }; /** * optional string session_id = 1; * @return {string} */ proto.identity.auth.UpdateUserPasswordStartResponse.prototype.getSessionId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.identity.auth.UpdateUserPasswordStartResponse} returns this */ proto.identity.auth.UpdateUserPasswordStartResponse.prototype.setSessionId = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * optional bytes opaque_registration_response = 2; * @return {string} */ proto.identity.auth.UpdateUserPasswordStartResponse.prototype.getOpaqueRegistrationResponse = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * optional bytes opaque_registration_response = 2; * This is a type-conversion wrapper around `getOpaqueRegistrationResponse()` * @return {string} */ proto.identity.auth.UpdateUserPasswordStartResponse.prototype.getOpaqueRegistrationResponse_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getOpaqueRegistrationResponse())); }; /** * optional bytes opaque_registration_response = 2; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getOpaqueRegistrationResponse()` * @return {!Uint8Array} */ proto.identity.auth.UpdateUserPasswordStartResponse.prototype.getOpaqueRegistrationResponse_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getOpaqueRegistrationResponse())); }; /** * @param {!(string|Uint8Array)} value * @return {!proto.identity.auth.UpdateUserPasswordStartResponse} returns this */ proto.identity.auth.UpdateUserPasswordStartResponse.prototype.setOpaqueRegistrationResponse = function(value) { return jspb.Message.setProto3BytesField(this, 2, value); }; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: * net/proto2/compiler/js/internal/generator.cc#kKeyword. * @param {boolean=} opt_includeInstance Deprecated. whether to include the * JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @return {!Object} */ proto.identity.auth.GetDeviceListRequest.prototype.toObject = function(opt_includeInstance) { return proto.identity.auth.GetDeviceListRequest.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.identity.auth.GetDeviceListRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.identity.auth.GetDeviceListRequest.toObject = function(includeInstance, msg) { var f, obj = { userId: jspb.Message.getFieldWithDefault(msg, 1, ""), sinceTimestamp: jspb.Message.getFieldWithDefault(msg, 2, 0) }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.identity.auth.GetDeviceListRequest} */ proto.identity.auth.GetDeviceListRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.identity.auth.GetDeviceListRequest; return proto.identity.auth.GetDeviceListRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.identity.auth.GetDeviceListRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.identity.auth.GetDeviceListRequest} */ proto.identity.auth.GetDeviceListRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); msg.setUserId(value); break; case 2: var value = /** @type {number} */ (reader.readInt64()); msg.setSinceTimestamp(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.identity.auth.GetDeviceListRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.identity.auth.GetDeviceListRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.identity.auth.GetDeviceListRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.identity.auth.GetDeviceListRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getUserId(); if (f.length > 0) { writer.writeString( 1, f ); } f = /** @type {number} */ (jspb.Message.getField(message, 2)); if (f != null) { writer.writeInt64( 2, f ); } }; /** * optional string user_id = 1; * @return {string} */ proto.identity.auth.GetDeviceListRequest.prototype.getUserId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.identity.auth.GetDeviceListRequest} returns this */ proto.identity.auth.GetDeviceListRequest.prototype.setUserId = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * optional int64 since_timestamp = 2; * @return {number} */ proto.identity.auth.GetDeviceListRequest.prototype.getSinceTimestamp = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** * @param {number} value * @return {!proto.identity.auth.GetDeviceListRequest} returns this */ proto.identity.auth.GetDeviceListRequest.prototype.setSinceTimestamp = function(value) { return jspb.Message.setField(this, 2, value); }; /** * Clears the field making it undefined. * @return {!proto.identity.auth.GetDeviceListRequest} returns this */ proto.identity.auth.GetDeviceListRequest.prototype.clearSinceTimestamp = function() { return jspb.Message.setField(this, 2, undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.identity.auth.GetDeviceListRequest.prototype.hasSinceTimestamp = function() { return jspb.Message.getField(this, 2) != null; }; /** * List of repeated fields within this message type. * @private {!Array} * @const */ proto.identity.auth.GetDeviceListResponse.repeatedFields_ = [1]; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: * net/proto2/compiler/js/internal/generator.cc#kKeyword. * @param {boolean=} opt_includeInstance Deprecated. whether to include the * JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @return {!Object} */ proto.identity.auth.GetDeviceListResponse.prototype.toObject = function(opt_includeInstance) { return proto.identity.auth.GetDeviceListResponse.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.identity.auth.GetDeviceListResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.identity.auth.GetDeviceListResponse.toObject = function(includeInstance, msg) { var f, obj = { deviceListUpdatesList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.identity.auth.GetDeviceListResponse} */ proto.identity.auth.GetDeviceListResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.identity.auth.GetDeviceListResponse; return proto.identity.auth.GetDeviceListResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.identity.auth.GetDeviceListResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.identity.auth.GetDeviceListResponse} */ proto.identity.auth.GetDeviceListResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); msg.addDeviceListUpdates(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.identity.auth.GetDeviceListResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.identity.auth.GetDeviceListResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.identity.auth.GetDeviceListResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.identity.auth.GetDeviceListResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getDeviceListUpdatesList(); if (f.length > 0) { writer.writeRepeatedString( 1, f ); } }; /** * repeated string device_list_updates = 1; * @return {!Array} */ proto.identity.auth.GetDeviceListResponse.prototype.getDeviceListUpdatesList = function() { return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); }; /** * @param {!Array} value * @return {!proto.identity.auth.GetDeviceListResponse} returns this */ proto.identity.auth.GetDeviceListResponse.prototype.setDeviceListUpdatesList = function(value) { return jspb.Message.setField(this, 1, value || []); }; /** * @param {string} value * @param {number=} opt_index * @return {!proto.identity.auth.GetDeviceListResponse} returns this */ proto.identity.auth.GetDeviceListResponse.prototype.addDeviceListUpdates = function(value, opt_index) { return jspb.Message.addToRepeatedField(this, 1, value, opt_index); }; /** * Clears the list making it empty but non-null. * @return {!proto.identity.auth.GetDeviceListResponse} returns this */ proto.identity.auth.GetDeviceListResponse.prototype.clearDeviceListUpdatesList = function() { return this.setDeviceListUpdatesList([]); }; goog.object.extend(exports, proto.identity.auth); diff --git a/web/protobufs/identity-auth-structs.cjs.flow b/web/protobufs/identity-auth-structs.cjs.flow index 2bf1b1630..4562b216d 100644 --- a/web/protobufs/identity-auth-structs.cjs.flow +++ b/web/protobufs/identity-auth-structs.cjs.flow @@ -1,363 +1,414 @@ // @flow import { Message, BinaryWriter, BinaryReader, Map as ProtoMap, } from 'google-protobuf'; import * as identityStructs from './identity-unauth-structs.cjs'; +declare export class EthereumIdentity extends Message { + getWalletAddress(): string; + setWalletAddress(value: string): EthereumIdentity; + + getSocialProof(): string; + setSocialProof(value: string): EthereumIdentity; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): EthereumIdentityObject; + static toObject(includeInstance: boolean, msg: EthereumIdentity): EthereumIdentityObject; + static serializeBinaryToWriter(message: EthereumIdentity, writer: BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): EthereumIdentity; + static deserializeBinaryFromReader(message: EthereumIdentity, reader: BinaryReader): EthereumIdentity; +} + +export type EthereumIdentityObject = { + walletAddress: string, + socialProof: string, +} + +export type IdentityInfoCase = 0 | 1 | 2; + +declare export class Identity extends Message { + getUsername(): string; + setUsername(value: string): Identity; + + getEthIdentity(): EthereumIdentity | void; + setEthIdentity(value?: EthereumIdentity): Identity; + hasEthIdentity(): boolean; + clearEthIdentity(): Identity; + + getIdentityInfoCase(): IdentityInfoCase; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): IdentityObject; + static toObject(includeInstance: boolean, msg: Identity): IdentityObject; + static serializeBinaryToWriter(message: Identity, writer: BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Identity; + static deserializeBinaryFromReader(message: Identity, reader: BinaryReader): Identity; +} + +export type IdentityObject = { + username: string, + ethIdentity: ?EthereumIdentityObject, +} + declare export class UploadOneTimeKeysRequest extends Message { getContentOneTimePrekeysList(): Array; setContentOneTimePrekeysList(value: Array): UploadOneTimeKeysRequest; clearContentOneTimePrekeysList(): UploadOneTimeKeysRequest; addContentOneTimePrekeys(value: string, index?: number): UploadOneTimeKeysRequest; getNotifOneTimePrekeysList(): Array; setNotifOneTimePrekeysList(value: Array): UploadOneTimeKeysRequest; clearNotifOneTimePrekeysList(): UploadOneTimeKeysRequest; addNotifOneTimePrekeys(value: string, index?: number): UploadOneTimeKeysRequest; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): UploadOneTimeKeysRequestObject; static toObject(includeInstance: boolean, msg: UploadOneTimeKeysRequest): UploadOneTimeKeysRequestObject; static serializeBinaryToWriter(message: UploadOneTimeKeysRequest, writer: BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): UploadOneTimeKeysRequest; static deserializeBinaryFromReader(message: UploadOneTimeKeysRequest, reader: BinaryReader): UploadOneTimeKeysRequest; } export type UploadOneTimeKeysRequestObject = { contentOneTimePrekeysList: Array, notifOneTimePrekeysList: Array, }; declare export class RefreshUserPrekeysRequest extends Message { getNewContentPrekeys(): identityStructs.Prekey | void; setNewContentPrekeys(value?: identityStructs.Prekey): RefreshUserPrekeysRequest; hasNewContentPrekeys(): boolean; clearNewContentPrekeys(): RefreshUserPrekeysRequest; getNewNotifPrekeys(): identityStructs.Prekey | void; setNewNotifPrekeys(value?: identityStructs.Prekey): RefreshUserPrekeysRequest; hasNewNotifPrekeys(): boolean; clearNewNotifPrekeys(): RefreshUserPrekeysRequest; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): RefreshUserPrekeysRequestObject; static toObject(includeInstance: boolean, msg: RefreshUserPrekeysRequest): RefreshUserPrekeysRequestObject; static serializeBinaryToWriter(message: RefreshUserPrekeysRequest, writer: BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): RefreshUserPrekeysRequest; static deserializeBinaryFromReader(message: RefreshUserPrekeysRequest, reader: BinaryReader): RefreshUserPrekeysRequest; } export type RefreshUserPrekeysRequestObject = { newContentPrekeys?: identityStructs.PrekeyObject, newNotifPrekeys?: identityStructs.PrekeyObject, } declare export class OutboundKeyInfo extends Message { getIdentityInfo(): identityStructs.IdentityKeyInfo | void; setIdentityInfo(value?: identityStructs.IdentityKeyInfo): OutboundKeyInfo; hasIdentityInfo(): boolean; clearIdentityInfo(): OutboundKeyInfo; getContentPrekey(): identityStructs.Prekey | void; setContentPrekey(value?: identityStructs.Prekey): OutboundKeyInfo; hasContentPrekey(): boolean; clearContentPrekey(): OutboundKeyInfo; getNotifPrekey(): identityStructs.Prekey | void; setNotifPrekey(value?: identityStructs.Prekey): OutboundKeyInfo; hasNotifPrekey(): boolean; clearNotifPrekey(): OutboundKeyInfo; getOneTimeContentPrekey(): string; setOneTimeContentPrekey(value: string): OutboundKeyInfo; hasOneTimeContentPrekey(): boolean; clearOneTimeContentPrekey(): OutboundKeyInfo; getOneTimeNotifPrekey(): string; setOneTimeNotifPrekey(value: string): OutboundKeyInfo; hasOneTimeNotifPrekey(): boolean; clearOneTimeNotifPrekey(): OutboundKeyInfo; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): OutboundKeyInfoObject; static toObject(includeInstance: boolean, msg: OutboundKeyInfo): OutboundKeyInfoObject; static serializeBinaryToWriter(message: OutboundKeyInfo, writer: BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): OutboundKeyInfo; static deserializeBinaryFromReader(message: OutboundKeyInfo, reader: BinaryReader): OutboundKeyInfo; } export type OutboundKeyInfoObject = { identityInfo?: identityStructs.IdentityKeyInfoObject, contentPrekey?: identityStructs.PrekeyObject, notifPrekey?: identityStructs.PrekeyObject, oneTimeContentPrekey?: string, oneTimeNotifPrekey?: string, }; declare export class KeyserverKeysResponse extends Message { getKeyserverInfo(): OutboundKeyInfo | void; setKeyserverInfo(value?: OutboundKeyInfo): KeyserverKeysResponse; hasKeyserverInfo(): boolean; clearKeyserverInfo(): KeyserverKeysResponse; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): KeyserverKeysResponseObject; static toObject(includeInstance: boolean, msg: KeyserverKeysResponse): KeyserverKeysResponseObject; static serializeBinaryToWriter(message: KeyserverKeysResponse, writer: BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): KeyserverKeysResponse; static deserializeBinaryFromReader(message: KeyserverKeysResponse, reader: BinaryReader): KeyserverKeysResponse; } export type KeyserverKeysResponseObject = { keyserverInfo?: OutboundKeyInfoObject, }; declare export class OutboundKeysForUserResponse extends Message { getDevicesMap(): ProtoMap; clearDevicesMap(): OutboundKeysForUserResponse; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): OutboundKeysForUserResponseObject; static toObject(includeInstance: boolean, msg: OutboundKeysForUserResponse): OutboundKeysForUserResponseObject; static serializeBinaryToWriter(message: OutboundKeysForUserResponse, writer: BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): OutboundKeysForUserResponse; static deserializeBinaryFromReader(message: OutboundKeysForUserResponse, reader: BinaryReader): OutboundKeysForUserResponse; } export type OutboundKeysForUserResponseObject = { devicesMap: Array<[string, OutboundKeyInfoObject]>, }; declare export class OutboundKeysForUserRequest extends Message { getUserId(): string; setUserId(value: string): OutboundKeysForUserRequest; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): OutboundKeysForUserRequestObject; static toObject(includeInstance: boolean, msg: OutboundKeysForUserRequest): OutboundKeysForUserRequestObject; static serializeBinaryToWriter(message: OutboundKeysForUserRequest, writer: BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): OutboundKeysForUserRequest; static deserializeBinaryFromReader(message: OutboundKeysForUserRequest, reader: BinaryReader): OutboundKeysForUserRequest; } export type OutboundKeysForUserRequestObject = { userId: string, }; declare export class InboundKeyInfo extends Message { getIdentityInfo(): identityStructs.IdentityKeyInfo | void; setIdentityInfo(value?: identityStructs.IdentityKeyInfo): InboundKeyInfo; hasIdentityInfo(): boolean; clearIdentityInfo(): InboundKeyInfo; getContentPrekey(): identityStructs.Prekey | void; setContentPrekey(value?: identityStructs.Prekey): InboundKeyInfo; hasContentPrekey(): boolean; clearContentPrekey(): InboundKeyInfo; getNotifPrekey(): identityStructs.Prekey | void; setNotifPrekey(value?: identityStructs.Prekey): InboundKeyInfo; hasNotifPrekey(): boolean; clearNotifPrekey(): InboundKeyInfo; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): InboundKeyInfoObject; static toObject(includeInstance: boolean, msg: InboundKeyInfo): InboundKeyInfoObject; static serializeBinaryToWriter(message: InboundKeyInfo, writer: BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): InboundKeyInfo; static deserializeBinaryFromReader(message: InboundKeyInfo, reader: BinaryReader): InboundKeyInfo; } export type InboundKeyInfoObject = { identityInfo?: identityStructs.IdentityKeyInfoObject, contentPrekey?: identityStructs.PrekeyObject, notifPrekey?: identityStructs.PrekeyObject, }; declare export class InboundKeysForUserResponse extends Message { getDevicesMap(): ProtoMap; clearDevicesMap(): InboundKeysForUserResponse; + getIdentity(): Identity | void; + setIdentity(value?: Identity): InboundKeysForUserResponse; + hasIdentity(): boolean; + clearIdentity(): InboundKeysForUserResponse; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): InboundKeysForUserResponseObject; static toObject(includeInstance: boolean, msg: InboundKeysForUserResponse): InboundKeysForUserResponseObject; static serializeBinaryToWriter(message: InboundKeysForUserResponse, writer: BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): InboundKeysForUserResponse; static deserializeBinaryFromReader(message: InboundKeysForUserResponse, reader: BinaryReader): InboundKeysForUserResponse; } export type InboundKeysForUserResponseObject = { devicesMap: Array<[string, InboundKeyInfoObject]>, + identity: ?IdentityObject, } declare export class InboundKeysForUserRequest extends Message { getUserId(): string; setUserId(value: string): InboundKeysForUserRequest; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): InboundKeysForUserRequestObject; static toObject(includeInstance: boolean, msg: InboundKeysForUserRequest): InboundKeysForUserRequestObject; static serializeBinaryToWriter(message: InboundKeysForUserRequest, writer: BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): InboundKeysForUserRequest; static deserializeBinaryFromReader(message: InboundKeysForUserRequest, reader: BinaryReader): InboundKeysForUserRequest; } export type InboundKeysForUserRequestObject = { userId: string, }; export type IdentifierCase = 0 | 1 | 2; declare export class FindUserIDRequest extends Message { getUsername(): string; setUsername(value: string): FindUserIDRequest; getWalletAddress(): string; setWalletAddress(value: string): FindUserIDRequest; getIdentifierCase(): IdentifierCase; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): FindUserIDRequestObject; static toObject(includeInstance: boolean, msg: FindUserIDRequest): FindUserIDRequestObject; static serializeBinaryToWriter(message: FindUserIDRequest, writer: BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): FindUserIDRequest; static deserializeBinaryFromReader(message: FindUserIDRequest, reader: BinaryReader): FindUserIDRequest; } export type FindUserIDRequestObject = { username: string, walletAddress: string, } declare export class FindUserIDResponse extends Message { getUserId(): string; setUserId(value: string): FindUserIDResponse; hasUserId(): boolean; clearUserId(): FindUserIDResponse; getIsReserved(): boolean; setIsReserved(value: boolean): FindUserIDResponse; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): FindUserIDResponseObject; static toObject(includeInstance: boolean, msg: FindUserIDResponse): FindUserIDResponseObject; static serializeBinaryToWriter(message: FindUserIDResponse, writer: BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): FindUserIDResponse; static deserializeBinaryFromReader(message: FindUserIDResponse, reader: BinaryReader): FindUserIDResponse; } export type FindUserIDResponseObject = { userId?: string, isReserved: boolean, } declare export class UpdateUserPasswordStartRequest extends Message { getOpaqueRegistrationRequest(): Uint8Array | string; getOpaqueRegistrationRequest_asU8(): Uint8Array; getOpaqueRegistrationRequest_asB64(): string; setOpaqueRegistrationRequest(value: Uint8Array | string): UpdateUserPasswordStartRequest; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): UpdateUserPasswordStartRequestObject; static toObject(includeInstance: boolean, msg: UpdateUserPasswordStartRequest): UpdateUserPasswordStartRequestObject; static serializeBinaryToWriter(message: UpdateUserPasswordStartRequest, writer: BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): UpdateUserPasswordStartRequest; static deserializeBinaryFromReader(message: UpdateUserPasswordStartRequest, reader: BinaryReader): UpdateUserPasswordStartRequest; } export type UpdateUserPasswordStartRequestObject = { opaqueRegistrationRequest: Uint8Array | string, }; declare export class UpdateUserPasswordFinishRequest extends Message { getSessionId(): string; setSessionId(value: string): UpdateUserPasswordFinishRequest; getOpaqueRegistrationUpload(): Uint8Array | string; getOpaqueRegistrationUpload_asU8(): Uint8Array; getOpaqueRegistrationUpload_asB64(): string; setOpaqueRegistrationUpload(value: Uint8Array | string): UpdateUserPasswordFinishRequest; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): UpdateUserPasswordFinishRequestObject; static toObject(includeInstance: boolean, msg: UpdateUserPasswordFinishRequest): UpdateUserPasswordFinishRequestObject; static serializeBinaryToWriter(message: UpdateUserPasswordFinishRequest, writer: BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): UpdateUserPasswordFinishRequest; static deserializeBinaryFromReader(message: UpdateUserPasswordFinishRequest, reader: BinaryReader): UpdateUserPasswordFinishRequest; } export type UpdateUserPasswordFinishRequestObject = { sessionId: string, opaqueRegistrationUpload: Uint8Array | string, }; declare export class UpdateUserPasswordStartResponse extends Message { getSessionId(): string; setSessionId(value: string): UpdateUserPasswordStartResponse; getOpaqueRegistrationResponse(): Uint8Array | string; getOpaqueRegistrationResponse_asU8(): Uint8Array; getOpaqueRegistrationResponse_asB64(): string; setOpaqueRegistrationResponse(value: Uint8Array | string): UpdateUserPasswordStartResponse; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): UpdateUserPasswordStartResponseObject; static toObject(includeInstance: boolean, msg: UpdateUserPasswordStartResponse): UpdateUserPasswordStartResponseObject; static serializeBinaryToWriter(message: UpdateUserPasswordStartResponse, writer: BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): UpdateUserPasswordStartResponse; static deserializeBinaryFromReader(message: UpdateUserPasswordStartResponse, reader: BinaryReader): UpdateUserPasswordStartResponse; } export type UpdateUserPasswordStartResponseObject = { sessionId: string, opaqueRegistrationResponse: Uint8Array | string, }; export type SinceTimestampCase = 0 | 2; declare export class GetDeviceListRequest extends Message { getUserId(): string; setUserId(value: string): GetDeviceListRequest; getSinceTimestamp(): number; setSinceTimestamp(value: number): GetDeviceListRequest; hasSinceTimestamp(): boolean; clearSinceTimestamp(): GetDeviceListRequest; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): GetDeviceListRequestObject; static toObject(includeInstance: boolean, msg: GetDeviceListRequest): GetDeviceListRequestObject; static serializeBinaryToWriter(message: GetDeviceListRequest, writer: BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): GetDeviceListRequest; static deserializeBinaryFromReader(message: GetDeviceListRequest, reader: BinaryReader): GetDeviceListRequest; } export type GetDeviceListRequestObject = { userId: string, sinceTimestamp?: number, } declare export class GetDeviceListResponse extends Message { getDeviceListUpdatesList(): Array; setDeviceListUpdatesList(value: Array): GetDeviceListResponse; clearDeviceListUpdatesList(): GetDeviceListResponse; addDeviceListUpdates(value: string, index?: number): GetDeviceListResponse; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): GetDeviceListResponseObject; static toObject(includeInstance: boolean, msg: GetDeviceListResponse): GetDeviceListResponseObject; static serializeBinaryToWriter(message: GetDeviceListResponse, writer: BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): GetDeviceListResponse; static deserializeBinaryFromReader(message: GetDeviceListResponse, reader: BinaryReader): GetDeviceListResponse; } export type GetDeviceListResponseObject = { deviceListUpdatesList: Array, } -