diff --git a/web/protobufs/identity-auth-client.cjs b/web/protobufs/identity-auth-client.cjs index d7ac955aa..37eb86ab7 100644 --- a/web/protobufs/identity-auth-client.cjs +++ b/web/protobufs/identity-auth-client.cjs @@ -1,263 +1,691 @@ /** * @fileoverview gRPC-Web generated client stub for identity.authenticated * @enhanceable * @public * @generated */ // Code generated by protoc-gen-grpc-web. DO NOT EDIT. // versions: // protoc-gen-grpc-web v1.4.2 // protoc v3.21.12 // source: identity_authenticated.proto /* eslint-disable */ // @ts-nocheck const grpc = {}; grpc.web = require('grpc-web'); var identity_client_pb = require('./identity-structs.cjs') const proto = {}; proto.identity = {}; proto.identity.authenticated = require('./identity-auth-structs.cjs'); /** * @param {string} hostname * @param {?Object} credentials * @param {?grpc.web.ClientOptions} options * @constructor * @struct * @final */ proto.identity.authenticated.IdentityClientServiceClient = function(hostname, credentials, options) { if (!options) options = {}; options.format = 'text'; /** * @private @const {!grpc.web.GrpcWebClientBase} The client */ this.client_ = new grpc.web.GrpcWebClientBase(options); /** * @private @const {string} The hostname */ this.hostname_ = hostname.replace(/\/+$/, ''); }; /** * @param {string} hostname * @param {?Object} credentials * @param {?grpc.web.ClientOptions} options * @constructor * @struct * @final */ proto.identity.authenticated.IdentityClientServicePromiseClient = function(hostname, credentials, options) { if (!options) options = {}; options.format = 'text'; /** * @private @const {!grpc.web.GrpcWebClientBase} The client */ this.client_ = new grpc.web.GrpcWebClientBase(options); /** * @private @const {string} The hostname */ this.hostname_ = hostname.replace(/\/+$/, ''); }; /** * @const * @type {!grpc.web.MethodDescriptor< * !proto.identity.authenticated.UploadOneTimeKeysRequest, * !proto.identity.client.Empty>} */ const methodDescriptor_IdentityClientService_UploadOneTimeKeys = new grpc.web.MethodDescriptor( '/identity.authenticated.IdentityClientService/UploadOneTimeKeys', grpc.web.MethodType.UNARY, proto.identity.authenticated.UploadOneTimeKeysRequest, identity_client_pb.Empty, /** * @param {!proto.identity.authenticated.UploadOneTimeKeysRequest} request * @return {!Uint8Array} */ function(request) { return request.serializeBinary(); }, identity_client_pb.Empty.deserializeBinary ); /** * @param {!proto.identity.authenticated.UploadOneTimeKeysRequest} request The * request proto * @param {?Object} metadata User defined * call metadata * @param {function(?grpc.web.RpcError, ?proto.identity.client.Empty)} * callback The callback function(error, response) * @return {!grpc.web.ClientReadableStream|undefined} * The XHR Node Readable Stream */ proto.identity.authenticated.IdentityClientServiceClient.prototype.uploadOneTimeKeys = function(request, metadata, callback) { return this.client_.rpcCall(this.hostname_ + '/identity.authenticated.IdentityClientService/UploadOneTimeKeys', request, metadata || {}, methodDescriptor_IdentityClientService_UploadOneTimeKeys, callback); }; /** * @param {!proto.identity.authenticated.UploadOneTimeKeysRequest} request The * request proto * @param {?Object=} metadata User defined * call metadata * @return {!Promise} * Promise that resolves to the response */ proto.identity.authenticated.IdentityClientServicePromiseClient.prototype.uploadOneTimeKeys = function(request, metadata) { return this.client_.unaryCall(this.hostname_ + '/identity.authenticated.IdentityClientService/UploadOneTimeKeys', request, metadata || {}, methodDescriptor_IdentityClientService_UploadOneTimeKeys); }; /** * @const * @type {!grpc.web.MethodDescriptor< * !proto.identity.authenticated.RefreshUserPreKeysRequest, * !proto.identity.client.Empty>} */ const methodDescriptor_IdentityClientService_RefreshUserPreKeys = new grpc.web.MethodDescriptor( '/identity.authenticated.IdentityClientService/RefreshUserPreKeys', grpc.web.MethodType.UNARY, proto.identity.authenticated.RefreshUserPreKeysRequest, identity_client_pb.Empty, /** * @param {!proto.identity.authenticated.RefreshUserPreKeysRequest} request * @return {!Uint8Array} */ function(request) { return request.serializeBinary(); }, identity_client_pb.Empty.deserializeBinary ); /** * @param {!proto.identity.authenticated.RefreshUserPreKeysRequest} request The * request proto * @param {?Object} metadata User defined * call metadata * @param {function(?grpc.web.RpcError, ?proto.identity.client.Empty)} * callback The callback function(error, response) * @return {!grpc.web.ClientReadableStream|undefined} * The XHR Node Readable Stream */ proto.identity.authenticated.IdentityClientServiceClient.prototype.refreshUserPreKeys = function(request, metadata, callback) { return this.client_.rpcCall(this.hostname_ + '/identity.authenticated.IdentityClientService/RefreshUserPreKeys', request, metadata || {}, methodDescriptor_IdentityClientService_RefreshUserPreKeys, callback); }; /** * @param {!proto.identity.authenticated.RefreshUserPreKeysRequest} request The * request proto * @param {?Object=} metadata User defined * call metadata * @return {!Promise} * Promise that resolves to the response */ proto.identity.authenticated.IdentityClientServicePromiseClient.prototype.refreshUserPreKeys = function(request, metadata) { return this.client_.unaryCall(this.hostname_ + '/identity.authenticated.IdentityClientService/RefreshUserPreKeys', request, metadata || {}, methodDescriptor_IdentityClientService_RefreshUserPreKeys); }; +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.identity.authenticated.OutboundKeysForUserRequest, + * !proto.identity.authenticated.OutboundKeysForUserResponse>} + */ +const methodDescriptor_IdentityClientService_GetOutboundKeysForUser = new grpc.web.MethodDescriptor( + '/identity.authenticated.IdentityClientService/GetOutboundKeysForUser', + grpc.web.MethodType.UNARY, + proto.identity.authenticated.OutboundKeysForUserRequest, + proto.identity.authenticated.OutboundKeysForUserResponse, + /** + * @param {!proto.identity.authenticated.OutboundKeysForUserRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.identity.authenticated.OutboundKeysForUserResponse.deserializeBinary +); + + +/** + * @param {!proto.identity.authenticated.OutboundKeysForUserRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.identity.authenticated.OutboundKeysForUserResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.identity.authenticated.IdentityClientServiceClient.prototype.getOutboundKeysForUser = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/identity.authenticated.IdentityClientService/GetOutboundKeysForUser', + request, + metadata || {}, + methodDescriptor_IdentityClientService_GetOutboundKeysForUser, + callback); +}; + + +/** + * @param {!proto.identity.authenticated.OutboundKeysForUserRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.identity.authenticated.IdentityClientServicePromiseClient.prototype.getOutboundKeysForUser = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/identity.authenticated.IdentityClientService/GetOutboundKeysForUser', + request, + metadata || {}, + methodDescriptor_IdentityClientService_GetOutboundKeysForUser); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.identity.authenticated.InboundKeysForUserRequest, + * !proto.identity.authenticated.InboundKeysForUserResponse>} + */ +const methodDescriptor_IdentityClientService_GetInboundKeysForUser = new grpc.web.MethodDescriptor( + '/identity.authenticated.IdentityClientService/GetInboundKeysForUser', + grpc.web.MethodType.UNARY, + proto.identity.authenticated.InboundKeysForUserRequest, + proto.identity.authenticated.InboundKeysForUserResponse, + /** + * @param {!proto.identity.authenticated.InboundKeysForUserRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.identity.authenticated.InboundKeysForUserResponse.deserializeBinary +); + + +/** + * @param {!proto.identity.authenticated.InboundKeysForUserRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.identity.authenticated.InboundKeysForUserResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.identity.authenticated.IdentityClientServiceClient.prototype.getInboundKeysForUser = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/identity.authenticated.IdentityClientService/GetInboundKeysForUser', + request, + metadata || {}, + methodDescriptor_IdentityClientService_GetInboundKeysForUser, + callback); +}; + + +/** + * @param {!proto.identity.authenticated.InboundKeysForUserRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.identity.authenticated.IdentityClientServicePromiseClient.prototype.getInboundKeysForUser = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/identity.authenticated.IdentityClientService/GetInboundKeysForUser', + request, + metadata || {}, + methodDescriptor_IdentityClientService_GetInboundKeysForUser); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.identity.authenticated.UpdateUserPasswordStartRequest, + * !proto.identity.authenticated.UpdateUserPasswordStartResponse>} + */ +const methodDescriptor_IdentityClientService_UpdateUserPasswordStart = new grpc.web.MethodDescriptor( + '/identity.authenticated.IdentityClientService/UpdateUserPasswordStart', + grpc.web.MethodType.UNARY, + proto.identity.authenticated.UpdateUserPasswordStartRequest, + proto.identity.authenticated.UpdateUserPasswordStartResponse, + /** + * @param {!proto.identity.authenticated.UpdateUserPasswordStartRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.identity.authenticated.UpdateUserPasswordStartResponse.deserializeBinary +); + + +/** + * @param {!proto.identity.authenticated.UpdateUserPasswordStartRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.identity.authenticated.UpdateUserPasswordStartResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.identity.authenticated.IdentityClientServiceClient.prototype.updateUserPasswordStart = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/identity.authenticated.IdentityClientService/UpdateUserPasswordStart', + request, + metadata || {}, + methodDescriptor_IdentityClientService_UpdateUserPasswordStart, + callback); +}; + + +/** + * @param {!proto.identity.authenticated.UpdateUserPasswordStartRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.identity.authenticated.IdentityClientServicePromiseClient.prototype.updateUserPasswordStart = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/identity.authenticated.IdentityClientService/UpdateUserPasswordStart', + request, + metadata || {}, + methodDescriptor_IdentityClientService_UpdateUserPasswordStart); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.identity.authenticated.UpdateUserPasswordFinishRequest, + * !proto.identity.client.Empty>} + */ +const methodDescriptor_IdentityClientService_UpdateUserPasswordFinish = new grpc.web.MethodDescriptor( + '/identity.authenticated.IdentityClientService/UpdateUserPasswordFinish', + grpc.web.MethodType.UNARY, + proto.identity.authenticated.UpdateUserPasswordFinishRequest, + identity_client_pb.Empty, + /** + * @param {!proto.identity.authenticated.UpdateUserPasswordFinishRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + identity_client_pb.Empty.deserializeBinary +); + + +/** + * @param {!proto.identity.authenticated.UpdateUserPasswordFinishRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.identity.client.Empty)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.identity.authenticated.IdentityClientServiceClient.prototype.updateUserPasswordFinish = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/identity.authenticated.IdentityClientService/UpdateUserPasswordFinish', + request, + metadata || {}, + methodDescriptor_IdentityClientService_UpdateUserPasswordFinish, + callback); +}; + + +/** + * @param {!proto.identity.authenticated.UpdateUserPasswordFinishRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.identity.authenticated.IdentityClientServicePromiseClient.prototype.updateUserPasswordFinish = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/identity.authenticated.IdentityClientService/UpdateUserPasswordFinish', + request, + metadata || {}, + methodDescriptor_IdentityClientService_UpdateUserPasswordFinish); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.identity.client.Empty, + * !proto.identity.client.Empty>} + */ +const methodDescriptor_IdentityClientService_LogOutUser = new grpc.web.MethodDescriptor( + '/identity.authenticated.IdentityClientService/LogOutUser', + grpc.web.MethodType.UNARY, + identity_client_pb.Empty, + identity_client_pb.Empty, + /** + * @param {!proto.identity.client.Empty} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + identity_client_pb.Empty.deserializeBinary +); + + +/** + * @param {!proto.identity.client.Empty} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.identity.client.Empty)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.identity.authenticated.IdentityClientServiceClient.prototype.logOutUser = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/identity.authenticated.IdentityClientService/LogOutUser', + request, + metadata || {}, + methodDescriptor_IdentityClientService_LogOutUser, + callback); +}; + + +/** + * @param {!proto.identity.client.Empty} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.identity.authenticated.IdentityClientServicePromiseClient.prototype.logOutUser = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/identity.authenticated.IdentityClientService/LogOutUser', + request, + metadata || {}, + methodDescriptor_IdentityClientService_LogOutUser); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.identity.client.Empty, + * !proto.identity.client.Empty>} + */ +const methodDescriptor_IdentityClientService_DeleteUser = new grpc.web.MethodDescriptor( + '/identity.authenticated.IdentityClientService/DeleteUser', + grpc.web.MethodType.UNARY, + identity_client_pb.Empty, + identity_client_pb.Empty, + /** + * @param {!proto.identity.client.Empty} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + identity_client_pb.Empty.deserializeBinary +); + + +/** + * @param {!proto.identity.client.Empty} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.identity.client.Empty)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.identity.authenticated.IdentityClientServiceClient.prototype.deleteUser = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/identity.authenticated.IdentityClientService/DeleteUser', + request, + metadata || {}, + methodDescriptor_IdentityClientService_DeleteUser, + callback); +}; + + +/** + * @param {!proto.identity.client.Empty} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.identity.authenticated.IdentityClientServicePromiseClient.prototype.deleteUser = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/identity.authenticated.IdentityClientService/DeleteUser', + request, + metadata || {}, + methodDescriptor_IdentityClientService_DeleteUser); +}; + + /** * @const * @type {!grpc.web.MethodDescriptor< * !proto.identity.authenticated.OutboundKeysForUserRequest, * !proto.identity.authenticated.KeyserverKeysResponse>} */ const methodDescriptor_IdentityClientService_GetKeyserverKeys = new grpc.web.MethodDescriptor( '/identity.authenticated.IdentityClientService/GetKeyserverKeys', grpc.web.MethodType.UNARY, proto.identity.authenticated.OutboundKeysForUserRequest, proto.identity.authenticated.KeyserverKeysResponse, /** * @param {!proto.identity.authenticated.OutboundKeysForUserRequest} request * @return {!Uint8Array} */ function(request) { return request.serializeBinary(); }, proto.identity.authenticated.KeyserverKeysResponse.deserializeBinary ); /** * @param {!proto.identity.authenticated.OutboundKeysForUserRequest} request The * request proto * @param {?Object} metadata User defined * call metadata * @param {function(?grpc.web.RpcError, ?proto.identity.authenticated.KeyserverKeysResponse)} * callback The callback function(error, response) * @return {!grpc.web.ClientReadableStream|undefined} * The XHR Node Readable Stream */ proto.identity.authenticated.IdentityClientServiceClient.prototype.getKeyserverKeys = function(request, metadata, callback) { return this.client_.rpcCall(this.hostname_ + '/identity.authenticated.IdentityClientService/GetKeyserverKeys', request, metadata || {}, methodDescriptor_IdentityClientService_GetKeyserverKeys, callback); }; /** * @param {!proto.identity.authenticated.OutboundKeysForUserRequest} request The * request proto * @param {?Object=} metadata User defined * call metadata * @return {!Promise} * Promise that resolves to the response */ proto.identity.authenticated.IdentityClientServicePromiseClient.prototype.getKeyserverKeys = function(request, metadata) { return this.client_.unaryCall(this.hostname_ + '/identity.authenticated.IdentityClientService/GetKeyserverKeys', request, metadata || {}, methodDescriptor_IdentityClientService_GetKeyserverKeys); }; +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.identity.authenticated.FindUserIDRequest, + * !proto.identity.authenticated.FindUserIDResponse>} + */ +const methodDescriptor_IdentityClientService_FindUserID = new grpc.web.MethodDescriptor( + '/identity.authenticated.IdentityClientService/FindUserID', + grpc.web.MethodType.UNARY, + proto.identity.authenticated.FindUserIDRequest, + proto.identity.authenticated.FindUserIDResponse, + /** + * @param {!proto.identity.authenticated.FindUserIDRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.identity.authenticated.FindUserIDResponse.deserializeBinary +); + + +/** + * @param {!proto.identity.authenticated.FindUserIDRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.identity.authenticated.FindUserIDResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.identity.authenticated.IdentityClientServiceClient.prototype.findUserID = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/identity.authenticated.IdentityClientService/FindUserID', + request, + metadata || {}, + methodDescriptor_IdentityClientService_FindUserID, + callback); +}; + + +/** + * @param {!proto.identity.authenticated.FindUserIDRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.identity.authenticated.IdentityClientServicePromiseClient.prototype.findUserID = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/identity.authenticated.IdentityClientService/FindUserID', + request, + metadata || {}, + methodDescriptor_IdentityClientService_FindUserID); +}; + + module.exports = proto.identity.authenticated; + diff --git a/web/protobufs/identity-auth-client.cjs.flow b/web/protobufs/identity-auth-client.cjs.flow index a1757b1de..5b511338d 100644 --- a/web/protobufs/identity-auth-client.cjs.flow +++ b/web/protobufs/identity-auth-client.cjs.flow @@ -1,57 +1,139 @@ // @flow import * as grpcWeb from 'grpc-web'; import * as identityAuthStructs from './identity-auth-structs.cjs'; import * as identityStructs from './identity-structs.cjs'; declare export class IdentityClientServiceClient { constructor (hostname: string, credentials?: null | { +[index: string]: string; }, options?: null | { +[index: string]: any; }): void; uploadOneTimeKeys( request: identityAuthStructs.UploadOneTimeKeysRequest, metadata: grpcWeb.Metadata | void, callback: (err: grpcWeb.RpcError, response: identityStructs.Empty) => void ): grpcWeb.ClientReadableStream; refreshUserPreKeys( request: identityAuthStructs.RefreshUserPreKeysRequest, metadata: grpcWeb.Metadata | void, callback: (err: grpcWeb.RpcError, response: identityStructs.Empty) => void ): grpcWeb.ClientReadableStream; + getOutboundKeysForUser( + request: identityAuthStructs.OutboundKeysForUserRequest, + metadata: grpcWeb.Metadata | void, + callback: (err: grpcWeb.RpcError, + response: identityAuthStructs.OutboundKeysForUserResponse) => void + ): grpcWeb.ClientReadableStream; + + getInboundKeysForUser( + request: identityAuthStructs.InboundKeysForUserRequest, + metadata: grpcWeb.Metadata | void, + callback: (err: grpcWeb.RpcError, + response: identityAuthStructs.InboundKeysForUserResponse) => void + ): grpcWeb.ClientReadableStream; + + updateUserPasswordStart( + request: identityAuthStructs.UpdateUserPasswordStartRequest, + metadata: grpcWeb.Metadata | void, + callback: (err: grpcWeb.RpcError, + response: identityAuthStructs.UpdateUserPasswordStartResponse) => void + ): grpcWeb.ClientReadableStream; + + updateUserPasswordFinish( + request: identityAuthStructs.UpdateUserPasswordFinishRequest, + metadata: grpcWeb.Metadata | void, + callback: (err: grpcWeb.RpcError, + response: identityStructs.Empty) => void + ): grpcWeb.ClientReadableStream; + + logOutUser( + request: identityStructs.Empty, + metadata: grpcWeb.Metadata | void, + callback: (err: grpcWeb.RpcError, + response: identityStructs.Empty) => void + ): grpcWeb.ClientReadableStream; + + deleteUser( + request: identityStructs.Empty, + metadata: grpcWeb.Metadata | void, + callback: (err: grpcWeb.RpcError, + response: identityStructs.Empty) => void + ): grpcWeb.ClientReadableStream; + getKeyserverKeys( request: identityAuthStructs.OutboundKeysForUserRequest, metadata: grpcWeb.Metadata | void, callback: (err: grpcWeb.RpcError, response: identityAuthStructs.KeyserverKeysResponse) => void ): grpcWeb.ClientReadableStream; + findUserID( + request: identityAuthStructs.FindUserIDRequest, + metadata: grpcWeb.Metadata | void, + callback: (err: grpcWeb.RpcError, + response: identityAuthStructs.FindUserIDResponse) => void + ): grpcWeb.ClientReadableStream; } declare export class IdentityClientServicePromiseClient { constructor (hostname: string, credentials?: null | { +[index: string]: string; }, options?: null | { +[index: string]: any; }): void; uploadOneTimeKeys( request: identityAuthStructs.UploadOneTimeKeysRequest, metadata?: grpcWeb.Metadata ): Promise; refreshUserPreKeys( request: identityAuthStructs.RefreshUserPreKeysRequest, metadata?: grpcWeb.Metadata ): Promise; + getOutboundKeysForUser( + request: identityAuthStructs.OutboundKeysForUserRequest, + metadata?: grpcWeb.Metadata + ): Promise; + + getInboundKeysForUser( + request: identityAuthStructs.InboundKeysForUserRequest, + metadata?: grpcWeb.Metadata + ): Promise; + + updateUserPasswordStart( + request: identityAuthStructs.UpdateUserPasswordStartRequest, + metadata?: grpcWeb.Metadata + ): Promise; + + updateUserPasswordFinish( + request: identityAuthStructs.UpdateUserPasswordFinishRequest, + metadata?: grpcWeb.Metadata + ): Promise; + + logOutUser( + request: identityStructs.Empty, + metadata?: grpcWeb.Metadata + ): Promise; + + deleteUser( + request: identityStructs.Empty, + metadata?: grpcWeb.Metadata + ): Promise; + getKeyserverKeys( request: identityAuthStructs.OutboundKeysForUserRequest, metadata?: grpcWeb.Metadata ): Promise; + findUserID( + request: identityAuthStructs.FindUserIDRequest, + metadata?: grpcWeb.Metadata + ): Promise; } diff --git a/web/protobufs/identity-auth-structs.cjs b/web/protobufs/identity-auth-structs.cjs index 255343db3..08af3e3cd 100644 --- a/web/protobufs/identity-auth-structs.cjs +++ b/web/protobufs/identity-auth-structs.cjs @@ -1,1174 +1,2946 @@ // source: identity_authenticated.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_client_pb = require('./identity-structs.cjs'); goog.object.extend(proto, identity_client_pb); +goog.exportSymbol('proto.identity.authenticated.FindUserIDRequest', null, global); +goog.exportSymbol('proto.identity.authenticated.FindUserIDRequest.IdentifierCase', null, global); +goog.exportSymbol('proto.identity.authenticated.FindUserIDResponse', null, global); +goog.exportSymbol('proto.identity.authenticated.InboundKeyInfo', null, global); +goog.exportSymbol('proto.identity.authenticated.InboundKeysForUserRequest', null, global); +goog.exportSymbol('proto.identity.authenticated.InboundKeysForUserResponse', null, global); goog.exportSymbol('proto.identity.authenticated.KeyserverKeysResponse', null, global); goog.exportSymbol('proto.identity.authenticated.OutboundKeyInfo', null, global); goog.exportSymbol('proto.identity.authenticated.OutboundKeysForUserRequest', null, global); +goog.exportSymbol('proto.identity.authenticated.OutboundKeysForUserResponse', null, global); goog.exportSymbol('proto.identity.authenticated.RefreshUserPreKeysRequest', null, global); +goog.exportSymbol('proto.identity.authenticated.UpdateUserPasswordFinishRequest', null, global); +goog.exportSymbol('proto.identity.authenticated.UpdateUserPasswordStartRequest', null, global); +goog.exportSymbol('proto.identity.authenticated.UpdateUserPasswordStartResponse', null, global); goog.exportSymbol('proto.identity.authenticated.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.authenticated.UploadOneTimeKeysRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.identity.authenticated.UploadOneTimeKeysRequest.repeatedFields_, null); }; goog.inherits(proto.identity.authenticated.UploadOneTimeKeysRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.identity.authenticated.UploadOneTimeKeysRequest.displayName = 'proto.identity.authenticated.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.authenticated.RefreshUserPreKeysRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.identity.authenticated.RefreshUserPreKeysRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.identity.authenticated.RefreshUserPreKeysRequest.displayName = 'proto.identity.authenticated.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.authenticated.OutboundKeyInfo = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.identity.authenticated.OutboundKeyInfo, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.identity.authenticated.OutboundKeyInfo.displayName = 'proto.identity.authenticated.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.authenticated.KeyserverKeysResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.identity.authenticated.KeyserverKeysResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.identity.authenticated.KeyserverKeysResponse.displayName = 'proto.identity.authenticated.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.authenticated.OutboundKeysForUserResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.identity.authenticated.OutboundKeysForUserResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.identity.authenticated.OutboundKeysForUserResponse.displayName = 'proto.identity.authenticated.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.authenticated.OutboundKeysForUserRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.identity.authenticated.OutboundKeysForUserRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.identity.authenticated.OutboundKeysForUserRequest.displayName = 'proto.identity.authenticated.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.authenticated.InboundKeyInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.identity.authenticated.InboundKeyInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.identity.authenticated.InboundKeyInfo.displayName = 'proto.identity.authenticated.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.authenticated.InboundKeysForUserResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.identity.authenticated.InboundKeysForUserResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.identity.authenticated.InboundKeysForUserResponse.displayName = 'proto.identity.authenticated.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.authenticated.InboundKeysForUserRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.identity.authenticated.InboundKeysForUserRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.identity.authenticated.InboundKeysForUserRequest.displayName = 'proto.identity.authenticated.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.authenticated.FindUserIDRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.identity.authenticated.FindUserIDRequest.oneofGroups_); +}; +goog.inherits(proto.identity.authenticated.FindUserIDRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.identity.authenticated.FindUserIDRequest.displayName = 'proto.identity.authenticated.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.authenticated.FindUserIDResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.identity.authenticated.FindUserIDResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.identity.authenticated.FindUserIDResponse.displayName = 'proto.identity.authenticated.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.authenticated.UpdateUserPasswordStartRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.identity.authenticated.UpdateUserPasswordStartRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.identity.authenticated.UpdateUserPasswordStartRequest.displayName = 'proto.identity.authenticated.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.authenticated.UpdateUserPasswordFinishRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.identity.authenticated.UpdateUserPasswordFinishRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.identity.authenticated.UpdateUserPasswordFinishRequest.displayName = 'proto.identity.authenticated.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.authenticated.UpdateUserPasswordStartResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.identity.authenticated.UpdateUserPasswordStartResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.identity.authenticated.UpdateUserPasswordStartResponse.displayName = 'proto.identity.authenticated.UpdateUserPasswordStartResponse'; +} /** * List of repeated fields within this message type. * @private {!Array} * @const */ proto.identity.authenticated.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.authenticated.UploadOneTimeKeysRequest.prototype.toObject = function(opt_includeInstance) { return proto.identity.authenticated.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.authenticated.UploadOneTimeKeysRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.identity.authenticated.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.authenticated.UploadOneTimeKeysRequest} */ proto.identity.authenticated.UploadOneTimeKeysRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.identity.authenticated.UploadOneTimeKeysRequest; return proto.identity.authenticated.UploadOneTimeKeysRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.identity.authenticated.UploadOneTimeKeysRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.identity.authenticated.UploadOneTimeKeysRequest} */ proto.identity.authenticated.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.authenticated.UploadOneTimeKeysRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.identity.authenticated.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.authenticated.UploadOneTimeKeysRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.identity.authenticated.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 contentOneTimePreKeys = 1; * @return {!Array} */ proto.identity.authenticated.UploadOneTimeKeysRequest.prototype.getContentonetimeprekeysList = function() { return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); }; /** * @param {!Array} value * @return {!proto.identity.authenticated.UploadOneTimeKeysRequest} returns this */ proto.identity.authenticated.UploadOneTimeKeysRequest.prototype.setContentonetimeprekeysList = function(value) { return jspb.Message.setField(this, 1, value || []); }; /** * @param {string} value * @param {number=} opt_index * @return {!proto.identity.authenticated.UploadOneTimeKeysRequest} returns this */ proto.identity.authenticated.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.authenticated.UploadOneTimeKeysRequest} returns this */ proto.identity.authenticated.UploadOneTimeKeysRequest.prototype.clearContentonetimeprekeysList = function() { return this.setContentonetimeprekeysList([]); }; /** * repeated string notifOneTimePreKeys = 2; * @return {!Array} */ proto.identity.authenticated.UploadOneTimeKeysRequest.prototype.getNotifonetimeprekeysList = function() { return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); }; /** * @param {!Array} value * @return {!proto.identity.authenticated.UploadOneTimeKeysRequest} returns this */ proto.identity.authenticated.UploadOneTimeKeysRequest.prototype.setNotifonetimeprekeysList = function(value) { return jspb.Message.setField(this, 2, value || []); }; /** * @param {string} value * @param {number=} opt_index * @return {!proto.identity.authenticated.UploadOneTimeKeysRequest} returns this */ proto.identity.authenticated.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.authenticated.UploadOneTimeKeysRequest} returns this */ proto.identity.authenticated.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.authenticated.RefreshUserPreKeysRequest.prototype.toObject = function(opt_includeInstance) { return proto.identity.authenticated.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.authenticated.RefreshUserPreKeysRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.identity.authenticated.RefreshUserPreKeysRequest.toObject = function(includeInstance, msg) { var f, obj = { newcontentprekeys: (f = msg.getNewcontentprekeys()) && identity_client_pb.PreKey.toObject(includeInstance, f), newnotifprekeys: (f = msg.getNewnotifprekeys()) && identity_client_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.authenticated.RefreshUserPreKeysRequest} */ proto.identity.authenticated.RefreshUserPreKeysRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.identity.authenticated.RefreshUserPreKeysRequest; return proto.identity.authenticated.RefreshUserPreKeysRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.identity.authenticated.RefreshUserPreKeysRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.identity.authenticated.RefreshUserPreKeysRequest} */ proto.identity.authenticated.RefreshUserPreKeysRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new identity_client_pb.PreKey; reader.readMessage(value,identity_client_pb.PreKey.deserializeBinaryFromReader); msg.setNewcontentprekeys(value); break; case 2: var value = new identity_client_pb.PreKey; reader.readMessage(value,identity_client_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.authenticated.RefreshUserPreKeysRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.identity.authenticated.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.authenticated.RefreshUserPreKeysRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.identity.authenticated.RefreshUserPreKeysRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getNewcontentprekeys(); if (f != null) { writer.writeMessage( 1, f, identity_client_pb.PreKey.serializeBinaryToWriter ); } f = message.getNewnotifprekeys(); if (f != null) { writer.writeMessage( 2, f, identity_client_pb.PreKey.serializeBinaryToWriter ); } }; /** * optional identity.client.PreKey newContentPreKeys = 1; * @return {?proto.identity.client.PreKey} */ proto.identity.authenticated.RefreshUserPreKeysRequest.prototype.getNewcontentprekeys = function() { return /** @type{?proto.identity.client.PreKey} */ ( jspb.Message.getWrapperField(this, identity_client_pb.PreKey, 1)); }; /** * @param {?proto.identity.client.PreKey|undefined} value * @return {!proto.identity.authenticated.RefreshUserPreKeysRequest} returns this */ proto.identity.authenticated.RefreshUserPreKeysRequest.prototype.setNewcontentprekeys = function(value) { return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. * @return {!proto.identity.authenticated.RefreshUserPreKeysRequest} returns this */ proto.identity.authenticated.RefreshUserPreKeysRequest.prototype.clearNewcontentprekeys = function() { return this.setNewcontentprekeys(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.identity.authenticated.RefreshUserPreKeysRequest.prototype.hasNewcontentprekeys = function() { return jspb.Message.getField(this, 1) != null; }; /** * optional identity.client.PreKey newNotifPreKeys = 2; * @return {?proto.identity.client.PreKey} */ proto.identity.authenticated.RefreshUserPreKeysRequest.prototype.getNewnotifprekeys = function() { return /** @type{?proto.identity.client.PreKey} */ ( jspb.Message.getWrapperField(this, identity_client_pb.PreKey, 2)); }; /** * @param {?proto.identity.client.PreKey|undefined} value * @return {!proto.identity.authenticated.RefreshUserPreKeysRequest} returns this */ proto.identity.authenticated.RefreshUserPreKeysRequest.prototype.setNewnotifprekeys = function(value) { return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. * @return {!proto.identity.authenticated.RefreshUserPreKeysRequest} returns this */ proto.identity.authenticated.RefreshUserPreKeysRequest.prototype.clearNewnotifprekeys = function() { return this.setNewnotifprekeys(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.identity.authenticated.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.authenticated.OutboundKeyInfo.prototype.toObject = function(opt_includeInstance) { return proto.identity.authenticated.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.authenticated.OutboundKeyInfo} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.identity.authenticated.OutboundKeyInfo.toObject = function(includeInstance, msg) { var f, obj = { identityinfo: (f = msg.getIdentityinfo()) && identity_client_pb.IdentityKeyInfo.toObject(includeInstance, f), contentprekey: (f = msg.getContentprekey()) && identity_client_pb.PreKey.toObject(includeInstance, f), notifprekey: (f = msg.getNotifprekey()) && identity_client_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.authenticated.OutboundKeyInfo} */ proto.identity.authenticated.OutboundKeyInfo.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.identity.authenticated.OutboundKeyInfo; return proto.identity.authenticated.OutboundKeyInfo.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.identity.authenticated.OutboundKeyInfo} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.identity.authenticated.OutboundKeyInfo} */ proto.identity.authenticated.OutboundKeyInfo.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new identity_client_pb.IdentityKeyInfo; reader.readMessage(value,identity_client_pb.IdentityKeyInfo.deserializeBinaryFromReader); msg.setIdentityinfo(value); break; case 2: var value = new identity_client_pb.PreKey; reader.readMessage(value,identity_client_pb.PreKey.deserializeBinaryFromReader); msg.setContentprekey(value); break; case 3: var value = new identity_client_pb.PreKey; reader.readMessage(value,identity_client_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.authenticated.OutboundKeyInfo.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.identity.authenticated.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.authenticated.OutboundKeyInfo} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.identity.authenticated.OutboundKeyInfo.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getIdentityinfo(); if (f != null) { writer.writeMessage( 1, f, identity_client_pb.IdentityKeyInfo.serializeBinaryToWriter ); } f = message.getContentprekey(); if (f != null) { writer.writeMessage( 2, f, identity_client_pb.PreKey.serializeBinaryToWriter ); } f = message.getNotifprekey(); if (f != null) { writer.writeMessage( 3, f, identity_client_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.client.IdentityKeyInfo identityInfo = 1; * @return {?proto.identity.client.IdentityKeyInfo} */ proto.identity.authenticated.OutboundKeyInfo.prototype.getIdentityinfo = function() { return /** @type{?proto.identity.client.IdentityKeyInfo} */ ( jspb.Message.getWrapperField(this, identity_client_pb.IdentityKeyInfo, 1)); }; /** * @param {?proto.identity.client.IdentityKeyInfo|undefined} value * @return {!proto.identity.authenticated.OutboundKeyInfo} returns this */ proto.identity.authenticated.OutboundKeyInfo.prototype.setIdentityinfo = function(value) { return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. * @return {!proto.identity.authenticated.OutboundKeyInfo} returns this */ proto.identity.authenticated.OutboundKeyInfo.prototype.clearIdentityinfo = function() { return this.setIdentityinfo(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.identity.authenticated.OutboundKeyInfo.prototype.hasIdentityinfo = function() { return jspb.Message.getField(this, 1) != null; }; /** * optional identity.client.PreKey contentPrekey = 2; * @return {?proto.identity.client.PreKey} */ proto.identity.authenticated.OutboundKeyInfo.prototype.getContentprekey = function() { return /** @type{?proto.identity.client.PreKey} */ ( jspb.Message.getWrapperField(this, identity_client_pb.PreKey, 2)); }; /** * @param {?proto.identity.client.PreKey|undefined} value * @return {!proto.identity.authenticated.OutboundKeyInfo} returns this */ proto.identity.authenticated.OutboundKeyInfo.prototype.setContentprekey = function(value) { return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. * @return {!proto.identity.authenticated.OutboundKeyInfo} returns this */ proto.identity.authenticated.OutboundKeyInfo.prototype.clearContentprekey = function() { return this.setContentprekey(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.identity.authenticated.OutboundKeyInfo.prototype.hasContentprekey = function() { return jspb.Message.getField(this, 2) != null; }; /** * optional identity.client.PreKey notifPrekey = 3; * @return {?proto.identity.client.PreKey} */ proto.identity.authenticated.OutboundKeyInfo.prototype.getNotifprekey = function() { return /** @type{?proto.identity.client.PreKey} */ ( jspb.Message.getWrapperField(this, identity_client_pb.PreKey, 3)); }; /** * @param {?proto.identity.client.PreKey|undefined} value * @return {!proto.identity.authenticated.OutboundKeyInfo} returns this */ proto.identity.authenticated.OutboundKeyInfo.prototype.setNotifprekey = function(value) { return jspb.Message.setWrapperField(this, 3, value); }; /** * Clears the message field making it undefined. * @return {!proto.identity.authenticated.OutboundKeyInfo} returns this */ proto.identity.authenticated.OutboundKeyInfo.prototype.clearNotifprekey = function() { return this.setNotifprekey(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.identity.authenticated.OutboundKeyInfo.prototype.hasNotifprekey = function() { return jspb.Message.getField(this, 3) != null; }; /** * optional string oneTimeContentPrekey = 4; * @return {string} */ proto.identity.authenticated.OutboundKeyInfo.prototype.getOnetimecontentprekey = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); }; /** * @param {string} value * @return {!proto.identity.authenticated.OutboundKeyInfo} returns this */ proto.identity.authenticated.OutboundKeyInfo.prototype.setOnetimecontentprekey = function(value) { return jspb.Message.setField(this, 4, value); }; /** * Clears the field making it undefined. * @return {!proto.identity.authenticated.OutboundKeyInfo} returns this */ proto.identity.authenticated.OutboundKeyInfo.prototype.clearOnetimecontentprekey = function() { return jspb.Message.setField(this, 4, undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.identity.authenticated.OutboundKeyInfo.prototype.hasOnetimecontentprekey = function() { return jspb.Message.getField(this, 4) != null; }; /** * optional string oneTimeNotifPrekey = 5; * @return {string} */ proto.identity.authenticated.OutboundKeyInfo.prototype.getOnetimenotifprekey = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); }; /** * @param {string} value * @return {!proto.identity.authenticated.OutboundKeyInfo} returns this */ proto.identity.authenticated.OutboundKeyInfo.prototype.setOnetimenotifprekey = function(value) { return jspb.Message.setField(this, 5, value); }; /** * Clears the field making it undefined. * @return {!proto.identity.authenticated.OutboundKeyInfo} returns this */ proto.identity.authenticated.OutboundKeyInfo.prototype.clearOnetimenotifprekey = function() { return jspb.Message.setField(this, 5, undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.identity.authenticated.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.authenticated.KeyserverKeysResponse.prototype.toObject = function(opt_includeInstance) { return proto.identity.authenticated.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.authenticated.KeyserverKeysResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.identity.authenticated.KeyserverKeysResponse.toObject = function(includeInstance, msg) { var f, obj = { keyserverinfo: (f = msg.getKeyserverinfo()) && proto.identity.authenticated.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.authenticated.KeyserverKeysResponse} */ proto.identity.authenticated.KeyserverKeysResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.identity.authenticated.KeyserverKeysResponse; return proto.identity.authenticated.KeyserverKeysResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.identity.authenticated.KeyserverKeysResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.identity.authenticated.KeyserverKeysResponse} */ proto.identity.authenticated.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.authenticated.OutboundKeyInfo; reader.readMessage(value,proto.identity.authenticated.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.authenticated.KeyserverKeysResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.identity.authenticated.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.authenticated.KeyserverKeysResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.identity.authenticated.KeyserverKeysResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getKeyserverinfo(); if (f != null) { writer.writeMessage( 1, f, proto.identity.authenticated.OutboundKeyInfo.serializeBinaryToWriter ); } }; /** * optional OutboundKeyInfo keyserverInfo = 1; * @return {?proto.identity.authenticated.OutboundKeyInfo} */ proto.identity.authenticated.KeyserverKeysResponse.prototype.getKeyserverinfo = function() { return /** @type{?proto.identity.authenticated.OutboundKeyInfo} */ ( jspb.Message.getWrapperField(this, proto.identity.authenticated.OutboundKeyInfo, 1)); }; /** * @param {?proto.identity.authenticated.OutboundKeyInfo|undefined} value * @return {!proto.identity.authenticated.KeyserverKeysResponse} returns this */ proto.identity.authenticated.KeyserverKeysResponse.prototype.setKeyserverinfo = function(value) { return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. * @return {!proto.identity.authenticated.KeyserverKeysResponse} returns this */ proto.identity.authenticated.KeyserverKeysResponse.prototype.clearKeyserverinfo = function() { return this.setKeyserverinfo(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.identity.authenticated.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.authenticated.OutboundKeysForUserRequest.prototype.toObject = function(opt_includeInstance) { - return proto.identity.authenticated.OutboundKeysForUserRequest.toObject(opt_includeInstance, this); +proto.identity.authenticated.OutboundKeysForUserResponse.prototype.toObject = function(opt_includeInstance) { + return proto.identity.authenticated.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.authenticated.OutboundKeysForUserRequest} msg The msg instance to transform. + * @param {!proto.identity.authenticated.OutboundKeysForUserResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.identity.authenticated.OutboundKeysForUserRequest.toObject = function(includeInstance, msg) { +proto.identity.authenticated.OutboundKeysForUserResponse.toObject = function(includeInstance, msg) { var f, obj = { - userid: jspb.Message.getFieldWithDefault(msg, 1, "") + devicesMap: (f = msg.getDevicesMap()) ? f.toObject(includeInstance, proto.identity.authenticated.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.authenticated.OutboundKeysForUserRequest} + * @return {!proto.identity.authenticated.OutboundKeysForUserResponse} */ -proto.identity.authenticated.OutboundKeysForUserRequest.deserializeBinary = function(bytes) { +proto.identity.authenticated.OutboundKeysForUserResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.identity.authenticated.OutboundKeysForUserRequest; - return proto.identity.authenticated.OutboundKeysForUserRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.identity.authenticated.OutboundKeysForUserResponse; + return proto.identity.authenticated.OutboundKeysForUserResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.identity.authenticated.OutboundKeysForUserRequest} msg The message object to deserialize into. + * @param {!proto.identity.authenticated.OutboundKeysForUserResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.identity.authenticated.OutboundKeysForUserRequest} + * @return {!proto.identity.authenticated.OutboundKeysForUserResponse} */ -proto.identity.authenticated.OutboundKeysForUserRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.identity.authenticated.OutboundKeysForUserResponse.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); + 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.authenticated.OutboundKeyInfo.deserializeBinaryFromReader, "", new proto.identity.authenticated.OutboundKeyInfo()); + }); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.identity.authenticated.OutboundKeysForUserRequest.prototype.serializeBinary = function() { +proto.identity.authenticated.OutboundKeysForUserResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.identity.authenticated.OutboundKeysForUserRequest.serializeBinaryToWriter(this, writer); + proto.identity.authenticated.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.authenticated.OutboundKeysForUserRequest} message + * @param {!proto.identity.authenticated.OutboundKeysForUserResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.identity.authenticated.OutboundKeysForUserRequest.serializeBinaryToWriter = function(message, writer) { +proto.identity.authenticated.OutboundKeysForUserResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getUserid(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); + f = message.getDevicesMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(1, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.identity.authenticated.OutboundKeyInfo.serializeBinaryToWriter); } }; /** - * optional string userID = 1; - * @return {string} + * map devices = 1; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} */ -proto.identity.authenticated.OutboundKeysForUserRequest.prototype.getUserid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.identity.authenticated.OutboundKeysForUserResponse.prototype.getDevicesMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 1, opt_noLazyCreate, + proto.identity.authenticated.OutboundKeyInfo)); }; /** - * @param {string} value - * @return {!proto.identity.authenticated.OutboundKeysForUserRequest} returns this + * Clears values from the map. The map will be non-null. + * @return {!proto.identity.authenticated.OutboundKeysForUserResponse} returns this */ -proto.identity.authenticated.OutboundKeysForUserRequest.prototype.setUserid = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); +proto.identity.authenticated.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.authenticated.OutboundKeysForUserRequest.prototype.toObject = function(opt_includeInstance) { + return proto.identity.authenticated.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.authenticated.OutboundKeysForUserRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.identity.authenticated.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.authenticated.OutboundKeysForUserRequest} + */ +proto.identity.authenticated.OutboundKeysForUserRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.identity.authenticated.OutboundKeysForUserRequest; + return proto.identity.authenticated.OutboundKeysForUserRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.identity.authenticated.OutboundKeysForUserRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.identity.authenticated.OutboundKeysForUserRequest} + */ +proto.identity.authenticated.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.authenticated.OutboundKeysForUserRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.identity.authenticated.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.authenticated.OutboundKeysForUserRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.identity.authenticated.OutboundKeysForUserRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getUserid(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string userID = 1; + * @return {string} + */ +proto.identity.authenticated.OutboundKeysForUserRequest.prototype.getUserid = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.identity.authenticated.OutboundKeysForUserRequest} returns this + */ +proto.identity.authenticated.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.authenticated.InboundKeyInfo.prototype.toObject = function(opt_includeInstance) { + return proto.identity.authenticated.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.authenticated.InboundKeyInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.identity.authenticated.InboundKeyInfo.toObject = function(includeInstance, msg) { + var f, obj = { + identityinfo: (f = msg.getIdentityinfo()) && identity_client_pb.IdentityKeyInfo.toObject(includeInstance, f), + contentprekey: (f = msg.getContentprekey()) && identity_client_pb.PreKey.toObject(includeInstance, f), + notifprekey: (f = msg.getNotifprekey()) && identity_client_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.authenticated.InboundKeyInfo} + */ +proto.identity.authenticated.InboundKeyInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.identity.authenticated.InboundKeyInfo; + return proto.identity.authenticated.InboundKeyInfo.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.identity.authenticated.InboundKeyInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.identity.authenticated.InboundKeyInfo} + */ +proto.identity.authenticated.InboundKeyInfo.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new identity_client_pb.IdentityKeyInfo; + reader.readMessage(value,identity_client_pb.IdentityKeyInfo.deserializeBinaryFromReader); + msg.setIdentityinfo(value); + break; + case 2: + var value = new identity_client_pb.PreKey; + reader.readMessage(value,identity_client_pb.PreKey.deserializeBinaryFromReader); + msg.setContentprekey(value); + break; + case 3: + var value = new identity_client_pb.PreKey; + reader.readMessage(value,identity_client_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.authenticated.InboundKeyInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.identity.authenticated.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.authenticated.InboundKeyInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.identity.authenticated.InboundKeyInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getIdentityinfo(); + if (f != null) { + writer.writeMessage( + 1, + f, + identity_client_pb.IdentityKeyInfo.serializeBinaryToWriter + ); + } + f = message.getContentprekey(); + if (f != null) { + writer.writeMessage( + 2, + f, + identity_client_pb.PreKey.serializeBinaryToWriter + ); + } + f = message.getNotifprekey(); + if (f != null) { + writer.writeMessage( + 3, + f, + identity_client_pb.PreKey.serializeBinaryToWriter + ); + } +}; + + +/** + * optional identity.client.IdentityKeyInfo identityInfo = 1; + * @return {?proto.identity.client.IdentityKeyInfo} + */ +proto.identity.authenticated.InboundKeyInfo.prototype.getIdentityinfo = function() { + return /** @type{?proto.identity.client.IdentityKeyInfo} */ ( + jspb.Message.getWrapperField(this, identity_client_pb.IdentityKeyInfo, 1)); +}; + + +/** + * @param {?proto.identity.client.IdentityKeyInfo|undefined} value + * @return {!proto.identity.authenticated.InboundKeyInfo} returns this +*/ +proto.identity.authenticated.InboundKeyInfo.prototype.setIdentityinfo = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.identity.authenticated.InboundKeyInfo} returns this + */ +proto.identity.authenticated.InboundKeyInfo.prototype.clearIdentityinfo = function() { + return this.setIdentityinfo(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.identity.authenticated.InboundKeyInfo.prototype.hasIdentityinfo = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional identity.client.PreKey contentPrekey = 2; + * @return {?proto.identity.client.PreKey} + */ +proto.identity.authenticated.InboundKeyInfo.prototype.getContentprekey = function() { + return /** @type{?proto.identity.client.PreKey} */ ( + jspb.Message.getWrapperField(this, identity_client_pb.PreKey, 2)); +}; + + +/** + * @param {?proto.identity.client.PreKey|undefined} value + * @return {!proto.identity.authenticated.InboundKeyInfo} returns this +*/ +proto.identity.authenticated.InboundKeyInfo.prototype.setContentprekey = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.identity.authenticated.InboundKeyInfo} returns this + */ +proto.identity.authenticated.InboundKeyInfo.prototype.clearContentprekey = function() { + return this.setContentprekey(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.identity.authenticated.InboundKeyInfo.prototype.hasContentprekey = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional identity.client.PreKey notifPrekey = 3; + * @return {?proto.identity.client.PreKey} + */ +proto.identity.authenticated.InboundKeyInfo.prototype.getNotifprekey = function() { + return /** @type{?proto.identity.client.PreKey} */ ( + jspb.Message.getWrapperField(this, identity_client_pb.PreKey, 3)); +}; + + +/** + * @param {?proto.identity.client.PreKey|undefined} value + * @return {!proto.identity.authenticated.InboundKeyInfo} returns this +*/ +proto.identity.authenticated.InboundKeyInfo.prototype.setNotifprekey = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.identity.authenticated.InboundKeyInfo} returns this + */ +proto.identity.authenticated.InboundKeyInfo.prototype.clearNotifprekey = function() { + return this.setNotifprekey(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.identity.authenticated.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.authenticated.InboundKeysForUserResponse.prototype.toObject = function(opt_includeInstance) { + return proto.identity.authenticated.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.authenticated.InboundKeysForUserResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.identity.authenticated.InboundKeysForUserResponse.toObject = function(includeInstance, msg) { + var f, obj = { + devicesMap: (f = msg.getDevicesMap()) ? f.toObject(includeInstance, proto.identity.authenticated.InboundKeyInfo.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.authenticated.InboundKeysForUserResponse} + */ +proto.identity.authenticated.InboundKeysForUserResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.identity.authenticated.InboundKeysForUserResponse; + return proto.identity.authenticated.InboundKeysForUserResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.identity.authenticated.InboundKeysForUserResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.identity.authenticated.InboundKeysForUserResponse} + */ +proto.identity.authenticated.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.authenticated.InboundKeyInfo.deserializeBinaryFromReader, "", new proto.identity.authenticated.InboundKeyInfo()); + }); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.identity.authenticated.InboundKeysForUserResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.identity.authenticated.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.authenticated.InboundKeysForUserResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.identity.authenticated.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.authenticated.InboundKeyInfo.serializeBinaryToWriter); + } +}; + + +/** + * map devices = 1; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.identity.authenticated.InboundKeysForUserResponse.prototype.getDevicesMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 1, opt_noLazyCreate, + proto.identity.authenticated.InboundKeyInfo)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.identity.authenticated.InboundKeysForUserResponse} returns this + */ +proto.identity.authenticated.InboundKeysForUserResponse.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.authenticated.InboundKeysForUserRequest.prototype.toObject = function(opt_includeInstance) { + return proto.identity.authenticated.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.authenticated.InboundKeysForUserRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.identity.authenticated.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.authenticated.InboundKeysForUserRequest} + */ +proto.identity.authenticated.InboundKeysForUserRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.identity.authenticated.InboundKeysForUserRequest; + return proto.identity.authenticated.InboundKeysForUserRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.identity.authenticated.InboundKeysForUserRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.identity.authenticated.InboundKeysForUserRequest} + */ +proto.identity.authenticated.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.authenticated.InboundKeysForUserRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.identity.authenticated.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.authenticated.InboundKeysForUserRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.identity.authenticated.InboundKeysForUserRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getUserid(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string userID = 1; + * @return {string} + */ +proto.identity.authenticated.InboundKeysForUserRequest.prototype.getUserid = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.identity.authenticated.InboundKeysForUserRequest} returns this + */ +proto.identity.authenticated.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.authenticated.FindUserIDRequest.oneofGroups_ = [[1,2]]; + +/** + * @enum {number} + */ +proto.identity.authenticated.FindUserIDRequest.IdentifierCase = { + IDENTIFIER_NOT_SET: 0, + USERNAME: 1, + WALLETADDRESS: 2 +}; + +/** + * @return {proto.identity.authenticated.FindUserIDRequest.IdentifierCase} + */ +proto.identity.authenticated.FindUserIDRequest.prototype.getIdentifierCase = function() { + return /** @type {proto.identity.authenticated.FindUserIDRequest.IdentifierCase} */(jspb.Message.computeOneofCase(this, proto.identity.authenticated.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.authenticated.FindUserIDRequest.prototype.toObject = function(opt_includeInstance) { + return proto.identity.authenticated.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.authenticated.FindUserIDRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.identity.authenticated.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.authenticated.FindUserIDRequest} + */ +proto.identity.authenticated.FindUserIDRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.identity.authenticated.FindUserIDRequest; + return proto.identity.authenticated.FindUserIDRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.identity.authenticated.FindUserIDRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.identity.authenticated.FindUserIDRequest} + */ +proto.identity.authenticated.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.authenticated.FindUserIDRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.identity.authenticated.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.authenticated.FindUserIDRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.identity.authenticated.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.authenticated.FindUserIDRequest.prototype.getUsername = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.identity.authenticated.FindUserIDRequest} returns this + */ +proto.identity.authenticated.FindUserIDRequest.prototype.setUsername = function(value) { + return jspb.Message.setOneofField(this, 1, proto.identity.authenticated.FindUserIDRequest.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.identity.authenticated.FindUserIDRequest} returns this + */ +proto.identity.authenticated.FindUserIDRequest.prototype.clearUsername = function() { + return jspb.Message.setOneofField(this, 1, proto.identity.authenticated.FindUserIDRequest.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.identity.authenticated.FindUserIDRequest.prototype.hasUsername = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string walletAddress = 2; + * @return {string} + */ +proto.identity.authenticated.FindUserIDRequest.prototype.getWalletaddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.identity.authenticated.FindUserIDRequest} returns this + */ +proto.identity.authenticated.FindUserIDRequest.prototype.setWalletaddress = function(value) { + return jspb.Message.setOneofField(this, 2, proto.identity.authenticated.FindUserIDRequest.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.identity.authenticated.FindUserIDRequest} returns this + */ +proto.identity.authenticated.FindUserIDRequest.prototype.clearWalletaddress = function() { + return jspb.Message.setOneofField(this, 2, proto.identity.authenticated.FindUserIDRequest.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.identity.authenticated.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.authenticated.FindUserIDResponse.prototype.toObject = function(opt_includeInstance) { + return proto.identity.authenticated.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.authenticated.FindUserIDResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.identity.authenticated.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.authenticated.FindUserIDResponse} + */ +proto.identity.authenticated.FindUserIDResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.identity.authenticated.FindUserIDResponse; + return proto.identity.authenticated.FindUserIDResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.identity.authenticated.FindUserIDResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.identity.authenticated.FindUserIDResponse} + */ +proto.identity.authenticated.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.authenticated.FindUserIDResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.identity.authenticated.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.authenticated.FindUserIDResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.identity.authenticated.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 userID = 1; + * @return {string} + */ +proto.identity.authenticated.FindUserIDResponse.prototype.getUserid = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.identity.authenticated.FindUserIDResponse} returns this + */ +proto.identity.authenticated.FindUserIDResponse.prototype.setUserid = function(value) { + return jspb.Message.setField(this, 1, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.identity.authenticated.FindUserIDResponse} returns this + */ +proto.identity.authenticated.FindUserIDResponse.prototype.clearUserid = function() { + return jspb.Message.setField(this, 1, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.identity.authenticated.FindUserIDResponse.prototype.hasUserid = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional bool is_reserved = 2; + * @return {boolean} + */ +proto.identity.authenticated.FindUserIDResponse.prototype.getIsReserved = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.identity.authenticated.FindUserIDResponse} returns this + */ +proto.identity.authenticated.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.authenticated.UpdateUserPasswordStartRequest.prototype.toObject = function(opt_includeInstance) { + return proto.identity.authenticated.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.authenticated.UpdateUserPasswordStartRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.identity.authenticated.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.authenticated.UpdateUserPasswordStartRequest} + */ +proto.identity.authenticated.UpdateUserPasswordStartRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.identity.authenticated.UpdateUserPasswordStartRequest; + return proto.identity.authenticated.UpdateUserPasswordStartRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.identity.authenticated.UpdateUserPasswordStartRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.identity.authenticated.UpdateUserPasswordStartRequest} + */ +proto.identity.authenticated.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.authenticated.UpdateUserPasswordStartRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.identity.authenticated.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.authenticated.UpdateUserPasswordStartRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.identity.authenticated.UpdateUserPasswordStartRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOpaqueregistrationrequest_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } +}; + + +/** + * optional bytes opaqueRegistrationRequest = 1; + * @return {string} + */ +proto.identity.authenticated.UpdateUserPasswordStartRequest.prototype.getOpaqueregistrationrequest = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes opaqueRegistrationRequest = 1; + * This is a type-conversion wrapper around `getOpaqueregistrationrequest()` + * @return {string} + */ +proto.identity.authenticated.UpdateUserPasswordStartRequest.prototype.getOpaqueregistrationrequest_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getOpaqueregistrationrequest())); +}; + + +/** + * optional bytes opaqueRegistrationRequest = 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.authenticated.UpdateUserPasswordStartRequest.prototype.getOpaqueregistrationrequest_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getOpaqueregistrationrequest())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.identity.authenticated.UpdateUserPasswordStartRequest} returns this + */ +proto.identity.authenticated.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.authenticated.UpdateUserPasswordFinishRequest.prototype.toObject = function(opt_includeInstance) { + return proto.identity.authenticated.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.authenticated.UpdateUserPasswordFinishRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.identity.authenticated.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.authenticated.UpdateUserPasswordFinishRequest} + */ +proto.identity.authenticated.UpdateUserPasswordFinishRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.identity.authenticated.UpdateUserPasswordFinishRequest; + return proto.identity.authenticated.UpdateUserPasswordFinishRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.identity.authenticated.UpdateUserPasswordFinishRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.identity.authenticated.UpdateUserPasswordFinishRequest} + */ +proto.identity.authenticated.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.authenticated.UpdateUserPasswordFinishRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.identity.authenticated.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.authenticated.UpdateUserPasswordFinishRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.identity.authenticated.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 sessionID = 1; + * @return {string} + */ +proto.identity.authenticated.UpdateUserPasswordFinishRequest.prototype.getSessionid = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.identity.authenticated.UpdateUserPasswordFinishRequest} returns this + */ +proto.identity.authenticated.UpdateUserPasswordFinishRequest.prototype.setSessionid = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional bytes opaqueRegistrationUpload = 2; + * @return {string} + */ +proto.identity.authenticated.UpdateUserPasswordFinishRequest.prototype.getOpaqueregistrationupload = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes opaqueRegistrationUpload = 2; + * This is a type-conversion wrapper around `getOpaqueregistrationupload()` + * @return {string} + */ +proto.identity.authenticated.UpdateUserPasswordFinishRequest.prototype.getOpaqueregistrationupload_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getOpaqueregistrationupload())); +}; + + +/** + * optional bytes opaqueRegistrationUpload = 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.authenticated.UpdateUserPasswordFinishRequest.prototype.getOpaqueregistrationupload_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getOpaqueregistrationupload())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.identity.authenticated.UpdateUserPasswordFinishRequest} returns this + */ +proto.identity.authenticated.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.authenticated.UpdateUserPasswordStartResponse.prototype.toObject = function(opt_includeInstance) { + return proto.identity.authenticated.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.authenticated.UpdateUserPasswordStartResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.identity.authenticated.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.authenticated.UpdateUserPasswordStartResponse} + */ +proto.identity.authenticated.UpdateUserPasswordStartResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.identity.authenticated.UpdateUserPasswordStartResponse; + return proto.identity.authenticated.UpdateUserPasswordStartResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.identity.authenticated.UpdateUserPasswordStartResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.identity.authenticated.UpdateUserPasswordStartResponse} + */ +proto.identity.authenticated.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.authenticated.UpdateUserPasswordStartResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.identity.authenticated.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.authenticated.UpdateUserPasswordStartResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.identity.authenticated.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 sessionID = 1; + * @return {string} + */ +proto.identity.authenticated.UpdateUserPasswordStartResponse.prototype.getSessionid = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.identity.authenticated.UpdateUserPasswordStartResponse} returns this + */ +proto.identity.authenticated.UpdateUserPasswordStartResponse.prototype.setSessionid = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional bytes opaqueRegistrationResponse = 2; + * @return {string} + */ +proto.identity.authenticated.UpdateUserPasswordStartResponse.prototype.getOpaqueregistrationresponse = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes opaqueRegistrationResponse = 2; + * This is a type-conversion wrapper around `getOpaqueregistrationresponse()` + * @return {string} + */ +proto.identity.authenticated.UpdateUserPasswordStartResponse.prototype.getOpaqueregistrationresponse_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getOpaqueregistrationresponse())); +}; + + +/** + * optional bytes opaqueRegistrationResponse = 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.authenticated.UpdateUserPasswordStartResponse.prototype.getOpaqueregistrationresponse_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getOpaqueregistrationresponse())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.identity.authenticated.UpdateUserPasswordStartResponse} returns this + */ +proto.identity.authenticated.UpdateUserPasswordStartResponse.prototype.setOpaqueregistrationresponse = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); }; goog.object.extend(exports, proto.identity.authenticated); diff --git a/web/protobufs/identity-auth-structs.cjs.flow b/web/protobufs/identity-auth-structs.cjs.flow index bb3ea23e6..1e977122a 100644 --- a/web/protobufs/identity-auth-structs.cjs.flow +++ b/web/protobufs/identity-auth-structs.cjs.flow @@ -1,134 +1,338 @@ // @flow import { Message, BinaryWriter, BinaryReader, Map as ProtoMap, } from 'google-protobuf'; import * as identityStructs from './identity-structs.cjs'; 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; + + 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]>, +} + +declare export class InboundKeysForUserRequest extends Message { + getUsername(): string; + setUsername(value: string): InboundKeysForUserRequest; + + getWalletaddress(): string; + setWalletaddress(value: string): InboundKeysForUserRequest; + + getIdentifierCase(): IdentifierCase; + + 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; + + getAccesstoken(): string; + setAccesstoken(value: string): UpdateUserPasswordStartRequest; + + getUserid(): string; + setUserid(value: string): UpdateUserPasswordStartRequest; + + getDeviceidkey(): string; + setDeviceidkey(value: 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, + accesstoken: string, + userid: string, + deviceidkey: 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, +}; + diff --git a/web/protobufs/identity-client.cjs b/web/protobufs/identity-client.cjs index 07ec8d8b1..0a0b7e47d 100644 --- a/web/protobufs/identity-client.cjs +++ b/web/protobufs/identity-client.cjs @@ -1,1238 +1,811 @@ /** * @fileoverview gRPC-Web generated client stub for identity.client * @enhanceable * @public * @generated */ // Code generated by protoc-gen-grpc-web. DO NOT EDIT. // versions: // protoc-gen-grpc-web v1.4.2 // protoc v3.21.12 // source: identity_client.proto /* eslint-disable */ // @ts-nocheck const grpc = {}; grpc.web = require('grpc-web'); const proto = {}; proto.identity = {}; proto.identity.client = require('./identity-structs.cjs'); /** * @param {string} hostname * @param {?Object} credentials * @param {?grpc.web.ClientOptions} options * @constructor * @struct * @final */ proto.identity.client.IdentityClientServiceClient = function(hostname, credentials, options) { if (!options) options = {}; options.format = 'text'; /** * @private @const {!grpc.web.GrpcWebClientBase} The client */ this.client_ = new grpc.web.GrpcWebClientBase(options); /** * @private @const {string} The hostname */ this.hostname_ = hostname.replace(/\/+$/, ''); }; /** * @param {string} hostname * @param {?Object} credentials * @param {?grpc.web.ClientOptions} options * @constructor * @struct * @final */ proto.identity.client.IdentityClientServicePromiseClient = function(hostname, credentials, options) { if (!options) options = {}; options.format = 'text'; /** * @private @const {!grpc.web.GrpcWebClientBase} The client */ this.client_ = new grpc.web.GrpcWebClientBase(options); /** * @private @const {string} The hostname */ this.hostname_ = hostname.replace(/\/+$/, ''); }; /** * @const * @type {!grpc.web.MethodDescriptor< * !proto.identity.client.RegistrationStartRequest, * !proto.identity.client.RegistrationStartResponse>} */ const methodDescriptor_IdentityClientService_RegisterPasswordUserStart = new grpc.web.MethodDescriptor( '/identity.client.IdentityClientService/RegisterPasswordUserStart', grpc.web.MethodType.UNARY, proto.identity.client.RegistrationStartRequest, proto.identity.client.RegistrationStartResponse, /** * @param {!proto.identity.client.RegistrationStartRequest} request * @return {!Uint8Array} */ function(request) { return request.serializeBinary(); }, proto.identity.client.RegistrationStartResponse.deserializeBinary ); /** * @param {!proto.identity.client.RegistrationStartRequest} request The * request proto * @param {?Object} metadata User defined * call metadata * @param {function(?grpc.web.RpcError, ?proto.identity.client.RegistrationStartResponse)} * callback The callback function(error, response) * @return {!grpc.web.ClientReadableStream|undefined} * The XHR Node Readable Stream */ proto.identity.client.IdentityClientServiceClient.prototype.registerPasswordUserStart = function(request, metadata, callback) { return this.client_.rpcCall(this.hostname_ + '/identity.client.IdentityClientService/RegisterPasswordUserStart', request, metadata || {}, methodDescriptor_IdentityClientService_RegisterPasswordUserStart, callback); }; /** * @param {!proto.identity.client.RegistrationStartRequest} request The * request proto * @param {?Object=} metadata User defined * call metadata * @return {!Promise} * Promise that resolves to the response */ proto.identity.client.IdentityClientServicePromiseClient.prototype.registerPasswordUserStart = function(request, metadata) { return this.client_.unaryCall(this.hostname_ + '/identity.client.IdentityClientService/RegisterPasswordUserStart', request, metadata || {}, methodDescriptor_IdentityClientService_RegisterPasswordUserStart); }; /** * @const * @type {!grpc.web.MethodDescriptor< * !proto.identity.client.ReservedRegistrationStartRequest, * !proto.identity.client.RegistrationStartResponse>} */ const methodDescriptor_IdentityClientService_RegisterReservedPasswordUserStart = new grpc.web.MethodDescriptor( '/identity.client.IdentityClientService/RegisterReservedPasswordUserStart', grpc.web.MethodType.UNARY, proto.identity.client.ReservedRegistrationStartRequest, proto.identity.client.RegistrationStartResponse, /** * @param {!proto.identity.client.ReservedRegistrationStartRequest} request * @return {!Uint8Array} */ function(request) { return request.serializeBinary(); }, proto.identity.client.RegistrationStartResponse.deserializeBinary ); /** * @param {!proto.identity.client.ReservedRegistrationStartRequest} request The * request proto * @param {?Object} metadata User defined * call metadata * @param {function(?grpc.web.RpcError, ?proto.identity.client.RegistrationStartResponse)} * callback The callback function(error, response) * @return {!grpc.web.ClientReadableStream|undefined} * The XHR Node Readable Stream */ proto.identity.client.IdentityClientServiceClient.prototype.registerReservedPasswordUserStart = function(request, metadata, callback) { return this.client_.rpcCall(this.hostname_ + '/identity.client.IdentityClientService/RegisterReservedPasswordUserStart', request, metadata || {}, methodDescriptor_IdentityClientService_RegisterReservedPasswordUserStart, callback); }; /** * @param {!proto.identity.client.ReservedRegistrationStartRequest} request The * request proto * @param {?Object=} metadata User defined * call metadata * @return {!Promise} * Promise that resolves to the response */ proto.identity.client.IdentityClientServicePromiseClient.prototype.registerReservedPasswordUserStart = function(request, metadata) { return this.client_.unaryCall(this.hostname_ + '/identity.client.IdentityClientService/RegisterReservedPasswordUserStart', request, metadata || {}, methodDescriptor_IdentityClientService_RegisterReservedPasswordUserStart); }; /** * @const * @type {!grpc.web.MethodDescriptor< * !proto.identity.client.RegistrationFinishRequest, * !proto.identity.client.RegistrationFinishResponse>} */ const methodDescriptor_IdentityClientService_RegisterPasswordUserFinish = new grpc.web.MethodDescriptor( '/identity.client.IdentityClientService/RegisterPasswordUserFinish', grpc.web.MethodType.UNARY, proto.identity.client.RegistrationFinishRequest, proto.identity.client.RegistrationFinishResponse, /** * @param {!proto.identity.client.RegistrationFinishRequest} request * @return {!Uint8Array} */ function(request) { return request.serializeBinary(); }, proto.identity.client.RegistrationFinishResponse.deserializeBinary ); /** * @param {!proto.identity.client.RegistrationFinishRequest} request The * request proto * @param {?Object} metadata User defined * call metadata * @param {function(?grpc.web.RpcError, ?proto.identity.client.RegistrationFinishResponse)} * callback The callback function(error, response) * @return {!grpc.web.ClientReadableStream|undefined} * The XHR Node Readable Stream */ proto.identity.client.IdentityClientServiceClient.prototype.registerPasswordUserFinish = function(request, metadata, callback) { return this.client_.rpcCall(this.hostname_ + '/identity.client.IdentityClientService/RegisterPasswordUserFinish', request, metadata || {}, methodDescriptor_IdentityClientService_RegisterPasswordUserFinish, callback); }; /** * @param {!proto.identity.client.RegistrationFinishRequest} request The * request proto * @param {?Object=} metadata User defined * call metadata * @return {!Promise} * Promise that resolves to the response */ proto.identity.client.IdentityClientServicePromiseClient.prototype.registerPasswordUserFinish = function(request, metadata) { return this.client_.unaryCall(this.hostname_ + '/identity.client.IdentityClientService/RegisterPasswordUserFinish', request, metadata || {}, methodDescriptor_IdentityClientService_RegisterPasswordUserFinish); }; -/** - * @const - * @type {!grpc.web.MethodDescriptor< - * !proto.identity.client.UpdateUserPasswordStartRequest, - * !proto.identity.client.UpdateUserPasswordStartResponse>} - */ -const methodDescriptor_IdentityClientService_UpdateUserPasswordStart = new grpc.web.MethodDescriptor( - '/identity.client.IdentityClientService/UpdateUserPasswordStart', - grpc.web.MethodType.UNARY, - proto.identity.client.UpdateUserPasswordStartRequest, - proto.identity.client.UpdateUserPasswordStartResponse, - /** - * @param {!proto.identity.client.UpdateUserPasswordStartRequest} request - * @return {!Uint8Array} - */ - function(request) { - return request.serializeBinary(); - }, - proto.identity.client.UpdateUserPasswordStartResponse.deserializeBinary -); - - -/** - * @param {!proto.identity.client.UpdateUserPasswordStartRequest} request The - * request proto - * @param {?Object} metadata User defined - * call metadata - * @param {function(?grpc.web.RpcError, ?proto.identity.client.UpdateUserPasswordStartResponse)} - * callback The callback function(error, response) - * @return {!grpc.web.ClientReadableStream|undefined} - * The XHR Node Readable Stream - */ -proto.identity.client.IdentityClientServiceClient.prototype.updateUserPasswordStart = - function(request, metadata, callback) { - return this.client_.rpcCall(this.hostname_ + - '/identity.client.IdentityClientService/UpdateUserPasswordStart', - request, - metadata || {}, - methodDescriptor_IdentityClientService_UpdateUserPasswordStart, - callback); -}; - - -/** - * @param {!proto.identity.client.UpdateUserPasswordStartRequest} request The - * request proto - * @param {?Object=} metadata User defined - * call metadata - * @return {!Promise} - * Promise that resolves to the response - */ -proto.identity.client.IdentityClientServicePromiseClient.prototype.updateUserPasswordStart = - function(request, metadata) { - return this.client_.unaryCall(this.hostname_ + - '/identity.client.IdentityClientService/UpdateUserPasswordStart', - request, - metadata || {}, - methodDescriptor_IdentityClientService_UpdateUserPasswordStart); -}; - - -/** - * @const - * @type {!grpc.web.MethodDescriptor< - * !proto.identity.client.UpdateUserPasswordFinishRequest, - * !proto.identity.client.Empty>} - */ -const methodDescriptor_IdentityClientService_UpdateUserPasswordFinish = new grpc.web.MethodDescriptor( - '/identity.client.IdentityClientService/UpdateUserPasswordFinish', - grpc.web.MethodType.UNARY, - proto.identity.client.UpdateUserPasswordFinishRequest, - proto.identity.client.Empty, - /** - * @param {!proto.identity.client.UpdateUserPasswordFinishRequest} request - * @return {!Uint8Array} - */ - function(request) { - return request.serializeBinary(); - }, - proto.identity.client.Empty.deserializeBinary -); - - -/** - * @param {!proto.identity.client.UpdateUserPasswordFinishRequest} request The - * request proto - * @param {?Object} metadata User defined - * call metadata - * @param {function(?grpc.web.RpcError, ?proto.identity.client.Empty)} - * callback The callback function(error, response) - * @return {!grpc.web.ClientReadableStream|undefined} - * The XHR Node Readable Stream - */ -proto.identity.client.IdentityClientServiceClient.prototype.updateUserPasswordFinish = - function(request, metadata, callback) { - return this.client_.rpcCall(this.hostname_ + - '/identity.client.IdentityClientService/UpdateUserPasswordFinish', - request, - metadata || {}, - methodDescriptor_IdentityClientService_UpdateUserPasswordFinish, - callback); -}; - - -/** - * @param {!proto.identity.client.UpdateUserPasswordFinishRequest} request The - * request proto - * @param {?Object=} metadata User defined - * call metadata - * @return {!Promise} - * Promise that resolves to the response - */ -proto.identity.client.IdentityClientServicePromiseClient.prototype.updateUserPasswordFinish = - function(request, metadata) { - return this.client_.unaryCall(this.hostname_ + - '/identity.client.IdentityClientService/UpdateUserPasswordFinish', - request, - metadata || {}, - methodDescriptor_IdentityClientService_UpdateUserPasswordFinish); -}; - - /** * @const * @type {!grpc.web.MethodDescriptor< * !proto.identity.client.OpaqueLoginStartRequest, * !proto.identity.client.OpaqueLoginStartResponse>} */ const methodDescriptor_IdentityClientService_LoginPasswordUserStart = new grpc.web.MethodDescriptor( '/identity.client.IdentityClientService/LoginPasswordUserStart', grpc.web.MethodType.UNARY, proto.identity.client.OpaqueLoginStartRequest, proto.identity.client.OpaqueLoginStartResponse, /** * @param {!proto.identity.client.OpaqueLoginStartRequest} request * @return {!Uint8Array} */ function(request) { return request.serializeBinary(); }, proto.identity.client.OpaqueLoginStartResponse.deserializeBinary ); /** * @param {!proto.identity.client.OpaqueLoginStartRequest} request The * request proto * @param {?Object} metadata User defined * call metadata * @param {function(?grpc.web.RpcError, ?proto.identity.client.OpaqueLoginStartResponse)} * callback The callback function(error, response) * @return {!grpc.web.ClientReadableStream|undefined} * The XHR Node Readable Stream */ proto.identity.client.IdentityClientServiceClient.prototype.loginPasswordUserStart = function(request, metadata, callback) { return this.client_.rpcCall(this.hostname_ + '/identity.client.IdentityClientService/LoginPasswordUserStart', request, metadata || {}, methodDescriptor_IdentityClientService_LoginPasswordUserStart, callback); }; /** * @param {!proto.identity.client.OpaqueLoginStartRequest} request The * request proto * @param {?Object=} metadata User defined * call metadata * @return {!Promise} * Promise that resolves to the response */ proto.identity.client.IdentityClientServicePromiseClient.prototype.loginPasswordUserStart = function(request, metadata) { return this.client_.unaryCall(this.hostname_ + '/identity.client.IdentityClientService/LoginPasswordUserStart', request, metadata || {}, methodDescriptor_IdentityClientService_LoginPasswordUserStart); }; /** * @const * @type {!grpc.web.MethodDescriptor< * !proto.identity.client.OpaqueLoginFinishRequest, * !proto.identity.client.OpaqueLoginFinishResponse>} */ const methodDescriptor_IdentityClientService_LoginPasswordUserFinish = new grpc.web.MethodDescriptor( '/identity.client.IdentityClientService/LoginPasswordUserFinish', grpc.web.MethodType.UNARY, proto.identity.client.OpaqueLoginFinishRequest, proto.identity.client.OpaqueLoginFinishResponse, /** * @param {!proto.identity.client.OpaqueLoginFinishRequest} request * @return {!Uint8Array} */ function(request) { return request.serializeBinary(); }, proto.identity.client.OpaqueLoginFinishResponse.deserializeBinary ); /** * @param {!proto.identity.client.OpaqueLoginFinishRequest} request The * request proto * @param {?Object} metadata User defined * call metadata * @param {function(?grpc.web.RpcError, ?proto.identity.client.OpaqueLoginFinishResponse)} * callback The callback function(error, response) * @return {!grpc.web.ClientReadableStream|undefined} * The XHR Node Readable Stream */ proto.identity.client.IdentityClientServiceClient.prototype.loginPasswordUserFinish = function(request, metadata, callback) { return this.client_.rpcCall(this.hostname_ + '/identity.client.IdentityClientService/LoginPasswordUserFinish', request, metadata || {}, methodDescriptor_IdentityClientService_LoginPasswordUserFinish, callback); }; /** * @param {!proto.identity.client.OpaqueLoginFinishRequest} request The * request proto * @param {?Object=} metadata User defined * call metadata * @return {!Promise} * Promise that resolves to the response */ proto.identity.client.IdentityClientServicePromiseClient.prototype.loginPasswordUserFinish = function(request, metadata) { return this.client_.unaryCall(this.hostname_ + '/identity.client.IdentityClientService/LoginPasswordUserFinish', request, metadata || {}, methodDescriptor_IdentityClientService_LoginPasswordUserFinish); }; /** * @const * @type {!grpc.web.MethodDescriptor< * !proto.identity.client.WalletLoginRequest, * !proto.identity.client.WalletLoginResponse>} */ const methodDescriptor_IdentityClientService_LoginWalletUser = new grpc.web.MethodDescriptor( '/identity.client.IdentityClientService/LoginWalletUser', grpc.web.MethodType.UNARY, proto.identity.client.WalletLoginRequest, proto.identity.client.WalletLoginResponse, /** * @param {!proto.identity.client.WalletLoginRequest} request * @return {!Uint8Array} */ function(request) { return request.serializeBinary(); }, proto.identity.client.WalletLoginResponse.deserializeBinary ); /** * @param {!proto.identity.client.WalletLoginRequest} request The * request proto * @param {?Object} metadata User defined * call metadata * @param {function(?grpc.web.RpcError, ?proto.identity.client.WalletLoginResponse)} * callback The callback function(error, response) * @return {!grpc.web.ClientReadableStream|undefined} * The XHR Node Readable Stream */ proto.identity.client.IdentityClientServiceClient.prototype.loginWalletUser = function(request, metadata, callback) { return this.client_.rpcCall(this.hostname_ + '/identity.client.IdentityClientService/LoginWalletUser', request, metadata || {}, methodDescriptor_IdentityClientService_LoginWalletUser, callback); }; /** * @param {!proto.identity.client.WalletLoginRequest} request The * request proto * @param {?Object=} metadata User defined * call metadata * @return {!Promise} * Promise that resolves to the response */ proto.identity.client.IdentityClientServicePromiseClient.prototype.loginWalletUser = function(request, metadata) { return this.client_.unaryCall(this.hostname_ + '/identity.client.IdentityClientService/LoginWalletUser', request, metadata || {}, methodDescriptor_IdentityClientService_LoginWalletUser); }; /** * @const * @type {!grpc.web.MethodDescriptor< * !proto.identity.client.ReservedWalletLoginRequest, * !proto.identity.client.WalletLoginResponse>} */ const methodDescriptor_IdentityClientService_LoginReservedWalletUser = new grpc.web.MethodDescriptor( '/identity.client.IdentityClientService/LoginReservedWalletUser', grpc.web.MethodType.UNARY, proto.identity.client.ReservedWalletLoginRequest, proto.identity.client.WalletLoginResponse, /** * @param {!proto.identity.client.ReservedWalletLoginRequest} request * @return {!Uint8Array} */ function(request) { return request.serializeBinary(); }, proto.identity.client.WalletLoginResponse.deserializeBinary ); /** * @param {!proto.identity.client.ReservedWalletLoginRequest} request The * request proto * @param {?Object} metadata User defined * call metadata * @param {function(?grpc.web.RpcError, ?proto.identity.client.WalletLoginResponse)} * callback The callback function(error, response) * @return {!grpc.web.ClientReadableStream|undefined} * The XHR Node Readable Stream */ proto.identity.client.IdentityClientServiceClient.prototype.loginReservedWalletUser = function(request, metadata, callback) { return this.client_.rpcCall(this.hostname_ + '/identity.client.IdentityClientService/LoginReservedWalletUser', request, metadata || {}, methodDescriptor_IdentityClientService_LoginReservedWalletUser, callback); }; /** * @param {!proto.identity.client.ReservedWalletLoginRequest} request The * request proto * @param {?Object=} metadata User defined * call metadata * @return {!Promise} * Promise that resolves to the response */ proto.identity.client.IdentityClientServicePromiseClient.prototype.loginReservedWalletUser = function(request, metadata) { return this.client_.unaryCall(this.hostname_ + '/identity.client.IdentityClientService/LoginReservedWalletUser', request, metadata || {}, methodDescriptor_IdentityClientService_LoginReservedWalletUser); }; -/** - * @const - * @type {!grpc.web.MethodDescriptor< - * !proto.identity.client.LogoutRequest, - * !proto.identity.client.Empty>} - */ -const methodDescriptor_IdentityClientService_LogOutUser = new grpc.web.MethodDescriptor( - '/identity.client.IdentityClientService/LogOutUser', - grpc.web.MethodType.UNARY, - proto.identity.client.LogoutRequest, - proto.identity.client.Empty, - /** - * @param {!proto.identity.client.LogoutRequest} request - * @return {!Uint8Array} - */ - function(request) { - return request.serializeBinary(); - }, - proto.identity.client.Empty.deserializeBinary -); - - -/** - * @param {!proto.identity.client.LogoutRequest} request The - * request proto - * @param {?Object} metadata User defined - * call metadata - * @param {function(?grpc.web.RpcError, ?proto.identity.client.Empty)} - * callback The callback function(error, response) - * @return {!grpc.web.ClientReadableStream|undefined} - * The XHR Node Readable Stream - */ -proto.identity.client.IdentityClientServiceClient.prototype.logOutUser = - function(request, metadata, callback) { - return this.client_.rpcCall(this.hostname_ + - '/identity.client.IdentityClientService/LogOutUser', - request, - metadata || {}, - methodDescriptor_IdentityClientService_LogOutUser, - callback); -}; - - -/** - * @param {!proto.identity.client.LogoutRequest} request The - * request proto - * @param {?Object=} metadata User defined - * call metadata - * @return {!Promise} - * Promise that resolves to the response - */ -proto.identity.client.IdentityClientServicePromiseClient.prototype.logOutUser = - function(request, metadata) { - return this.client_.unaryCall(this.hostname_ + - '/identity.client.IdentityClientService/LogOutUser', - request, - metadata || {}, - methodDescriptor_IdentityClientService_LogOutUser); -}; - - -/** - * @const - * @type {!grpc.web.MethodDescriptor< - * !proto.identity.client.DeleteUserRequest, - * !proto.identity.client.Empty>} - */ -const methodDescriptor_IdentityClientService_DeleteUser = new grpc.web.MethodDescriptor( - '/identity.client.IdentityClientService/DeleteUser', - grpc.web.MethodType.UNARY, - proto.identity.client.DeleteUserRequest, - proto.identity.client.Empty, - /** - * @param {!proto.identity.client.DeleteUserRequest} request - * @return {!Uint8Array} - */ - function(request) { - return request.serializeBinary(); - }, - proto.identity.client.Empty.deserializeBinary -); - - -/** - * @param {!proto.identity.client.DeleteUserRequest} request The - * request proto - * @param {?Object} metadata User defined - * call metadata - * @param {function(?grpc.web.RpcError, ?proto.identity.client.Empty)} - * callback The callback function(error, response) - * @return {!grpc.web.ClientReadableStream|undefined} - * The XHR Node Readable Stream - */ -proto.identity.client.IdentityClientServiceClient.prototype.deleteUser = - function(request, metadata, callback) { - return this.client_.rpcCall(this.hostname_ + - '/identity.client.IdentityClientService/DeleteUser', - request, - metadata || {}, - methodDescriptor_IdentityClientService_DeleteUser, - callback); -}; - - -/** - * @param {!proto.identity.client.DeleteUserRequest} request The - * request proto - * @param {?Object=} metadata User defined - * call metadata - * @return {!Promise} - * Promise that resolves to the response - */ -proto.identity.client.IdentityClientServicePromiseClient.prototype.deleteUser = - function(request, metadata) { - return this.client_.unaryCall(this.hostname_ + - '/identity.client.IdentityClientService/DeleteUser', - request, - metadata || {}, - methodDescriptor_IdentityClientService_DeleteUser); -}; - - /** * @const * @type {!grpc.web.MethodDescriptor< * !proto.identity.client.Empty, * !proto.identity.client.GenerateNonceResponse>} */ const methodDescriptor_IdentityClientService_GenerateNonce = new grpc.web.MethodDescriptor( '/identity.client.IdentityClientService/GenerateNonce', grpc.web.MethodType.UNARY, proto.identity.client.Empty, proto.identity.client.GenerateNonceResponse, /** * @param {!proto.identity.client.Empty} request * @return {!Uint8Array} */ function(request) { return request.serializeBinary(); }, proto.identity.client.GenerateNonceResponse.deserializeBinary ); /** * @param {!proto.identity.client.Empty} request The * request proto * @param {?Object} metadata User defined * call metadata * @param {function(?grpc.web.RpcError, ?proto.identity.client.GenerateNonceResponse)} * callback The callback function(error, response) * @return {!grpc.web.ClientReadableStream|undefined} * The XHR Node Readable Stream */ proto.identity.client.IdentityClientServiceClient.prototype.generateNonce = function(request, metadata, callback) { return this.client_.rpcCall(this.hostname_ + '/identity.client.IdentityClientService/GenerateNonce', request, metadata || {}, methodDescriptor_IdentityClientService_GenerateNonce, callback); }; /** * @param {!proto.identity.client.Empty} request The * request proto * @param {?Object=} metadata User defined * call metadata * @return {!Promise} * Promise that resolves to the response */ proto.identity.client.IdentityClientServicePromiseClient.prototype.generateNonce = function(request, metadata) { return this.client_.unaryCall(this.hostname_ + '/identity.client.IdentityClientService/GenerateNonce', request, metadata || {}, methodDescriptor_IdentityClientService_GenerateNonce); }; -/** - * @const - * @type {!grpc.web.MethodDescriptor< - * !proto.identity.client.OutboundKeysForUserRequest, - * !proto.identity.client.OutboundKeysForUserResponse>} - */ -const methodDescriptor_IdentityClientService_GetOutboundKeysForUser = new grpc.web.MethodDescriptor( - '/identity.client.IdentityClientService/GetOutboundKeysForUser', - grpc.web.MethodType.UNARY, - proto.identity.client.OutboundKeysForUserRequest, - proto.identity.client.OutboundKeysForUserResponse, - /** - * @param {!proto.identity.client.OutboundKeysForUserRequest} request - * @return {!Uint8Array} - */ - function(request) { - return request.serializeBinary(); - }, - proto.identity.client.OutboundKeysForUserResponse.deserializeBinary -); - - -/** - * @param {!proto.identity.client.OutboundKeysForUserRequest} request The - * request proto - * @param {?Object} metadata User defined - * call metadata - * @param {function(?grpc.web.RpcError, ?proto.identity.client.OutboundKeysForUserResponse)} - * callback The callback function(error, response) - * @return {!grpc.web.ClientReadableStream|undefined} - * The XHR Node Readable Stream - */ -proto.identity.client.IdentityClientServiceClient.prototype.getOutboundKeysForUser = - function(request, metadata, callback) { - return this.client_.rpcCall(this.hostname_ + - '/identity.client.IdentityClientService/GetOutboundKeysForUser', - request, - metadata || {}, - methodDescriptor_IdentityClientService_GetOutboundKeysForUser, - callback); -}; - - -/** - * @param {!proto.identity.client.OutboundKeysForUserRequest} request The - * request proto - * @param {?Object=} metadata User defined - * call metadata - * @return {!Promise} - * Promise that resolves to the response - */ -proto.identity.client.IdentityClientServicePromiseClient.prototype.getOutboundKeysForUser = - function(request, metadata) { - return this.client_.unaryCall(this.hostname_ + - '/identity.client.IdentityClientService/GetOutboundKeysForUser', - request, - metadata || {}, - methodDescriptor_IdentityClientService_GetOutboundKeysForUser); -}; - - -/** - * @const - * @type {!grpc.web.MethodDescriptor< - * !proto.identity.client.InboundKeysForUserRequest, - * !proto.identity.client.InboundKeysForUserResponse>} - */ -const methodDescriptor_IdentityClientService_GetInboundKeysForUser = new grpc.web.MethodDescriptor( - '/identity.client.IdentityClientService/GetInboundKeysForUser', - grpc.web.MethodType.UNARY, - proto.identity.client.InboundKeysForUserRequest, - proto.identity.client.InboundKeysForUserResponse, - /** - * @param {!proto.identity.client.InboundKeysForUserRequest} request - * @return {!Uint8Array} - */ - function(request) { - return request.serializeBinary(); - }, - proto.identity.client.InboundKeysForUserResponse.deserializeBinary -); - - -/** - * @param {!proto.identity.client.InboundKeysForUserRequest} request The - * request proto - * @param {?Object} metadata User defined - * call metadata - * @param {function(?grpc.web.RpcError, ?proto.identity.client.InboundKeysForUserResponse)} - * callback The callback function(error, response) - * @return {!grpc.web.ClientReadableStream|undefined} - * The XHR Node Readable Stream - */ -proto.identity.client.IdentityClientServiceClient.prototype.getInboundKeysForUser = - function(request, metadata, callback) { - return this.client_.rpcCall(this.hostname_ + - '/identity.client.IdentityClientService/GetInboundKeysForUser', - request, - metadata || {}, - methodDescriptor_IdentityClientService_GetInboundKeysForUser, - callback); -}; - - -/** - * @param {!proto.identity.client.InboundKeysForUserRequest} request The - * request proto - * @param {?Object=} metadata User defined - * call metadata - * @return {!Promise} - * Promise that resolves to the response - */ -proto.identity.client.IdentityClientServicePromiseClient.prototype.getInboundKeysForUser = - function(request, metadata) { - return this.client_.unaryCall(this.hostname_ + - '/identity.client.IdentityClientService/GetInboundKeysForUser', - request, - metadata || {}, - methodDescriptor_IdentityClientService_GetInboundKeysForUser); -}; - - -/** - * @const - * @type {!grpc.web.MethodDescriptor< - * !proto.identity.client.UploadOneTimeKeysRequest, - * !proto.identity.client.Empty>} - */ -const methodDescriptor_IdentityClientService_UploadOneTimeKeys = new grpc.web.MethodDescriptor( - '/identity.client.IdentityClientService/UploadOneTimeKeys', - grpc.web.MethodType.UNARY, - proto.identity.client.UploadOneTimeKeysRequest, - proto.identity.client.Empty, - /** - * @param {!proto.identity.client.UploadOneTimeKeysRequest} request - * @return {!Uint8Array} - */ - function(request) { - return request.serializeBinary(); - }, - proto.identity.client.Empty.deserializeBinary -); - - -/** - * @param {!proto.identity.client.UploadOneTimeKeysRequest} request The - * request proto - * @param {?Object} metadata User defined - * call metadata - * @param {function(?grpc.web.RpcError, ?proto.identity.client.Empty)} - * callback The callback function(error, response) - * @return {!grpc.web.ClientReadableStream|undefined} - * The XHR Node Readable Stream - */ -proto.identity.client.IdentityClientServiceClient.prototype.uploadOneTimeKeys = - function(request, metadata, callback) { - return this.client_.rpcCall(this.hostname_ + - '/identity.client.IdentityClientService/UploadOneTimeKeys', - request, - metadata || {}, - methodDescriptor_IdentityClientService_UploadOneTimeKeys, - callback); -}; - - -/** - * @param {!proto.identity.client.UploadOneTimeKeysRequest} request The - * request proto - * @param {?Object=} metadata User defined - * call metadata - * @return {!Promise} - * Promise that resolves to the response - */ -proto.identity.client.IdentityClientServicePromiseClient.prototype.uploadOneTimeKeys = - function(request, metadata) { - return this.client_.unaryCall(this.hostname_ + - '/identity.client.IdentityClientService/UploadOneTimeKeys', - request, - metadata || {}, - methodDescriptor_IdentityClientService_UploadOneTimeKeys); -}; - - /** * @const * @type {!grpc.web.MethodDescriptor< * !proto.identity.client.VerifyUserAccessTokenRequest, * !proto.identity.client.VerifyUserAccessTokenResponse>} */ const methodDescriptor_IdentityClientService_VerifyUserAccessToken = new grpc.web.MethodDescriptor( '/identity.client.IdentityClientService/VerifyUserAccessToken', grpc.web.MethodType.UNARY, proto.identity.client.VerifyUserAccessTokenRequest, proto.identity.client.VerifyUserAccessTokenResponse, /** * @param {!proto.identity.client.VerifyUserAccessTokenRequest} request * @return {!Uint8Array} */ function(request) { return request.serializeBinary(); }, proto.identity.client.VerifyUserAccessTokenResponse.deserializeBinary ); /** * @param {!proto.identity.client.VerifyUserAccessTokenRequest} request The * request proto * @param {?Object} metadata User defined * call metadata * @param {function(?grpc.web.RpcError, ?proto.identity.client.VerifyUserAccessTokenResponse)} * callback The callback function(error, response) * @return {!grpc.web.ClientReadableStream|undefined} * The XHR Node Readable Stream */ proto.identity.client.IdentityClientServiceClient.prototype.verifyUserAccessToken = function(request, metadata, callback) { return this.client_.rpcCall(this.hostname_ + '/identity.client.IdentityClientService/VerifyUserAccessToken', request, metadata || {}, methodDescriptor_IdentityClientService_VerifyUserAccessToken, callback); }; /** * @param {!proto.identity.client.VerifyUserAccessTokenRequest} request The * request proto * @param {?Object=} metadata User defined * call metadata * @return {!Promise} * Promise that resolves to the response */ proto.identity.client.IdentityClientServicePromiseClient.prototype.verifyUserAccessToken = function(request, metadata) { return this.client_.unaryCall(this.hostname_ + '/identity.client.IdentityClientService/VerifyUserAccessToken', request, metadata || {}, methodDescriptor_IdentityClientService_VerifyUserAccessToken); }; /** * @const * @type {!grpc.web.MethodDescriptor< * !proto.identity.client.AddReservedUsernamesRequest, * !proto.identity.client.Empty>} */ const methodDescriptor_IdentityClientService_AddReservedUsernames = new grpc.web.MethodDescriptor( '/identity.client.IdentityClientService/AddReservedUsernames', grpc.web.MethodType.UNARY, proto.identity.client.AddReservedUsernamesRequest, proto.identity.client.Empty, /** * @param {!proto.identity.client.AddReservedUsernamesRequest} request * @return {!Uint8Array} */ function(request) { return request.serializeBinary(); }, proto.identity.client.Empty.deserializeBinary ); /** * @param {!proto.identity.client.AddReservedUsernamesRequest} request The * request proto * @param {?Object} metadata User defined * call metadata * @param {function(?grpc.web.RpcError, ?proto.identity.client.Empty)} * callback The callback function(error, response) * @return {!grpc.web.ClientReadableStream|undefined} * The XHR Node Readable Stream */ proto.identity.client.IdentityClientServiceClient.prototype.addReservedUsernames = function(request, metadata, callback) { return this.client_.rpcCall(this.hostname_ + '/identity.client.IdentityClientService/AddReservedUsernames', request, metadata || {}, methodDescriptor_IdentityClientService_AddReservedUsernames, callback); }; /** * @param {!proto.identity.client.AddReservedUsernamesRequest} request The * request proto * @param {?Object=} metadata User defined * call metadata * @return {!Promise} * Promise that resolves to the response */ proto.identity.client.IdentityClientServicePromiseClient.prototype.addReservedUsernames = function(request, metadata) { return this.client_.unaryCall(this.hostname_ + '/identity.client.IdentityClientService/AddReservedUsernames', request, metadata || {}, methodDescriptor_IdentityClientService_AddReservedUsernames); }; /** * @const * @type {!grpc.web.MethodDescriptor< * !proto.identity.client.RemoveReservedUsernameRequest, * !proto.identity.client.Empty>} */ const methodDescriptor_IdentityClientService_RemoveReservedUsername = new grpc.web.MethodDescriptor( '/identity.client.IdentityClientService/RemoveReservedUsername', grpc.web.MethodType.UNARY, proto.identity.client.RemoveReservedUsernameRequest, proto.identity.client.Empty, /** * @param {!proto.identity.client.RemoveReservedUsernameRequest} request * @return {!Uint8Array} */ function(request) { return request.serializeBinary(); }, proto.identity.client.Empty.deserializeBinary ); /** * @param {!proto.identity.client.RemoveReservedUsernameRequest} request The * request proto * @param {?Object} metadata User defined * call metadata * @param {function(?grpc.web.RpcError, ?proto.identity.client.Empty)} * callback The callback function(error, response) * @return {!grpc.web.ClientReadableStream|undefined} * The XHR Node Readable Stream */ proto.identity.client.IdentityClientServiceClient.prototype.removeReservedUsername = function(request, metadata, callback) { return this.client_.rpcCall(this.hostname_ + '/identity.client.IdentityClientService/RemoveReservedUsername', request, metadata || {}, methodDescriptor_IdentityClientService_RemoveReservedUsername, callback); }; /** * @param {!proto.identity.client.RemoveReservedUsernameRequest} request The * request proto * @param {?Object=} metadata User defined * call metadata * @return {!Promise} * Promise that resolves to the response */ proto.identity.client.IdentityClientServicePromiseClient.prototype.removeReservedUsername = function(request, metadata) { return this.client_.unaryCall(this.hostname_ + '/identity.client.IdentityClientService/RemoveReservedUsername', request, metadata || {}, methodDescriptor_IdentityClientService_RemoveReservedUsername); }; /** * @const * @type {!grpc.web.MethodDescriptor< * !proto.identity.client.Empty, * !proto.identity.client.Empty>} */ const methodDescriptor_IdentityClientService_Ping = new grpc.web.MethodDescriptor( '/identity.client.IdentityClientService/Ping', grpc.web.MethodType.UNARY, proto.identity.client.Empty, proto.identity.client.Empty, /** * @param {!proto.identity.client.Empty} request * @return {!Uint8Array} */ function(request) { return request.serializeBinary(); }, proto.identity.client.Empty.deserializeBinary ); /** * @param {!proto.identity.client.Empty} request The * request proto * @param {?Object} metadata User defined * call metadata * @param {function(?grpc.web.RpcError, ?proto.identity.client.Empty)} * callback The callback function(error, response) * @return {!grpc.web.ClientReadableStream|undefined} * The XHR Node Readable Stream */ proto.identity.client.IdentityClientServiceClient.prototype.ping = function(request, metadata, callback) { return this.client_.rpcCall(this.hostname_ + '/identity.client.IdentityClientService/Ping', request, metadata || {}, methodDescriptor_IdentityClientService_Ping, callback); }; /** * @param {!proto.identity.client.Empty} request The * request proto * @param {?Object=} metadata User defined * call metadata * @return {!Promise} * Promise that resolves to the response */ proto.identity.client.IdentityClientServicePromiseClient.prototype.ping = function(request, metadata) { return this.client_.unaryCall(this.hostname_ + '/identity.client.IdentityClientService/Ping', request, metadata || {}, methodDescriptor_IdentityClientService_Ping); }; module.exports = proto.identity.client; diff --git a/web/protobufs/identity-client.cjs.flow b/web/protobufs/identity-client.cjs.flow index a6a62f9dd..1960ae4e2 100644 --- a/web/protobufs/identity-client.cjs.flow +++ b/web/protobufs/identity-client.cjs.flow @@ -1,247 +1,163 @@ // @flow import * as grpcWeb from 'grpc-web'; import * as identityStructs from './identity-structs.cjs'; declare export class IdentityClientServiceClient { constructor (hostname: string, credentials?: null | { +[index: string]: string }, options?: null | { +[index: string]: any }): void; registerPasswordUserStart( request: identityStructs.RegistrationStartRequest, metadata: grpcWeb.Metadata | void, callback: (err: grpcWeb.RpcError, response: identityStructs.RegistrationStartResponse) => void ): grpcWeb.ClientReadableStream; registerReservedPasswordUserStart( request: identityStructs.ReservedRegistrationStartRequest, metadata: grpcWeb.Metadata | void, callback: (err: grpcWeb.RpcError, response: identityStructs.RegistrationStartResponse) => void ): grpcWeb.ClientReadableStream; registerPasswordUserFinish( request: identityStructs.RegistrationFinishRequest, metadata: grpcWeb.Metadata | void, callback: (err: grpcWeb.RpcError, response: identityStructs.RegistrationFinishResponse) => void ): grpcWeb.ClientReadableStream; - updateUserPasswordStart( - request: identityStructs.UpdateUserPasswordStartRequest, - metadata: grpcWeb.Metadata | void, - callback: (err: grpcWeb.RpcError, - response: identityStructs.UpdateUserPasswordStartResponse) => void - ): grpcWeb.ClientReadableStream; - - updateUserPasswordFinish( - request: identityStructs.UpdateUserPasswordFinishRequest, - metadata: grpcWeb.Metadata | void, - callback: (err: grpcWeb.RpcError, - response: identityStructs.Empty) => void - ): grpcWeb.ClientReadableStream; - loginPasswordUserStart( request: identityStructs.OpaqueLoginStartRequest, metadata: grpcWeb.Metadata | void, callback: (err: grpcWeb.RpcError, response: identityStructs.OpaqueLoginStartResponse) => void ): grpcWeb.ClientReadableStream; loginPasswordUserFinish( request: identityStructs.OpaqueLoginFinishRequest, metadata: grpcWeb.Metadata | void, callback: (err: grpcWeb.RpcError, response: identityStructs.OpaqueLoginFinishResponse) => void ): grpcWeb.ClientReadableStream; loginWalletUser( request: identityStructs.WalletLoginRequest, metadata: grpcWeb.Metadata | void, callback: (err: grpcWeb.RpcError, response: identityStructs.WalletLoginResponse) => void ): grpcWeb.ClientReadableStream; loginReservedWalletUser( request: identityStructs.ReservedWalletLoginRequest, metadata: grpcWeb.Metadata | void, callback: (err: grpcWeb.RpcError, response: identityStructs.WalletLoginResponse) => void ): grpcWeb.ClientReadableStream; - logOutUser( - request: identityStructs.LogoutRequest, - metadata: grpcWeb.Metadata | void, - callback: (err: grpcWeb.RpcError, - response: identityStructs.Empty) => void - ): grpcWeb.ClientReadableStream; - - deleteUser( - request: identityStructs.DeleteUserRequest, - metadata: grpcWeb.Metadata | void, - callback: (err: grpcWeb.RpcError, - response: identityStructs.Empty) => void - ): grpcWeb.ClientReadableStream; - generateNonce( request: identityStructs.Empty, metadata: grpcWeb.Metadata | void, callback: (err: grpcWeb.RpcError, response: identityStructs.GenerateNonceResponse) => void ): grpcWeb.ClientReadableStream; - getOutboundKeysForUser( - request: identityStructs.OutboundKeysForUserRequest, - metadata: grpcWeb.Metadata | void, - callback: (err: grpcWeb.RpcError, - response: identityStructs.OutboundKeysForUserResponse) => void - ): grpcWeb.ClientReadableStream; - - getInboundKeysForUser( - request: identityStructs.InboundKeysForUserRequest, - metadata: grpcWeb.Metadata | void, - callback: (err: grpcWeb.RpcError, - response: identityStructs.InboundKeysForUserResponse) => void - ): grpcWeb.ClientReadableStream; - - uploadOneTimeKeys( - request: identityStructs.UploadOneTimeKeysRequest, - metadata: grpcWeb.Metadata | void, - callback: (err: grpcWeb.RpcError, - response: identityStructs.Empty) => void - ): grpcWeb.ClientReadableStream; - verifyUserAccessToken( request: identityStructs.VerifyUserAccessTokenRequest, metadata: grpcWeb.Metadata | void, callback: (err: grpcWeb.RpcError, response: identityStructs.VerifyUserAccessTokenResponse) => void ): grpcWeb.ClientReadableStream; addReservedUsernames( request: identityStructs.AddReservedUsernamesRequest, metadata: grpcWeb.Metadata | void, callback: (err: grpcWeb.RpcError, response: identityStructs.Empty) => void ): grpcWeb.ClientReadableStream; removeReservedUsername( request: identityStructs.RemoveReservedUsernameRequest, metadata: grpcWeb.Metadata | void, callback: (err: grpcWeb.RpcError, response: identityStructs.Empty) => void ): grpcWeb.ClientReadableStream; ping( request: identityStructs.Empty, metadata: grpcWeb.Metadata | void, callback: (err: grpcWeb.RpcError, response: identityStructs.Empty) => void ): grpcWeb.ClientReadableStream; } declare export class IdentityClientServicePromiseClient { constructor (hostname: string, credentials?: null | { +[index: string]: string }, options?: null | { +[index: string]: any }): void; registerPasswordUserStart( request: identityStructs.RegistrationStartRequest, metadata?: grpcWeb.Metadata ): Promise; registerReservedPasswordUserStart( request: identityStructs.ReservedRegistrationStartRequest, metadata?: grpcWeb.Metadata ): Promise; registerPasswordUserFinish( request: identityStructs.RegistrationFinishRequest, metadata?: grpcWeb.Metadata ): Promise; - updateUserPasswordStart( - request: identityStructs.UpdateUserPasswordStartRequest, - metadata?: grpcWeb.Metadata - ): Promise; - - updateUserPasswordFinish( - request: identityStructs.UpdateUserPasswordFinishRequest, - metadata?: grpcWeb.Metadata - ): Promise; - loginPasswordUserStart( request: identityStructs.OpaqueLoginStartRequest, metadata?: grpcWeb.Metadata ): Promise; loginPasswordUserFinish( request: identityStructs.OpaqueLoginFinishRequest, metadata?: grpcWeb.Metadata ): Promise; loginWalletUser( request: identityStructs.WalletLoginRequest, metadata?: grpcWeb.Metadata ): Promise; loginReservedWalletUser( request: identityStructs.ReservedWalletLoginRequest, metadata?: grpcWeb.Metadata ): Promise; - logOutUser( - request: identityStructs.LogoutRequest, - metadata?: grpcWeb.Metadata - ): Promise; - - deleteUser( - request: identityStructs.DeleteUserRequest, - metadata?: grpcWeb.Metadata - ): Promise; - generateNonce( request: identityStructs.Empty, metadata?: grpcWeb.Metadata ): Promise; - getOutboundKeysForUser( - request: identityStructs.OutboundKeysForUserRequest, - metadata?: grpcWeb.Metadata - ): Promise; - - getInboundKeysForUser( - request: identityStructs.InboundKeysForUserRequest, - metadata?: grpcWeb.Metadata - ): Promise; - - uploadOneTimeKeys( - request: identityStructs.UploadOneTimeKeysRequest, - metadata?: grpcWeb.Metadata - ): Promise; - verifyUserAccessToken( request: identityStructs.VerifyUserAccessTokenRequest, metadata?: grpcWeb.Metadata ): Promise; addReservedUsernames( request: identityStructs.AddReservedUsernamesRequest, metadata?: grpcWeb.Metadata ): Promise; removeReservedUsername( request: identityStructs.RemoveReservedUsernameRequest, metadata?: grpcWeb.Metadata ): Promise; ping( request: identityStructs.Empty, metadata?: grpcWeb.Metadata ): Promise; } diff --git a/web/protobufs/identity-structs.cjs b/web/protobufs/identity-structs.cjs index 1f96ebbef..6f2aa082e 100644 --- a/web/protobufs/identity-structs.cjs +++ b/web/protobufs/identity-structs.cjs @@ -1,7457 +1,4590 @@ // source: identity_client.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')(); goog.exportSymbol('proto.identity.client.AddReservedUsernamesRequest', null, global); -goog.exportSymbol('proto.identity.client.DeleteUserRequest', null, global); goog.exportSymbol('proto.identity.client.DeviceKeyUpload', null, global); goog.exportSymbol('proto.identity.client.DeviceType', null, global); goog.exportSymbol('proto.identity.client.Empty', null, global); goog.exportSymbol('proto.identity.client.GenerateNonceResponse', null, global); goog.exportSymbol('proto.identity.client.IdentityKeyInfo', null, global); -goog.exportSymbol('proto.identity.client.InboundKeyInfo', null, global); -goog.exportSymbol('proto.identity.client.InboundKeysForUserRequest', null, global); -goog.exportSymbol('proto.identity.client.InboundKeysForUserRequest.IdentifierCase', null, global); -goog.exportSymbol('proto.identity.client.InboundKeysForUserResponse', null, global); -goog.exportSymbol('proto.identity.client.LogoutRequest', null, global); goog.exportSymbol('proto.identity.client.OpaqueLoginFinishRequest', null, global); goog.exportSymbol('proto.identity.client.OpaqueLoginFinishResponse', null, global); goog.exportSymbol('proto.identity.client.OpaqueLoginStartRequest', null, global); goog.exportSymbol('proto.identity.client.OpaqueLoginStartResponse', null, global); -goog.exportSymbol('proto.identity.client.OutboundKeyInfo', null, global); -goog.exportSymbol('proto.identity.client.OutboundKeysForUserRequest', null, global); -goog.exportSymbol('proto.identity.client.OutboundKeysForUserRequest.IdentifierCase', null, global); -goog.exportSymbol('proto.identity.client.OutboundKeysForUserResponse', null, global); goog.exportSymbol('proto.identity.client.PreKey', null, global); goog.exportSymbol('proto.identity.client.RegistrationFinishRequest', null, global); goog.exportSymbol('proto.identity.client.RegistrationFinishResponse', null, global); goog.exportSymbol('proto.identity.client.RegistrationStartRequest', null, global); goog.exportSymbol('proto.identity.client.RegistrationStartResponse', null, global); goog.exportSymbol('proto.identity.client.RemoveReservedUsernameRequest', null, global); goog.exportSymbol('proto.identity.client.ReservedRegistrationStartRequest', null, global); goog.exportSymbol('proto.identity.client.ReservedWalletLoginRequest', null, global); -goog.exportSymbol('proto.identity.client.UpdateUserPasswordFinishRequest', null, global); -goog.exportSymbol('proto.identity.client.UpdateUserPasswordStartRequest', null, global); -goog.exportSymbol('proto.identity.client.UpdateUserPasswordStartResponse', null, global); -goog.exportSymbol('proto.identity.client.UploadOneTimeKeysRequest', null, global); goog.exportSymbol('proto.identity.client.VerifyUserAccessTokenRequest', null, global); goog.exportSymbol('proto.identity.client.VerifyUserAccessTokenResponse', null, global); goog.exportSymbol('proto.identity.client.WalletLoginRequest', null, global); goog.exportSymbol('proto.identity.client.WalletLoginResponse', 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.client.Empty = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.identity.client.Empty, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.identity.client.Empty.displayName = 'proto.identity.client.Empty'; } /** * 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.client.PreKey = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.identity.client.PreKey, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.identity.client.PreKey.displayName = 'proto.identity.client.PreKey'; } /** * 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.client.IdentityKeyInfo = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.identity.client.IdentityKeyInfo, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.identity.client.IdentityKeyInfo.displayName = 'proto.identity.client.IdentityKeyInfo'; } /** * 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.client.DeviceKeyUpload = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.identity.client.DeviceKeyUpload.repeatedFields_, null); }; goog.inherits(proto.identity.client.DeviceKeyUpload, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.identity.client.DeviceKeyUpload.displayName = 'proto.identity.client.DeviceKeyUpload'; } /** * 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.client.RegistrationStartRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.identity.client.RegistrationStartRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.identity.client.RegistrationStartRequest.displayName = 'proto.identity.client.RegistrationStartRequest'; } /** * 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.client.ReservedRegistrationStartRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.identity.client.ReservedRegistrationStartRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.identity.client.ReservedRegistrationStartRequest.displayName = 'proto.identity.client.ReservedRegistrationStartRequest'; } /** * 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.client.RegistrationFinishRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.identity.client.RegistrationFinishRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.identity.client.RegistrationFinishRequest.displayName = 'proto.identity.client.RegistrationFinishRequest'; } /** * 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.client.RegistrationStartResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.identity.client.RegistrationStartResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.identity.client.RegistrationStartResponse.displayName = 'proto.identity.client.RegistrationStartResponse'; } /** * 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.client.RegistrationFinishResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.identity.client.RegistrationFinishResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.identity.client.RegistrationFinishResponse.displayName = 'proto.identity.client.RegistrationFinishResponse'; } -/** - * 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.client.UpdateUserPasswordStartRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.identity.client.UpdateUserPasswordStartRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.identity.client.UpdateUserPasswordStartRequest.displayName = 'proto.identity.client.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.client.UpdateUserPasswordFinishRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.identity.client.UpdateUserPasswordFinishRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.identity.client.UpdateUserPasswordFinishRequest.displayName = 'proto.identity.client.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.client.UpdateUserPasswordStartResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.identity.client.UpdateUserPasswordStartResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.identity.client.UpdateUserPasswordStartResponse.displayName = 'proto.identity.client.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.client.OpaqueLoginStartRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.identity.client.OpaqueLoginStartRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.identity.client.OpaqueLoginStartRequest.displayName = 'proto.identity.client.OpaqueLoginStartRequest'; } /** * 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.client.OpaqueLoginFinishRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.identity.client.OpaqueLoginFinishRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.identity.client.OpaqueLoginFinishRequest.displayName = 'proto.identity.client.OpaqueLoginFinishRequest'; } /** * 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.client.OpaqueLoginStartResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.identity.client.OpaqueLoginStartResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.identity.client.OpaqueLoginStartResponse.displayName = 'proto.identity.client.OpaqueLoginStartResponse'; } /** * 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.client.OpaqueLoginFinishResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.identity.client.OpaqueLoginFinishResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.identity.client.OpaqueLoginFinishResponse.displayName = 'proto.identity.client.OpaqueLoginFinishResponse'; } /** * 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.client.WalletLoginRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.identity.client.WalletLoginRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.identity.client.WalletLoginRequest.displayName = 'proto.identity.client.WalletLoginRequest'; } /** * 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.client.ReservedWalletLoginRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.identity.client.ReservedWalletLoginRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.identity.client.ReservedWalletLoginRequest.displayName = 'proto.identity.client.ReservedWalletLoginRequest'; } /** * 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.client.WalletLoginResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.identity.client.WalletLoginResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.identity.client.WalletLoginResponse.displayName = 'proto.identity.client.WalletLoginResponse'; } -/** - * 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.client.LogoutRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.identity.client.LogoutRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.identity.client.LogoutRequest.displayName = 'proto.identity.client.LogoutRequest'; -} -/** - * 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.client.DeleteUserRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.identity.client.DeleteUserRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.identity.client.DeleteUserRequest.displayName = 'proto.identity.client.DeleteUserRequest'; -} /** * 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.client.GenerateNonceResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.identity.client.GenerateNonceResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.identity.client.GenerateNonceResponse.displayName = 'proto.identity.client.GenerateNonceResponse'; } -/** - * 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.client.OutboundKeyInfo = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.identity.client.OutboundKeyInfo, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.identity.client.OutboundKeyInfo.displayName = 'proto.identity.client.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.client.OutboundKeysForUserRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.identity.client.OutboundKeysForUserRequest.oneofGroups_); -}; -goog.inherits(proto.identity.client.OutboundKeysForUserRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.identity.client.OutboundKeysForUserRequest.displayName = 'proto.identity.client.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.client.OutboundKeysForUserResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.identity.client.OutboundKeysForUserResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.identity.client.OutboundKeysForUserResponse.displayName = 'proto.identity.client.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.client.InboundKeyInfo = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.identity.client.InboundKeyInfo, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.identity.client.InboundKeyInfo.displayName = 'proto.identity.client.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.client.InboundKeysForUserRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.identity.client.InboundKeysForUserRequest.oneofGroups_); -}; -goog.inherits(proto.identity.client.InboundKeysForUserRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.identity.client.InboundKeysForUserRequest.displayName = 'proto.identity.client.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.client.InboundKeysForUserResponse = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.identity.client.InboundKeysForUserResponse, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.identity.client.InboundKeysForUserResponse.displayName = 'proto.identity.client.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.client.UploadOneTimeKeysRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.identity.client.UploadOneTimeKeysRequest.repeatedFields_, null); -}; -goog.inherits(proto.identity.client.UploadOneTimeKeysRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.identity.client.UploadOneTimeKeysRequest.displayName = 'proto.identity.client.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.client.VerifyUserAccessTokenRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.identity.client.VerifyUserAccessTokenRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.identity.client.VerifyUserAccessTokenRequest.displayName = 'proto.identity.client.VerifyUserAccessTokenRequest'; } /** * 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.client.VerifyUserAccessTokenResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.identity.client.VerifyUserAccessTokenResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.identity.client.VerifyUserAccessTokenResponse.displayName = 'proto.identity.client.VerifyUserAccessTokenResponse'; } /** * 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.client.AddReservedUsernamesRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.identity.client.AddReservedUsernamesRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.identity.client.AddReservedUsernamesRequest.displayName = 'proto.identity.client.AddReservedUsernamesRequest'; } /** * 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.client.RemoveReservedUsernameRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.identity.client.RemoveReservedUsernameRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.identity.client.RemoveReservedUsernameRequest.displayName = 'proto.identity.client.RemoveReservedUsernameRequest'; } 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.client.Empty.prototype.toObject = function(opt_includeInstance) { return proto.identity.client.Empty.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.client.Empty} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.identity.client.Empty.toObject = function(includeInstance, msg) { var f, obj = { }; 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.client.Empty} */ proto.identity.client.Empty.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.identity.client.Empty; return proto.identity.client.Empty.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.identity.client.Empty} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.identity.client.Empty} */ proto.identity.client.Empty.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.identity.client.Empty.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.identity.client.Empty.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.client.Empty} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.identity.client.Empty.serializeBinaryToWriter = function(message, writer) { var f = undefined; }; 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.client.PreKey.prototype.toObject = function(opt_includeInstance) { return proto.identity.client.PreKey.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.client.PreKey} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.identity.client.PreKey.toObject = function(includeInstance, msg) { var f, obj = { prekey: jspb.Message.getFieldWithDefault(msg, 1, ""), prekeysignature: 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.client.PreKey} */ proto.identity.client.PreKey.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.identity.client.PreKey; return proto.identity.client.PreKey.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.identity.client.PreKey} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.identity.client.PreKey} */ proto.identity.client.PreKey.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.setPrekey(value); break; case 2: var value = /** @type {string} */ (reader.readString()); msg.setPrekeysignature(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.identity.client.PreKey.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.identity.client.PreKey.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.client.PreKey} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.identity.client.PreKey.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getPrekey(); if (f.length > 0) { writer.writeString( 1, f ); } f = message.getPrekeysignature(); if (f.length > 0) { writer.writeString( 2, f ); } }; /** * optional string preKey = 1; * @return {string} */ proto.identity.client.PreKey.prototype.getPrekey = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.identity.client.PreKey} returns this */ proto.identity.client.PreKey.prototype.setPrekey = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * optional string preKeySignature = 2; * @return {string} */ proto.identity.client.PreKey.prototype.getPrekeysignature = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value * @return {!proto.identity.client.PreKey} returns this */ proto.identity.client.PreKey.prototype.setPrekeysignature = function(value) { return jspb.Message.setProto3StringField(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.client.IdentityKeyInfo.prototype.toObject = function(opt_includeInstance) { return proto.identity.client.IdentityKeyInfo.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.client.IdentityKeyInfo} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.identity.client.IdentityKeyInfo.toObject = function(includeInstance, msg) { var f, obj = { payload: jspb.Message.getFieldWithDefault(msg, 1, ""), payloadsignature: jspb.Message.getFieldWithDefault(msg, 2, ""), socialproof: jspb.Message.getFieldWithDefault(msg, 3, "") }; 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.client.IdentityKeyInfo} */ proto.identity.client.IdentityKeyInfo.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.identity.client.IdentityKeyInfo; return proto.identity.client.IdentityKeyInfo.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.identity.client.IdentityKeyInfo} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.identity.client.IdentityKeyInfo} */ proto.identity.client.IdentityKeyInfo.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.setPayload(value); break; case 2: var value = /** @type {string} */ (reader.readString()); msg.setPayloadsignature(value); break; case 3: 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.client.IdentityKeyInfo.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.identity.client.IdentityKeyInfo.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.client.IdentityKeyInfo} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.identity.client.IdentityKeyInfo.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getPayload(); if (f.length > 0) { writer.writeString( 1, f ); } f = message.getPayloadsignature(); if (f.length > 0) { writer.writeString( 2, f ); } f = /** @type {string} */ (jspb.Message.getField(message, 3)); if (f != null) { writer.writeString( 3, f ); } }; /** * optional string payload = 1; * @return {string} */ proto.identity.client.IdentityKeyInfo.prototype.getPayload = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.identity.client.IdentityKeyInfo} returns this */ proto.identity.client.IdentityKeyInfo.prototype.setPayload = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * optional string payloadSignature = 2; * @return {string} */ proto.identity.client.IdentityKeyInfo.prototype.getPayloadsignature = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value * @return {!proto.identity.client.IdentityKeyInfo} returns this */ proto.identity.client.IdentityKeyInfo.prototype.setPayloadsignature = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; /** * optional string socialProof = 3; * @return {string} */ proto.identity.client.IdentityKeyInfo.prototype.getSocialproof = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** * @param {string} value * @return {!proto.identity.client.IdentityKeyInfo} returns this */ proto.identity.client.IdentityKeyInfo.prototype.setSocialproof = function(value) { return jspb.Message.setField(this, 3, value); }; /** * Clears the field making it undefined. * @return {!proto.identity.client.IdentityKeyInfo} returns this */ proto.identity.client.IdentityKeyInfo.prototype.clearSocialproof = function() { return jspb.Message.setField(this, 3, undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.identity.client.IdentityKeyInfo.prototype.hasSocialproof = function() { return jspb.Message.getField(this, 3) != null; }; /** * List of repeated fields within this message type. * @private {!Array} * @const */ proto.identity.client.DeviceKeyUpload.repeatedFields_ = [4,5]; 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.client.DeviceKeyUpload.prototype.toObject = function(opt_includeInstance) { return proto.identity.client.DeviceKeyUpload.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.client.DeviceKeyUpload} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.identity.client.DeviceKeyUpload.toObject = function(includeInstance, msg) { var f, obj = { devicekeyinfo: (f = msg.getDevicekeyinfo()) && proto.identity.client.IdentityKeyInfo.toObject(includeInstance, f), contentupload: (f = msg.getContentupload()) && proto.identity.client.PreKey.toObject(includeInstance, f), notifupload: (f = msg.getNotifupload()) && proto.identity.client.PreKey.toObject(includeInstance, f), onetimecontentprekeysList: (f = jspb.Message.getRepeatedField(msg, 4)) == null ? undefined : f, onetimenotifprekeysList: (f = jspb.Message.getRepeatedField(msg, 5)) == null ? undefined : f, devicetype: jspb.Message.getFieldWithDefault(msg, 6, 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.client.DeviceKeyUpload} */ proto.identity.client.DeviceKeyUpload.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.identity.client.DeviceKeyUpload; return proto.identity.client.DeviceKeyUpload.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.identity.client.DeviceKeyUpload} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.identity.client.DeviceKeyUpload} */ proto.identity.client.DeviceKeyUpload.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new proto.identity.client.IdentityKeyInfo; reader.readMessage(value,proto.identity.client.IdentityKeyInfo.deserializeBinaryFromReader); msg.setDevicekeyinfo(value); break; case 2: var value = new proto.identity.client.PreKey; reader.readMessage(value,proto.identity.client.PreKey.deserializeBinaryFromReader); msg.setContentupload(value); break; case 3: var value = new proto.identity.client.PreKey; reader.readMessage(value,proto.identity.client.PreKey.deserializeBinaryFromReader); msg.setNotifupload(value); break; case 4: var value = /** @type {string} */ (reader.readString()); msg.addOnetimecontentprekeys(value); break; case 5: var value = /** @type {string} */ (reader.readString()); msg.addOnetimenotifprekeys(value); break; case 6: var value = /** @type {!proto.identity.client.DeviceType} */ (reader.readEnum()); msg.setDevicetype(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.identity.client.DeviceKeyUpload.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.identity.client.DeviceKeyUpload.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.client.DeviceKeyUpload} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.identity.client.DeviceKeyUpload.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getDevicekeyinfo(); if (f != null) { writer.writeMessage( 1, f, proto.identity.client.IdentityKeyInfo.serializeBinaryToWriter ); } f = message.getContentupload(); if (f != null) { writer.writeMessage( 2, f, proto.identity.client.PreKey.serializeBinaryToWriter ); } f = message.getNotifupload(); if (f != null) { writer.writeMessage( 3, f, proto.identity.client.PreKey.serializeBinaryToWriter ); } f = message.getOnetimecontentprekeysList(); if (f.length > 0) { writer.writeRepeatedString( 4, f ); } f = message.getOnetimenotifprekeysList(); if (f.length > 0) { writer.writeRepeatedString( 5, f ); } f = message.getDevicetype(); if (f !== 0.0) { writer.writeEnum( 6, f ); } }; /** * optional IdentityKeyInfo deviceKeyInfo = 1; * @return {?proto.identity.client.IdentityKeyInfo} */ proto.identity.client.DeviceKeyUpload.prototype.getDevicekeyinfo = function() { return /** @type{?proto.identity.client.IdentityKeyInfo} */ ( jspb.Message.getWrapperField(this, proto.identity.client.IdentityKeyInfo, 1)); }; /** * @param {?proto.identity.client.IdentityKeyInfo|undefined} value * @return {!proto.identity.client.DeviceKeyUpload} returns this */ proto.identity.client.DeviceKeyUpload.prototype.setDevicekeyinfo = function(value) { return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. * @return {!proto.identity.client.DeviceKeyUpload} returns this */ proto.identity.client.DeviceKeyUpload.prototype.clearDevicekeyinfo = function() { return this.setDevicekeyinfo(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.identity.client.DeviceKeyUpload.prototype.hasDevicekeyinfo = function() { return jspb.Message.getField(this, 1) != null; }; /** * optional PreKey contentUpload = 2; * @return {?proto.identity.client.PreKey} */ proto.identity.client.DeviceKeyUpload.prototype.getContentupload = function() { return /** @type{?proto.identity.client.PreKey} */ ( jspb.Message.getWrapperField(this, proto.identity.client.PreKey, 2)); }; /** * @param {?proto.identity.client.PreKey|undefined} value * @return {!proto.identity.client.DeviceKeyUpload} returns this */ proto.identity.client.DeviceKeyUpload.prototype.setContentupload = function(value) { return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. * @return {!proto.identity.client.DeviceKeyUpload} returns this */ proto.identity.client.DeviceKeyUpload.prototype.clearContentupload = function() { return this.setContentupload(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.identity.client.DeviceKeyUpload.prototype.hasContentupload = function() { return jspb.Message.getField(this, 2) != null; }; /** * optional PreKey notifUpload = 3; * @return {?proto.identity.client.PreKey} */ proto.identity.client.DeviceKeyUpload.prototype.getNotifupload = function() { return /** @type{?proto.identity.client.PreKey} */ ( jspb.Message.getWrapperField(this, proto.identity.client.PreKey, 3)); }; /** * @param {?proto.identity.client.PreKey|undefined} value * @return {!proto.identity.client.DeviceKeyUpload} returns this */ proto.identity.client.DeviceKeyUpload.prototype.setNotifupload = function(value) { return jspb.Message.setWrapperField(this, 3, value); }; /** * Clears the message field making it undefined. * @return {!proto.identity.client.DeviceKeyUpload} returns this */ proto.identity.client.DeviceKeyUpload.prototype.clearNotifupload = function() { return this.setNotifupload(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.identity.client.DeviceKeyUpload.prototype.hasNotifupload = function() { return jspb.Message.getField(this, 3) != null; }; /** * repeated string oneTimeContentPrekeys = 4; * @return {!Array} */ proto.identity.client.DeviceKeyUpload.prototype.getOnetimecontentprekeysList = function() { return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 4)); }; /** * @param {!Array} value * @return {!proto.identity.client.DeviceKeyUpload} returns this */ proto.identity.client.DeviceKeyUpload.prototype.setOnetimecontentprekeysList = function(value) { return jspb.Message.setField(this, 4, value || []); }; /** * @param {string} value * @param {number=} opt_index * @return {!proto.identity.client.DeviceKeyUpload} returns this */ proto.identity.client.DeviceKeyUpload.prototype.addOnetimecontentprekeys = function(value, opt_index) { return jspb.Message.addToRepeatedField(this, 4, value, opt_index); }; /** * Clears the list making it empty but non-null. * @return {!proto.identity.client.DeviceKeyUpload} returns this */ proto.identity.client.DeviceKeyUpload.prototype.clearOnetimecontentprekeysList = function() { return this.setOnetimecontentprekeysList([]); }; /** * repeated string oneTimeNotifPrekeys = 5; * @return {!Array} */ proto.identity.client.DeviceKeyUpload.prototype.getOnetimenotifprekeysList = function() { return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 5)); }; /** * @param {!Array} value * @return {!proto.identity.client.DeviceKeyUpload} returns this */ proto.identity.client.DeviceKeyUpload.prototype.setOnetimenotifprekeysList = function(value) { return jspb.Message.setField(this, 5, value || []); }; /** * @param {string} value * @param {number=} opt_index * @return {!proto.identity.client.DeviceKeyUpload} returns this */ proto.identity.client.DeviceKeyUpload.prototype.addOnetimenotifprekeys = function(value, opt_index) { return jspb.Message.addToRepeatedField(this, 5, value, opt_index); }; /** * Clears the list making it empty but non-null. * @return {!proto.identity.client.DeviceKeyUpload} returns this */ proto.identity.client.DeviceKeyUpload.prototype.clearOnetimenotifprekeysList = function() { return this.setOnetimenotifprekeysList([]); }; /** * optional DeviceType deviceType = 6; * @return {!proto.identity.client.DeviceType} */ proto.identity.client.DeviceKeyUpload.prototype.getDevicetype = function() { return /** @type {!proto.identity.client.DeviceType} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); }; /** * @param {!proto.identity.client.DeviceType} value * @return {!proto.identity.client.DeviceKeyUpload} returns this */ proto.identity.client.DeviceKeyUpload.prototype.setDevicetype = function(value) { return jspb.Message.setProto3EnumField(this, 6, 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.client.RegistrationStartRequest.prototype.toObject = function(opt_includeInstance) { return proto.identity.client.RegistrationStartRequest.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.client.RegistrationStartRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.identity.client.RegistrationStartRequest.toObject = function(includeInstance, msg) { var f, obj = { opaqueregistrationrequest: msg.getOpaqueregistrationrequest_asB64(), username: jspb.Message.getFieldWithDefault(msg, 2, ""), devicekeyupload: (f = msg.getDevicekeyupload()) && proto.identity.client.DeviceKeyUpload.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.client.RegistrationStartRequest} */ proto.identity.client.RegistrationStartRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.identity.client.RegistrationStartRequest; return proto.identity.client.RegistrationStartRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.identity.client.RegistrationStartRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.identity.client.RegistrationStartRequest} */ proto.identity.client.RegistrationStartRequest.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; case 2: var value = /** @type {string} */ (reader.readString()); msg.setUsername(value); break; case 3: var value = new proto.identity.client.DeviceKeyUpload; reader.readMessage(value,proto.identity.client.DeviceKeyUpload.deserializeBinaryFromReader); msg.setDevicekeyupload(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.identity.client.RegistrationStartRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.identity.client.RegistrationStartRequest.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.client.RegistrationStartRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.identity.client.RegistrationStartRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getOpaqueregistrationrequest_asU8(); if (f.length > 0) { writer.writeBytes( 1, f ); } f = message.getUsername(); if (f.length > 0) { writer.writeString( 2, f ); } f = message.getDevicekeyupload(); if (f != null) { writer.writeMessage( 3, f, proto.identity.client.DeviceKeyUpload.serializeBinaryToWriter ); } }; /** * optional bytes opaqueRegistrationRequest = 1; * @return {string} */ proto.identity.client.RegistrationStartRequest.prototype.getOpaqueregistrationrequest = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * optional bytes opaqueRegistrationRequest = 1; * This is a type-conversion wrapper around `getOpaqueregistrationrequest()` * @return {string} */ proto.identity.client.RegistrationStartRequest.prototype.getOpaqueregistrationrequest_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getOpaqueregistrationrequest())); }; /** * optional bytes opaqueRegistrationRequest = 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.client.RegistrationStartRequest.prototype.getOpaqueregistrationrequest_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getOpaqueregistrationrequest())); }; /** * @param {!(string|Uint8Array)} value * @return {!proto.identity.client.RegistrationStartRequest} returns this */ proto.identity.client.RegistrationStartRequest.prototype.setOpaqueregistrationrequest = function(value) { return jspb.Message.setProto3BytesField(this, 1, value); }; /** * optional string username = 2; * @return {string} */ proto.identity.client.RegistrationStartRequest.prototype.getUsername = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value * @return {!proto.identity.client.RegistrationStartRequest} returns this */ proto.identity.client.RegistrationStartRequest.prototype.setUsername = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; /** * optional DeviceKeyUpload deviceKeyUpload = 3; * @return {?proto.identity.client.DeviceKeyUpload} */ proto.identity.client.RegistrationStartRequest.prototype.getDevicekeyupload = function() { return /** @type{?proto.identity.client.DeviceKeyUpload} */ ( jspb.Message.getWrapperField(this, proto.identity.client.DeviceKeyUpload, 3)); }; /** * @param {?proto.identity.client.DeviceKeyUpload|undefined} value * @return {!proto.identity.client.RegistrationStartRequest} returns this */ proto.identity.client.RegistrationStartRequest.prototype.setDevicekeyupload = function(value) { return jspb.Message.setWrapperField(this, 3, value); }; /** * Clears the message field making it undefined. * @return {!proto.identity.client.RegistrationStartRequest} returns this */ proto.identity.client.RegistrationStartRequest.prototype.clearDevicekeyupload = function() { return this.setDevicekeyupload(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.identity.client.RegistrationStartRequest.prototype.hasDevicekeyupload = 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.client.ReservedRegistrationStartRequest.prototype.toObject = function(opt_includeInstance) { return proto.identity.client.ReservedRegistrationStartRequest.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.client.ReservedRegistrationStartRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.identity.client.ReservedRegistrationStartRequest.toObject = function(includeInstance, msg) { var f, obj = { opaqueregistrationrequest: msg.getOpaqueregistrationrequest_asB64(), username: jspb.Message.getFieldWithDefault(msg, 2, ""), devicekeyupload: (f = msg.getDevicekeyupload()) && proto.identity.client.DeviceKeyUpload.toObject(includeInstance, f), keyservermessage: jspb.Message.getFieldWithDefault(msg, 4, ""), keyserversignature: 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.client.ReservedRegistrationStartRequest} */ proto.identity.client.ReservedRegistrationStartRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.identity.client.ReservedRegistrationStartRequest; return proto.identity.client.ReservedRegistrationStartRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.identity.client.ReservedRegistrationStartRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.identity.client.ReservedRegistrationStartRequest} */ proto.identity.client.ReservedRegistrationStartRequest.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; case 2: var value = /** @type {string} */ (reader.readString()); msg.setUsername(value); break; case 3: var value = new proto.identity.client.DeviceKeyUpload; reader.readMessage(value,proto.identity.client.DeviceKeyUpload.deserializeBinaryFromReader); msg.setDevicekeyupload(value); break; case 4: var value = /** @type {string} */ (reader.readString()); msg.setKeyservermessage(value); break; case 5: var value = /** @type {string} */ (reader.readString()); msg.setKeyserversignature(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.identity.client.ReservedRegistrationStartRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.identity.client.ReservedRegistrationStartRequest.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.client.ReservedRegistrationStartRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.identity.client.ReservedRegistrationStartRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getOpaqueregistrationrequest_asU8(); if (f.length > 0) { writer.writeBytes( 1, f ); } f = message.getUsername(); if (f.length > 0) { writer.writeString( 2, f ); } f = message.getDevicekeyupload(); if (f != null) { writer.writeMessage( 3, f, proto.identity.client.DeviceKeyUpload.serializeBinaryToWriter ); } f = message.getKeyservermessage(); if (f.length > 0) { writer.writeString( 4, f ); } f = message.getKeyserversignature(); if (f.length > 0) { writer.writeString( 5, f ); } }; /** * optional bytes opaqueRegistrationRequest = 1; * @return {string} */ proto.identity.client.ReservedRegistrationStartRequest.prototype.getOpaqueregistrationrequest = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * optional bytes opaqueRegistrationRequest = 1; * This is a type-conversion wrapper around `getOpaqueregistrationrequest()` * @return {string} */ proto.identity.client.ReservedRegistrationStartRequest.prototype.getOpaqueregistrationrequest_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getOpaqueregistrationrequest())); }; /** * optional bytes opaqueRegistrationRequest = 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.client.ReservedRegistrationStartRequest.prototype.getOpaqueregistrationrequest_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getOpaqueregistrationrequest())); }; /** * @param {!(string|Uint8Array)} value * @return {!proto.identity.client.ReservedRegistrationStartRequest} returns this */ proto.identity.client.ReservedRegistrationStartRequest.prototype.setOpaqueregistrationrequest = function(value) { return jspb.Message.setProto3BytesField(this, 1, value); }; /** * optional string username = 2; * @return {string} */ proto.identity.client.ReservedRegistrationStartRequest.prototype.getUsername = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value * @return {!proto.identity.client.ReservedRegistrationStartRequest} returns this */ proto.identity.client.ReservedRegistrationStartRequest.prototype.setUsername = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; /** * optional DeviceKeyUpload deviceKeyUpload = 3; * @return {?proto.identity.client.DeviceKeyUpload} */ proto.identity.client.ReservedRegistrationStartRequest.prototype.getDevicekeyupload = function() { return /** @type{?proto.identity.client.DeviceKeyUpload} */ ( jspb.Message.getWrapperField(this, proto.identity.client.DeviceKeyUpload, 3)); }; /** * @param {?proto.identity.client.DeviceKeyUpload|undefined} value * @return {!proto.identity.client.ReservedRegistrationStartRequest} returns this */ proto.identity.client.ReservedRegistrationStartRequest.prototype.setDevicekeyupload = function(value) { return jspb.Message.setWrapperField(this, 3, value); }; /** * Clears the message field making it undefined. * @return {!proto.identity.client.ReservedRegistrationStartRequest} returns this */ proto.identity.client.ReservedRegistrationStartRequest.prototype.clearDevicekeyupload = function() { return this.setDevicekeyupload(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.identity.client.ReservedRegistrationStartRequest.prototype.hasDevicekeyupload = function() { return jspb.Message.getField(this, 3) != null; }; /** * optional string keyserverMessage = 4; * @return {string} */ proto.identity.client.ReservedRegistrationStartRequest.prototype.getKeyservermessage = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); }; /** * @param {string} value * @return {!proto.identity.client.ReservedRegistrationStartRequest} returns this */ proto.identity.client.ReservedRegistrationStartRequest.prototype.setKeyservermessage = function(value) { return jspb.Message.setProto3StringField(this, 4, value); }; /** * optional string keyserverSignature = 5; * @return {string} */ proto.identity.client.ReservedRegistrationStartRequest.prototype.getKeyserversignature = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); }; /** * @param {string} value * @return {!proto.identity.client.ReservedRegistrationStartRequest} returns this */ proto.identity.client.ReservedRegistrationStartRequest.prototype.setKeyserversignature = function(value) { return jspb.Message.setProto3StringField(this, 5, 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.client.RegistrationFinishRequest.prototype.toObject = function(opt_includeInstance) { return proto.identity.client.RegistrationFinishRequest.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.client.RegistrationFinishRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.identity.client.RegistrationFinishRequest.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.client.RegistrationFinishRequest} */ proto.identity.client.RegistrationFinishRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.identity.client.RegistrationFinishRequest; return proto.identity.client.RegistrationFinishRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.identity.client.RegistrationFinishRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.identity.client.RegistrationFinishRequest} */ proto.identity.client.RegistrationFinishRequest.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.client.RegistrationFinishRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.identity.client.RegistrationFinishRequest.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.client.RegistrationFinishRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.identity.client.RegistrationFinishRequest.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 sessionID = 1; * @return {string} */ proto.identity.client.RegistrationFinishRequest.prototype.getSessionid = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.identity.client.RegistrationFinishRequest} returns this */ proto.identity.client.RegistrationFinishRequest.prototype.setSessionid = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * optional bytes opaqueRegistrationUpload = 2; * @return {string} */ proto.identity.client.RegistrationFinishRequest.prototype.getOpaqueregistrationupload = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * optional bytes opaqueRegistrationUpload = 2; * This is a type-conversion wrapper around `getOpaqueregistrationupload()` * @return {string} */ proto.identity.client.RegistrationFinishRequest.prototype.getOpaqueregistrationupload_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getOpaqueregistrationupload())); }; /** * optional bytes opaqueRegistrationUpload = 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.client.RegistrationFinishRequest.prototype.getOpaqueregistrationupload_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getOpaqueregistrationupload())); }; /** * @param {!(string|Uint8Array)} value * @return {!proto.identity.client.RegistrationFinishRequest} returns this */ proto.identity.client.RegistrationFinishRequest.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.client.RegistrationStartResponse.prototype.toObject = function(opt_includeInstance) { return proto.identity.client.RegistrationStartResponse.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.client.RegistrationStartResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.identity.client.RegistrationStartResponse.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.client.RegistrationStartResponse} */ proto.identity.client.RegistrationStartResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.identity.client.RegistrationStartResponse; return proto.identity.client.RegistrationStartResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.identity.client.RegistrationStartResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.identity.client.RegistrationStartResponse} */ proto.identity.client.RegistrationStartResponse.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.client.RegistrationStartResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.identity.client.RegistrationStartResponse.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.client.RegistrationStartResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.identity.client.RegistrationStartResponse.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 sessionID = 1; * @return {string} */ proto.identity.client.RegistrationStartResponse.prototype.getSessionid = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.identity.client.RegistrationStartResponse} returns this */ proto.identity.client.RegistrationStartResponse.prototype.setSessionid = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * optional bytes opaqueRegistrationResponse = 2; * @return {string} */ proto.identity.client.RegistrationStartResponse.prototype.getOpaqueregistrationresponse = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * optional bytes opaqueRegistrationResponse = 2; * This is a type-conversion wrapper around `getOpaqueregistrationresponse()` * @return {string} */ proto.identity.client.RegistrationStartResponse.prototype.getOpaqueregistrationresponse_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getOpaqueregistrationresponse())); }; /** * optional bytes opaqueRegistrationResponse = 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.client.RegistrationStartResponse.prototype.getOpaqueregistrationresponse_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getOpaqueregistrationresponse())); }; /** * @param {!(string|Uint8Array)} value * @return {!proto.identity.client.RegistrationStartResponse} returns this */ proto.identity.client.RegistrationStartResponse.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.client.RegistrationFinishResponse.prototype.toObject = function(opt_includeInstance) { return proto.identity.client.RegistrationFinishResponse.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.client.RegistrationFinishResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.identity.client.RegistrationFinishResponse.toObject = function(includeInstance, msg) { var f, obj = { userid: jspb.Message.getFieldWithDefault(msg, 1, ""), accesstoken: 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.client.RegistrationFinishResponse} */ proto.identity.client.RegistrationFinishResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.identity.client.RegistrationFinishResponse; return proto.identity.client.RegistrationFinishResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.identity.client.RegistrationFinishResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.identity.client.RegistrationFinishResponse} */ proto.identity.client.RegistrationFinishResponse.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 {string} */ (reader.readString()); msg.setAccesstoken(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.identity.client.RegistrationFinishResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.identity.client.RegistrationFinishResponse.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.client.RegistrationFinishResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.identity.client.RegistrationFinishResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getUserid(); if (f.length > 0) { writer.writeString( 1, f ); } f = message.getAccesstoken(); if (f.length > 0) { writer.writeString( 2, f ); } }; /** * optional string userID = 1; * @return {string} */ proto.identity.client.RegistrationFinishResponse.prototype.getUserid = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.identity.client.RegistrationFinishResponse} returns this */ proto.identity.client.RegistrationFinishResponse.prototype.setUserid = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * optional string accessToken = 2; * @return {string} */ proto.identity.client.RegistrationFinishResponse.prototype.getAccesstoken = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value * @return {!proto.identity.client.RegistrationFinishResponse} returns this */ proto.identity.client.RegistrationFinishResponse.prototype.setAccesstoken = function(value) { return jspb.Message.setProto3StringField(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.client.UpdateUserPasswordStartRequest.prototype.toObject = function(opt_includeInstance) { - return proto.identity.client.UpdateUserPasswordStartRequest.toObject(opt_includeInstance, this); +proto.identity.client.OpaqueLoginStartRequest.prototype.toObject = function(opt_includeInstance) { + return proto.identity.client.OpaqueLoginStartRequest.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.client.UpdateUserPasswordStartRequest} msg The msg instance to transform. + * @param {!proto.identity.client.OpaqueLoginStartRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.identity.client.UpdateUserPasswordStartRequest.toObject = function(includeInstance, msg) { +proto.identity.client.OpaqueLoginStartRequest.toObject = function(includeInstance, msg) { var f, obj = { - opaqueregistrationrequest: msg.getOpaqueregistrationrequest_asB64(), - accesstoken: jspb.Message.getFieldWithDefault(msg, 2, ""), - userid: jspb.Message.getFieldWithDefault(msg, 3, ""), - deviceidkey: jspb.Message.getFieldWithDefault(msg, 4, "") + username: jspb.Message.getFieldWithDefault(msg, 1, ""), + opaqueloginrequest: msg.getOpaqueloginrequest_asB64(), + devicekeyupload: (f = msg.getDevicekeyupload()) && proto.identity.client.DeviceKeyUpload.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.client.UpdateUserPasswordStartRequest} + * @return {!proto.identity.client.OpaqueLoginStartRequest} */ -proto.identity.client.UpdateUserPasswordStartRequest.deserializeBinary = function(bytes) { +proto.identity.client.OpaqueLoginStartRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.identity.client.UpdateUserPasswordStartRequest; - return proto.identity.client.UpdateUserPasswordStartRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.identity.client.OpaqueLoginStartRequest; + return proto.identity.client.OpaqueLoginStartRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.identity.client.UpdateUserPasswordStartRequest} msg The message object to deserialize into. + * @param {!proto.identity.client.OpaqueLoginStartRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.identity.client.UpdateUserPasswordStartRequest} + * @return {!proto.identity.client.OpaqueLoginStartRequest} */ -proto.identity.client.UpdateUserPasswordStartRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.identity.client.OpaqueLoginStartRequest.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); + var value = /** @type {string} */ (reader.readString()); + msg.setUsername(value); break; case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setAccesstoken(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setOpaqueloginrequest(value); break; case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setUserid(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setDeviceidkey(value); + var value = new proto.identity.client.DeviceKeyUpload; + reader.readMessage(value,proto.identity.client.DeviceKeyUpload.deserializeBinaryFromReader); + msg.setDevicekeyupload(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.identity.client.UpdateUserPasswordStartRequest.prototype.serializeBinary = function() { +proto.identity.client.OpaqueLoginStartRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.identity.client.UpdateUserPasswordStartRequest.serializeBinaryToWriter(this, writer); + proto.identity.client.OpaqueLoginStartRequest.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.client.UpdateUserPasswordStartRequest} message + * @param {!proto.identity.client.OpaqueLoginStartRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.identity.client.UpdateUserPasswordStartRequest.serializeBinaryToWriter = function(message, writer) { +proto.identity.client.OpaqueLoginStartRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getOpaqueregistrationrequest_asU8(); + f = message.getUsername(); if (f.length > 0) { - writer.writeBytes( + writer.writeString( 1, f ); } - f = message.getAccesstoken(); + f = message.getOpaqueloginrequest_asU8(); if (f.length > 0) { - writer.writeString( + writer.writeBytes( 2, f ); } - f = message.getUserid(); - if (f.length > 0) { - writer.writeString( + f = message.getDevicekeyupload(); + if (f != null) { + writer.writeMessage( 3, - f - ); - } - f = message.getDeviceidkey(); - if (f.length > 0) { - writer.writeString( - 4, - f + f, + proto.identity.client.DeviceKeyUpload.serializeBinaryToWriter ); } }; /** - * optional bytes opaqueRegistrationRequest = 1; + * optional string username = 1; * @return {string} */ -proto.identity.client.UpdateUserPasswordStartRequest.prototype.getOpaqueregistrationrequest = function() { +proto.identity.client.OpaqueLoginStartRequest.prototype.getUsername = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * optional bytes opaqueRegistrationRequest = 1; - * This is a type-conversion wrapper around `getOpaqueregistrationrequest()` - * @return {string} + * @param {string} value + * @return {!proto.identity.client.OpaqueLoginStartRequest} returns this */ -proto.identity.client.UpdateUserPasswordStartRequest.prototype.getOpaqueregistrationrequest_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getOpaqueregistrationrequest())); +proto.identity.client.OpaqueLoginStartRequest.prototype.setUsername = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; /** - * optional bytes opaqueRegistrationRequest = 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} + * optional bytes opaqueLoginRequest = 2; + * @return {string} */ -proto.identity.client.UpdateUserPasswordStartRequest.prototype.getOpaqueregistrationrequest_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOpaqueregistrationrequest())); +proto.identity.client.OpaqueLoginStartRequest.prototype.getOpaqueloginrequest = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.identity.client.UpdateUserPasswordStartRequest} returns this + * optional bytes opaqueLoginRequest = 2; + * This is a type-conversion wrapper around `getOpaqueloginrequest()` + * @return {string} */ -proto.identity.client.UpdateUserPasswordStartRequest.prototype.setOpaqueregistrationrequest = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); +proto.identity.client.OpaqueLoginStartRequest.prototype.getOpaqueloginrequest_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getOpaqueloginrequest())); }; /** - * optional string accessToken = 2; - * @return {string} + * optional bytes opaqueLoginRequest = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getOpaqueloginrequest()` + * @return {!Uint8Array} */ -proto.identity.client.UpdateUserPasswordStartRequest.prototype.getAccesstoken = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.identity.client.OpaqueLoginStartRequest.prototype.getOpaqueloginrequest_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getOpaqueloginrequest())); }; /** - * @param {string} value - * @return {!proto.identity.client.UpdateUserPasswordStartRequest} returns this + * @param {!(string|Uint8Array)} value + * @return {!proto.identity.client.OpaqueLoginStartRequest} returns this */ -proto.identity.client.UpdateUserPasswordStartRequest.prototype.setAccesstoken = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); +proto.identity.client.OpaqueLoginStartRequest.prototype.setOpaqueloginrequest = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); }; /** - * optional string userID = 3; - * @return {string} + * optional DeviceKeyUpload deviceKeyUpload = 3; + * @return {?proto.identity.client.DeviceKeyUpload} */ -proto.identity.client.UpdateUserPasswordStartRequest.prototype.getUserid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +proto.identity.client.OpaqueLoginStartRequest.prototype.getDevicekeyupload = function() { + return /** @type{?proto.identity.client.DeviceKeyUpload} */ ( + jspb.Message.getWrapperField(this, proto.identity.client.DeviceKeyUpload, 3)); }; /** - * @param {string} value - * @return {!proto.identity.client.UpdateUserPasswordStartRequest} returns this - */ -proto.identity.client.UpdateUserPasswordStartRequest.prototype.setUserid = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); + * @param {?proto.identity.client.DeviceKeyUpload|undefined} value + * @return {!proto.identity.client.OpaqueLoginStartRequest} returns this +*/ +proto.identity.client.OpaqueLoginStartRequest.prototype.setDevicekeyupload = function(value) { + return jspb.Message.setWrapperField(this, 3, value); }; /** - * optional string deviceIDKey = 4; - * @return {string} + * Clears the message field making it undefined. + * @return {!proto.identity.client.OpaqueLoginStartRequest} returns this */ -proto.identity.client.UpdateUserPasswordStartRequest.prototype.getDeviceidkey = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +proto.identity.client.OpaqueLoginStartRequest.prototype.clearDevicekeyupload = function() { + return this.setDevicekeyupload(undefined); }; /** - * @param {string} value - * @return {!proto.identity.client.UpdateUserPasswordStartRequest} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.identity.client.UpdateUserPasswordStartRequest.prototype.setDeviceidkey = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); +proto.identity.client.OpaqueLoginStartRequest.prototype.hasDevicekeyupload = 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.client.UpdateUserPasswordFinishRequest.prototype.toObject = function(opt_includeInstance) { - return proto.identity.client.UpdateUserPasswordFinishRequest.toObject(opt_includeInstance, this); +proto.identity.client.OpaqueLoginFinishRequest.prototype.toObject = function(opt_includeInstance) { + return proto.identity.client.OpaqueLoginFinishRequest.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.client.UpdateUserPasswordFinishRequest} msg The msg instance to transform. + * @param {!proto.identity.client.OpaqueLoginFinishRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.identity.client.UpdateUserPasswordFinishRequest.toObject = function(includeInstance, msg) { +proto.identity.client.OpaqueLoginFinishRequest.toObject = function(includeInstance, msg) { var f, obj = { sessionid: jspb.Message.getFieldWithDefault(msg, 1, ""), - opaqueregistrationupload: msg.getOpaqueregistrationupload_asB64() + opaqueloginupload: msg.getOpaqueloginupload_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.client.UpdateUserPasswordFinishRequest} + * @return {!proto.identity.client.OpaqueLoginFinishRequest} */ -proto.identity.client.UpdateUserPasswordFinishRequest.deserializeBinary = function(bytes) { +proto.identity.client.OpaqueLoginFinishRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.identity.client.UpdateUserPasswordFinishRequest; - return proto.identity.client.UpdateUserPasswordFinishRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.identity.client.OpaqueLoginFinishRequest; + return proto.identity.client.OpaqueLoginFinishRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.identity.client.UpdateUserPasswordFinishRequest} msg The message object to deserialize into. + * @param {!proto.identity.client.OpaqueLoginFinishRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.identity.client.UpdateUserPasswordFinishRequest} + * @return {!proto.identity.client.OpaqueLoginFinishRequest} */ -proto.identity.client.UpdateUserPasswordFinishRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.identity.client.OpaqueLoginFinishRequest.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); + msg.setOpaqueloginupload(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.identity.client.UpdateUserPasswordFinishRequest.prototype.serializeBinary = function() { +proto.identity.client.OpaqueLoginFinishRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.identity.client.UpdateUserPasswordFinishRequest.serializeBinaryToWriter(this, writer); + proto.identity.client.OpaqueLoginFinishRequest.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.client.UpdateUserPasswordFinishRequest} message + * @param {!proto.identity.client.OpaqueLoginFinishRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.identity.client.UpdateUserPasswordFinishRequest.serializeBinaryToWriter = function(message, writer) { +proto.identity.client.OpaqueLoginFinishRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getSessionid(); if (f.length > 0) { writer.writeString( 1, f ); } - f = message.getOpaqueregistrationupload_asU8(); + f = message.getOpaqueloginupload_asU8(); if (f.length > 0) { writer.writeBytes( 2, f ); } }; /** * optional string sessionID = 1; * @return {string} */ -proto.identity.client.UpdateUserPasswordFinishRequest.prototype.getSessionid = function() { +proto.identity.client.OpaqueLoginFinishRequest.prototype.getSessionid = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.identity.client.UpdateUserPasswordFinishRequest} returns this + * @return {!proto.identity.client.OpaqueLoginFinishRequest} returns this */ -proto.identity.client.UpdateUserPasswordFinishRequest.prototype.setSessionid = function(value) { +proto.identity.client.OpaqueLoginFinishRequest.prototype.setSessionid = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** - * optional bytes opaqueRegistrationUpload = 2; + * optional bytes opaqueLoginUpload = 2; * @return {string} */ -proto.identity.client.UpdateUserPasswordFinishRequest.prototype.getOpaqueregistrationupload = function() { +proto.identity.client.OpaqueLoginFinishRequest.prototype.getOpaqueloginupload = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * optional bytes opaqueRegistrationUpload = 2; - * This is a type-conversion wrapper around `getOpaqueregistrationupload()` + * optional bytes opaqueLoginUpload = 2; + * This is a type-conversion wrapper around `getOpaqueloginupload()` * @return {string} */ -proto.identity.client.UpdateUserPasswordFinishRequest.prototype.getOpaqueregistrationupload_asB64 = function() { +proto.identity.client.OpaqueLoginFinishRequest.prototype.getOpaqueloginupload_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getOpaqueregistrationupload())); + this.getOpaqueloginupload())); }; /** - * optional bytes opaqueRegistrationUpload = 2; + * optional bytes opaqueLoginUpload = 2; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getOpaqueregistrationupload()` + * This is a type-conversion wrapper around `getOpaqueloginupload()` * @return {!Uint8Array} */ -proto.identity.client.UpdateUserPasswordFinishRequest.prototype.getOpaqueregistrationupload_asU8 = function() { +proto.identity.client.OpaqueLoginFinishRequest.prototype.getOpaqueloginupload_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOpaqueregistrationupload())); + this.getOpaqueloginupload())); }; /** * @param {!(string|Uint8Array)} value - * @return {!proto.identity.client.UpdateUserPasswordFinishRequest} returns this + * @return {!proto.identity.client.OpaqueLoginFinishRequest} returns this */ -proto.identity.client.UpdateUserPasswordFinishRequest.prototype.setOpaqueregistrationupload = function(value) { +proto.identity.client.OpaqueLoginFinishRequest.prototype.setOpaqueloginupload = 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.client.UpdateUserPasswordStartResponse.prototype.toObject = function(opt_includeInstance) { - return proto.identity.client.UpdateUserPasswordStartResponse.toObject(opt_includeInstance, this); +proto.identity.client.OpaqueLoginStartResponse.prototype.toObject = function(opt_includeInstance) { + return proto.identity.client.OpaqueLoginStartResponse.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.client.UpdateUserPasswordStartResponse} msg The msg instance to transform. + * @param {!proto.identity.client.OpaqueLoginStartResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.identity.client.UpdateUserPasswordStartResponse.toObject = function(includeInstance, msg) { +proto.identity.client.OpaqueLoginStartResponse.toObject = function(includeInstance, msg) { var f, obj = { sessionid: jspb.Message.getFieldWithDefault(msg, 1, ""), - opaqueregistrationresponse: msg.getOpaqueregistrationresponse_asB64() + opaqueloginresponse: msg.getOpaqueloginresponse_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.client.UpdateUserPasswordStartResponse} + * @return {!proto.identity.client.OpaqueLoginStartResponse} */ -proto.identity.client.UpdateUserPasswordStartResponse.deserializeBinary = function(bytes) { +proto.identity.client.OpaqueLoginStartResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.identity.client.UpdateUserPasswordStartResponse; - return proto.identity.client.UpdateUserPasswordStartResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.identity.client.OpaqueLoginStartResponse; + return proto.identity.client.OpaqueLoginStartResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.identity.client.UpdateUserPasswordStartResponse} msg The message object to deserialize into. + * @param {!proto.identity.client.OpaqueLoginStartResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.identity.client.UpdateUserPasswordStartResponse} + * @return {!proto.identity.client.OpaqueLoginStartResponse} */ -proto.identity.client.UpdateUserPasswordStartResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.identity.client.OpaqueLoginStartResponse.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); + msg.setOpaqueloginresponse(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.identity.client.UpdateUserPasswordStartResponse.prototype.serializeBinary = function() { +proto.identity.client.OpaqueLoginStartResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.identity.client.UpdateUserPasswordStartResponse.serializeBinaryToWriter(this, writer); + proto.identity.client.OpaqueLoginStartResponse.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.client.UpdateUserPasswordStartResponse} message + * @param {!proto.identity.client.OpaqueLoginStartResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.identity.client.UpdateUserPasswordStartResponse.serializeBinaryToWriter = function(message, writer) { +proto.identity.client.OpaqueLoginStartResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getSessionid(); if (f.length > 0) { writer.writeString( 1, f ); } - f = message.getOpaqueregistrationresponse_asU8(); + f = message.getOpaqueloginresponse_asU8(); if (f.length > 0) { writer.writeBytes( 2, f ); } }; /** * optional string sessionID = 1; * @return {string} */ -proto.identity.client.UpdateUserPasswordStartResponse.prototype.getSessionid = function() { +proto.identity.client.OpaqueLoginStartResponse.prototype.getSessionid = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.identity.client.UpdateUserPasswordStartResponse} returns this + * @return {!proto.identity.client.OpaqueLoginStartResponse} returns this */ -proto.identity.client.UpdateUserPasswordStartResponse.prototype.setSessionid = function(value) { +proto.identity.client.OpaqueLoginStartResponse.prototype.setSessionid = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** - * optional bytes opaqueRegistrationResponse = 2; + * optional bytes opaqueLoginResponse = 2; * @return {string} */ -proto.identity.client.UpdateUserPasswordStartResponse.prototype.getOpaqueregistrationresponse = function() { +proto.identity.client.OpaqueLoginStartResponse.prototype.getOpaqueloginresponse = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * optional bytes opaqueRegistrationResponse = 2; - * This is a type-conversion wrapper around `getOpaqueregistrationresponse()` + * optional bytes opaqueLoginResponse = 2; + * This is a type-conversion wrapper around `getOpaqueloginresponse()` * @return {string} */ -proto.identity.client.UpdateUserPasswordStartResponse.prototype.getOpaqueregistrationresponse_asB64 = function() { +proto.identity.client.OpaqueLoginStartResponse.prototype.getOpaqueloginresponse_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getOpaqueregistrationresponse())); + this.getOpaqueloginresponse())); }; /** - * optional bytes opaqueRegistrationResponse = 2; + * optional bytes opaqueLoginResponse = 2; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getOpaqueregistrationresponse()` + * This is a type-conversion wrapper around `getOpaqueloginresponse()` * @return {!Uint8Array} */ -proto.identity.client.UpdateUserPasswordStartResponse.prototype.getOpaqueregistrationresponse_asU8 = function() { +proto.identity.client.OpaqueLoginStartResponse.prototype.getOpaqueloginresponse_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOpaqueregistrationresponse())); + this.getOpaqueloginresponse())); }; /** * @param {!(string|Uint8Array)} value - * @return {!proto.identity.client.UpdateUserPasswordStartResponse} returns this + * @return {!proto.identity.client.OpaqueLoginStartResponse} returns this */ -proto.identity.client.UpdateUserPasswordStartResponse.prototype.setOpaqueregistrationresponse = function(value) { +proto.identity.client.OpaqueLoginStartResponse.prototype.setOpaqueloginresponse = 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.client.OpaqueLoginStartRequest.prototype.toObject = function(opt_includeInstance) { - return proto.identity.client.OpaqueLoginStartRequest.toObject(opt_includeInstance, this); +proto.identity.client.OpaqueLoginFinishResponse.prototype.toObject = function(opt_includeInstance) { + return proto.identity.client.OpaqueLoginFinishResponse.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.client.OpaqueLoginStartRequest} msg The msg instance to transform. + * @param {!proto.identity.client.OpaqueLoginFinishResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.identity.client.OpaqueLoginStartRequest.toObject = function(includeInstance, msg) { +proto.identity.client.OpaqueLoginFinishResponse.toObject = function(includeInstance, msg) { var f, obj = { - username: jspb.Message.getFieldWithDefault(msg, 1, ""), - opaqueloginrequest: msg.getOpaqueloginrequest_asB64(), - devicekeyupload: (f = msg.getDevicekeyupload()) && proto.identity.client.DeviceKeyUpload.toObject(includeInstance, f) + userid: jspb.Message.getFieldWithDefault(msg, 1, ""), + accesstoken: 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.client.OpaqueLoginStartRequest} + * @return {!proto.identity.client.OpaqueLoginFinishResponse} */ -proto.identity.client.OpaqueLoginStartRequest.deserializeBinary = function(bytes) { +proto.identity.client.OpaqueLoginFinishResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.identity.client.OpaqueLoginStartRequest; - return proto.identity.client.OpaqueLoginStartRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.identity.client.OpaqueLoginFinishResponse; + return proto.identity.client.OpaqueLoginFinishResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.identity.client.OpaqueLoginStartRequest} msg The message object to deserialize into. + * @param {!proto.identity.client.OpaqueLoginFinishResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.identity.client.OpaqueLoginStartRequest} + * @return {!proto.identity.client.OpaqueLoginFinishResponse} */ -proto.identity.client.OpaqueLoginStartRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.identity.client.OpaqueLoginFinishResponse.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); + msg.setUserid(value); break; case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setOpaqueloginrequest(value); - break; - case 3: - var value = new proto.identity.client.DeviceKeyUpload; - reader.readMessage(value,proto.identity.client.DeviceKeyUpload.deserializeBinaryFromReader); - msg.setDevicekeyupload(value); + var value = /** @type {string} */ (reader.readString()); + msg.setAccesstoken(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.identity.client.OpaqueLoginStartRequest.prototype.serializeBinary = function() { +proto.identity.client.OpaqueLoginFinishResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.identity.client.OpaqueLoginStartRequest.serializeBinaryToWriter(this, writer); + proto.identity.client.OpaqueLoginFinishResponse.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.client.OpaqueLoginStartRequest} message + * @param {!proto.identity.client.OpaqueLoginFinishResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.identity.client.OpaqueLoginStartRequest.serializeBinaryToWriter = function(message, writer) { +proto.identity.client.OpaqueLoginFinishResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getUsername(); + f = message.getUserid(); if (f.length > 0) { writer.writeString( 1, f ); } - f = message.getOpaqueloginrequest_asU8(); + f = message.getAccesstoken(); if (f.length > 0) { - writer.writeBytes( + writer.writeString( 2, f ); } - f = message.getDevicekeyupload(); - if (f != null) { - writer.writeMessage( - 3, - f, - proto.identity.client.DeviceKeyUpload.serializeBinaryToWriter - ); - } }; /** - * optional string username = 1; + * optional string userID = 1; * @return {string} */ -proto.identity.client.OpaqueLoginStartRequest.prototype.getUsername = function() { +proto.identity.client.OpaqueLoginFinishResponse.prototype.getUserid = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.identity.client.OpaqueLoginStartRequest} returns this + * @return {!proto.identity.client.OpaqueLoginFinishResponse} returns this */ -proto.identity.client.OpaqueLoginStartRequest.prototype.setUsername = function(value) { +proto.identity.client.OpaqueLoginFinishResponse.prototype.setUserid = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** - * optional bytes opaqueLoginRequest = 2; + * optional string accessToken = 2; * @return {string} */ -proto.identity.client.OpaqueLoginStartRequest.prototype.getOpaqueloginrequest = function() { +proto.identity.client.OpaqueLoginFinishResponse.prototype.getAccesstoken = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * optional bytes opaqueLoginRequest = 2; - * This is a type-conversion wrapper around `getOpaqueloginrequest()` - * @return {string} + * @param {string} value + * @return {!proto.identity.client.OpaqueLoginFinishResponse} returns this */ -proto.identity.client.OpaqueLoginStartRequest.prototype.getOpaqueloginrequest_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getOpaqueloginrequest())); -}; - - -/** - * optional bytes opaqueLoginRequest = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getOpaqueloginrequest()` - * @return {!Uint8Array} - */ -proto.identity.client.OpaqueLoginStartRequest.prototype.getOpaqueloginrequest_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOpaqueloginrequest())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.identity.client.OpaqueLoginStartRequest} returns this - */ -proto.identity.client.OpaqueLoginStartRequest.prototype.setOpaqueloginrequest = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); -}; - - -/** - * optional DeviceKeyUpload deviceKeyUpload = 3; - * @return {?proto.identity.client.DeviceKeyUpload} - */ -proto.identity.client.OpaqueLoginStartRequest.prototype.getDevicekeyupload = function() { - return /** @type{?proto.identity.client.DeviceKeyUpload} */ ( - jspb.Message.getWrapperField(this, proto.identity.client.DeviceKeyUpload, 3)); -}; - - -/** - * @param {?proto.identity.client.DeviceKeyUpload|undefined} value - * @return {!proto.identity.client.OpaqueLoginStartRequest} returns this -*/ -proto.identity.client.OpaqueLoginStartRequest.prototype.setDevicekeyupload = function(value) { - return jspb.Message.setWrapperField(this, 3, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.identity.client.OpaqueLoginStartRequest} returns this - */ -proto.identity.client.OpaqueLoginStartRequest.prototype.clearDevicekeyupload = function() { - return this.setDevicekeyupload(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.identity.client.OpaqueLoginStartRequest.prototype.hasDevicekeyupload = 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.client.OpaqueLoginFinishRequest.prototype.toObject = function(opt_includeInstance) { - return proto.identity.client.OpaqueLoginFinishRequest.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.client.OpaqueLoginFinishRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.identity.client.OpaqueLoginFinishRequest.toObject = function(includeInstance, msg) { - var f, obj = { - sessionid: jspb.Message.getFieldWithDefault(msg, 1, ""), - opaqueloginupload: msg.getOpaqueloginupload_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.client.OpaqueLoginFinishRequest} - */ -proto.identity.client.OpaqueLoginFinishRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.identity.client.OpaqueLoginFinishRequest; - return proto.identity.client.OpaqueLoginFinishRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.identity.client.OpaqueLoginFinishRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.identity.client.OpaqueLoginFinishRequest} - */ -proto.identity.client.OpaqueLoginFinishRequest.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.setOpaqueloginupload(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.identity.client.OpaqueLoginFinishRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.identity.client.OpaqueLoginFinishRequest.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.client.OpaqueLoginFinishRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.identity.client.OpaqueLoginFinishRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getSessionid(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getOpaqueloginupload_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } -}; - - -/** - * optional string sessionID = 1; - * @return {string} - */ -proto.identity.client.OpaqueLoginFinishRequest.prototype.getSessionid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.identity.client.OpaqueLoginFinishRequest} returns this - */ -proto.identity.client.OpaqueLoginFinishRequest.prototype.setSessionid = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional bytes opaqueLoginUpload = 2; - * @return {string} - */ -proto.identity.client.OpaqueLoginFinishRequest.prototype.getOpaqueloginupload = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes opaqueLoginUpload = 2; - * This is a type-conversion wrapper around `getOpaqueloginupload()` - * @return {string} - */ -proto.identity.client.OpaqueLoginFinishRequest.prototype.getOpaqueloginupload_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getOpaqueloginupload())); -}; - - -/** - * optional bytes opaqueLoginUpload = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getOpaqueloginupload()` - * @return {!Uint8Array} - */ -proto.identity.client.OpaqueLoginFinishRequest.prototype.getOpaqueloginupload_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOpaqueloginupload())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.identity.client.OpaqueLoginFinishRequest} returns this - */ -proto.identity.client.OpaqueLoginFinishRequest.prototype.setOpaqueloginupload = 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.client.OpaqueLoginStartResponse.prototype.toObject = function(opt_includeInstance) { - return proto.identity.client.OpaqueLoginStartResponse.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.client.OpaqueLoginStartResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.identity.client.OpaqueLoginStartResponse.toObject = function(includeInstance, msg) { - var f, obj = { - sessionid: jspb.Message.getFieldWithDefault(msg, 1, ""), - opaqueloginresponse: msg.getOpaqueloginresponse_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.client.OpaqueLoginStartResponse} - */ -proto.identity.client.OpaqueLoginStartResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.identity.client.OpaqueLoginStartResponse; - return proto.identity.client.OpaqueLoginStartResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.identity.client.OpaqueLoginStartResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.identity.client.OpaqueLoginStartResponse} - */ -proto.identity.client.OpaqueLoginStartResponse.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.setOpaqueloginresponse(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.identity.client.OpaqueLoginStartResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.identity.client.OpaqueLoginStartResponse.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.client.OpaqueLoginStartResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.identity.client.OpaqueLoginStartResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getSessionid(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getOpaqueloginresponse_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } -}; - - -/** - * optional string sessionID = 1; - * @return {string} - */ -proto.identity.client.OpaqueLoginStartResponse.prototype.getSessionid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.identity.client.OpaqueLoginStartResponse} returns this - */ -proto.identity.client.OpaqueLoginStartResponse.prototype.setSessionid = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional bytes opaqueLoginResponse = 2; - * @return {string} - */ -proto.identity.client.OpaqueLoginStartResponse.prototype.getOpaqueloginresponse = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes opaqueLoginResponse = 2; - * This is a type-conversion wrapper around `getOpaqueloginresponse()` - * @return {string} - */ -proto.identity.client.OpaqueLoginStartResponse.prototype.getOpaqueloginresponse_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getOpaqueloginresponse())); -}; - - -/** - * optional bytes opaqueLoginResponse = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getOpaqueloginresponse()` - * @return {!Uint8Array} - */ -proto.identity.client.OpaqueLoginStartResponse.prototype.getOpaqueloginresponse_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOpaqueloginresponse())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.identity.client.OpaqueLoginStartResponse} returns this - */ -proto.identity.client.OpaqueLoginStartResponse.prototype.setOpaqueloginresponse = 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.client.OpaqueLoginFinishResponse.prototype.toObject = function(opt_includeInstance) { - return proto.identity.client.OpaqueLoginFinishResponse.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.client.OpaqueLoginFinishResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.identity.client.OpaqueLoginFinishResponse.toObject = function(includeInstance, msg) { - var f, obj = { - userid: jspb.Message.getFieldWithDefault(msg, 1, ""), - accesstoken: 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.client.OpaqueLoginFinishResponse} - */ -proto.identity.client.OpaqueLoginFinishResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.identity.client.OpaqueLoginFinishResponse; - return proto.identity.client.OpaqueLoginFinishResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.identity.client.OpaqueLoginFinishResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.identity.client.OpaqueLoginFinishResponse} - */ -proto.identity.client.OpaqueLoginFinishResponse.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 {string} */ (reader.readString()); - msg.setAccesstoken(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.identity.client.OpaqueLoginFinishResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.identity.client.OpaqueLoginFinishResponse.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.client.OpaqueLoginFinishResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.identity.client.OpaqueLoginFinishResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getUserid(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getAccesstoken(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } -}; - - -/** - * optional string userID = 1; - * @return {string} - */ -proto.identity.client.OpaqueLoginFinishResponse.prototype.getUserid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.identity.client.OpaqueLoginFinishResponse} returns this - */ -proto.identity.client.OpaqueLoginFinishResponse.prototype.setUserid = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string accessToken = 2; - * @return {string} - */ -proto.identity.client.OpaqueLoginFinishResponse.prototype.getAccesstoken = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.identity.client.OpaqueLoginFinishResponse} returns this - */ -proto.identity.client.OpaqueLoginFinishResponse.prototype.setAccesstoken = function(value) { - return jspb.Message.setProto3StringField(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.client.WalletLoginRequest.prototype.toObject = function(opt_includeInstance) { - return proto.identity.client.WalletLoginRequest.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.client.WalletLoginRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.identity.client.WalletLoginRequest.toObject = function(includeInstance, msg) { - var f, obj = { - siwemessage: jspb.Message.getFieldWithDefault(msg, 1, ""), - siwesignature: jspb.Message.getFieldWithDefault(msg, 2, ""), - devicekeyupload: (f = msg.getDevicekeyupload()) && proto.identity.client.DeviceKeyUpload.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.client.WalletLoginRequest} - */ -proto.identity.client.WalletLoginRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.identity.client.WalletLoginRequest; - return proto.identity.client.WalletLoginRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.identity.client.WalletLoginRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.identity.client.WalletLoginRequest} - */ -proto.identity.client.WalletLoginRequest.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.setSiwemessage(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setSiwesignature(value); - break; - case 3: - var value = new proto.identity.client.DeviceKeyUpload; - reader.readMessage(value,proto.identity.client.DeviceKeyUpload.deserializeBinaryFromReader); - msg.setDevicekeyupload(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.identity.client.WalletLoginRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.identity.client.WalletLoginRequest.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.client.WalletLoginRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.identity.client.WalletLoginRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getSiwemessage(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getSiwesignature(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getDevicekeyupload(); - if (f != null) { - writer.writeMessage( - 3, - f, - proto.identity.client.DeviceKeyUpload.serializeBinaryToWriter - ); - } -}; - - -/** - * optional string siweMessage = 1; - * @return {string} - */ -proto.identity.client.WalletLoginRequest.prototype.getSiwemessage = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.identity.client.WalletLoginRequest} returns this - */ -proto.identity.client.WalletLoginRequest.prototype.setSiwemessage = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string siweSignature = 2; - * @return {string} - */ -proto.identity.client.WalletLoginRequest.prototype.getSiwesignature = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.identity.client.WalletLoginRequest} returns this - */ -proto.identity.client.WalletLoginRequest.prototype.setSiwesignature = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional DeviceKeyUpload deviceKeyUpload = 3; - * @return {?proto.identity.client.DeviceKeyUpload} - */ -proto.identity.client.WalletLoginRequest.prototype.getDevicekeyupload = function() { - return /** @type{?proto.identity.client.DeviceKeyUpload} */ ( - jspb.Message.getWrapperField(this, proto.identity.client.DeviceKeyUpload, 3)); -}; - - -/** - * @param {?proto.identity.client.DeviceKeyUpload|undefined} value - * @return {!proto.identity.client.WalletLoginRequest} returns this -*/ -proto.identity.client.WalletLoginRequest.prototype.setDevicekeyupload = function(value) { - return jspb.Message.setWrapperField(this, 3, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.identity.client.WalletLoginRequest} returns this - */ -proto.identity.client.WalletLoginRequest.prototype.clearDevicekeyupload = function() { - return this.setDevicekeyupload(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.identity.client.WalletLoginRequest.prototype.hasDevicekeyupload = 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.client.ReservedWalletLoginRequest.prototype.toObject = function(opt_includeInstance) { - return proto.identity.client.ReservedWalletLoginRequest.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.client.ReservedWalletLoginRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.identity.client.ReservedWalletLoginRequest.toObject = function(includeInstance, msg) { - var f, obj = { - siwemessage: jspb.Message.getFieldWithDefault(msg, 1, ""), - siwesignature: jspb.Message.getFieldWithDefault(msg, 2, ""), - devicekeyupload: (f = msg.getDevicekeyupload()) && proto.identity.client.DeviceKeyUpload.toObject(includeInstance, f), - keyservermessage: jspb.Message.getFieldWithDefault(msg, 4, ""), - keyserversignature: 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.client.ReservedWalletLoginRequest} - */ -proto.identity.client.ReservedWalletLoginRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.identity.client.ReservedWalletLoginRequest; - return proto.identity.client.ReservedWalletLoginRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.identity.client.ReservedWalletLoginRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.identity.client.ReservedWalletLoginRequest} - */ -proto.identity.client.ReservedWalletLoginRequest.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.setSiwemessage(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setSiwesignature(value); - break; - case 3: - var value = new proto.identity.client.DeviceKeyUpload; - reader.readMessage(value,proto.identity.client.DeviceKeyUpload.deserializeBinaryFromReader); - msg.setDevicekeyupload(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setKeyservermessage(value); - break; - case 5: - var value = /** @type {string} */ (reader.readString()); - msg.setKeyserversignature(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.identity.client.ReservedWalletLoginRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.identity.client.ReservedWalletLoginRequest.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.client.ReservedWalletLoginRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.identity.client.ReservedWalletLoginRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getSiwemessage(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getSiwesignature(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getDevicekeyupload(); - if (f != null) { - writer.writeMessage( - 3, - f, - proto.identity.client.DeviceKeyUpload.serializeBinaryToWriter - ); - } - f = message.getKeyservermessage(); - if (f.length > 0) { - writer.writeString( - 4, - f - ); - } - f = message.getKeyserversignature(); - if (f.length > 0) { - writer.writeString( - 5, - f - ); - } -}; - - -/** - * optional string siweMessage = 1; - * @return {string} - */ -proto.identity.client.ReservedWalletLoginRequest.prototype.getSiwemessage = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.identity.client.ReservedWalletLoginRequest} returns this - */ -proto.identity.client.ReservedWalletLoginRequest.prototype.setSiwemessage = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string siweSignature = 2; - * @return {string} - */ -proto.identity.client.ReservedWalletLoginRequest.prototype.getSiwesignature = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.identity.client.ReservedWalletLoginRequest} returns this - */ -proto.identity.client.ReservedWalletLoginRequest.prototype.setSiwesignature = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional DeviceKeyUpload deviceKeyUpload = 3; - * @return {?proto.identity.client.DeviceKeyUpload} - */ -proto.identity.client.ReservedWalletLoginRequest.prototype.getDevicekeyupload = function() { - return /** @type{?proto.identity.client.DeviceKeyUpload} */ ( - jspb.Message.getWrapperField(this, proto.identity.client.DeviceKeyUpload, 3)); -}; - - -/** - * @param {?proto.identity.client.DeviceKeyUpload|undefined} value - * @return {!proto.identity.client.ReservedWalletLoginRequest} returns this -*/ -proto.identity.client.ReservedWalletLoginRequest.prototype.setDevicekeyupload = function(value) { - return jspb.Message.setWrapperField(this, 3, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.identity.client.ReservedWalletLoginRequest} returns this - */ -proto.identity.client.ReservedWalletLoginRequest.prototype.clearDevicekeyupload = function() { - return this.setDevicekeyupload(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.identity.client.ReservedWalletLoginRequest.prototype.hasDevicekeyupload = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -/** - * optional string keyserverMessage = 4; - * @return {string} - */ -proto.identity.client.ReservedWalletLoginRequest.prototype.getKeyservermessage = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * @param {string} value - * @return {!proto.identity.client.ReservedWalletLoginRequest} returns this - */ -proto.identity.client.ReservedWalletLoginRequest.prototype.setKeyservermessage = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); -}; - - -/** - * optional string keyserverSignature = 5; - * @return {string} - */ -proto.identity.client.ReservedWalletLoginRequest.prototype.getKeyserversignature = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); -}; - - -/** - * @param {string} value - * @return {!proto.identity.client.ReservedWalletLoginRequest} returns this - */ -proto.identity.client.ReservedWalletLoginRequest.prototype.setKeyserversignature = function(value) { - return jspb.Message.setProto3StringField(this, 5, 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.client.WalletLoginResponse.prototype.toObject = function(opt_includeInstance) { - return proto.identity.client.WalletLoginResponse.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.client.WalletLoginResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.identity.client.WalletLoginResponse.toObject = function(includeInstance, msg) { - var f, obj = { - userid: jspb.Message.getFieldWithDefault(msg, 1, ""), - accesstoken: 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.client.WalletLoginResponse} - */ -proto.identity.client.WalletLoginResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.identity.client.WalletLoginResponse; - return proto.identity.client.WalletLoginResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.identity.client.WalletLoginResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.identity.client.WalletLoginResponse} - */ -proto.identity.client.WalletLoginResponse.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 {string} */ (reader.readString()); - msg.setAccesstoken(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.identity.client.WalletLoginResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.identity.client.WalletLoginResponse.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.client.WalletLoginResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.identity.client.WalletLoginResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getUserid(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getAccesstoken(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } -}; - - -/** - * optional string userID = 1; - * @return {string} - */ -proto.identity.client.WalletLoginResponse.prototype.getUserid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.identity.client.WalletLoginResponse} returns this - */ -proto.identity.client.WalletLoginResponse.prototype.setUserid = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string accessToken = 2; - * @return {string} - */ -proto.identity.client.WalletLoginResponse.prototype.getAccesstoken = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.identity.client.WalletLoginResponse} returns this - */ -proto.identity.client.WalletLoginResponse.prototype.setAccesstoken = function(value) { - return jspb.Message.setProto3StringField(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.client.LogoutRequest.prototype.toObject = function(opt_includeInstance) { - return proto.identity.client.LogoutRequest.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.client.LogoutRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.identity.client.LogoutRequest.toObject = function(includeInstance, msg) { - var f, obj = { - accesstoken: jspb.Message.getFieldWithDefault(msg, 1, ""), - userid: jspb.Message.getFieldWithDefault(msg, 2, ""), - deviceidkey: jspb.Message.getFieldWithDefault(msg, 3, "") - }; - - 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.client.LogoutRequest} - */ -proto.identity.client.LogoutRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.identity.client.LogoutRequest; - return proto.identity.client.LogoutRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.identity.client.LogoutRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.identity.client.LogoutRequest} - */ -proto.identity.client.LogoutRequest.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.setAccesstoken(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setUserid(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setDeviceidkey(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.identity.client.LogoutRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.identity.client.LogoutRequest.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.client.LogoutRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.identity.client.LogoutRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAccesstoken(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getUserid(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getDeviceidkey(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } -}; - - -/** - * optional string accessToken = 1; - * @return {string} - */ -proto.identity.client.LogoutRequest.prototype.getAccesstoken = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.identity.client.LogoutRequest} returns this - */ -proto.identity.client.LogoutRequest.prototype.setAccesstoken = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string userID = 2; - * @return {string} - */ -proto.identity.client.LogoutRequest.prototype.getUserid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.identity.client.LogoutRequest} returns this - */ -proto.identity.client.LogoutRequest.prototype.setUserid = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string deviceIDKey = 3; - * @return {string} - */ -proto.identity.client.LogoutRequest.prototype.getDeviceidkey = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.identity.client.LogoutRequest} returns this - */ -proto.identity.client.LogoutRequest.prototype.setDeviceidkey = function(value) { - return jspb.Message.setProto3StringField(this, 3, 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.client.DeleteUserRequest.prototype.toObject = function(opt_includeInstance) { - return proto.identity.client.DeleteUserRequest.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.client.DeleteUserRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.identity.client.DeleteUserRequest.toObject = function(includeInstance, msg) { - var f, obj = { - accesstoken: jspb.Message.getFieldWithDefault(msg, 1, ""), - userid: jspb.Message.getFieldWithDefault(msg, 2, ""), - deviceidkey: jspb.Message.getFieldWithDefault(msg, 3, "") - }; - - 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.client.DeleteUserRequest} - */ -proto.identity.client.DeleteUserRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.identity.client.DeleteUserRequest; - return proto.identity.client.DeleteUserRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.identity.client.DeleteUserRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.identity.client.DeleteUserRequest} - */ -proto.identity.client.DeleteUserRequest.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.setAccesstoken(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setUserid(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setDeviceidkey(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.identity.client.DeleteUserRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.identity.client.DeleteUserRequest.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.client.DeleteUserRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.identity.client.DeleteUserRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAccesstoken(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getUserid(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getDeviceidkey(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } -}; - - -/** - * optional string accessToken = 1; - * @return {string} - */ -proto.identity.client.DeleteUserRequest.prototype.getAccesstoken = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.identity.client.DeleteUserRequest} returns this - */ -proto.identity.client.DeleteUserRequest.prototype.setAccesstoken = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string userID = 2; - * @return {string} - */ -proto.identity.client.DeleteUserRequest.prototype.getUserid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.identity.client.DeleteUserRequest} returns this - */ -proto.identity.client.DeleteUserRequest.prototype.setUserid = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string deviceIDKey = 3; - * @return {string} - */ -proto.identity.client.DeleteUserRequest.prototype.getDeviceidkey = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.identity.client.DeleteUserRequest} returns this - */ -proto.identity.client.DeleteUserRequest.prototype.setDeviceidkey = function(value) { - return jspb.Message.setProto3StringField(this, 3, 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.client.GenerateNonceResponse.prototype.toObject = function(opt_includeInstance) { - return proto.identity.client.GenerateNonceResponse.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.client.GenerateNonceResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.identity.client.GenerateNonceResponse.toObject = function(includeInstance, msg) { - var f, obj = { - nonce: 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.client.GenerateNonceResponse} - */ -proto.identity.client.GenerateNonceResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.identity.client.GenerateNonceResponse; - return proto.identity.client.GenerateNonceResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.identity.client.GenerateNonceResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.identity.client.GenerateNonceResponse} - */ -proto.identity.client.GenerateNonceResponse.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.setNonce(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.identity.client.GenerateNonceResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.identity.client.GenerateNonceResponse.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.client.GenerateNonceResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.identity.client.GenerateNonceResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getNonce(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string nonce = 1; - * @return {string} - */ -proto.identity.client.GenerateNonceResponse.prototype.getNonce = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.identity.client.GenerateNonceResponse} returns this - */ -proto.identity.client.GenerateNonceResponse.prototype.setNonce = 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.client.OutboundKeyInfo.prototype.toObject = function(opt_includeInstance) { - return proto.identity.client.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.client.OutboundKeyInfo} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.identity.client.OutboundKeyInfo.toObject = function(includeInstance, msg) { - var f, obj = { - identityinfo: (f = msg.getIdentityinfo()) && proto.identity.client.IdentityKeyInfo.toObject(includeInstance, f), - contentprekey: (f = msg.getContentprekey()) && proto.identity.client.PreKey.toObject(includeInstance, f), - notifprekey: (f = msg.getNotifprekey()) && proto.identity.client.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.client.OutboundKeyInfo} - */ -proto.identity.client.OutboundKeyInfo.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.identity.client.OutboundKeyInfo; - return proto.identity.client.OutboundKeyInfo.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.identity.client.OutboundKeyInfo} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.identity.client.OutboundKeyInfo} - */ -proto.identity.client.OutboundKeyInfo.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.identity.client.IdentityKeyInfo; - reader.readMessage(value,proto.identity.client.IdentityKeyInfo.deserializeBinaryFromReader); - msg.setIdentityinfo(value); - break; - case 2: - var value = new proto.identity.client.PreKey; - reader.readMessage(value,proto.identity.client.PreKey.deserializeBinaryFromReader); - msg.setContentprekey(value); - break; - case 3: - var value = new proto.identity.client.PreKey; - reader.readMessage(value,proto.identity.client.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.client.OutboundKeyInfo.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.identity.client.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.client.OutboundKeyInfo} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.identity.client.OutboundKeyInfo.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getIdentityinfo(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.identity.client.IdentityKeyInfo.serializeBinaryToWriter - ); - } - f = message.getContentprekey(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.identity.client.PreKey.serializeBinaryToWriter - ); - } - f = message.getNotifprekey(); - if (f != null) { - writer.writeMessage( - 3, - f, - proto.identity.client.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 IdentityKeyInfo identityInfo = 1; - * @return {?proto.identity.client.IdentityKeyInfo} - */ -proto.identity.client.OutboundKeyInfo.prototype.getIdentityinfo = function() { - return /** @type{?proto.identity.client.IdentityKeyInfo} */ ( - jspb.Message.getWrapperField(this, proto.identity.client.IdentityKeyInfo, 1)); -}; - - -/** - * @param {?proto.identity.client.IdentityKeyInfo|undefined} value - * @return {!proto.identity.client.OutboundKeyInfo} returns this -*/ -proto.identity.client.OutboundKeyInfo.prototype.setIdentityinfo = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.identity.client.OutboundKeyInfo} returns this - */ -proto.identity.client.OutboundKeyInfo.prototype.clearIdentityinfo = function() { - return this.setIdentityinfo(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.identity.client.OutboundKeyInfo.prototype.hasIdentityinfo = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional PreKey contentPrekey = 2; - * @return {?proto.identity.client.PreKey} - */ -proto.identity.client.OutboundKeyInfo.prototype.getContentprekey = function() { - return /** @type{?proto.identity.client.PreKey} */ ( - jspb.Message.getWrapperField(this, proto.identity.client.PreKey, 2)); -}; - - -/** - * @param {?proto.identity.client.PreKey|undefined} value - * @return {!proto.identity.client.OutboundKeyInfo} returns this -*/ -proto.identity.client.OutboundKeyInfo.prototype.setContentprekey = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.identity.client.OutboundKeyInfo} returns this - */ -proto.identity.client.OutboundKeyInfo.prototype.clearContentprekey = function() { - return this.setContentprekey(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.identity.client.OutboundKeyInfo.prototype.hasContentprekey = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional PreKey notifPrekey = 3; - * @return {?proto.identity.client.PreKey} - */ -proto.identity.client.OutboundKeyInfo.prototype.getNotifprekey = function() { - return /** @type{?proto.identity.client.PreKey} */ ( - jspb.Message.getWrapperField(this, proto.identity.client.PreKey, 3)); -}; - - -/** - * @param {?proto.identity.client.PreKey|undefined} value - * @return {!proto.identity.client.OutboundKeyInfo} returns this -*/ -proto.identity.client.OutboundKeyInfo.prototype.setNotifprekey = function(value) { - return jspb.Message.setWrapperField(this, 3, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.identity.client.OutboundKeyInfo} returns this - */ -proto.identity.client.OutboundKeyInfo.prototype.clearNotifprekey = function() { - return this.setNotifprekey(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.identity.client.OutboundKeyInfo.prototype.hasNotifprekey = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -/** - * optional string oneTimeContentPrekey = 4; - * @return {string} - */ -proto.identity.client.OutboundKeyInfo.prototype.getOnetimecontentprekey = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * @param {string} value - * @return {!proto.identity.client.OutboundKeyInfo} returns this - */ -proto.identity.client.OutboundKeyInfo.prototype.setOnetimecontentprekey = function(value) { - return jspb.Message.setField(this, 4, value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.identity.client.OutboundKeyInfo} returns this - */ -proto.identity.client.OutboundKeyInfo.prototype.clearOnetimecontentprekey = function() { - return jspb.Message.setField(this, 4, undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.identity.client.OutboundKeyInfo.prototype.hasOnetimecontentprekey = function() { - return jspb.Message.getField(this, 4) != null; -}; - - -/** - * optional string oneTimeNotifPrekey = 5; - * @return {string} - */ -proto.identity.client.OutboundKeyInfo.prototype.getOnetimenotifprekey = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); -}; - - -/** - * @param {string} value - * @return {!proto.identity.client.OutboundKeyInfo} returns this - */ -proto.identity.client.OutboundKeyInfo.prototype.setOnetimenotifprekey = function(value) { - return jspb.Message.setField(this, 5, value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.identity.client.OutboundKeyInfo} returns this - */ -proto.identity.client.OutboundKeyInfo.prototype.clearOnetimenotifprekey = function() { - return jspb.Message.setField(this, 5, undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.identity.client.OutboundKeyInfo.prototype.hasOnetimenotifprekey = function() { - return jspb.Message.getField(this, 5) != null; -}; - - - -/** - * 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.client.OutboundKeysForUserRequest.oneofGroups_ = [[1,2]]; - -/** - * @enum {number} - */ -proto.identity.client.OutboundKeysForUserRequest.IdentifierCase = { - IDENTIFIER_NOT_SET: 0, - USERNAME: 1, - WALLETADDRESS: 2 -}; - -/** - * @return {proto.identity.client.OutboundKeysForUserRequest.IdentifierCase} - */ -proto.identity.client.OutboundKeysForUserRequest.prototype.getIdentifierCase = function() { - return /** @type {proto.identity.client.OutboundKeysForUserRequest.IdentifierCase} */(jspb.Message.computeOneofCase(this, proto.identity.client.OutboundKeysForUserRequest.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.client.OutboundKeysForUserRequest.prototype.toObject = function(opt_includeInstance) { - return proto.identity.client.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.client.OutboundKeysForUserRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.identity.client.OutboundKeysForUserRequest.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.client.OutboundKeysForUserRequest} - */ -proto.identity.client.OutboundKeysForUserRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.identity.client.OutboundKeysForUserRequest; - return proto.identity.client.OutboundKeysForUserRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.identity.client.OutboundKeysForUserRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.identity.client.OutboundKeysForUserRequest} - */ -proto.identity.client.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.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.client.OutboundKeysForUserRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.identity.client.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.client.OutboundKeysForUserRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.identity.client.OutboundKeysForUserRequest.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.client.OutboundKeysForUserRequest.prototype.getUsername = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.identity.client.OutboundKeysForUserRequest} returns this - */ -proto.identity.client.OutboundKeysForUserRequest.prototype.setUsername = function(value) { - return jspb.Message.setOneofField(this, 1, proto.identity.client.OutboundKeysForUserRequest.oneofGroups_[0], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.identity.client.OutboundKeysForUserRequest} returns this - */ -proto.identity.client.OutboundKeysForUserRequest.prototype.clearUsername = function() { - return jspb.Message.setOneofField(this, 1, proto.identity.client.OutboundKeysForUserRequest.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.identity.client.OutboundKeysForUserRequest.prototype.hasUsername = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional string walletAddress = 2; - * @return {string} - */ -proto.identity.client.OutboundKeysForUserRequest.prototype.getWalletaddress = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.identity.client.OutboundKeysForUserRequest} returns this - */ -proto.identity.client.OutboundKeysForUserRequest.prototype.setWalletaddress = function(value) { - return jspb.Message.setOneofField(this, 2, proto.identity.client.OutboundKeysForUserRequest.oneofGroups_[0], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.identity.client.OutboundKeysForUserRequest} returns this - */ -proto.identity.client.OutboundKeysForUserRequest.prototype.clearWalletaddress = function() { - return jspb.Message.setOneofField(this, 2, proto.identity.client.OutboundKeysForUserRequest.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.identity.client.OutboundKeysForUserRequest.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.client.OutboundKeysForUserResponse.prototype.toObject = function(opt_includeInstance) { - return proto.identity.client.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.client.OutboundKeysForUserResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.identity.client.OutboundKeysForUserResponse.toObject = function(includeInstance, msg) { - var f, obj = { - devicesMap: (f = msg.getDevicesMap()) ? f.toObject(includeInstance, proto.identity.client.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.client.OutboundKeysForUserResponse} - */ -proto.identity.client.OutboundKeysForUserResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.identity.client.OutboundKeysForUserResponse; - return proto.identity.client.OutboundKeysForUserResponse.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.identity.client.OutboundKeysForUserResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.identity.client.OutboundKeysForUserResponse} - */ -proto.identity.client.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.client.OutboundKeyInfo.deserializeBinaryFromReader, "", new proto.identity.client.OutboundKeyInfo()); - }); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.identity.client.OutboundKeysForUserResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.identity.client.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.client.OutboundKeysForUserResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.identity.client.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.client.OutboundKeyInfo.serializeBinaryToWriter); - } -}; - - -/** - * map devices = 1; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} - */ -proto.identity.client.OutboundKeysForUserResponse.prototype.getDevicesMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 1, opt_noLazyCreate, - proto.identity.client.OutboundKeyInfo)); -}; - - -/** - * Clears values from the map. The map will be non-null. - * @return {!proto.identity.client.OutboundKeysForUserResponse} returns this - */ -proto.identity.client.OutboundKeysForUserResponse.prototype.clearDevicesMap = function() { - this.getDevicesMap().clear(); - return this; +proto.identity.client.OpaqueLoginFinishResponse.prototype.setAccesstoken = function(value) { + return jspb.Message.setProto3StringField(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.client.InboundKeyInfo.prototype.toObject = function(opt_includeInstance) { - return proto.identity.client.InboundKeyInfo.toObject(opt_includeInstance, this); +proto.identity.client.WalletLoginRequest.prototype.toObject = function(opt_includeInstance) { + return proto.identity.client.WalletLoginRequest.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.client.InboundKeyInfo} msg The msg instance to transform. + * @param {!proto.identity.client.WalletLoginRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.identity.client.InboundKeyInfo.toObject = function(includeInstance, msg) { +proto.identity.client.WalletLoginRequest.toObject = function(includeInstance, msg) { var f, obj = { - identityinfo: (f = msg.getIdentityinfo()) && proto.identity.client.IdentityKeyInfo.toObject(includeInstance, f), - contentprekey: (f = msg.getContentprekey()) && proto.identity.client.PreKey.toObject(includeInstance, f), - notifprekey: (f = msg.getNotifprekey()) && proto.identity.client.PreKey.toObject(includeInstance, f) + siwemessage: jspb.Message.getFieldWithDefault(msg, 1, ""), + siwesignature: jspb.Message.getFieldWithDefault(msg, 2, ""), + devicekeyupload: (f = msg.getDevicekeyupload()) && proto.identity.client.DeviceKeyUpload.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.client.InboundKeyInfo} + * @return {!proto.identity.client.WalletLoginRequest} */ -proto.identity.client.InboundKeyInfo.deserializeBinary = function(bytes) { +proto.identity.client.WalletLoginRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.identity.client.InboundKeyInfo; - return proto.identity.client.InboundKeyInfo.deserializeBinaryFromReader(msg, reader); + var msg = new proto.identity.client.WalletLoginRequest; + return proto.identity.client.WalletLoginRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.identity.client.InboundKeyInfo} msg The message object to deserialize into. + * @param {!proto.identity.client.WalletLoginRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.identity.client.InboundKeyInfo} + * @return {!proto.identity.client.WalletLoginRequest} */ -proto.identity.client.InboundKeyInfo.deserializeBinaryFromReader = function(msg, reader) { +proto.identity.client.WalletLoginRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.identity.client.IdentityKeyInfo; - reader.readMessage(value,proto.identity.client.IdentityKeyInfo.deserializeBinaryFromReader); - msg.setIdentityinfo(value); + var value = /** @type {string} */ (reader.readString()); + msg.setSiwemessage(value); break; case 2: - var value = new proto.identity.client.PreKey; - reader.readMessage(value,proto.identity.client.PreKey.deserializeBinaryFromReader); - msg.setContentprekey(value); + var value = /** @type {string} */ (reader.readString()); + msg.setSiwesignature(value); break; case 3: - var value = new proto.identity.client.PreKey; - reader.readMessage(value,proto.identity.client.PreKey.deserializeBinaryFromReader); - msg.setNotifprekey(value); + var value = new proto.identity.client.DeviceKeyUpload; + reader.readMessage(value,proto.identity.client.DeviceKeyUpload.deserializeBinaryFromReader); + msg.setDevicekeyupload(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.identity.client.InboundKeyInfo.prototype.serializeBinary = function() { +proto.identity.client.WalletLoginRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.identity.client.InboundKeyInfo.serializeBinaryToWriter(this, writer); + proto.identity.client.WalletLoginRequest.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.client.InboundKeyInfo} message + * @param {!proto.identity.client.WalletLoginRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.identity.client.InboundKeyInfo.serializeBinaryToWriter = function(message, writer) { +proto.identity.client.WalletLoginRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getIdentityinfo(); - if (f != null) { - writer.writeMessage( + f = message.getSiwemessage(); + if (f.length > 0) { + writer.writeString( 1, - f, - proto.identity.client.IdentityKeyInfo.serializeBinaryToWriter + f ); } - f = message.getContentprekey(); - if (f != null) { - writer.writeMessage( + f = message.getSiwesignature(); + if (f.length > 0) { + writer.writeString( 2, - f, - proto.identity.client.PreKey.serializeBinaryToWriter + f ); } - f = message.getNotifprekey(); + f = message.getDevicekeyupload(); if (f != null) { writer.writeMessage( 3, f, - proto.identity.client.PreKey.serializeBinaryToWriter + proto.identity.client.DeviceKeyUpload.serializeBinaryToWriter ); } }; /** - * optional IdentityKeyInfo identityInfo = 1; - * @return {?proto.identity.client.IdentityKeyInfo} - */ -proto.identity.client.InboundKeyInfo.prototype.getIdentityinfo = function() { - return /** @type{?proto.identity.client.IdentityKeyInfo} */ ( - jspb.Message.getWrapperField(this, proto.identity.client.IdentityKeyInfo, 1)); -}; - - -/** - * @param {?proto.identity.client.IdentityKeyInfo|undefined} value - * @return {!proto.identity.client.InboundKeyInfo} returns this -*/ -proto.identity.client.InboundKeyInfo.prototype.setIdentityinfo = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.identity.client.InboundKeyInfo} returns this - */ -proto.identity.client.InboundKeyInfo.prototype.clearIdentityinfo = function() { - return this.setIdentityinfo(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} + * optional string siweMessage = 1; + * @return {string} */ -proto.identity.client.InboundKeyInfo.prototype.hasIdentityinfo = function() { - return jspb.Message.getField(this, 1) != null; +proto.identity.client.WalletLoginRequest.prototype.getSiwemessage = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * optional PreKey contentPrekey = 2; - * @return {?proto.identity.client.PreKey} + * @param {string} value + * @return {!proto.identity.client.WalletLoginRequest} returns this */ -proto.identity.client.InboundKeyInfo.prototype.getContentprekey = function() { - return /** @type{?proto.identity.client.PreKey} */ ( - jspb.Message.getWrapperField(this, proto.identity.client.PreKey, 2)); -}; - - -/** - * @param {?proto.identity.client.PreKey|undefined} value - * @return {!proto.identity.client.InboundKeyInfo} returns this -*/ -proto.identity.client.InboundKeyInfo.prototype.setContentprekey = function(value) { - return jspb.Message.setWrapperField(this, 2, value); +proto.identity.client.WalletLoginRequest.prototype.setSiwemessage = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; /** - * Clears the message field making it undefined. - * @return {!proto.identity.client.InboundKeyInfo} returns this + * optional string siweSignature = 2; + * @return {string} */ -proto.identity.client.InboundKeyInfo.prototype.clearContentprekey = function() { - return this.setContentprekey(undefined); +proto.identity.client.WalletLoginRequest.prototype.getSiwesignature = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {string} value + * @return {!proto.identity.client.WalletLoginRequest} returns this */ -proto.identity.client.InboundKeyInfo.prototype.hasContentprekey = function() { - return jspb.Message.getField(this, 2) != null; +proto.identity.client.WalletLoginRequest.prototype.setSiwesignature = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); }; /** - * optional PreKey notifPrekey = 3; - * @return {?proto.identity.client.PreKey} + * optional DeviceKeyUpload deviceKeyUpload = 3; + * @return {?proto.identity.client.DeviceKeyUpload} */ -proto.identity.client.InboundKeyInfo.prototype.getNotifprekey = function() { - return /** @type{?proto.identity.client.PreKey} */ ( - jspb.Message.getWrapperField(this, proto.identity.client.PreKey, 3)); +proto.identity.client.WalletLoginRequest.prototype.getDevicekeyupload = function() { + return /** @type{?proto.identity.client.DeviceKeyUpload} */ ( + jspb.Message.getWrapperField(this, proto.identity.client.DeviceKeyUpload, 3)); }; /** - * @param {?proto.identity.client.PreKey|undefined} value - * @return {!proto.identity.client.InboundKeyInfo} returns this + * @param {?proto.identity.client.DeviceKeyUpload|undefined} value + * @return {!proto.identity.client.WalletLoginRequest} returns this */ -proto.identity.client.InboundKeyInfo.prototype.setNotifprekey = function(value) { +proto.identity.client.WalletLoginRequest.prototype.setDevicekeyupload = function(value) { return jspb.Message.setWrapperField(this, 3, value); }; /** * Clears the message field making it undefined. - * @return {!proto.identity.client.InboundKeyInfo} returns this + * @return {!proto.identity.client.WalletLoginRequest} returns this */ -proto.identity.client.InboundKeyInfo.prototype.clearNotifprekey = function() { - return this.setNotifprekey(undefined); +proto.identity.client.WalletLoginRequest.prototype.clearDevicekeyupload = function() { + return this.setDevicekeyupload(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ -proto.identity.client.InboundKeyInfo.prototype.hasNotifprekey = function() { +proto.identity.client.WalletLoginRequest.prototype.hasDevicekeyupload = function() { return jspb.Message.getField(this, 3) != null; }; -/** - * 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.client.InboundKeysForUserRequest.oneofGroups_ = [[1,2]]; - -/** - * @enum {number} - */ -proto.identity.client.InboundKeysForUserRequest.IdentifierCase = { - IDENTIFIER_NOT_SET: 0, - USERNAME: 1, - WALLETADDRESS: 2 -}; - -/** - * @return {proto.identity.client.InboundKeysForUserRequest.IdentifierCase} - */ -proto.identity.client.InboundKeysForUserRequest.prototype.getIdentifierCase = function() { - return /** @type {proto.identity.client.InboundKeysForUserRequest.IdentifierCase} */(jspb.Message.computeOneofCase(this, proto.identity.client.InboundKeysForUserRequest.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.client.InboundKeysForUserRequest.prototype.toObject = function(opt_includeInstance) { - return proto.identity.client.InboundKeysForUserRequest.toObject(opt_includeInstance, this); +proto.identity.client.ReservedWalletLoginRequest.prototype.toObject = function(opt_includeInstance) { + return proto.identity.client.ReservedWalletLoginRequest.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.client.InboundKeysForUserRequest} msg The msg instance to transform. + * @param {!proto.identity.client.ReservedWalletLoginRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.identity.client.InboundKeysForUserRequest.toObject = function(includeInstance, msg) { +proto.identity.client.ReservedWalletLoginRequest.toObject = function(includeInstance, msg) { var f, obj = { - username: jspb.Message.getFieldWithDefault(msg, 1, ""), - walletaddress: jspb.Message.getFieldWithDefault(msg, 2, "") + siwemessage: jspb.Message.getFieldWithDefault(msg, 1, ""), + siwesignature: jspb.Message.getFieldWithDefault(msg, 2, ""), + devicekeyupload: (f = msg.getDevicekeyupload()) && proto.identity.client.DeviceKeyUpload.toObject(includeInstance, f), + keyservermessage: jspb.Message.getFieldWithDefault(msg, 4, ""), + keyserversignature: 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.client.InboundKeysForUserRequest} + * @return {!proto.identity.client.ReservedWalletLoginRequest} */ -proto.identity.client.InboundKeysForUserRequest.deserializeBinary = function(bytes) { +proto.identity.client.ReservedWalletLoginRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.identity.client.InboundKeysForUserRequest; - return proto.identity.client.InboundKeysForUserRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.identity.client.ReservedWalletLoginRequest; + return proto.identity.client.ReservedWalletLoginRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.identity.client.InboundKeysForUserRequest} msg The message object to deserialize into. + * @param {!proto.identity.client.ReservedWalletLoginRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.identity.client.InboundKeysForUserRequest} + * @return {!proto.identity.client.ReservedWalletLoginRequest} */ -proto.identity.client.InboundKeysForUserRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.identity.client.ReservedWalletLoginRequest.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); + msg.setSiwemessage(value); break; case 2: var value = /** @type {string} */ (reader.readString()); - msg.setWalletaddress(value); + msg.setSiwesignature(value); + break; + case 3: + var value = new proto.identity.client.DeviceKeyUpload; + reader.readMessage(value,proto.identity.client.DeviceKeyUpload.deserializeBinaryFromReader); + msg.setDevicekeyupload(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setKeyservermessage(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setKeyserversignature(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.identity.client.InboundKeysForUserRequest.prototype.serializeBinary = function() { +proto.identity.client.ReservedWalletLoginRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.identity.client.InboundKeysForUserRequest.serializeBinaryToWriter(this, writer); + proto.identity.client.ReservedWalletLoginRequest.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.client.InboundKeysForUserRequest} message + * @param {!proto.identity.client.ReservedWalletLoginRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.identity.client.InboundKeysForUserRequest.serializeBinaryToWriter = function(message, writer) { +proto.identity.client.ReservedWalletLoginRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = /** @type {string} */ (jspb.Message.getField(message, 1)); - if (f != null) { + f = message.getSiwemessage(); + if (f.length > 0) { writer.writeString( 1, f ); } - f = /** @type {string} */ (jspb.Message.getField(message, 2)); - if (f != null) { + f = message.getSiwesignature(); + if (f.length > 0) { writer.writeString( 2, f ); } + f = message.getDevicekeyupload(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.identity.client.DeviceKeyUpload.serializeBinaryToWriter + ); + } + f = message.getKeyservermessage(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getKeyserversignature(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } +}; + + +/** + * optional string siweMessage = 1; + * @return {string} + */ +proto.identity.client.ReservedWalletLoginRequest.prototype.getSiwemessage = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.identity.client.ReservedWalletLoginRequest} returns this + */ +proto.identity.client.ReservedWalletLoginRequest.prototype.setSiwemessage = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string siweSignature = 2; + * @return {string} + */ +proto.identity.client.ReservedWalletLoginRequest.prototype.getSiwesignature = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.identity.client.ReservedWalletLoginRequest} returns this + */ +proto.identity.client.ReservedWalletLoginRequest.prototype.setSiwesignature = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); }; /** - * optional string username = 1; - * @return {string} + * optional DeviceKeyUpload deviceKeyUpload = 3; + * @return {?proto.identity.client.DeviceKeyUpload} */ -proto.identity.client.InboundKeysForUserRequest.prototype.getUsername = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.identity.client.ReservedWalletLoginRequest.prototype.getDevicekeyupload = function() { + return /** @type{?proto.identity.client.DeviceKeyUpload} */ ( + jspb.Message.getWrapperField(this, proto.identity.client.DeviceKeyUpload, 3)); }; /** - * @param {string} value - * @return {!proto.identity.client.InboundKeysForUserRequest} returns this - */ -proto.identity.client.InboundKeysForUserRequest.prototype.setUsername = function(value) { - return jspb.Message.setOneofField(this, 1, proto.identity.client.InboundKeysForUserRequest.oneofGroups_[0], value); + * @param {?proto.identity.client.DeviceKeyUpload|undefined} value + * @return {!proto.identity.client.ReservedWalletLoginRequest} returns this +*/ +proto.identity.client.ReservedWalletLoginRequest.prototype.setDevicekeyupload = function(value) { + return jspb.Message.setWrapperField(this, 3, value); }; /** - * Clears the field making it undefined. - * @return {!proto.identity.client.InboundKeysForUserRequest} returns this + * Clears the message field making it undefined. + * @return {!proto.identity.client.ReservedWalletLoginRequest} returns this */ -proto.identity.client.InboundKeysForUserRequest.prototype.clearUsername = function() { - return jspb.Message.setOneofField(this, 1, proto.identity.client.InboundKeysForUserRequest.oneofGroups_[0], undefined); +proto.identity.client.ReservedWalletLoginRequest.prototype.clearDevicekeyupload = function() { + return this.setDevicekeyupload(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ -proto.identity.client.InboundKeysForUserRequest.prototype.hasUsername = function() { - return jspb.Message.getField(this, 1) != null; +proto.identity.client.ReservedWalletLoginRequest.prototype.hasDevicekeyupload = function() { + return jspb.Message.getField(this, 3) != null; }; /** - * optional string walletAddress = 2; + * optional string keyserverMessage = 4; * @return {string} */ -proto.identity.client.InboundKeysForUserRequest.prototype.getWalletaddress = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.identity.client.ReservedWalletLoginRequest.prototype.getKeyservermessage = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); }; /** * @param {string} value - * @return {!proto.identity.client.InboundKeysForUserRequest} returns this + * @return {!proto.identity.client.ReservedWalletLoginRequest} returns this */ -proto.identity.client.InboundKeysForUserRequest.prototype.setWalletaddress = function(value) { - return jspb.Message.setOneofField(this, 2, proto.identity.client.InboundKeysForUserRequest.oneofGroups_[0], value); +proto.identity.client.ReservedWalletLoginRequest.prototype.setKeyservermessage = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); }; /** - * Clears the field making it undefined. - * @return {!proto.identity.client.InboundKeysForUserRequest} returns this + * optional string keyserverSignature = 5; + * @return {string} */ -proto.identity.client.InboundKeysForUserRequest.prototype.clearWalletaddress = function() { - return jspb.Message.setOneofField(this, 2, proto.identity.client.InboundKeysForUserRequest.oneofGroups_[0], undefined); +proto.identity.client.ReservedWalletLoginRequest.prototype.getKeyserversignature = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {string} value + * @return {!proto.identity.client.ReservedWalletLoginRequest} returns this */ -proto.identity.client.InboundKeysForUserRequest.prototype.hasWalletaddress = function() { - return jspb.Message.getField(this, 2) != null; +proto.identity.client.ReservedWalletLoginRequest.prototype.setKeyserversignature = function(value) { + return jspb.Message.setProto3StringField(this, 5, 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.client.InboundKeysForUserResponse.prototype.toObject = function(opt_includeInstance) { - return proto.identity.client.InboundKeysForUserResponse.toObject(opt_includeInstance, this); +proto.identity.client.WalletLoginResponse.prototype.toObject = function(opt_includeInstance) { + return proto.identity.client.WalletLoginResponse.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.client.InboundKeysForUserResponse} msg The msg instance to transform. + * @param {!proto.identity.client.WalletLoginResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.identity.client.InboundKeysForUserResponse.toObject = function(includeInstance, msg) { +proto.identity.client.WalletLoginResponse.toObject = function(includeInstance, msg) { var f, obj = { - devicesMap: (f = msg.getDevicesMap()) ? f.toObject(includeInstance, proto.identity.client.InboundKeyInfo.toObject) : [] + userid: jspb.Message.getFieldWithDefault(msg, 1, ""), + accesstoken: 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.client.InboundKeysForUserResponse} + * @return {!proto.identity.client.WalletLoginResponse} */ -proto.identity.client.InboundKeysForUserResponse.deserializeBinary = function(bytes) { +proto.identity.client.WalletLoginResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.identity.client.InboundKeysForUserResponse; - return proto.identity.client.InboundKeysForUserResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.identity.client.WalletLoginResponse; + return proto.identity.client.WalletLoginResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.identity.client.InboundKeysForUserResponse} msg The message object to deserialize into. + * @param {!proto.identity.client.WalletLoginResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.identity.client.InboundKeysForUserResponse} + * @return {!proto.identity.client.WalletLoginResponse} */ -proto.identity.client.InboundKeysForUserResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.identity.client.WalletLoginResponse.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.client.InboundKeyInfo.deserializeBinaryFromReader, "", new proto.identity.client.InboundKeyInfo()); - }); + var value = /** @type {string} */ (reader.readString()); + msg.setUserid(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setAccesstoken(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.identity.client.InboundKeysForUserResponse.prototype.serializeBinary = function() { +proto.identity.client.WalletLoginResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.identity.client.InboundKeysForUserResponse.serializeBinaryToWriter(this, writer); + proto.identity.client.WalletLoginResponse.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.client.InboundKeysForUserResponse} message + * @param {!proto.identity.client.WalletLoginResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.identity.client.InboundKeysForUserResponse.serializeBinaryToWriter = function(message, writer) { +proto.identity.client.WalletLoginResponse.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.client.InboundKeyInfo.serializeBinaryToWriter); + f = message.getUserid(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getAccesstoken(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); } }; /** - * map devices = 1; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} + * optional string userID = 1; + * @return {string} */ -proto.identity.client.InboundKeysForUserResponse.prototype.getDevicesMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 1, opt_noLazyCreate, - proto.identity.client.InboundKeyInfo)); +proto.identity.client.WalletLoginResponse.prototype.getUserid = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * Clears values from the map. The map will be non-null. - * @return {!proto.identity.client.InboundKeysForUserResponse} returns this + * @param {string} value + * @return {!proto.identity.client.WalletLoginResponse} returns this */ -proto.identity.client.InboundKeysForUserResponse.prototype.clearDevicesMap = function() { - this.getDevicesMap().clear(); - return this; +proto.identity.client.WalletLoginResponse.prototype.setUserid = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; +/** + * optional string accessToken = 2; + * @return {string} + */ +proto.identity.client.WalletLoginResponse.prototype.getAccesstoken = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + /** - * List of repeated fields within this message type. - * @private {!Array} - * @const + * @param {string} value + * @return {!proto.identity.client.WalletLoginResponse} returns this */ -proto.identity.client.UploadOneTimeKeysRequest.repeatedFields_ = [4,5]; +proto.identity.client.WalletLoginResponse.prototype.setAccesstoken = function(value) { + return jspb.Message.setProto3StringField(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.client.UploadOneTimeKeysRequest.prototype.toObject = function(opt_includeInstance) { - return proto.identity.client.UploadOneTimeKeysRequest.toObject(opt_includeInstance, this); +proto.identity.client.GenerateNonceResponse.prototype.toObject = function(opt_includeInstance) { + return proto.identity.client.GenerateNonceResponse.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.client.UploadOneTimeKeysRequest} msg The msg instance to transform. + * @param {!proto.identity.client.GenerateNonceResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.identity.client.UploadOneTimeKeysRequest.toObject = function(includeInstance, msg) { +proto.identity.client.GenerateNonceResponse.toObject = function(includeInstance, msg) { var f, obj = { - userid: jspb.Message.getFieldWithDefault(msg, 1, ""), - deviceid: jspb.Message.getFieldWithDefault(msg, 2, ""), - accesstoken: jspb.Message.getFieldWithDefault(msg, 3, ""), - contentonetimeprekeysList: (f = jspb.Message.getRepeatedField(msg, 4)) == null ? undefined : f, - notifonetimeprekeysList: (f = jspb.Message.getRepeatedField(msg, 5)) == null ? undefined : f + nonce: 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.client.UploadOneTimeKeysRequest} + * @return {!proto.identity.client.GenerateNonceResponse} */ -proto.identity.client.UploadOneTimeKeysRequest.deserializeBinary = function(bytes) { +proto.identity.client.GenerateNonceResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.identity.client.UploadOneTimeKeysRequest; - return proto.identity.client.UploadOneTimeKeysRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.identity.client.GenerateNonceResponse; + return proto.identity.client.GenerateNonceResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.identity.client.UploadOneTimeKeysRequest} msg The message object to deserialize into. + * @param {!proto.identity.client.GenerateNonceResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.identity.client.UploadOneTimeKeysRequest} + * @return {!proto.identity.client.GenerateNonceResponse} */ -proto.identity.client.UploadOneTimeKeysRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.identity.client.GenerateNonceResponse.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 {string} */ (reader.readString()); - msg.setDeviceid(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setAccesstoken(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.addContentonetimeprekeys(value); - break; - case 5: - var value = /** @type {string} */ (reader.readString()); - msg.addNotifonetimeprekeys(value); + msg.setNonce(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.identity.client.UploadOneTimeKeysRequest.prototype.serializeBinary = function() { +proto.identity.client.GenerateNonceResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.identity.client.UploadOneTimeKeysRequest.serializeBinaryToWriter(this, writer); + proto.identity.client.GenerateNonceResponse.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.client.UploadOneTimeKeysRequest} message + * @param {!proto.identity.client.GenerateNonceResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.identity.client.UploadOneTimeKeysRequest.serializeBinaryToWriter = function(message, writer) { +proto.identity.client.GenerateNonceResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getUserid(); + f = message.getNonce(); if (f.length > 0) { writer.writeString( 1, f ); } - f = message.getDeviceid(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getAccesstoken(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getContentonetimeprekeysList(); - if (f.length > 0) { - writer.writeRepeatedString( - 4, - f - ); - } - f = message.getNotifonetimeprekeysList(); - if (f.length > 0) { - writer.writeRepeatedString( - 5, - f - ); - } }; /** - * optional string userID = 1; + * optional string nonce = 1; * @return {string} */ -proto.identity.client.UploadOneTimeKeysRequest.prototype.getUserid = function() { +proto.identity.client.GenerateNonceResponse.prototype.getNonce = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.identity.client.UploadOneTimeKeysRequest} returns this + * @return {!proto.identity.client.GenerateNonceResponse} returns this */ -proto.identity.client.UploadOneTimeKeysRequest.prototype.setUserid = function(value) { +proto.identity.client.GenerateNonceResponse.prototype.setNonce = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; -/** - * optional string deviceID = 2; - * @return {string} - */ -proto.identity.client.UploadOneTimeKeysRequest.prototype.getDeviceid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.identity.client.UploadOneTimeKeysRequest} returns this - */ -proto.identity.client.UploadOneTimeKeysRequest.prototype.setDeviceid = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string accessToken = 3; - * @return {string} - */ -proto.identity.client.UploadOneTimeKeysRequest.prototype.getAccesstoken = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.identity.client.UploadOneTimeKeysRequest} returns this - */ -proto.identity.client.UploadOneTimeKeysRequest.prototype.setAccesstoken = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * repeated string contentOneTimePreKeys = 4; - * @return {!Array} - */ -proto.identity.client.UploadOneTimeKeysRequest.prototype.getContentonetimeprekeysList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 4)); -}; - - -/** - * @param {!Array} value - * @return {!proto.identity.client.UploadOneTimeKeysRequest} returns this - */ -proto.identity.client.UploadOneTimeKeysRequest.prototype.setContentonetimeprekeysList = function(value) { - return jspb.Message.setField(this, 4, value || []); -}; - - -/** - * @param {string} value - * @param {number=} opt_index - * @return {!proto.identity.client.UploadOneTimeKeysRequest} returns this - */ -proto.identity.client.UploadOneTimeKeysRequest.prototype.addContentonetimeprekeys = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 4, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.identity.client.UploadOneTimeKeysRequest} returns this - */ -proto.identity.client.UploadOneTimeKeysRequest.prototype.clearContentonetimeprekeysList = function() { - return this.setContentonetimeprekeysList([]); -}; - - -/** - * repeated string notifOneTimePreKeys = 5; - * @return {!Array} - */ -proto.identity.client.UploadOneTimeKeysRequest.prototype.getNotifonetimeprekeysList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 5)); -}; - - -/** - * @param {!Array} value - * @return {!proto.identity.client.UploadOneTimeKeysRequest} returns this - */ -proto.identity.client.UploadOneTimeKeysRequest.prototype.setNotifonetimeprekeysList = function(value) { - return jspb.Message.setField(this, 5, value || []); -}; - - -/** - * @param {string} value - * @param {number=} opt_index - * @return {!proto.identity.client.UploadOneTimeKeysRequest} returns this - */ -proto.identity.client.UploadOneTimeKeysRequest.prototype.addNotifonetimeprekeys = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 5, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.identity.client.UploadOneTimeKeysRequest} returns this - */ -proto.identity.client.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.client.VerifyUserAccessTokenRequest.prototype.toObject = function(opt_includeInstance) { return proto.identity.client.VerifyUserAccessTokenRequest.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.client.VerifyUserAccessTokenRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.identity.client.VerifyUserAccessTokenRequest.toObject = function(includeInstance, msg) { var f, obj = { userid: jspb.Message.getFieldWithDefault(msg, 1, ""), signingpublickey: jspb.Message.getFieldWithDefault(msg, 2, ""), accesstoken: jspb.Message.getFieldWithDefault(msg, 3, "") }; 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.client.VerifyUserAccessTokenRequest} */ proto.identity.client.VerifyUserAccessTokenRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.identity.client.VerifyUserAccessTokenRequest; return proto.identity.client.VerifyUserAccessTokenRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.identity.client.VerifyUserAccessTokenRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.identity.client.VerifyUserAccessTokenRequest} */ proto.identity.client.VerifyUserAccessTokenRequest.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 {string} */ (reader.readString()); msg.setSigningpublickey(value); break; case 3: var value = /** @type {string} */ (reader.readString()); msg.setAccesstoken(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.identity.client.VerifyUserAccessTokenRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.identity.client.VerifyUserAccessTokenRequest.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.client.VerifyUserAccessTokenRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.identity.client.VerifyUserAccessTokenRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getUserid(); if (f.length > 0) { writer.writeString( 1, f ); } f = message.getSigningpublickey(); if (f.length > 0) { writer.writeString( 2, f ); } f = message.getAccesstoken(); if (f.length > 0) { writer.writeString( 3, f ); } }; /** * optional string userID = 1; * @return {string} */ proto.identity.client.VerifyUserAccessTokenRequest.prototype.getUserid = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.identity.client.VerifyUserAccessTokenRequest} returns this */ proto.identity.client.VerifyUserAccessTokenRequest.prototype.setUserid = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * optional string signingPublicKey = 2; * @return {string} */ proto.identity.client.VerifyUserAccessTokenRequest.prototype.getSigningpublickey = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value * @return {!proto.identity.client.VerifyUserAccessTokenRequest} returns this */ proto.identity.client.VerifyUserAccessTokenRequest.prototype.setSigningpublickey = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; /** * optional string accessToken = 3; * @return {string} */ proto.identity.client.VerifyUserAccessTokenRequest.prototype.getAccesstoken = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** * @param {string} value * @return {!proto.identity.client.VerifyUserAccessTokenRequest} returns this */ proto.identity.client.VerifyUserAccessTokenRequest.prototype.setAccesstoken = function(value) { return jspb.Message.setProto3StringField(this, 3, 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.client.VerifyUserAccessTokenResponse.prototype.toObject = function(opt_includeInstance) { return proto.identity.client.VerifyUserAccessTokenResponse.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.client.VerifyUserAccessTokenResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.identity.client.VerifyUserAccessTokenResponse.toObject = function(includeInstance, msg) { var f, obj = { tokenvalid: jspb.Message.getBooleanFieldWithDefault(msg, 1, 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.client.VerifyUserAccessTokenResponse} */ proto.identity.client.VerifyUserAccessTokenResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.identity.client.VerifyUserAccessTokenResponse; return proto.identity.client.VerifyUserAccessTokenResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.identity.client.VerifyUserAccessTokenResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.identity.client.VerifyUserAccessTokenResponse} */ proto.identity.client.VerifyUserAccessTokenResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {boolean} */ (reader.readBool()); msg.setTokenvalid(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.identity.client.VerifyUserAccessTokenResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.identity.client.VerifyUserAccessTokenResponse.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.client.VerifyUserAccessTokenResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.identity.client.VerifyUserAccessTokenResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getTokenvalid(); if (f) { writer.writeBool( 1, f ); } }; /** * optional bool tokenValid = 1; * @return {boolean} */ proto.identity.client.VerifyUserAccessTokenResponse.prototype.getTokenvalid = function() { return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); }; /** * @param {boolean} value * @return {!proto.identity.client.VerifyUserAccessTokenResponse} returns this */ proto.identity.client.VerifyUserAccessTokenResponse.prototype.setTokenvalid = function(value) { return jspb.Message.setProto3BooleanField(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.client.AddReservedUsernamesRequest.prototype.toObject = function(opt_includeInstance) { return proto.identity.client.AddReservedUsernamesRequest.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.client.AddReservedUsernamesRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.identity.client.AddReservedUsernamesRequest.toObject = function(includeInstance, msg) { var f, obj = { message: jspb.Message.getFieldWithDefault(msg, 1, ""), signature: 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.client.AddReservedUsernamesRequest} */ proto.identity.client.AddReservedUsernamesRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.identity.client.AddReservedUsernamesRequest; return proto.identity.client.AddReservedUsernamesRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.identity.client.AddReservedUsernamesRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.identity.client.AddReservedUsernamesRequest} */ proto.identity.client.AddReservedUsernamesRequest.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.setMessage(value); break; case 2: var value = /** @type {string} */ (reader.readString()); msg.setSignature(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.identity.client.AddReservedUsernamesRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.identity.client.AddReservedUsernamesRequest.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.client.AddReservedUsernamesRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.identity.client.AddReservedUsernamesRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getMessage(); if (f.length > 0) { writer.writeString( 1, f ); } f = message.getSignature(); if (f.length > 0) { writer.writeString( 2, f ); } }; /** * optional string message = 1; * @return {string} */ proto.identity.client.AddReservedUsernamesRequest.prototype.getMessage = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.identity.client.AddReservedUsernamesRequest} returns this */ proto.identity.client.AddReservedUsernamesRequest.prototype.setMessage = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * optional string signature = 2; * @return {string} */ proto.identity.client.AddReservedUsernamesRequest.prototype.getSignature = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value * @return {!proto.identity.client.AddReservedUsernamesRequest} returns this */ proto.identity.client.AddReservedUsernamesRequest.prototype.setSignature = function(value) { return jspb.Message.setProto3StringField(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.client.RemoveReservedUsernameRequest.prototype.toObject = function(opt_includeInstance) { return proto.identity.client.RemoveReservedUsernameRequest.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.client.RemoveReservedUsernameRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.identity.client.RemoveReservedUsernameRequest.toObject = function(includeInstance, msg) { var f, obj = { message: jspb.Message.getFieldWithDefault(msg, 1, ""), signature: 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.client.RemoveReservedUsernameRequest} */ proto.identity.client.RemoveReservedUsernameRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.identity.client.RemoveReservedUsernameRequest; return proto.identity.client.RemoveReservedUsernameRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.identity.client.RemoveReservedUsernameRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.identity.client.RemoveReservedUsernameRequest} */ proto.identity.client.RemoveReservedUsernameRequest.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.setMessage(value); break; case 2: var value = /** @type {string} */ (reader.readString()); msg.setSignature(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.identity.client.RemoveReservedUsernameRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.identity.client.RemoveReservedUsernameRequest.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.client.RemoveReservedUsernameRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.identity.client.RemoveReservedUsernameRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getMessage(); if (f.length > 0) { writer.writeString( 1, f ); } f = message.getSignature(); if (f.length > 0) { writer.writeString( 2, f ); } }; /** * optional string message = 1; * @return {string} */ proto.identity.client.RemoveReservedUsernameRequest.prototype.getMessage = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.identity.client.RemoveReservedUsernameRequest} returns this */ proto.identity.client.RemoveReservedUsernameRequest.prototype.setMessage = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * optional string signature = 2; * @return {string} */ proto.identity.client.RemoveReservedUsernameRequest.prototype.getSignature = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value * @return {!proto.identity.client.RemoveReservedUsernameRequest} returns this */ proto.identity.client.RemoveReservedUsernameRequest.prototype.setSignature = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; /** * @enum {number} */ proto.identity.client.DeviceType = { KEYSERVER: 0, WEB: 1, IOS: 2, ANDROID: 3, WINDOWS: 4, MACOS: 5 }; goog.object.extend(exports, proto.identity.client); diff --git a/web/protobufs/identity-structs.cjs.flow b/web/protobufs/identity-structs.cjs.flow index 589cfdcd3..7ed06a47f 100644 --- a/web/protobufs/identity-structs.cjs.flow +++ b/web/protobufs/identity-structs.cjs.flow @@ -1,815 +1,506 @@ // @flow import { Message, BinaryWriter, BinaryReader, Map as ProtoMap, } from 'google-protobuf'; declare export class Empty extends Message { serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): {}; static toObject(includeInstance: boolean, msg: Empty): {}; static serializeBinaryToWriter(message: Empty, writer: BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): Empty; static deserializeBinaryFromReader(message: Empty, reader: BinaryReader): Empty; } export type PreKeyObject = { prekey: string, prekeysignature: string, } declare export class PreKey extends Message { getPrekey(): string; setPrekey(value: string): PreKey; getPrekeysignature(): string; setPrekeysignature(value: string): PreKey; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): PreKeyObject; static toObject(includeInstance: boolean, msg: PreKey): PreKeyObject; static serializeBinaryToWriter(message: PreKey, writer: BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): PreKey; static deserializeBinaryFromReader(message: PreKey, reader: BinaryReader): PreKey; } export type IdentityKeyInfoObject = { payload: string, payloadsignature: string, socialproof?: string, }; declare export class IdentityKeyInfo extends Message { getPayload(): string; setPayload(value: string): IdentityKeyInfo; getPayloadsignature(): string; setPayloadsignature(value: string): IdentityKeyInfo; getSocialproof(): string; setSocialproof(value: string): IdentityKeyInfo; hasSocialproof(): boolean; clearSocialproof(): IdentityKeyInfo; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): IdentityKeyInfoObject; static toObject(includeInstance: boolean, msg: IdentityKeyInfo): IdentityKeyInfoObject; static serializeBinaryToWriter(message: IdentityKeyInfo, writer: BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): IdentityKeyInfo; static deserializeBinaryFromReader(message: IdentityKeyInfo, reader: BinaryReader): IdentityKeyInfo; } declare export class DeviceKeyUpload extends Message { getDevicekeyinfo(): IdentityKeyInfo | void; setDevicekeyinfo(value?: IdentityKeyInfo): DeviceKeyUpload; hasDevicekeyinfo(): boolean; clearDevicekeyinfo(): DeviceKeyUpload; getContentupload(): PreKey | void; setContentupload(value?: PreKey): DeviceKeyUpload; hasContentupload(): boolean; clearContentupload(): DeviceKeyUpload; getNotifupload(): PreKey | void; setNotifupload(value?: PreKey): DeviceKeyUpload; hasNotifupload(): boolean; clearNotifupload(): DeviceKeyUpload; getOnetimecontentprekeysList(): Array; setOnetimecontentprekeysList(value: Array): DeviceKeyUpload; clearOnetimecontentprekeysList(): DeviceKeyUpload; addOnetimecontentprekeys(value: string, index?: number): DeviceKeyUpload; getOnetimenotifprekeysList(): Array; setOnetimenotifprekeysList(value: Array): DeviceKeyUpload; clearOnetimenotifprekeysList(): DeviceKeyUpload; addOnetimenotifprekeys(value: string, index?: number): DeviceKeyUpload; getDevicetype(): DeviceType; setDevicetype(value: DeviceType): DeviceKeyUpload; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): DeviceKeyUploadObject; static toObject(includeInstance: boolean, msg: DeviceKeyUpload): DeviceKeyUploadObject; static serializeBinaryToWriter(message: DeviceKeyUpload, writer: BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): DeviceKeyUpload; static deserializeBinaryFromReader(message: DeviceKeyUpload, reader: BinaryReader): DeviceKeyUpload; } export type DeviceKeyUploadObject = { devicekeyinfo?: IdentityKeyInfoObject, identityupload?: PreKeyObject, notifupload?: PreKeyObject, onetimeidentityprekeysList: Array, onetimenotifprekeysList: Array, }; declare export class RegistrationStartRequest extends Message { getOpaqueregistrationrequest(): Uint8Array | string; getOpaqueregistrationrequest_asU8(): Uint8Array; getOpaqueregistrationrequest_asB64(): string; setOpaqueregistrationrequest(value: Uint8Array | string): RegistrationStartRequest; getUsername(): string; setUsername(value: string): RegistrationStartRequest; getDevicekeyupload(): DeviceKeyUpload | void; setDevicekeyupload(value?: DeviceKeyUpload): RegistrationStartRequest; hasDevicekeyupload(): boolean; clearDevicekeyupload(): RegistrationStartRequest; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): RegistrationStartRequestObject; static toObject(includeInstance: boolean, msg: RegistrationStartRequest): RegistrationStartRequestObject; static serializeBinaryToWriter(message: RegistrationStartRequest, writer: BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): RegistrationStartRequest; static deserializeBinaryFromReader(message: RegistrationStartRequest, reader: BinaryReader): RegistrationStartRequest; } export type RegistrationStartRequestObject = { opaqueregistrationrequest: Uint8Array | string, username: string, devicekeyupload?: DeviceKeyUploadObject, }; declare export class ReservedRegistrationStartRequest extends Message { getOpaqueregistrationrequest(): Uint8Array | string; getOpaqueregistrationrequest_asU8(): Uint8Array; getOpaqueregistrationrequest_asB64(): string; setOpaqueregistrationrequest(value: Uint8Array | string): ReservedRegistrationStartRequest; getUsername(): string; setUsername(value: string): ReservedRegistrationStartRequest; getDevicekeyupload(): DeviceKeyUpload | void; setDevicekeyupload(value?: DeviceKeyUpload): ReservedRegistrationStartRequest; hasDevicekeyupload(): boolean; clearDevicekeyupload(): ReservedRegistrationStartRequest; getKeyservermessage(): string; setKeyservermessage(value: string): ReservedRegistrationStartRequest; getKeyserversignature(): string; setKeyserversignature(value: string): ReservedRegistrationStartRequest; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): ReservedRegistrationStartRequestObject; static toObject(includeInstance: boolean, msg: ReservedRegistrationStartRequest): ReservedRegistrationStartRequestObject; static serializeBinaryToWriter(message: ReservedRegistrationStartRequest, writer: BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): ReservedRegistrationStartRequest; static deserializeBinaryFromReader(message: ReservedRegistrationStartRequest, reader: BinaryReader): ReservedRegistrationStartRequest; } export type ReservedRegistrationStartRequestObject = { opaqueregistrationrequest: Uint8Array | string, username: string, devicekeyupload?: DeviceKeyUploadObject, keyservermessage: string, keyserversignature: string, }; declare export class RegistrationFinishRequest extends Message { getSessionid(): string; setSessionid(value: string): RegistrationFinishRequest; getOpaqueregistrationupload(): Uint8Array | string; getOpaqueregistrationupload_asU8(): Uint8Array; getOpaqueregistrationupload_asB64(): string; setOpaqueregistrationupload(value: Uint8Array | string): RegistrationFinishRequest; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): RegistrationFinishRequestObject; static toObject(includeInstance: boolean, msg: RegistrationFinishRequest): RegistrationFinishRequestObject; static serializeBinaryToWriter(message: RegistrationFinishRequest, writer: BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): RegistrationFinishRequest; static deserializeBinaryFromReader(message: RegistrationFinishRequest, reader: BinaryReader): RegistrationFinishRequest; } export type RegistrationFinishRequestObject = { sessionid: string, opaqueregistrationupload: Uint8Array | string, }; declare export class RegistrationStartResponse extends Message { getSessionid(): string; setSessionid(value: string): RegistrationStartResponse; getOpaqueregistrationresponse(): Uint8Array | string; getOpaqueregistrationresponse_asU8(): Uint8Array; getOpaqueregistrationresponse_asB64(): string; setOpaqueregistrationresponse(value: Uint8Array | string): RegistrationStartResponse; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): RegistrationStartResponseObject; static toObject(includeInstance: boolean, msg: RegistrationStartResponse): RegistrationStartResponseObject; static serializeBinaryToWriter(message: RegistrationStartResponse, writer: BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): RegistrationStartResponse; static deserializeBinaryFromReader(message: RegistrationStartResponse, reader: BinaryReader): RegistrationStartResponse; } export type RegistrationStartResponseObject = { sessionid: string, opaqueregistrationresponse: Uint8Array | string, }; declare export class RegistrationFinishResponse extends Message { getUserid(): string; setUserid(value: string): RegistrationFinishResponse; getAccesstoken(): string; setAccesstoken(value: string): RegistrationFinishResponse; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): RegistrationFinishResponseObject; static toObject(includeInstance: boolean, msg: RegistrationFinishResponse): RegistrationFinishResponseObject; static serializeBinaryToWriter(message: RegistrationFinishResponse, writer: BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): RegistrationFinishResponse; static deserializeBinaryFromReader(message: RegistrationFinishResponse, reader: BinaryReader): RegistrationFinishResponse; } export type RegistrationFinishResponseObject = { userid: string, accesstoken: string, }; -declare export class UpdateUserPasswordStartRequest extends Message { - getOpaqueregistrationrequest(): Uint8Array | string; - getOpaqueregistrationrequest_asU8(): Uint8Array; - getOpaqueregistrationrequest_asB64(): string; - setOpaqueregistrationrequest(value: Uint8Array | string): UpdateUserPasswordStartRequest; - - getAccesstoken(): string; - setAccesstoken(value: string): UpdateUserPasswordStartRequest; - - getUserid(): string; - setUserid(value: string): UpdateUserPasswordStartRequest; - - getDeviceidkey(): string; - setDeviceidkey(value: 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, - accesstoken: string, - userid: string, - deviceidkey: 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, -}; - declare export class OpaqueLoginStartRequest extends Message { getUsername(): string; setUsername(value: string): OpaqueLoginStartRequest; getOpaqueloginrequest(): Uint8Array | string; getOpaqueloginrequest_asU8(): Uint8Array; getOpaqueloginrequest_asB64(): string; setOpaqueloginrequest(value: Uint8Array | string): OpaqueLoginStartRequest; getDevicekeyupload(): DeviceKeyUpload | void; setDevicekeyupload(value?: DeviceKeyUpload): OpaqueLoginStartRequest; hasDevicekeyupload(): boolean; clearDevicekeyupload(): OpaqueLoginStartRequest; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): OpaqueLoginStartRequestObject; static toObject(includeInstance: boolean, msg: OpaqueLoginStartRequest): OpaqueLoginStartRequestObject; static serializeBinaryToWriter(message: OpaqueLoginStartRequest, writer: BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): OpaqueLoginStartRequest; static deserializeBinaryFromReader(message: OpaqueLoginStartRequest, reader: BinaryReader): OpaqueLoginStartRequest; } export type OpaqueLoginStartRequestObject = { username: string, opaqueloginrequest: Uint8Array | string, devicekeyupload?: DeviceKeyUploadObject, }; declare export class OpaqueLoginFinishRequest extends Message { getSessionid(): string; setSessionid(value: string): OpaqueLoginFinishRequest; getOpaqueloginupload(): Uint8Array | string; getOpaqueloginupload_asU8(): Uint8Array; getOpaqueloginupload_asB64(): string; setOpaqueloginupload(value: Uint8Array | string): OpaqueLoginFinishRequest; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): OpaqueLoginFinishRequestObject; static toObject(includeInstance: boolean, msg: OpaqueLoginFinishRequest): OpaqueLoginFinishRequestObject; static serializeBinaryToWriter(message: OpaqueLoginFinishRequest, writer: BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): OpaqueLoginFinishRequest; static deserializeBinaryFromReader(message: OpaqueLoginFinishRequest, reader: BinaryReader): OpaqueLoginFinishRequest; } export type OpaqueLoginFinishRequestObject = { sessionid: string, opaqueloginupload: Uint8Array | string, }; declare export class OpaqueLoginStartResponse extends Message { getSessionid(): string; setSessionid(value: string): OpaqueLoginStartResponse; getOpaqueloginresponse(): Uint8Array | string; getOpaqueloginresponse_asU8(): Uint8Array; getOpaqueloginresponse_asB64(): string; setOpaqueloginresponse(value: Uint8Array | string): OpaqueLoginStartResponse; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): OpaqueLoginStartResponseObject; static toObject(includeInstance: boolean, msg: OpaqueLoginStartResponse): OpaqueLoginStartResponseObject; static serializeBinaryToWriter(message: OpaqueLoginStartResponse, writer: BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): OpaqueLoginStartResponse; static deserializeBinaryFromReader(message: OpaqueLoginStartResponse, reader: BinaryReader): OpaqueLoginStartResponse; } export type OpaqueLoginStartResponseObject = { sessionid: string, opaqueloginresponse: Uint8Array | string, }; declare export class OpaqueLoginFinishResponse extends Message { getUserid(): string; setUserid(value: string): OpaqueLoginFinishResponse; getAccesstoken(): string; setAccesstoken(value: string): OpaqueLoginFinishResponse; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): OpaqueLoginFinishResponseObject; static toObject(includeInstance: boolean, msg: OpaqueLoginFinishResponse): OpaqueLoginFinishResponseObject; static serializeBinaryToWriter(message: OpaqueLoginFinishResponse, writer: BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): OpaqueLoginFinishResponse; static deserializeBinaryFromReader(message: OpaqueLoginFinishResponse, reader: BinaryReader): OpaqueLoginFinishResponse; } export type OpaqueLoginFinishResponseObject = { userid: string, accesstoken: string, }; declare export class WalletLoginRequest extends Message { getSiwemessage(): string; setSiwemessage(value: string): WalletLoginRequest; getSiwesignature(): string; setSiwesignature(value: string): WalletLoginRequest; getDevicekeyupload(): DeviceKeyUpload | void; setDevicekeyupload(value?: DeviceKeyUpload): WalletLoginRequest; hasDevicekeyupload(): boolean; clearDevicekeyupload(): WalletLoginRequest; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): WalletLoginRequestObject; static toObject(includeInstance: boolean, msg: WalletLoginRequest): WalletLoginRequestObject; static serializeBinaryToWriter(message: WalletLoginRequest, writer: BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): WalletLoginRequest; static deserializeBinaryFromReader(message: WalletLoginRequest, reader: BinaryReader): WalletLoginRequest; } export type WalletLoginRequestObject = { siwemessage: string, siwesignature: string, devicekeyupload?: DeviceKeyUploadObject, }; declare export class ReservedWalletLoginRequest extends Message { getSiwemessage(): string; setSiwemessage(value: string): ReservedWalletLoginRequest; getSiwesignature(): string; setSiwesignature(value: string): ReservedWalletLoginRequest; getDevicekeyupload(): DeviceKeyUpload | void; setDevicekeyupload(value?: DeviceKeyUpload): ReservedWalletLoginRequest; hasDevicekeyupload(): boolean; clearDevicekeyupload(): ReservedWalletLoginRequest; getKeyservermessage(): string; setKeyservermessage(value: string): ReservedWalletLoginRequest; getKeyserversignature(): string; setKeyserversignature(value: string): ReservedWalletLoginRequest; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): ReservedWalletLoginRequestObject; static toObject(includeInstance: boolean, msg: ReservedWalletLoginRequest): ReservedWalletLoginRequestObject; static serializeBinaryToWriter(message: ReservedWalletLoginRequest, writer: BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): ReservedWalletLoginRequest; static deserializeBinaryFromReader(message: ReservedWalletLoginRequest, reader: BinaryReader): ReservedWalletLoginRequest; } export type ReservedWalletLoginRequestObject = { siwemessage: string, siwesignature: string, devicekeyupload?: DeviceKeyUploadObject, keyservermessage: string, keyserversignature: string, }; declare export class WalletLoginResponse extends Message { getUserid(): string; setUserid(value: string): WalletLoginResponse; getAccesstoken(): string; setAccesstoken(value: string): WalletLoginResponse; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): WalletLoginResponseObject; static toObject(includeInstance: boolean, msg: WalletLoginResponse): WalletLoginResponseObject; static serializeBinaryToWriter(message: WalletLoginResponse, writer: BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): WalletLoginResponse; static deserializeBinaryFromReader(message: WalletLoginResponse, reader: BinaryReader): WalletLoginResponse; } export type WalletLoginResponseObject = { userid: string, accesstoken: string, }; -declare export class LogoutRequest extends Message { - getAccesstoken(): string; - setAccesstoken(value: string): LogoutRequest; - - getUserid(): string; - setUserid(value: string): LogoutRequest; - - getDeviceidkey(): string; - setDeviceidkey(value: string): LogoutRequest; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): LogoutRequestObject; - static toObject(includeInstance: boolean, msg: LogoutRequest): LogoutRequestObject; - static serializeBinaryToWriter(message: LogoutRequest, writer: BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): LogoutRequest; - static deserializeBinaryFromReader(message: LogoutRequest, reader: BinaryReader): LogoutRequest; -} - -export type LogoutRequestObject = { - accesstoken: string, - userid: string, - deviceidkey: string, -}; - -declare export class DeleteUserRequest extends Message { - getAccesstoken(): string; - setAccesstoken(value: string): DeleteUserRequest; - - getUserid(): string; - setUserid(value: string): DeleteUserRequest; - - getDeviceidkey(): string; - setDeviceidkey(value: string): DeleteUserRequest; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): DeleteUserRequestObject; - static toObject(includeInstance: boolean, msg: DeleteUserRequest): DeleteUserRequestObject; - static serializeBinaryToWriter(message: DeleteUserRequest, writer: BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): DeleteUserRequest; - static deserializeBinaryFromReader(message: DeleteUserRequest, reader: BinaryReader): DeleteUserRequest; -} - -export type DeleteUserRequestObject = { - accesstoken: string, - userid: string, - deviceidkey: string, -}; - declare export class GenerateNonceResponse extends Message { getNonce(): string; setNonce(value: string): GenerateNonceResponse; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): GenerateNonceResponseObject; static toObject(includeInstance: boolean, msg: GenerateNonceResponse): GenerateNonceResponseObject; static serializeBinaryToWriter(message: GenerateNonceResponse, writer: BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): GenerateNonceResponse; static deserializeBinaryFromReader(message: GenerateNonceResponse, reader: BinaryReader): GenerateNonceResponse; } export type GenerateNonceResponseObject = { nonce: string, }; -declare export class OutboundKeyInfo extends Message { - getIdentityinfo(): IdentityKeyInfo | void; - setIdentityinfo(value?: IdentityKeyInfo): OutboundKeyInfo; - hasIdentityinfo(): boolean; - clearIdentityinfo(): OutboundKeyInfo; - - getContentprekey(): PreKey | void; - setContentprekey(value?: PreKey): OutboundKeyInfo; - hasContentprekey(): boolean; - clearContentprekey(): OutboundKeyInfo; - - getNotifprekey(): PreKey | void; - setNotifprekey(value?: 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?: IdentityKeyInfoObject, - contentprekey?: PreKeyObject, - notifprekey?: PreKeyObject, - onetimecontentprekey?: string, - onetimenotifprekey?: string, -}; - -export type IdentifierCase = 0 | 1 | 2; - -declare export class OutboundKeysForUserRequest extends Message { - getUsername(): string; - setUsername(value: string): OutboundKeysForUserRequest; - - getWalletaddress(): string; - setWalletaddress(value: string): OutboundKeysForUserRequest; - - getIdentifierCase(): IdentifierCase; - - 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 = { - username: string, - walletaddress: string, -}; - -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 InboundKeyInfo extends Message { - getIdentityinfo(): IdentityKeyInfo | void; - setIdentityinfo(value?: IdentityKeyInfo): InboundKeyInfo; - hasIdentityinfo(): boolean; - clearIdentityinfo(): InboundKeyInfo; - - getContentprekey(): PreKey | void; - setContentprekey(value?: PreKey): InboundKeyInfo; - hasContentprekey(): boolean; - clearContentprekey(): InboundKeyInfo; - - getNotifprekey(): PreKey | void; - setNotifprekey(value?: 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?: IdentityKeyInfoObject, - contentprekey?: PreKeyObject, - notifprekey?: PreKeyObject, -}; - - -declare export class InboundKeysForUserRequest extends Message { - getUsername(): string; - setUsername(value: string): InboundKeysForUserRequest; - - getWalletaddress(): string; - setWalletaddress(value: string): InboundKeysForUserRequest; - - getIdentifierCase(): IdentifierCase; - - 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 = { - username: string, - walletaddress: string, -}; - -declare export class InboundKeysForUserResponse extends Message { - getDevicesMap(): ProtoMap; - clearDevicesMap(): 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]>, -} - -declare export class UploadOneTimeKeysRequest extends Message { - getUserid(): string; - setUserid(value: string): UploadOneTimeKeysRequest; - - getDeviceid(): string; - setDeviceid(value: string): UploadOneTimeKeysRequest; - - getAccesstoken(): string; - setAccesstoken(value: string): UploadOneTimeKeysRequest; - - 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 = { - userid: string, - deviceid: string, - accesstoken: string, - contentonetimeprekeysList: Array, - notifonetimeprekeysList: Array, -}; - declare export class VerifyUserAccessTokenRequest extends Message { getUserid(): string; setUserid(value: string): VerifyUserAccessTokenRequest; getSigningpublickey(): string; setSigningpublickey(value: string): VerifyUserAccessTokenRequest; getAccesstoken(): string; setAccesstoken(value: string): VerifyUserAccessTokenRequest; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): VerifyUserAccessTokenRequestObject; static toObject(includeInstance: boolean, msg: VerifyUserAccessTokenRequest): VerifyUserAccessTokenRequestObject; static serializeBinaryToWriter(message: VerifyUserAccessTokenRequest, writer: BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): VerifyUserAccessTokenRequest; static deserializeBinaryFromReader(message: VerifyUserAccessTokenRequest, reader: BinaryReader): VerifyUserAccessTokenRequest; } export type VerifyUserAccessTokenRequestObject = { userid: string, signingpublickey: string, accesstoken: string, }; declare export class VerifyUserAccessTokenResponse extends Message { getTokenvalid(): boolean; setTokenvalid(value: boolean): VerifyUserAccessTokenResponse; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): VerifyUserAccessTokenResponseObject; static toObject(includeInstance: boolean, msg: VerifyUserAccessTokenResponse): VerifyUserAccessTokenResponseObject; static serializeBinaryToWriter(message: VerifyUserAccessTokenResponse, writer: BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): VerifyUserAccessTokenResponse; static deserializeBinaryFromReader(message: VerifyUserAccessTokenResponse, reader: BinaryReader): VerifyUserAccessTokenResponse; } export type VerifyUserAccessTokenResponseObject = { tokenvalid: boolean, }; declare export class AddReservedUsernamesRequest extends Message { getMessage(): string; setMessage(value: string): AddReservedUsernamesRequest; getSignature(): string; setSignature(value: string): AddReservedUsernamesRequest; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): AddReservedUsernamesRequestObject; static toObject(includeInstance: boolean, msg: AddReservedUsernamesRequest): AddReservedUsernamesRequestObject; static serializeBinaryToWriter(message: AddReservedUsernamesRequest, writer: BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): AddReservedUsernamesRequest; static deserializeBinaryFromReader(message: AddReservedUsernamesRequest, reader: BinaryReader): AddReservedUsernamesRequest; } export type AddReservedUsernamesRequestObject = { message: string, signature: string, }; declare export class RemoveReservedUsernameRequest extends Message { getMessage(): string; setMessage(value: string): RemoveReservedUsernameRequest; getSignature(): string; setSignature(value: string): RemoveReservedUsernameRequest; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): RemoveReservedUsernameRequestObject; static toObject(includeInstance: boolean, msg: RemoveReservedUsernameRequest): RemoveReservedUsernameRequestObject; static serializeBinaryToWriter(message: RemoveReservedUsernameRequest, writer: BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): RemoveReservedUsernameRequest; static deserializeBinaryFromReader(message: RemoveReservedUsernameRequest, reader: BinaryReader): RemoveReservedUsernameRequest; } export type RemoveReservedUsernameRequestObject = { message: string, signature: string, }; export type DeviceType = 0 | 1 | 2 | 3 | 4 | 5;