diff --git a/web/protobufs/identity-client.cjs b/web/protobufs/identity-client.cjs --- a/web/protobufs/identity-client.cjs +++ b/web/protobufs/identity-client.cjs @@ -5,7 +5,11 @@ * @generated */ -// GENERATED CODE -- DO NOT EDIT! +// 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 @@ -40,7 +44,7 @@ /** * @private @const {string} The hostname */ - this.hostname_ = hostname; + this.hostname_ = hostname.replace(/\/+$/, ''); }; @@ -66,7 +70,7 @@ /** * @private @const {string} The hostname */ - this.hostname_ = hostname; + this.hostname_ = hostname.replace(/\/+$/, ''); }; @@ -132,6 +136,67 @@ }; +/** + * @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< @@ -258,13 +323,13 @@ * @const * @type {!grpc.web.MethodDescriptor< * !proto.identity.client.UpdateUserPasswordFinishRequest, - * !proto.identity.client.UpdateUserPasswordFinishResponse>} + * !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.UpdateUserPasswordFinishResponse, + proto.identity.client.Empty, /** * @param {!proto.identity.client.UpdateUserPasswordFinishRequest} request * @return {!Uint8Array} @@ -272,7 +337,7 @@ function(request) { return request.serializeBinary(); }, - proto.identity.client.UpdateUserPasswordFinishResponse.deserializeBinary + proto.identity.client.Empty.deserializeBinary ); @@ -281,9 +346,9 @@ * request proto * @param {?Object} metadata User defined * call metadata - * @param {function(?grpc.web.RpcError, ?proto.identity.client.UpdateUserPasswordFinishResponse)} + * @param {function(?grpc.web.RpcError, ?proto.identity.client.Empty)} * callback The callback function(error, response) - * @return {!grpc.web.ClientReadableStream|undefined} + * @return {!grpc.web.ClientReadableStream|undefined} * The XHR Node Readable Stream */ proto.identity.client.IdentityClientServiceClient.prototype.updateUserPasswordFinish = @@ -302,7 +367,7 @@ * request proto * @param {?Object=} metadata User defined * call metadata - * @return {!Promise} + * @return {!Promise} * Promise that resolves to the response */ proto.identity.client.IdentityClientServicePromiseClient.prototype.updateUserPasswordFinish = @@ -498,6 +563,67 @@ }; +/** + * @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< @@ -623,199 +749,199 @@ /** * @const * @type {!grpc.web.MethodDescriptor< - * !proto.identity.client.ReceiverKeysForUserRequest, - * !proto.identity.client.ReceiverKeysForUserResponse>} + * !proto.identity.client.OutboundKeysForUserRequest, + * !proto.identity.client.OutboundKeysForUserResponse>} */ -const methodDescriptor_IdentityClientService_GetReceiverKeysForUser = new grpc.web.MethodDescriptor( - '/identity.client.IdentityClientService/GetReceiverKeysForUser', +const methodDescriptor_IdentityClientService_GetOutboundKeysForUser = new grpc.web.MethodDescriptor( + '/identity.client.IdentityClientService/GetOutboundKeysForUser', grpc.web.MethodType.UNARY, - proto.identity.client.ReceiverKeysForUserRequest, - proto.identity.client.ReceiverKeysForUserResponse, + proto.identity.client.OutboundKeysForUserRequest, + proto.identity.client.OutboundKeysForUserResponse, /** - * @param {!proto.identity.client.ReceiverKeysForUserRequest} request + * @param {!proto.identity.client.OutboundKeysForUserRequest} request * @return {!Uint8Array} */ function(request) { return request.serializeBinary(); }, - proto.identity.client.ReceiverKeysForUserResponse.deserializeBinary + proto.identity.client.OutboundKeysForUserResponse.deserializeBinary ); /** - * @param {!proto.identity.client.ReceiverKeysForUserRequest} request The + * @param {!proto.identity.client.OutboundKeysForUserRequest} request The * request proto * @param {?Object} metadata User defined * call metadata - * @param {function(?grpc.web.RpcError, ?proto.identity.client.ReceiverKeysForUserResponse)} + * @param {function(?grpc.web.RpcError, ?proto.identity.client.OutboundKeysForUserResponse)} * callback The callback function(error, response) - * @return {!grpc.web.ClientReadableStream|undefined} + * @return {!grpc.web.ClientReadableStream|undefined} * The XHR Node Readable Stream */ -proto.identity.client.IdentityClientServiceClient.prototype.getReceiverKeysForUser = +proto.identity.client.IdentityClientServiceClient.prototype.getOutboundKeysForUser = function(request, metadata, callback) { return this.client_.rpcCall(this.hostname_ + - '/identity.client.IdentityClientService/GetReceiverKeysForUser', + '/identity.client.IdentityClientService/GetOutboundKeysForUser', request, metadata || {}, - methodDescriptor_IdentityClientService_GetReceiverKeysForUser, + methodDescriptor_IdentityClientService_GetOutboundKeysForUser, callback); }; /** - * @param {!proto.identity.client.ReceiverKeysForUserRequest} request The + * @param {!proto.identity.client.OutboundKeysForUserRequest} request The * request proto * @param {?Object=} metadata User defined * call metadata - * @return {!Promise} + * @return {!Promise} * Promise that resolves to the response */ -proto.identity.client.IdentityClientServicePromiseClient.prototype.getReceiverKeysForUser = +proto.identity.client.IdentityClientServicePromiseClient.prototype.getOutboundKeysForUser = function(request, metadata) { return this.client_.unaryCall(this.hostname_ + - '/identity.client.IdentityClientService/GetReceiverKeysForUser', + '/identity.client.IdentityClientService/GetOutboundKeysForUser', request, metadata || {}, - methodDescriptor_IdentityClientService_GetReceiverKeysForUser); + methodDescriptor_IdentityClientService_GetOutboundKeysForUser); }; /** * @const * @type {!grpc.web.MethodDescriptor< - * !proto.identity.client.SenderKeysForUserRequest, - * !proto.identity.client.SenderKeysForUserResponse>} + * !proto.identity.client.InboundKeysForUserRequest, + * !proto.identity.client.InboundKeysForUserResponse>} */ -const methodDescriptor_IdentityClientService_GetSenderKeysForUser = new grpc.web.MethodDescriptor( - '/identity.client.IdentityClientService/GetSenderKeysForUser', +const methodDescriptor_IdentityClientService_GetInboundKeysForUser = new grpc.web.MethodDescriptor( + '/identity.client.IdentityClientService/GetInboundKeysForUser', grpc.web.MethodType.UNARY, - proto.identity.client.SenderKeysForUserRequest, - proto.identity.client.SenderKeysForUserResponse, + proto.identity.client.InboundKeysForUserRequest, + proto.identity.client.InboundKeysForUserResponse, /** - * @param {!proto.identity.client.SenderKeysForUserRequest} request + * @param {!proto.identity.client.InboundKeysForUserRequest} request * @return {!Uint8Array} */ function(request) { return request.serializeBinary(); }, - proto.identity.client.SenderKeysForUserResponse.deserializeBinary + proto.identity.client.InboundKeysForUserResponse.deserializeBinary ); /** - * @param {!proto.identity.client.SenderKeysForUserRequest} request The + * @param {!proto.identity.client.InboundKeysForUserRequest} request The * request proto * @param {?Object} metadata User defined * call metadata - * @param {function(?grpc.web.RpcError, ?proto.identity.client.SenderKeysForUserResponse)} + * @param {function(?grpc.web.RpcError, ?proto.identity.client.InboundKeysForUserResponse)} * callback The callback function(error, response) - * @return {!grpc.web.ClientReadableStream|undefined} + * @return {!grpc.web.ClientReadableStream|undefined} * The XHR Node Readable Stream */ -proto.identity.client.IdentityClientServiceClient.prototype.getSenderKeysForUser = +proto.identity.client.IdentityClientServiceClient.prototype.getInboundKeysForUser = function(request, metadata, callback) { return this.client_.rpcCall(this.hostname_ + - '/identity.client.IdentityClientService/GetSenderKeysForUser', + '/identity.client.IdentityClientService/GetInboundKeysForUser', request, metadata || {}, - methodDescriptor_IdentityClientService_GetSenderKeysForUser, + methodDescriptor_IdentityClientService_GetInboundKeysForUser, callback); }; /** - * @param {!proto.identity.client.SenderKeysForUserRequest} request The + * @param {!proto.identity.client.InboundKeysForUserRequest} request The * request proto * @param {?Object=} metadata User defined * call metadata - * @return {!Promise} + * @return {!Promise} * Promise that resolves to the response */ -proto.identity.client.IdentityClientServicePromiseClient.prototype.getSenderKeysForUser = +proto.identity.client.IdentityClientServicePromiseClient.prototype.getInboundKeysForUser = function(request, metadata) { return this.client_.unaryCall(this.hostname_ + - '/identity.client.IdentityClientService/GetSenderKeysForUser', + '/identity.client.IdentityClientService/GetInboundKeysForUser', request, metadata || {}, - methodDescriptor_IdentityClientService_GetSenderKeysForUser); + methodDescriptor_IdentityClientService_GetInboundKeysForUser); }; /** * @const * @type {!grpc.web.MethodDescriptor< - * !proto.identity.client.KeyserverKeysRequest, - * !proto.identity.client.KeyserverKeysResponse>} + * !proto.identity.client.UploadOneTimeKeysRequest, + * !proto.identity.client.Empty>} */ -const methodDescriptor_IdentityClientService_GetKeyserverKeys = new grpc.web.MethodDescriptor( - '/identity.client.IdentityClientService/GetKeyserverKeys', +const methodDescriptor_IdentityClientService_UploadOneTimeKeys = new grpc.web.MethodDescriptor( + '/identity.client.IdentityClientService/UploadOneTimeKeys', grpc.web.MethodType.UNARY, - proto.identity.client.KeyserverKeysRequest, - proto.identity.client.KeyserverKeysResponse, + proto.identity.client.UploadOneTimeKeysRequest, + proto.identity.client.Empty, /** - * @param {!proto.identity.client.KeyserverKeysRequest} request + * @param {!proto.identity.client.UploadOneTimeKeysRequest} request * @return {!Uint8Array} */ function(request) { return request.serializeBinary(); }, - proto.identity.client.KeyserverKeysResponse.deserializeBinary + proto.identity.client.Empty.deserializeBinary ); /** - * @param {!proto.identity.client.KeyserverKeysRequest} request The + * @param {!proto.identity.client.UploadOneTimeKeysRequest} request The * request proto * @param {?Object} metadata User defined * call metadata - * @param {function(?grpc.web.RpcError, ?proto.identity.client.KeyserverKeysResponse)} + * @param {function(?grpc.web.RpcError, ?proto.identity.client.Empty)} * callback The callback function(error, response) - * @return {!grpc.web.ClientReadableStream|undefined} + * @return {!grpc.web.ClientReadableStream|undefined} * The XHR Node Readable Stream */ -proto.identity.client.IdentityClientServiceClient.prototype.getKeyserverKeys = +proto.identity.client.IdentityClientServiceClient.prototype.uploadOneTimeKeys = function(request, metadata, callback) { return this.client_.rpcCall(this.hostname_ + - '/identity.client.IdentityClientService/GetKeyserverKeys', + '/identity.client.IdentityClientService/UploadOneTimeKeys', request, metadata || {}, - methodDescriptor_IdentityClientService_GetKeyserverKeys, + methodDescriptor_IdentityClientService_UploadOneTimeKeys, callback); }; /** - * @param {!proto.identity.client.KeyserverKeysRequest} request The + * @param {!proto.identity.client.UploadOneTimeKeysRequest} request The * request proto * @param {?Object=} metadata User defined * call metadata - * @return {!Promise} + * @return {!Promise} * Promise that resolves to the response */ -proto.identity.client.IdentityClientServicePromiseClient.prototype.getKeyserverKeys = +proto.identity.client.IdentityClientServicePromiseClient.prototype.uploadOneTimeKeys = function(request, metadata) { return this.client_.unaryCall(this.hostname_ + - '/identity.client.IdentityClientService/GetKeyserverKeys', + '/identity.client.IdentityClientService/UploadOneTimeKeys', request, metadata || {}, - methodDescriptor_IdentityClientService_GetKeyserverKeys); + methodDescriptor_IdentityClientService_UploadOneTimeKeys); }; /** * @const * @type {!grpc.web.MethodDescriptor< - * !proto.identity.client.UploadOneTimeKeysRequest, + * !proto.identity.client.RefreshUserPreKeysRequest, * !proto.identity.client.Empty>} */ -const methodDescriptor_IdentityClientService_UploadOneTimeKeys = new grpc.web.MethodDescriptor( - '/identity.client.IdentityClientService/UploadOneTimeKeys', +const methodDescriptor_IdentityClientService_RefreshUserPreKeys = new grpc.web.MethodDescriptor( + '/identity.client.IdentityClientService/RefreshUserPreKeys', grpc.web.MethodType.UNARY, - proto.identity.client.UploadOneTimeKeysRequest, + proto.identity.client.RefreshUserPreKeysRequest, proto.identity.client.Empty, /** - * @param {!proto.identity.client.UploadOneTimeKeysRequest} request + * @param {!proto.identity.client.RefreshUserPreKeysRequest} request * @return {!Uint8Array} */ function(request) { @@ -826,7 +952,7 @@ /** - * @param {!proto.identity.client.UploadOneTimeKeysRequest} request The + * @param {!proto.identity.client.RefreshUserPreKeysRequest} request The * request proto * @param {?Object} metadata User defined * call metadata @@ -835,48 +961,109 @@ * @return {!grpc.web.ClientReadableStream|undefined} * The XHR Node Readable Stream */ -proto.identity.client.IdentityClientServiceClient.prototype.uploadOneTimeKeys = +proto.identity.client.IdentityClientServiceClient.prototype.refreshUserPreKeys = function(request, metadata, callback) { return this.client_.rpcCall(this.hostname_ + - '/identity.client.IdentityClientService/UploadOneTimeKeys', + '/identity.client.IdentityClientService/RefreshUserPreKeys', request, metadata || {}, - methodDescriptor_IdentityClientService_UploadOneTimeKeys, + methodDescriptor_IdentityClientService_RefreshUserPreKeys, callback); }; /** - * @param {!proto.identity.client.UploadOneTimeKeysRequest} request The + * @param {!proto.identity.client.RefreshUserPreKeysRequest} 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 = +proto.identity.client.IdentityClientServicePromiseClient.prototype.refreshUserPreKeys = function(request, metadata) { return this.client_.unaryCall(this.hostname_ + - '/identity.client.IdentityClientService/UploadOneTimeKeys', + '/identity.client.IdentityClientService/RefreshUserPreKeys', request, metadata || {}, - methodDescriptor_IdentityClientService_UploadOneTimeKeys); + methodDescriptor_IdentityClientService_RefreshUserPreKeys); }; /** * @const * @type {!grpc.web.MethodDescriptor< - * !proto.identity.client.RefreshUserPreKeysRequest, + * !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_RefreshUserPreKeys = new grpc.web.MethodDescriptor( - '/identity.client.IdentityClientService/RefreshUserPreKeys', +const methodDescriptor_IdentityClientService_AddReservedUsernames = new grpc.web.MethodDescriptor( + '/identity.client.IdentityClientService/AddReservedUsernames', grpc.web.MethodType.UNARY, - proto.identity.client.RefreshUserPreKeysRequest, + proto.identity.client.AddReservedUsernamesRequest, proto.identity.client.Empty, /** - * @param {!proto.identity.client.RefreshUserPreKeysRequest} request + * @param {!proto.identity.client.AddReservedUsernamesRequest} request * @return {!Uint8Array} */ function(request) { @@ -887,7 +1074,7 @@ /** - * @param {!proto.identity.client.RefreshUserPreKeysRequest} request The + * @param {!proto.identity.client.AddReservedUsernamesRequest} request The * request proto * @param {?Object} metadata User defined * call metadata @@ -896,32 +1083,93 @@ * @return {!grpc.web.ClientReadableStream|undefined} * The XHR Node Readable Stream */ -proto.identity.client.IdentityClientServiceClient.prototype.refreshUserPreKeys = +proto.identity.client.IdentityClientServiceClient.prototype.addReservedUsernames = function(request, metadata, callback) { return this.client_.rpcCall(this.hostname_ + - '/identity.client.IdentityClientService/RefreshUserPreKeys', + '/identity.client.IdentityClientService/AddReservedUsernames', request, metadata || {}, - methodDescriptor_IdentityClientService_RefreshUserPreKeys, + methodDescriptor_IdentityClientService_AddReservedUsernames, callback); }; /** - * @param {!proto.identity.client.RefreshUserPreKeysRequest} request The + * @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.refreshUserPreKeys = +proto.identity.client.IdentityClientServicePromiseClient.prototype.addReservedUsernames = function(request, metadata) { return this.client_.unaryCall(this.hostname_ + - '/identity.client.IdentityClientService/RefreshUserPreKeys', + '/identity.client.IdentityClientService/AddReservedUsernames', request, metadata || {}, - methodDescriptor_IdentityClientService_RefreshUserPreKeys); + 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); }; diff --git a/web/protobufs/identity-client.cjs.flow b/web/protobufs/identity-client.cjs.flow --- a/web/protobufs/identity-client.cjs.flow +++ b/web/protobufs/identity-client.cjs.flow @@ -1,245 +1,235 @@ // @flow -import type { - Empty, - RegistrationStartRequest, - RegistrationFinishRequest, - RegistrationStartResponse, - RegistrationFinishResponse, - UpdateUserPasswordStartRequest, - UpdateUserPasswordFinishRequest, - UpdateUserPasswordStartResponse, - UpdateUserPasswordFinishResponse, - OpaqueLoginStartRequest, - OpaqueLoginFinishRequest, - OpaqueLoginStartResponse, - OpaqueLoginFinishResponse, - WalletLoginRequest, - WalletLoginResponse, - DeleteUserRequest, - GenerateNonceResponse, - ReceiverKeysForUserRequest, - ReceiverKeysForUserResponse, - SenderKeysForUserRequest, - SenderKeysForUserResponse, - KeyserverKeysRequest, - KeyserverKeysResponse, - UploadOneTimeKeysRequest, - RefreshUserPreKeysRequest, -} from './identity-structs.cjs'; - -import { type Metadata, type RpcError, ClientReadableStream } from 'grpc-web'; +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; + constructor (hostname: string, + credentials?: null | { +[index: string]: string }, + options?: null | { +[index: string]: any }): void; registerPasswordUserStart( - request: RegistrationStartRequest, - metadata: Metadata | void, - callback: ( - err: RpcError, - response: RegistrationStartResponse, - ) => void, - ): ClientReadableStream; + 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: RegistrationFinishRequest, - metadata: Metadata | void, - callback: ( - err: RpcError, - response: RegistrationFinishResponse, - ) => void, - ): ClientReadableStream; + request: identityStructs.RegistrationFinishRequest, + metadata: grpcWeb.Metadata | void, + callback: (err: grpcWeb.RpcError, + response: identityStructs.RegistrationFinishResponse) => void + ): grpcWeb.ClientReadableStream; updateUserPasswordStart( - request: UpdateUserPasswordStartRequest, - metadata: Metadata | void, - callback: ( - err: RpcError, - response: UpdateUserPasswordStartResponse, - ) => void, - ): ClientReadableStream; + request: identityStructs.UpdateUserPasswordStartRequest, + metadata: grpcWeb.Metadata | void, + callback: (err: grpcWeb.RpcError, + response: identityStructs.UpdateUserPasswordStartResponse) => void + ): grpcWeb.ClientReadableStream; updateUserPasswordFinish( - request: UpdateUserPasswordFinishRequest, - metadata: Metadata | void, - callback: ( - err: RpcError, - response: UpdateUserPasswordFinishResponse, - ) => void, - ): ClientReadableStream; + request: identityStructs.UpdateUserPasswordFinishRequest, + metadata: grpcWeb.Metadata | void, + callback: (err: grpcWeb.RpcError, + response: identityStructs.Empty) => void + ): grpcWeb.ClientReadableStream; loginPasswordUserStart( - request: OpaqueLoginStartRequest, - metadata: Metadata | void, - callback: ( - err: RpcError, - response: OpaqueLoginStartResponse, - ) => void, - ): ClientReadableStream; + request: identityStructs.OpaqueLoginStartRequest, + metadata: grpcWeb.Metadata | void, + callback: (err: grpcWeb.RpcError, + response: identityStructs.OpaqueLoginStartResponse) => void + ): grpcWeb.ClientReadableStream; loginPasswordUserFinish( - request: OpaqueLoginFinishRequest, - metadata: Metadata | void, - callback: ( - err: RpcError, - response: OpaqueLoginFinishResponse, - ) => void, - ): ClientReadableStream; + request: identityStructs.OpaqueLoginFinishRequest, + metadata: grpcWeb.Metadata | void, + callback: (err: grpcWeb.RpcError, + response: identityStructs.OpaqueLoginFinishResponse) => void + ): grpcWeb.ClientReadableStream; loginWalletUser( - request: WalletLoginRequest, - metadata: Metadata | void, - callback: ( - err: RpcError, - response: WalletLoginResponse, - ) => void, - ): ClientReadableStream; + request: identityStructs.WalletLoginRequest, + 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: DeleteUserRequest, - metadata: Metadata | void, - callback: ( - err: RpcError, - response: Empty, - ) => void, - ): ClientReadableStream; + request: identityStructs.DeleteUserRequest, + metadata: grpcWeb.Metadata | void, + callback: (err: grpcWeb.RpcError, + response: identityStructs.Empty) => void + ): grpcWeb.ClientReadableStream; generateNonce( - request: Empty, - metadata: Metadata | void, - callback: ( - err: RpcError, - response: GenerateNonceResponse, - ) => void, - ): ClientReadableStream; - - getReceiverKeysForUser( - request: ReceiverKeysForUserRequest, - metadata: Metadata | void, - callback: ( - err: RpcError, - response: ReceiverKeysForUserResponse, - ) => void, - ): ClientReadableStream; - - getSenderKeysForUser( - request: SenderKeysForUserRequest, - metadata: Metadata | void, - callback: ( - err: RpcError, - response: SenderKeysForUserResponse, - ) => void, - ): ClientReadableStream; - - getKeyserverKeys( - request: KeyserverKeysRequest, - metadata: Metadata | void, - callback: ( - err: RpcError, - response: KeyserverKeysResponse, - ) => void, - ): ClientReadableStream; + 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: UploadOneTimeKeysRequest, - metadata: Metadata | void, - callback: ( - err: RpcError, - response: Empty, - ) => void, - ): ClientReadableStream; + request: identityStructs.UploadOneTimeKeysRequest, + metadata: grpcWeb.Metadata | void, + callback: (err: grpcWeb.RpcError, + response: identityStructs.Empty) => void + ): grpcWeb.ClientReadableStream; refreshUserPreKeys( - request: RefreshUserPreKeysRequest, - metadata: Metadata | void, - callback: ( - err: RpcError, - response: Empty, - ) => void, - ): ClientReadableStream; + request: identityStructs.RefreshUserPreKeysRequest, + 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; } declare export class IdentityClientServicePromiseClient { - constructor( - hostname: string, - credentials?: null | { +[index: string]: string }, - options?: null | { +[index: string]: any }, - ): void; + constructor (hostname: string, + credentials?: null | { +[index: string]: string }, + options?: null | { +[index: string]: any }): void; registerPasswordUserStart( - request: RegistrationStartRequest, - metadata?: Metadata, - ): Promise; + request: identityStructs.RegistrationStartRequest, + metadata?: grpcWeb.Metadata + ): Promise; + + registerReservedPasswordUserStart( + request: identityStructs.ReservedRegistrationStartRequest, + metadata?: grpcWeb.Metadata + ): Promise; registerPasswordUserFinish( - request: RegistrationFinishRequest, - metadata?: Metadata, - ): Promise; + request: identityStructs.RegistrationFinishRequest, + metadata?: grpcWeb.Metadata + ): Promise; updateUserPasswordStart( - request: UpdateUserPasswordStartRequest, - metadata?: Metadata, - ): Promise; + request: identityStructs.UpdateUserPasswordStartRequest, + metadata?: grpcWeb.Metadata + ): Promise; updateUserPasswordFinish( - request: UpdateUserPasswordFinishRequest, - metadata?: Metadata, - ): Promise; + request: identityStructs.UpdateUserPasswordFinishRequest, + metadata?: grpcWeb.Metadata + ): Promise; loginPasswordUserStart( - request: OpaqueLoginStartRequest, - metadata?: Metadata, - ): Promise; + request: identityStructs.OpaqueLoginStartRequest, + metadata?: grpcWeb.Metadata + ): Promise; loginPasswordUserFinish( - request: OpaqueLoginFinishRequest, - metadata?: Metadata, - ): Promise; + request: identityStructs.OpaqueLoginFinishRequest, + metadata?: grpcWeb.Metadata + ): Promise; loginWalletUser( - request: WalletLoginRequest, - metadata?: Metadata, - ): Promise; + request: identityStructs.WalletLoginRequest, + metadata?: grpcWeb.Metadata + ): Promise; + + logOutUser( + request: identityStructs.LogoutRequest, + metadata?: grpcWeb.Metadata + ): Promise; deleteUser( - request: DeleteUserRequest, - metadata?: Metadata, - ): Promise; + request: identityStructs.DeleteUserRequest, + metadata?: grpcWeb.Metadata + ): Promise; generateNonce( - request: Empty, - metadata?: Metadata, - ): Promise; - - getReceiverKeysForUser( - request: ReceiverKeysForUserRequest, - metadata?: Metadata, - ): Promise; + request: identityStructs.Empty, + metadata?: grpcWeb.Metadata + ): Promise; - getSenderKeysForUser( - request: SenderKeysForUserRequest, - metadata?: Metadata, - ): Promise; + getOutboundKeysForUser( + request: identityStructs.OutboundKeysForUserRequest, + metadata?: grpcWeb.Metadata + ): Promise; - getKeyserverKeys( - request: KeyserverKeysRequest, - metadata?: Metadata, - ): Promise; + getInboundKeysForUser( + request: identityStructs.InboundKeysForUserRequest, + metadata?: grpcWeb.Metadata + ): Promise; uploadOneTimeKeys( - request: UploadOneTimeKeysRequest, - metadata?: Metadata, - ): Promise; + request: identityStructs.UploadOneTimeKeysRequest, + metadata?: grpcWeb.Metadata + ): Promise; refreshUserPreKeys( - request: RefreshUserPreKeysRequest, - metadata?: Metadata, - ): Promise; + request: identityStructs.RefreshUserPreKeysRequest, + 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; } diff --git a/web/protobufs/identity-structs.cjs b/web/protobufs/identity-structs.cjs --- a/web/protobufs/identity-structs.cjs +++ b/web/protobufs/identity-structs.cjs @@ -14,40 +14,48 @@ var jspb = require('google-protobuf'); var goog = jspb; -var global = Function('return this')(); - +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.KeyserverKeysRequest', null, global); -goog.exportSymbol('proto.identity.client.KeyserverKeysRequest.IdentifierCase', null, global); -goog.exportSymbol('proto.identity.client.KeyserverKeysResponse', null, global); -goog.exportSymbol('proto.identity.client.KeyserverSessionInfo', 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.ReceiverKeyInfo', null, global); -goog.exportSymbol('proto.identity.client.ReceiverKeysForUserRequest', null, global); -goog.exportSymbol('proto.identity.client.ReceiverKeysForUserRequest.IdentifierCase', null, global); -goog.exportSymbol('proto.identity.client.ReceiverKeysForUserResponse', null, global); goog.exportSymbol('proto.identity.client.RefreshUserPreKeysRequest', 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.SenderKeyInfo', null, global); -goog.exportSymbol('proto.identity.client.SenderKeysForUserRequest', null, global); -goog.exportSymbol('proto.identity.client.SenderKeysForUserRequest.IdentifierCase', null, global); -goog.exportSymbol('proto.identity.client.SenderKeysForUserResponse', null, global); +goog.exportSymbol('proto.identity.client.RemoveReservedUsernameRequest', null, global); +goog.exportSymbol('proto.identity.client.ReservedRegistrationStartRequest', null, global); goog.exportSymbol('proto.identity.client.UpdateUserPasswordFinishRequest', null, global); -goog.exportSymbol('proto.identity.client.UpdateUserPasswordFinishResponse', 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); /** @@ -165,16 +173,16 @@ * @extends {jspb.Message} * @constructor */ -proto.identity.client.RegistrationFinishRequest = function(opt_data) { +proto.identity.client.ReservedRegistrationStartRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.identity.client.RegistrationFinishRequest, jspb.Message); +goog.inherits(proto.identity.client.ReservedRegistrationStartRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.identity.client.RegistrationFinishRequest.displayName = 'proto.identity.client.RegistrationFinishRequest'; + proto.identity.client.ReservedRegistrationStartRequest.displayName = 'proto.identity.client.ReservedRegistrationStartRequest'; } /** * Generated by JsPbCodeGenerator. @@ -186,16 +194,16 @@ * @extends {jspb.Message} * @constructor */ -proto.identity.client.RegistrationStartResponse = function(opt_data) { +proto.identity.client.RegistrationFinishRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.identity.client.RegistrationStartResponse, jspb.Message); +goog.inherits(proto.identity.client.RegistrationFinishRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.identity.client.RegistrationStartResponse.displayName = 'proto.identity.client.RegistrationStartResponse'; + proto.identity.client.RegistrationFinishRequest.displayName = 'proto.identity.client.RegistrationFinishRequest'; } /** * Generated by JsPbCodeGenerator. @@ -207,16 +215,16 @@ * @extends {jspb.Message} * @constructor */ -proto.identity.client.RegistrationFinishResponse = function(opt_data) { +proto.identity.client.RegistrationStartResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.identity.client.RegistrationFinishResponse, jspb.Message); +goog.inherits(proto.identity.client.RegistrationStartResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.identity.client.RegistrationFinishResponse.displayName = 'proto.identity.client.RegistrationFinishResponse'; + proto.identity.client.RegistrationStartResponse.displayName = 'proto.identity.client.RegistrationStartResponse'; } /** * Generated by JsPbCodeGenerator. @@ -228,16 +236,16 @@ * @extends {jspb.Message} * @constructor */ -proto.identity.client.UpdateUserPasswordStartRequest = function(opt_data) { +proto.identity.client.RegistrationFinishResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.identity.client.UpdateUserPasswordStartRequest, jspb.Message); +goog.inherits(proto.identity.client.RegistrationFinishResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.identity.client.UpdateUserPasswordStartRequest.displayName = 'proto.identity.client.UpdateUserPasswordStartRequest'; + proto.identity.client.RegistrationFinishResponse.displayName = 'proto.identity.client.RegistrationFinishResponse'; } /** * Generated by JsPbCodeGenerator. @@ -249,16 +257,16 @@ * @extends {jspb.Message} * @constructor */ -proto.identity.client.UpdateUserPasswordFinishRequest = function(opt_data) { +proto.identity.client.UpdateUserPasswordStartRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.identity.client.UpdateUserPasswordFinishRequest, jspb.Message); +goog.inherits(proto.identity.client.UpdateUserPasswordStartRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.identity.client.UpdateUserPasswordFinishRequest.displayName = 'proto.identity.client.UpdateUserPasswordFinishRequest'; + proto.identity.client.UpdateUserPasswordStartRequest.displayName = 'proto.identity.client.UpdateUserPasswordStartRequest'; } /** * Generated by JsPbCodeGenerator. @@ -270,16 +278,16 @@ * @extends {jspb.Message} * @constructor */ -proto.identity.client.UpdateUserPasswordStartResponse = function(opt_data) { +proto.identity.client.UpdateUserPasswordFinishRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.identity.client.UpdateUserPasswordStartResponse, jspb.Message); +goog.inherits(proto.identity.client.UpdateUserPasswordFinishRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.identity.client.UpdateUserPasswordStartResponse.displayName = 'proto.identity.client.UpdateUserPasswordStartResponse'; + proto.identity.client.UpdateUserPasswordFinishRequest.displayName = 'proto.identity.client.UpdateUserPasswordFinishRequest'; } /** * Generated by JsPbCodeGenerator. @@ -291,16 +299,16 @@ * @extends {jspb.Message} * @constructor */ -proto.identity.client.UpdateUserPasswordFinishResponse = function(opt_data) { +proto.identity.client.UpdateUserPasswordStartResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.identity.client.UpdateUserPasswordFinishResponse, jspb.Message); +goog.inherits(proto.identity.client.UpdateUserPasswordStartResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.identity.client.UpdateUserPasswordFinishResponse.displayName = 'proto.identity.client.UpdateUserPasswordFinishResponse'; + proto.identity.client.UpdateUserPasswordStartResponse.displayName = 'proto.identity.client.UpdateUserPasswordStartResponse'; } /** * Generated by JsPbCodeGenerator. @@ -428,6 +436,27 @@ */ 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 @@ -480,16 +509,16 @@ * @extends {jspb.Message} * @constructor */ -proto.identity.client.ReceiverKeyInfo = function(opt_data) { +proto.identity.client.OutboundKeyInfo = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.identity.client.ReceiverKeyInfo, jspb.Message); +goog.inherits(proto.identity.client.OutboundKeyInfo, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.identity.client.ReceiverKeyInfo.displayName = 'proto.identity.client.ReceiverKeyInfo'; + proto.identity.client.OutboundKeyInfo.displayName = 'proto.identity.client.OutboundKeyInfo'; } /** * Generated by JsPbCodeGenerator. @@ -501,16 +530,16 @@ * @extends {jspb.Message} * @constructor */ -proto.identity.client.ReceiverKeysForUserRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.identity.client.ReceiverKeysForUserRequest.oneofGroups_); +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.ReceiverKeysForUserRequest, jspb.Message); +goog.inherits(proto.identity.client.OutboundKeysForUserRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.identity.client.ReceiverKeysForUserRequest.displayName = 'proto.identity.client.ReceiverKeysForUserRequest'; + proto.identity.client.OutboundKeysForUserRequest.displayName = 'proto.identity.client.OutboundKeysForUserRequest'; } /** * Generated by JsPbCodeGenerator. @@ -522,16 +551,16 @@ * @extends {jspb.Message} * @constructor */ -proto.identity.client.ReceiverKeysForUserResponse = function(opt_data) { +proto.identity.client.OutboundKeysForUserResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.identity.client.ReceiverKeysForUserResponse, jspb.Message); +goog.inherits(proto.identity.client.OutboundKeysForUserResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.identity.client.ReceiverKeysForUserResponse.displayName = 'proto.identity.client.ReceiverKeysForUserResponse'; + proto.identity.client.OutboundKeysForUserResponse.displayName = 'proto.identity.client.OutboundKeysForUserResponse'; } /** * Generated by JsPbCodeGenerator. @@ -543,16 +572,16 @@ * @extends {jspb.Message} * @constructor */ -proto.identity.client.SenderKeyInfo = function(opt_data) { +proto.identity.client.InboundKeyInfo = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.identity.client.SenderKeyInfo, jspb.Message); +goog.inherits(proto.identity.client.InboundKeyInfo, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.identity.client.SenderKeyInfo.displayName = 'proto.identity.client.SenderKeyInfo'; + proto.identity.client.InboundKeyInfo.displayName = 'proto.identity.client.InboundKeyInfo'; } /** * Generated by JsPbCodeGenerator. @@ -564,16 +593,16 @@ * @extends {jspb.Message} * @constructor */ -proto.identity.client.SenderKeysForUserRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.identity.client.SenderKeysForUserRequest.oneofGroups_); +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.SenderKeysForUserRequest, jspb.Message); +goog.inherits(proto.identity.client.InboundKeysForUserRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.identity.client.SenderKeysForUserRequest.displayName = 'proto.identity.client.SenderKeysForUserRequest'; + proto.identity.client.InboundKeysForUserRequest.displayName = 'proto.identity.client.InboundKeysForUserRequest'; } /** * Generated by JsPbCodeGenerator. @@ -585,16 +614,37 @@ * @extends {jspb.Message} * @constructor */ -proto.identity.client.SenderKeysForUserResponse = function(opt_data) { +proto.identity.client.InboundKeysForUserResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.identity.client.SenderKeysForUserResponse, jspb.Message); +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.SenderKeysForUserResponse.displayName = 'proto.identity.client.SenderKeysForUserResponse'; + proto.identity.client.UploadOneTimeKeysRequest.displayName = 'proto.identity.client.UploadOneTimeKeysRequest'; } /** * Generated by JsPbCodeGenerator. @@ -606,16 +656,16 @@ * @extends {jspb.Message} * @constructor */ -proto.identity.client.KeyserverSessionInfo = function(opt_data) { +proto.identity.client.RefreshUserPreKeysRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.identity.client.KeyserverSessionInfo, jspb.Message); +goog.inherits(proto.identity.client.RefreshUserPreKeysRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.identity.client.KeyserverSessionInfo.displayName = 'proto.identity.client.KeyserverSessionInfo'; + proto.identity.client.RefreshUserPreKeysRequest.displayName = 'proto.identity.client.RefreshUserPreKeysRequest'; } /** * Generated by JsPbCodeGenerator. @@ -627,16 +677,16 @@ * @extends {jspb.Message} * @constructor */ -proto.identity.client.KeyserverKeysRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.identity.client.KeyserverKeysRequest.oneofGroups_); +proto.identity.client.VerifyUserAccessTokenRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.identity.client.KeyserverKeysRequest, jspb.Message); +goog.inherits(proto.identity.client.VerifyUserAccessTokenRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.identity.client.KeyserverKeysRequest.displayName = 'proto.identity.client.KeyserverKeysRequest'; + proto.identity.client.VerifyUserAccessTokenRequest.displayName = 'proto.identity.client.VerifyUserAccessTokenRequest'; } /** * Generated by JsPbCodeGenerator. @@ -648,16 +698,16 @@ * @extends {jspb.Message} * @constructor */ -proto.identity.client.KeyserverKeysResponse = function(opt_data) { +proto.identity.client.VerifyUserAccessTokenResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.identity.client.KeyserverKeysResponse, jspb.Message); +goog.inherits(proto.identity.client.VerifyUserAccessTokenResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.identity.client.KeyserverKeysResponse.displayName = 'proto.identity.client.KeyserverKeysResponse'; + proto.identity.client.VerifyUserAccessTokenResponse.displayName = 'proto.identity.client.VerifyUserAccessTokenResponse'; } /** * Generated by JsPbCodeGenerator. @@ -669,16 +719,16 @@ * @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); +proto.identity.client.AddReservedUsernamesRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.identity.client.UploadOneTimeKeysRequest, jspb.Message); +goog.inherits(proto.identity.client.AddReservedUsernamesRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.identity.client.UploadOneTimeKeysRequest.displayName = 'proto.identity.client.UploadOneTimeKeysRequest'; + proto.identity.client.AddReservedUsernamesRequest.displayName = 'proto.identity.client.AddReservedUsernamesRequest'; } /** * Generated by JsPbCodeGenerator. @@ -690,16 +740,16 @@ * @extends {jspb.Message} * @constructor */ -proto.identity.client.RefreshUserPreKeysRequest = function(opt_data) { +proto.identity.client.RemoveReservedUsernameRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.identity.client.RefreshUserPreKeysRequest, jspb.Message); +goog.inherits(proto.identity.client.RemoveReservedUsernameRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.identity.client.RefreshUserPreKeysRequest.displayName = 'proto.identity.client.RefreshUserPreKeysRequest'; + proto.identity.client.RemoveReservedUsernameRequest.displayName = 'proto.identity.client.RemoveReservedUsernameRequest'; } @@ -1210,10 +1260,11 @@ proto.identity.client.DeviceKeyUpload.toObject = function(includeInstance, msg) { var f, obj = { devicekeyinfo: (f = msg.getDevicekeyinfo()) && proto.identity.client.IdentityKeyInfo.toObject(includeInstance, f), - identityupload: (f = msg.getIdentityupload()) && proto.identity.client.PreKey.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), - onetimeidentityprekeysList: (f = jspb.Message.getRepeatedField(msg, 4)) == null ? undefined : f, - onetimenotifprekeysList: (f = jspb.Message.getRepeatedField(msg, 5)) == null ? undefined : 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) { @@ -1258,7 +1309,7 @@ case 2: var value = new proto.identity.client.PreKey; reader.readMessage(value,proto.identity.client.PreKey.deserializeBinaryFromReader); - msg.setIdentityupload(value); + msg.setContentupload(value); break; case 3: var value = new proto.identity.client.PreKey; @@ -1267,12 +1318,16 @@ break; case 4: var value = /** @type {string} */ (reader.readString()); - msg.addOnetimeidentityprekeys(value); + 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; @@ -1310,7 +1365,7 @@ proto.identity.client.IdentityKeyInfo.serializeBinaryToWriter ); } - f = message.getIdentityupload(); + f = message.getContentupload(); if (f != null) { writer.writeMessage( 2, @@ -1326,7 +1381,7 @@ proto.identity.client.PreKey.serializeBinaryToWriter ); } - f = message.getOnetimeidentityprekeysList(); + f = message.getOnetimecontentprekeysList(); if (f.length > 0) { writer.writeRepeatedString( 4, @@ -1340,6 +1395,13 @@ f ); } + f = message.getDevicetype(); + if (f !== 0.0) { + writer.writeEnum( + 6, + f + ); + } }; @@ -1381,10 +1443,10 @@ /** - * optional PreKey identityUpload = 2; + * optional PreKey contentUpload = 2; * @return {?proto.identity.client.PreKey} */ -proto.identity.client.DeviceKeyUpload.prototype.getIdentityupload = function() { +proto.identity.client.DeviceKeyUpload.prototype.getContentupload = function() { return /** @type{?proto.identity.client.PreKey} */ ( jspb.Message.getWrapperField(this, proto.identity.client.PreKey, 2)); }; @@ -1394,7 +1456,7 @@ * @param {?proto.identity.client.PreKey|undefined} value * @return {!proto.identity.client.DeviceKeyUpload} returns this */ -proto.identity.client.DeviceKeyUpload.prototype.setIdentityupload = function(value) { +proto.identity.client.DeviceKeyUpload.prototype.setContentupload = function(value) { return jspb.Message.setWrapperField(this, 2, value); }; @@ -1403,8 +1465,8 @@ * Clears the message field making it undefined. * @return {!proto.identity.client.DeviceKeyUpload} returns this */ -proto.identity.client.DeviceKeyUpload.prototype.clearIdentityupload = function() { - return this.setIdentityupload(undefined); +proto.identity.client.DeviceKeyUpload.prototype.clearContentupload = function() { + return this.setContentupload(undefined); }; @@ -1412,7 +1474,7 @@ * Returns whether this field is set. * @return {boolean} */ -proto.identity.client.DeviceKeyUpload.prototype.hasIdentityupload = function() { +proto.identity.client.DeviceKeyUpload.prototype.hasContentupload = function() { return jspb.Message.getField(this, 2) != null; }; @@ -1455,10 +1517,10 @@ /** - * repeated string onetimeIdentityPrekeys = 4; + * repeated string oneTimeContentPrekeys = 4; * @return {!Array} */ -proto.identity.client.DeviceKeyUpload.prototype.getOnetimeidentityprekeysList = function() { +proto.identity.client.DeviceKeyUpload.prototype.getOnetimecontentprekeysList = function() { return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 4)); }; @@ -1467,7 +1529,7 @@ * @param {!Array} value * @return {!proto.identity.client.DeviceKeyUpload} returns this */ -proto.identity.client.DeviceKeyUpload.prototype.setOnetimeidentityprekeysList = function(value) { +proto.identity.client.DeviceKeyUpload.prototype.setOnetimecontentprekeysList = function(value) { return jspb.Message.setField(this, 4, value || []); }; @@ -1477,7 +1539,7 @@ * @param {number=} opt_index * @return {!proto.identity.client.DeviceKeyUpload} returns this */ -proto.identity.client.DeviceKeyUpload.prototype.addOnetimeidentityprekeys = function(value, opt_index) { +proto.identity.client.DeviceKeyUpload.prototype.addOnetimecontentprekeys = function(value, opt_index) { return jspb.Message.addToRepeatedField(this, 4, value, opt_index); }; @@ -1486,13 +1548,13 @@ * Clears the list making it empty but non-null. * @return {!proto.identity.client.DeviceKeyUpload} returns this */ -proto.identity.client.DeviceKeyUpload.prototype.clearOnetimeidentityprekeysList = function() { - return this.setOnetimeidentityprekeysList([]); +proto.identity.client.DeviceKeyUpload.prototype.clearOnetimecontentprekeysList = function() { + return this.setOnetimecontentprekeysList([]); }; /** - * repeated string onetimeNotifPrekeys = 5; + * repeated string oneTimeNotifPrekeys = 5; * @return {!Array} */ proto.identity.client.DeviceKeyUpload.prototype.getOnetimenotifprekeysList = function() { @@ -1528,6 +1590,24 @@ }; +/** + * 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); +}; + + @@ -1779,8 +1859,8 @@ * 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); +proto.identity.client.ReservedRegistrationStartRequest.prototype.toObject = function(opt_includeInstance) { + return proto.identity.client.ReservedRegistrationStartRequest.toObject(opt_includeInstance, this); }; @@ -1789,14 +1869,17 @@ * @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. + * @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.RegistrationFinishRequest.toObject = function(includeInstance, msg) { +proto.identity.client.ReservedRegistrationStartRequest.toObject = function(includeInstance, msg) { var f, obj = { - sessionid: jspb.Message.getFieldWithDefault(msg, 1, ""), - opaqueregistrationupload: msg.getOpaqueregistrationupload_asB64() + 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) { @@ -1810,23 +1893,23 @@ /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.identity.client.RegistrationFinishRequest} + * @return {!proto.identity.client.ReservedRegistrationStartRequest} */ -proto.identity.client.RegistrationFinishRequest.deserializeBinary = function(bytes) { +proto.identity.client.ReservedRegistrationStartRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.identity.client.RegistrationFinishRequest; - return proto.identity.client.RegistrationFinishRequest.deserializeBinaryFromReader(msg, reader); + 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.RegistrationFinishRequest} msg The message object to deserialize into. + * @param {!proto.identity.client.ReservedRegistrationStartRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.identity.client.RegistrationFinishRequest} + * @return {!proto.identity.client.ReservedRegistrationStartRequest} */ -proto.identity.client.RegistrationFinishRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.identity.client.ReservedRegistrationStartRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1834,12 +1917,25 @@ var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setSessionid(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setOpaqueregistrationrequest(value); break; case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setOpaqueregistrationupload(value); + 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(); @@ -1854,9 +1950,9 @@ * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.identity.client.RegistrationFinishRequest.prototype.serializeBinary = function() { +proto.identity.client.ReservedRegistrationStartRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.identity.client.RegistrationFinishRequest.serializeBinaryToWriter(this, writer); + proto.identity.client.ReservedRegistrationStartRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -1864,153 +1960,248 @@ /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.identity.client.RegistrationFinishRequest} message + * @param {!proto.identity.client.ReservedRegistrationStartRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.identity.client.RegistrationFinishRequest.serializeBinaryToWriter = function(message, writer) { +proto.identity.client.ReservedRegistrationStartRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getSessionid(); + f = message.getOpaqueregistrationrequest_asU8(); if (f.length > 0) { - writer.writeString( + writer.writeBytes( 1, f ); } - f = message.getOpaqueregistrationupload_asU8(); + f = message.getUsername(); 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 + ); + } + f = message.getKeyservermessage(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getKeyserversignature(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } }; /** - * optional string sessionID = 1; + * optional bytes opaqueRegistrationRequest = 1; * @return {string} */ -proto.identity.client.RegistrationFinishRequest.prototype.getSessionid = function() { +proto.identity.client.ReservedRegistrationStartRequest.prototype.getOpaqueregistrationrequest = 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()` + * optional bytes opaqueRegistrationRequest = 1; + * This is a type-conversion wrapper around `getOpaqueregistrationrequest()` * @return {string} */ -proto.identity.client.RegistrationFinishRequest.prototype.getOpaqueregistrationupload_asB64 = function() { +proto.identity.client.ReservedRegistrationStartRequest.prototype.getOpaqueregistrationrequest_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getOpaqueregistrationupload())); + this.getOpaqueregistrationrequest())); }; /** - * optional bytes opaqueRegistrationUpload = 2; + * 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 `getOpaqueregistrationupload()` + * This is a type-conversion wrapper around `getOpaqueregistrationrequest()` * @return {!Uint8Array} */ -proto.identity.client.RegistrationFinishRequest.prototype.getOpaqueregistrationupload_asU8 = function() { +proto.identity.client.ReservedRegistrationStartRequest.prototype.getOpaqueregistrationrequest_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOpaqueregistrationupload())); + this.getOpaqueregistrationrequest())); }; /** * @param {!(string|Uint8Array)} value - * @return {!proto.identity.client.RegistrationFinishRequest} returns this + * @return {!proto.identity.client.ReservedRegistrationStartRequest} returns this */ -proto.identity.client.RegistrationFinishRequest.prototype.setOpaqueregistrationupload = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); +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, "")); +}; - -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} + * @param {string} value + * @return {!proto.identity.client.ReservedRegistrationStartRequest} returns this */ -proto.identity.client.RegistrationStartResponse.prototype.toObject = function(opt_includeInstance) { - return proto.identity.client.RegistrationStartResponse.toObject(opt_includeInstance, this); +proto.identity.client.ReservedRegistrationStartRequest.prototype.setUsername = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); }; /** - * 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 + * optional DeviceKeyUpload deviceKeyUpload = 3; + * @return {?proto.identity.client.DeviceKeyUpload} */ -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; +proto.identity.client.ReservedRegistrationStartRequest.prototype.getDevicekeyupload = function() { + return /** @type{?proto.identity.client.DeviceKeyUpload} */ ( + jspb.Message.getWrapperField(this, proto.identity.client.DeviceKeyUpload, 3)); }; -} /** - * 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) { + * @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.RegistrationStartResponse; - return proto.identity.client.RegistrationStartResponse.deserializeBinaryFromReader(msg, reader); + 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.RegistrationStartResponse} msg The message object to deserialize into. + * @param {!proto.identity.client.RegistrationFinishRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.identity.client.RegistrationStartResponse} + * @return {!proto.identity.client.RegistrationFinishRequest} */ -proto.identity.client.RegistrationStartResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.identity.client.RegistrationFinishRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -2023,7 +2214,7 @@ break; case 2: var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setOpaqueregistrationresponse(value); + msg.setOpaqueregistrationupload(value); break; default: reader.skipField(); @@ -2038,9 +2229,9 @@ * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.identity.client.RegistrationStartResponse.prototype.serializeBinary = function() { +proto.identity.client.RegistrationFinishRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.identity.client.RegistrationStartResponse.serializeBinaryToWriter(this, writer); + proto.identity.client.RegistrationFinishRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -2048,11 +2239,11 @@ /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.identity.client.RegistrationStartResponse} message + * @param {!proto.identity.client.RegistrationFinishRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.identity.client.RegistrationStartResponse.serializeBinaryToWriter = function(message, writer) { +proto.identity.client.RegistrationFinishRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getSessionid(); if (f.length > 0) { @@ -2061,7 +2252,7 @@ f ); } - f = message.getOpaqueregistrationresponse_asU8(); + f = message.getOpaqueregistrationupload_asU8(); if (f.length > 0) { writer.writeBytes( 2, @@ -2075,58 +2266,58 @@ * optional string sessionID = 1; * @return {string} */ -proto.identity.client.RegistrationStartResponse.prototype.getSessionid = function() { +proto.identity.client.RegistrationFinishRequest.prototype.getSessionid = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.identity.client.RegistrationStartResponse} returns this + * @return {!proto.identity.client.RegistrationFinishRequest} returns this */ -proto.identity.client.RegistrationStartResponse.prototype.setSessionid = function(value) { +proto.identity.client.RegistrationFinishRequest.prototype.setSessionid = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** - * optional bytes opaqueRegistrationResponse = 2; + * optional bytes opaqueRegistrationUpload = 2; * @return {string} */ -proto.identity.client.RegistrationStartResponse.prototype.getOpaqueregistrationresponse = function() { +proto.identity.client.RegistrationFinishRequest.prototype.getOpaqueregistrationupload = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * optional bytes opaqueRegistrationResponse = 2; - * This is a type-conversion wrapper around `getOpaqueregistrationresponse()` + * optional bytes opaqueRegistrationUpload = 2; + * This is a type-conversion wrapper around `getOpaqueregistrationupload()` * @return {string} */ -proto.identity.client.RegistrationStartResponse.prototype.getOpaqueregistrationresponse_asB64 = function() { +proto.identity.client.RegistrationFinishRequest.prototype.getOpaqueregistrationupload_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getOpaqueregistrationresponse())); + this.getOpaqueregistrationupload())); }; /** - * optional bytes opaqueRegistrationResponse = 2; + * 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 `getOpaqueregistrationresponse()` + * This is a type-conversion wrapper around `getOpaqueregistrationupload()` * @return {!Uint8Array} */ -proto.identity.client.RegistrationStartResponse.prototype.getOpaqueregistrationresponse_asU8 = function() { +proto.identity.client.RegistrationFinishRequest.prototype.getOpaqueregistrationupload_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOpaqueregistrationresponse())); + this.getOpaqueregistrationupload())); }; /** * @param {!(string|Uint8Array)} value - * @return {!proto.identity.client.RegistrationStartResponse} returns this + * @return {!proto.identity.client.RegistrationFinishRequest} returns this */ -proto.identity.client.RegistrationStartResponse.prototype.setOpaqueregistrationresponse = function(value) { +proto.identity.client.RegistrationFinishRequest.prototype.setOpaqueregistrationupload = function(value) { return jspb.Message.setProto3BytesField(this, 2, value); }; @@ -2147,8 +2338,8 @@ * 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); +proto.identity.client.RegistrationStartResponse.prototype.toObject = function(opt_includeInstance) { + return proto.identity.client.RegistrationStartResponse.toObject(opt_includeInstance, this); }; @@ -2157,13 +2348,14 @@ * @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. + * @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.RegistrationFinishResponse.toObject = function(includeInstance, msg) { +proto.identity.client.RegistrationStartResponse.toObject = function(includeInstance, msg) { var f, obj = { - accesstoken: jspb.Message.getFieldWithDefault(msg, 2, "") + sessionid: jspb.Message.getFieldWithDefault(msg, 1, ""), + opaqueregistrationresponse: msg.getOpaqueregistrationresponse_asB64() }; if (includeInstance) { @@ -2177,32 +2369,36 @@ /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.identity.client.RegistrationFinishResponse} + * @return {!proto.identity.client.RegistrationStartResponse} */ -proto.identity.client.RegistrationFinishResponse.deserializeBinary = function(bytes) { +proto.identity.client.RegistrationStartResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.identity.client.RegistrationFinishResponse; - return proto.identity.client.RegistrationFinishResponse.deserializeBinaryFromReader(msg, reader); + 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.RegistrationFinishResponse} msg The message object to deserialize into. + * @param {!proto.identity.client.RegistrationStartResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.identity.client.RegistrationFinishResponse} + * @return {!proto.identity.client.RegistrationStartResponse} */ -proto.identity.client.RegistrationFinishResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.identity.client.RegistrationStartResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { - case 2: + case 1: var value = /** @type {string} */ (reader.readString()); - msg.setAccesstoken(value); + msg.setSessionid(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setOpaqueregistrationresponse(value); break; default: reader.skipField(); @@ -2217,9 +2413,9 @@ * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.identity.client.RegistrationFinishResponse.prototype.serializeBinary = function() { +proto.identity.client.RegistrationStartResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.identity.client.RegistrationFinishResponse.serializeBinaryToWriter(this, writer); + proto.identity.client.RegistrationStartResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -2227,15 +2423,22 @@ /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.identity.client.RegistrationFinishResponse} message + * @param {!proto.identity.client.RegistrationStartResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.identity.client.RegistrationFinishResponse.serializeBinaryToWriter = function(message, writer) { +proto.identity.client.RegistrationStartResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getAccesstoken(); + f = message.getSessionid(); if (f.length > 0) { writer.writeString( + 1, + f + ); + } + f = message.getOpaqueregistrationresponse_asU8(); + if (f.length > 0) { + writer.writeBytes( 2, f ); @@ -2244,20 +2447,62 @@ /** - * optional string accessToken = 2; + * optional string sessionID = 1; * @return {string} */ -proto.identity.client.RegistrationFinishResponse.prototype.getAccesstoken = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.identity.client.RegistrationStartResponse.prototype.getSessionid = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.identity.client.RegistrationFinishResponse} returns this + * @return {!proto.identity.client.RegistrationStartResponse} returns this */ -proto.identity.client.RegistrationFinishResponse.prototype.setAccesstoken = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); +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); }; @@ -2277,8 +2522,168 @@ * 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.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); }; @@ -2294,7 +2699,9 @@ proto.identity.client.UpdateUserPasswordStartRequest.toObject = function(includeInstance, msg) { var f, obj = { opaqueregistrationrequest: msg.getOpaqueregistrationrequest_asB64(), - accesstoken: jspb.Message.getFieldWithDefault(msg, 3, "") + accesstoken: jspb.Message.getFieldWithDefault(msg, 2, ""), + userid: jspb.Message.getFieldWithDefault(msg, 3, ""), + deviceidkey: jspb.Message.getFieldWithDefault(msg, 4, "") }; if (includeInstance) { @@ -2335,10 +2742,18 @@ var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setOpaqueregistrationrequest(value); break; - case 3: + case 2: var value = /** @type {string} */ (reader.readString()); msg.setAccesstoken(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); + break; default: reader.skipField(); break; @@ -2376,12 +2791,26 @@ ); } f = message.getAccesstoken(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getUserid(); if (f.length > 0) { writer.writeString( 3, f ); } + f = message.getDeviceidkey(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } }; @@ -2428,11 +2857,11 @@ /** - * optional string accessToken = 3; + * optional string accessToken = 2; * @return {string} */ proto.identity.client.UpdateUserPasswordStartRequest.prototype.getAccesstoken = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; @@ -2441,10 +2870,46 @@ * @return {!proto.identity.client.UpdateUserPasswordStartRequest} returns this */ proto.identity.client.UpdateUserPasswordStartRequest.prototype.setAccesstoken = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string userID = 3; + * @return {string} + */ +proto.identity.client.UpdateUserPasswordStartRequest.prototype.getUserid = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 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); }; +/** + * optional string deviceIDKey = 4; + * @return {string} + */ +proto.identity.client.UpdateUserPasswordStartRequest.prototype.getDeviceidkey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.identity.client.UpdateUserPasswordStartRequest} returns this + */ +proto.identity.client.UpdateUserPasswordStartRequest.prototype.setDeviceidkey = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + @@ -2829,8 +3294,8 @@ * http://goto/soy-param-migration * @return {!Object} */ -proto.identity.client.UpdateUserPasswordFinishResponse.prototype.toObject = function(opt_includeInstance) { - return proto.identity.client.UpdateUserPasswordFinishResponse.toObject(opt_includeInstance, this); +proto.identity.client.OpaqueLoginStartRequest.prototype.toObject = function(opt_includeInstance) { + return proto.identity.client.OpaqueLoginStartRequest.toObject(opt_includeInstance, this); }; @@ -2839,13 +3304,15 @@ * @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.UpdateUserPasswordFinishResponse} 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.UpdateUserPasswordFinishResponse.toObject = function(includeInstance, msg) { +proto.identity.client.OpaqueLoginStartRequest.toObject = function(includeInstance, msg) { var f, obj = { - accesstoken: jspb.Message.getFieldWithDefault(msg, 2, "") + username: jspb.Message.getFieldWithDefault(msg, 1, ""), + opaqueloginrequest: msg.getOpaqueloginrequest_asB64(), + devicekeyupload: (f = msg.getDevicekeyupload()) && proto.identity.client.DeviceKeyUpload.toObject(includeInstance, f) }; if (includeInstance) { @@ -2859,32 +3326,41 @@ /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.identity.client.UpdateUserPasswordFinishResponse} + * @return {!proto.identity.client.OpaqueLoginStartRequest} */ -proto.identity.client.UpdateUserPasswordFinishResponse.deserializeBinary = function(bytes) { +proto.identity.client.OpaqueLoginStartRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.identity.client.UpdateUserPasswordFinishResponse; - return proto.identity.client.UpdateUserPasswordFinishResponse.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.UpdateUserPasswordFinishResponse} 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.UpdateUserPasswordFinishResponse} + * @return {!proto.identity.client.OpaqueLoginStartRequest} */ -proto.identity.client.UpdateUserPasswordFinishResponse.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 2: + case 1: var value = /** @type {string} */ (reader.readString()); - msg.setAccesstoken(value); + msg.setUsername(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); break; default: reader.skipField(); @@ -2899,9 +3375,9 @@ * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.identity.client.UpdateUserPasswordFinishResponse.prototype.serializeBinary = function() { +proto.identity.client.OpaqueLoginStartRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.identity.client.UpdateUserPasswordFinishResponse.serializeBinaryToWriter(this, writer); + proto.identity.client.OpaqueLoginStartRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -2909,163 +3385,22 @@ /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.identity.client.UpdateUserPasswordFinishResponse} message + * @param {!proto.identity.client.OpaqueLoginStartRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.identity.client.UpdateUserPasswordFinishResponse.serializeBinaryToWriter = function(message, writer) { +proto.identity.client.OpaqueLoginStartRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getAccesstoken(); + f = message.getUsername(); if (f.length > 0) { writer.writeString( - 2, - f - ); - } -}; - - -/** - * optional string accessToken = 2; - * @return {string} - */ -proto.identity.client.UpdateUserPasswordFinishResponse.prototype.getAccesstoken = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.identity.client.UpdateUserPasswordFinishResponse} returns this - */ -proto.identity.client.UpdateUserPasswordFinishResponse.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.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.OpaqueLoginStartRequest} 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) { - var f, obj = { - 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.OpaqueLoginStartRequest} - */ -proto.identity.client.OpaqueLoginStartRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - 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.OpaqueLoginStartRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.identity.client.OpaqueLoginStartRequest} - */ -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 {string} */ (reader.readString()); - msg.setUsername(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); - 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() { - var writer = new jspb.BinaryWriter(); - 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.OpaqueLoginStartRequest} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.identity.client.OpaqueLoginStartRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getUsername(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getOpaqueloginrequest_asU8(); - if (f.length > 0) { - writer.writeBytes( + 1, + f + ); + } + f = message.getOpaqueloginrequest_asU8(); + if (f.length > 0) { + writer.writeBytes( 2, f ); @@ -3578,6 +3913,7 @@ */ proto.identity.client.OpaqueLoginFinishResponse.toObject = function(includeInstance, msg) { var f, obj = { + userid: jspb.Message.getFieldWithDefault(msg, 1, ""), accesstoken: jspb.Message.getFieldWithDefault(msg, 2, "") }; @@ -3615,6 +3951,10 @@ } 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); @@ -3648,6 +3988,13 @@ */ 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( @@ -3658,6 +4005,24 @@ }; +/** + * 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} @@ -3919,7 +4284,8 @@ */ proto.identity.client.WalletLoginResponse.toObject = function(includeInstance, msg) { var f, obj = { - accesstoken: jspb.Message.getFieldWithDefault(msg, 1, "") + userid: jspb.Message.getFieldWithDefault(msg, 1, ""), + accesstoken: jspb.Message.getFieldWithDefault(msg, 2, "") }; if (includeInstance) { @@ -3957,6 +4323,10 @@ 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; @@ -3970,56 +4340,966 @@ /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * 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.WalletLoginResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.identity.client.WalletLoginResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.identity.client.OutboundKeyInfo.prototype.hasOnetimenotifprekey = function() { + return jspb.Message.getField(this, 5) != null; }; + /** - * 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 + * 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.WalletLoginResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAccesstoken(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - +proto.identity.client.OutboundKeysForUserRequest.oneofGroups_ = [[1,2]]; /** - * optional string accessToken = 1; - * @return {string} + * @enum {number} */ -proto.identity.client.WalletLoginResponse.prototype.getAccesstoken = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.identity.client.OutboundKeysForUserRequest.IdentifierCase = { + IDENTIFIER_NOT_SET: 0, + USERNAME: 1, + WALLETADDRESS: 2 }; - /** - * @param {string} value - * @return {!proto.identity.client.WalletLoginResponse} returns this + * @return {proto.identity.client.OutboundKeysForUserRequest.IdentifierCase} */ -proto.identity.client.WalletLoginResponse.prototype.setAccesstoken = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); +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. @@ -4033,8 +5313,8 @@ * 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); +proto.identity.client.OutboundKeysForUserRequest.prototype.toObject = function(opt_includeInstance) { + return proto.identity.client.OutboundKeysForUserRequest.toObject(opt_includeInstance, this); }; @@ -4043,13 +5323,14 @@ * @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. + * @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.DeleteUserRequest.toObject = function(includeInstance, msg) { +proto.identity.client.OutboundKeysForUserRequest.toObject = function(includeInstance, msg) { var f, obj = { - accesstoken: jspb.Message.getFieldWithDefault(msg, 1, "") + username: jspb.Message.getFieldWithDefault(msg, 1, ""), + walletaddress: jspb.Message.getFieldWithDefault(msg, 2, "") }; if (includeInstance) { @@ -4063,23 +5344,23 @@ /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.identity.client.DeleteUserRequest} + * @return {!proto.identity.client.OutboundKeysForUserRequest} */ -proto.identity.client.DeleteUserRequest.deserializeBinary = function(bytes) { +proto.identity.client.OutboundKeysForUserRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.identity.client.DeleteUserRequest; - return proto.identity.client.DeleteUserRequest.deserializeBinaryFromReader(msg, reader); + 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.DeleteUserRequest} msg The message object to deserialize into. + * @param {!proto.identity.client.OutboundKeysForUserRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.identity.client.DeleteUserRequest} + * @return {!proto.identity.client.OutboundKeysForUserRequest} */ -proto.identity.client.DeleteUserRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.identity.client.OutboundKeysForUserRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -4088,7 +5369,11 @@ switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setAccesstoken(value); + msg.setUsername(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setWalletaddress(value); break; default: reader.skipField(); @@ -4103,9 +5388,9 @@ * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.identity.client.DeleteUserRequest.prototype.serializeBinary = function() { +proto.identity.client.OutboundKeysForUserRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.identity.client.DeleteUserRequest.serializeBinaryToWriter(this, writer); + proto.identity.client.OutboundKeysForUserRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -4113,37 +5398,98 @@ /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.identity.client.DeleteUserRequest} message + * @param {!proto.identity.client.OutboundKeysForUserRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.identity.client.DeleteUserRequest.serializeBinaryToWriter = function(message, writer) { +proto.identity.client.OutboundKeysForUserRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getAccesstoken(); - if (f.length > 0) { + 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 accessToken = 1; + * optional string username = 1; * @return {string} */ -proto.identity.client.DeleteUserRequest.prototype.getAccesstoken = function() { +proto.identity.client.OutboundKeysForUserRequest.prototype.getUsername = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.identity.client.DeleteUserRequest} returns this + * @return {!proto.identity.client.OutboundKeysForUserRequest} returns this */ -proto.identity.client.DeleteUserRequest.prototype.setAccesstoken = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); +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; }; @@ -4163,8 +5509,8 @@ * 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); +proto.identity.client.OutboundKeysForUserResponse.prototype.toObject = function(opt_includeInstance) { + return proto.identity.client.OutboundKeysForUserResponse.toObject(opt_includeInstance, this); }; @@ -4173,13 +5519,13 @@ * @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. + * @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.GenerateNonceResponse.toObject = function(includeInstance, msg) { +proto.identity.client.OutboundKeysForUserResponse.toObject = function(includeInstance, msg) { var f, obj = { - nonce: jspb.Message.getFieldWithDefault(msg, 1, "") + devicesMap: (f = msg.getDevicesMap()) ? f.toObject(includeInstance, proto.identity.client.OutboundKeyInfo.toObject) : [] }; if (includeInstance) { @@ -4193,23 +5539,23 @@ /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.identity.client.GenerateNonceResponse} + * @return {!proto.identity.client.OutboundKeysForUserResponse} */ -proto.identity.client.GenerateNonceResponse.deserializeBinary = function(bytes) { +proto.identity.client.OutboundKeysForUserResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.identity.client.GenerateNonceResponse; - return proto.identity.client.GenerateNonceResponse.deserializeBinaryFromReader(msg, reader); + 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.GenerateNonceResponse} msg The message object to deserialize into. + * @param {!proto.identity.client.OutboundKeysForUserResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.identity.client.GenerateNonceResponse} + * @return {!proto.identity.client.OutboundKeysForUserResponse} */ -proto.identity.client.GenerateNonceResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.identity.client.OutboundKeysForUserResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -4217,8 +5563,10 @@ var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setNonce(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.client.OutboundKeyInfo.deserializeBinaryFromReader, "", new proto.identity.client.OutboundKeyInfo()); + }); break; default: reader.skipField(); @@ -4233,9 +5581,9 @@ * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.identity.client.GenerateNonceResponse.prototype.serializeBinary = function() { +proto.identity.client.OutboundKeysForUserResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.identity.client.GenerateNonceResponse.serializeBinaryToWriter(this, writer); + proto.identity.client.OutboundKeysForUserResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -4243,37 +5591,39 @@ /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.identity.client.GenerateNonceResponse} message + * @param {!proto.identity.client.OutboundKeysForUserResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.identity.client.GenerateNonceResponse.serializeBinaryToWriter = function(message, writer) { +proto.identity.client.OutboundKeysForUserResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getNonce(); - 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.client.OutboundKeyInfo.serializeBinaryToWriter); } }; /** - * optional string nonce = 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.client.GenerateNonceResponse.prototype.getNonce = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.identity.client.OutboundKeysForUserResponse.prototype.getDevicesMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 1, opt_noLazyCreate, + proto.identity.client.OutboundKeyInfo)); }; /** - * @param {string} value - * @return {!proto.identity.client.GenerateNonceResponse} returns this + * Clears values from the map. The map will be non-null. + * @return {!proto.identity.client.OutboundKeysForUserResponse} returns this */ -proto.identity.client.GenerateNonceResponse.prototype.setNonce = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); +proto.identity.client.OutboundKeysForUserResponse.prototype.clearDevicesMap = function() { + this.getDevicesMap().clear(); + return this; }; @@ -4293,8 +5643,8 @@ * http://goto/soy-param-migration * @return {!Object} */ -proto.identity.client.ReceiverKeyInfo.prototype.toObject = function(opt_includeInstance) { - return proto.identity.client.ReceiverKeyInfo.toObject(opt_includeInstance, this); +proto.identity.client.InboundKeyInfo.prototype.toObject = function(opt_includeInstance) { + return proto.identity.client.InboundKeyInfo.toObject(opt_includeInstance, this); }; @@ -4303,17 +5653,15 @@ * @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.ReceiverKeyInfo} msg The msg instance to transform. + * @param {!proto.identity.client.InboundKeyInfo} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.identity.client.ReceiverKeyInfo.toObject = function(includeInstance, msg) { +proto.identity.client.InboundKeyInfo.toObject = function(includeInstance, msg) { var f, obj = { identityinfo: (f = msg.getIdentityinfo()) && proto.identity.client.IdentityKeyInfo.toObject(includeInstance, f), - identityprekey: (f = msg.getIdentityprekey()) && proto.identity.client.PreKey.toObject(includeInstance, f), - notifprekey: (f = msg.getNotifprekey()) && proto.identity.client.PreKey.toObject(includeInstance, f), - onetimeidentityprekey: jspb.Message.getFieldWithDefault(msg, 4, ""), - onetimenotifprekey: jspb.Message.getFieldWithDefault(msg, 5, "") + contentprekey: (f = msg.getContentprekey()) && proto.identity.client.PreKey.toObject(includeInstance, f), + notifprekey: (f = msg.getNotifprekey()) && proto.identity.client.PreKey.toObject(includeInstance, f) }; if (includeInstance) { @@ -4327,23 +5675,23 @@ /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.identity.client.ReceiverKeyInfo} + * @return {!proto.identity.client.InboundKeyInfo} */ -proto.identity.client.ReceiverKeyInfo.deserializeBinary = function(bytes) { +proto.identity.client.InboundKeyInfo.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.identity.client.ReceiverKeyInfo; - return proto.identity.client.ReceiverKeyInfo.deserializeBinaryFromReader(msg, reader); + var msg = new proto.identity.client.InboundKeyInfo; + return proto.identity.client.InboundKeyInfo.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.identity.client.ReceiverKeyInfo} msg The message object to deserialize into. + * @param {!proto.identity.client.InboundKeyInfo} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.identity.client.ReceiverKeyInfo} + * @return {!proto.identity.client.InboundKeyInfo} */ -proto.identity.client.ReceiverKeyInfo.deserializeBinaryFromReader = function(msg, reader) { +proto.identity.client.InboundKeyInfo.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -4358,21 +5706,13 @@ case 2: var value = new proto.identity.client.PreKey; reader.readMessage(value,proto.identity.client.PreKey.deserializeBinaryFromReader); - msg.setIdentityprekey(value); + 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.setOnetimeidentityprekey(value); - break; - case 5: - var value = /** @type {string} */ (reader.readString()); - msg.setOnetimenotifprekey(value); - break; default: reader.skipField(); break; @@ -4386,9 +5726,9 @@ * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.identity.client.ReceiverKeyInfo.prototype.serializeBinary = function() { +proto.identity.client.InboundKeyInfo.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.identity.client.ReceiverKeyInfo.serializeBinaryToWriter(this, writer); + proto.identity.client.InboundKeyInfo.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -4396,11 +5736,11 @@ /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.identity.client.ReceiverKeyInfo} message + * @param {!proto.identity.client.InboundKeyInfo} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.identity.client.ReceiverKeyInfo.serializeBinaryToWriter = function(message, writer) { +proto.identity.client.InboundKeyInfo.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getIdentityinfo(); if (f != null) { @@ -4410,7 +5750,7 @@ proto.identity.client.IdentityKeyInfo.serializeBinaryToWriter ); } - f = message.getIdentityprekey(); + f = message.getContentprekey(); if (f != null) { writer.writeMessage( 2, @@ -4426,20 +5766,6 @@ 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 - ); - } }; @@ -4447,7 +5773,7 @@ * optional IdentityKeyInfo identityInfo = 1; * @return {?proto.identity.client.IdentityKeyInfo} */ -proto.identity.client.ReceiverKeyInfo.prototype.getIdentityinfo = function() { +proto.identity.client.InboundKeyInfo.prototype.getIdentityinfo = function() { return /** @type{?proto.identity.client.IdentityKeyInfo} */ ( jspb.Message.getWrapperField(this, proto.identity.client.IdentityKeyInfo, 1)); }; @@ -4455,18 +5781,18 @@ /** * @param {?proto.identity.client.IdentityKeyInfo|undefined} value - * @return {!proto.identity.client.ReceiverKeyInfo} returns this + * @return {!proto.identity.client.InboundKeyInfo} returns this */ -proto.identity.client.ReceiverKeyInfo.prototype.setIdentityinfo = function(value) { +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.ReceiverKeyInfo} returns this + * @return {!proto.identity.client.InboundKeyInfo} returns this */ -proto.identity.client.ReceiverKeyInfo.prototype.clearIdentityinfo = function() { +proto.identity.client.InboundKeyInfo.prototype.clearIdentityinfo = function() { return this.setIdentityinfo(undefined); }; @@ -4475,16 +5801,16 @@ * Returns whether this field is set. * @return {boolean} */ -proto.identity.client.ReceiverKeyInfo.prototype.hasIdentityinfo = function() { +proto.identity.client.InboundKeyInfo.prototype.hasIdentityinfo = function() { return jspb.Message.getField(this, 1) != null; }; /** - * optional PreKey identityPrekey = 2; + * optional PreKey contentPrekey = 2; * @return {?proto.identity.client.PreKey} */ -proto.identity.client.ReceiverKeyInfo.prototype.getIdentityprekey = function() { +proto.identity.client.InboundKeyInfo.prototype.getContentprekey = function() { return /** @type{?proto.identity.client.PreKey} */ ( jspb.Message.getWrapperField(this, proto.identity.client.PreKey, 2)); }; @@ -4492,92 +5818,19 @@ /** * @param {?proto.identity.client.PreKey|undefined} value - * @return {!proto.identity.client.ReceiverKeyInfo} returns this + * @return {!proto.identity.client.InboundKeyInfo} returns this */ -proto.identity.client.ReceiverKeyInfo.prototype.setIdentityprekey = function(value) { +proto.identity.client.InboundKeyInfo.prototype.setContentprekey = function(value) { return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. - * @return {!proto.identity.client.ReceiverKeyInfo} returns this - */ -proto.identity.client.ReceiverKeyInfo.prototype.clearIdentityprekey = function() { - return this.setIdentityprekey(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.identity.client.ReceiverKeyInfo.prototype.hasIdentityprekey = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional PreKey notifPrekey = 3; - * @return {?proto.identity.client.PreKey} - */ -proto.identity.client.ReceiverKeyInfo.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.ReceiverKeyInfo} returns this -*/ -proto.identity.client.ReceiverKeyInfo.prototype.setNotifprekey = function(value) { - return jspb.Message.setWrapperField(this, 3, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.identity.client.ReceiverKeyInfo} returns this - */ -proto.identity.client.ReceiverKeyInfo.prototype.clearNotifprekey = function() { - return this.setNotifprekey(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.identity.client.ReceiverKeyInfo.prototype.hasNotifprekey = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -/** - * optional string onetimeIdentityPrekey = 4; - * @return {string} - */ -proto.identity.client.ReceiverKeyInfo.prototype.getOnetimeidentityprekey = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * @param {string} value - * @return {!proto.identity.client.ReceiverKeyInfo} returns this + * @return {!proto.identity.client.InboundKeyInfo} returns this */ -proto.identity.client.ReceiverKeyInfo.prototype.setOnetimeidentityprekey = function(value) { - return jspb.Message.setField(this, 4, value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.identity.client.ReceiverKeyInfo} returns this - */ -proto.identity.client.ReceiverKeyInfo.prototype.clearOnetimeidentityprekey = function() { - return jspb.Message.setField(this, 4, undefined); +proto.identity.client.InboundKeyInfo.prototype.clearContentprekey = function() { + return this.setContentprekey(undefined); }; @@ -4585,35 +5838,36 @@ * Returns whether this field is set. * @return {boolean} */ -proto.identity.client.ReceiverKeyInfo.prototype.hasOnetimeidentityprekey = function() { - return jspb.Message.getField(this, 4) != null; +proto.identity.client.InboundKeyInfo.prototype.hasContentprekey = function() { + return jspb.Message.getField(this, 2) != null; }; /** - * optional string onetimeNotifPrekey = 5; - * @return {string} + * optional PreKey notifPrekey = 3; + * @return {?proto.identity.client.PreKey} */ -proto.identity.client.ReceiverKeyInfo.prototype.getOnetimenotifprekey = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +proto.identity.client.InboundKeyInfo.prototype.getNotifprekey = function() { + return /** @type{?proto.identity.client.PreKey} */ ( + jspb.Message.getWrapperField(this, proto.identity.client.PreKey, 3)); }; /** - * @param {string} value - * @return {!proto.identity.client.ReceiverKeyInfo} returns this - */ -proto.identity.client.ReceiverKeyInfo.prototype.setOnetimenotifprekey = function(value) { - return jspb.Message.setField(this, 5, value); + * @param {?proto.identity.client.PreKey|undefined} value + * @return {!proto.identity.client.InboundKeyInfo} returns this +*/ +proto.identity.client.InboundKeyInfo.prototype.setNotifprekey = function(value) { + return jspb.Message.setWrapperField(this, 3, value); }; /** - * Clears the field making it undefined. - * @return {!proto.identity.client.ReceiverKeyInfo} returns this + * Clears the message field making it undefined. + * @return {!proto.identity.client.InboundKeyInfo} returns this */ -proto.identity.client.ReceiverKeyInfo.prototype.clearOnetimenotifprekey = function() { - return jspb.Message.setField(this, 5, undefined); +proto.identity.client.InboundKeyInfo.prototype.clearNotifprekey = function() { + return this.setNotifprekey(undefined); }; @@ -4621,8 +5875,8 @@ * Returns whether this field is set. * @return {boolean} */ -proto.identity.client.ReceiverKeyInfo.prototype.hasOnetimenotifprekey = function() { - return jspb.Message.getField(this, 5) != null; +proto.identity.client.InboundKeyInfo.prototype.hasNotifprekey = function() { + return jspb.Message.getField(this, 3) != null; }; @@ -4635,22 +5889,22 @@ * @private {!Array>} * @const */ -proto.identity.client.ReceiverKeysForUserRequest.oneofGroups_ = [[1,2]]; +proto.identity.client.InboundKeysForUserRequest.oneofGroups_ = [[1,2]]; /** * @enum {number} */ -proto.identity.client.ReceiverKeysForUserRequest.IdentifierCase = { +proto.identity.client.InboundKeysForUserRequest.IdentifierCase = { IDENTIFIER_NOT_SET: 0, USERNAME: 1, WALLETADDRESS: 2 }; /** - * @return {proto.identity.client.ReceiverKeysForUserRequest.IdentifierCase} + * @return {proto.identity.client.InboundKeysForUserRequest.IdentifierCase} */ -proto.identity.client.ReceiverKeysForUserRequest.prototype.getIdentifierCase = function() { - return /** @type {proto.identity.client.ReceiverKeysForUserRequest.IdentifierCase} */(jspb.Message.computeOneofCase(this, proto.identity.client.ReceiverKeysForUserRequest.oneofGroups_[0])); +proto.identity.client.InboundKeysForUserRequest.prototype.getIdentifierCase = function() { + return /** @type {proto.identity.client.InboundKeysForUserRequest.IdentifierCase} */(jspb.Message.computeOneofCase(this, proto.identity.client.InboundKeysForUserRequest.oneofGroups_[0])); }; @@ -4668,8 +5922,8 @@ * http://goto/soy-param-migration * @return {!Object} */ -proto.identity.client.ReceiverKeysForUserRequest.prototype.toObject = function(opt_includeInstance) { - return proto.identity.client.ReceiverKeysForUserRequest.toObject(opt_includeInstance, this); +proto.identity.client.InboundKeysForUserRequest.prototype.toObject = function(opt_includeInstance) { + return proto.identity.client.InboundKeysForUserRequest.toObject(opt_includeInstance, this); }; @@ -4678,11 +5932,11 @@ * @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.ReceiverKeysForUserRequest} msg The msg instance to transform. + * @param {!proto.identity.client.InboundKeysForUserRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.identity.client.ReceiverKeysForUserRequest.toObject = function(includeInstance, msg) { +proto.identity.client.InboundKeysForUserRequest.toObject = function(includeInstance, msg) { var f, obj = { username: jspb.Message.getFieldWithDefault(msg, 1, ""), walletaddress: jspb.Message.getFieldWithDefault(msg, 2, "") @@ -4699,23 +5953,23 @@ /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.identity.client.ReceiverKeysForUserRequest} + * @return {!proto.identity.client.InboundKeysForUserRequest} */ -proto.identity.client.ReceiverKeysForUserRequest.deserializeBinary = function(bytes) { +proto.identity.client.InboundKeysForUserRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.identity.client.ReceiverKeysForUserRequest; - return proto.identity.client.ReceiverKeysForUserRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.identity.client.InboundKeysForUserRequest; + return proto.identity.client.InboundKeysForUserRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.identity.client.ReceiverKeysForUserRequest} msg The message object to deserialize into. + * @param {!proto.identity.client.InboundKeysForUserRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.identity.client.ReceiverKeysForUserRequest} + * @return {!proto.identity.client.InboundKeysForUserRequest} */ -proto.identity.client.ReceiverKeysForUserRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.identity.client.InboundKeysForUserRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -4743,9 +5997,9 @@ * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.identity.client.ReceiverKeysForUserRequest.prototype.serializeBinary = function() { +proto.identity.client.InboundKeysForUserRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.identity.client.ReceiverKeysForUserRequest.serializeBinaryToWriter(this, writer); + proto.identity.client.InboundKeysForUserRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -4753,11 +6007,11 @@ /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.identity.client.ReceiverKeysForUserRequest} message + * @param {!proto.identity.client.InboundKeysForUserRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.identity.client.ReceiverKeysForUserRequest.serializeBinaryToWriter = function(message, writer) { +proto.identity.client.InboundKeysForUserRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = /** @type {string} */ (jspb.Message.getField(message, 1)); if (f != null) { @@ -4780,26 +6034,26 @@ * optional string username = 1; * @return {string} */ -proto.identity.client.ReceiverKeysForUserRequest.prototype.getUsername = function() { +proto.identity.client.InboundKeysForUserRequest.prototype.getUsername = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.identity.client.ReceiverKeysForUserRequest} returns this + * @return {!proto.identity.client.InboundKeysForUserRequest} returns this */ -proto.identity.client.ReceiverKeysForUserRequest.prototype.setUsername = function(value) { - return jspb.Message.setOneofField(this, 1, proto.identity.client.ReceiverKeysForUserRequest.oneofGroups_[0], value); +proto.identity.client.InboundKeysForUserRequest.prototype.setUsername = function(value) { + return jspb.Message.setOneofField(this, 1, proto.identity.client.InboundKeysForUserRequest.oneofGroups_[0], value); }; /** * Clears the field making it undefined. - * @return {!proto.identity.client.ReceiverKeysForUserRequest} returns this + * @return {!proto.identity.client.InboundKeysForUserRequest} returns this */ -proto.identity.client.ReceiverKeysForUserRequest.prototype.clearUsername = function() { - return jspb.Message.setOneofField(this, 1, proto.identity.client.ReceiverKeysForUserRequest.oneofGroups_[0], undefined); +proto.identity.client.InboundKeysForUserRequest.prototype.clearUsername = function() { + return jspb.Message.setOneofField(this, 1, proto.identity.client.InboundKeysForUserRequest.oneofGroups_[0], undefined); }; @@ -4807,7 +6061,7 @@ * Returns whether this field is set. * @return {boolean} */ -proto.identity.client.ReceiverKeysForUserRequest.prototype.hasUsername = function() { +proto.identity.client.InboundKeysForUserRequest.prototype.hasUsername = function() { return jspb.Message.getField(this, 1) != null; }; @@ -4816,26 +6070,26 @@ * optional string walletAddress = 2; * @return {string} */ -proto.identity.client.ReceiverKeysForUserRequest.prototype.getWalletaddress = function() { +proto.identity.client.InboundKeysForUserRequest.prototype.getWalletaddress = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value - * @return {!proto.identity.client.ReceiverKeysForUserRequest} returns this + * @return {!proto.identity.client.InboundKeysForUserRequest} returns this */ -proto.identity.client.ReceiverKeysForUserRequest.prototype.setWalletaddress = function(value) { - return jspb.Message.setOneofField(this, 2, proto.identity.client.ReceiverKeysForUserRequest.oneofGroups_[0], value); +proto.identity.client.InboundKeysForUserRequest.prototype.setWalletaddress = function(value) { + return jspb.Message.setOneofField(this, 2, proto.identity.client.InboundKeysForUserRequest.oneofGroups_[0], value); }; /** * Clears the field making it undefined. - * @return {!proto.identity.client.ReceiverKeysForUserRequest} returns this + * @return {!proto.identity.client.InboundKeysForUserRequest} returns this */ -proto.identity.client.ReceiverKeysForUserRequest.prototype.clearWalletaddress = function() { - return jspb.Message.setOneofField(this, 2, proto.identity.client.ReceiverKeysForUserRequest.oneofGroups_[0], undefined); +proto.identity.client.InboundKeysForUserRequest.prototype.clearWalletaddress = function() { + return jspb.Message.setOneofField(this, 2, proto.identity.client.InboundKeysForUserRequest.oneofGroups_[0], undefined); }; @@ -4843,7 +6097,7 @@ * Returns whether this field is set. * @return {boolean} */ -proto.identity.client.ReceiverKeysForUserRequest.prototype.hasWalletaddress = function() { +proto.identity.client.InboundKeysForUserRequest.prototype.hasWalletaddress = function() { return jspb.Message.getField(this, 2) != null; }; @@ -4864,8 +6118,8 @@ * http://goto/soy-param-migration * @return {!Object} */ -proto.identity.client.ReceiverKeysForUserResponse.prototype.toObject = function(opt_includeInstance) { - return proto.identity.client.ReceiverKeysForUserResponse.toObject(opt_includeInstance, this); +proto.identity.client.InboundKeysForUserResponse.prototype.toObject = function(opt_includeInstance) { + return proto.identity.client.InboundKeysForUserResponse.toObject(opt_includeInstance, this); }; @@ -4874,13 +6128,13 @@ * @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.ReceiverKeysForUserResponse} msg The msg instance to transform. + * @param {!proto.identity.client.InboundKeysForUserResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.identity.client.ReceiverKeysForUserResponse.toObject = function(includeInstance, msg) { +proto.identity.client.InboundKeysForUserResponse.toObject = function(includeInstance, msg) { var f, obj = { - devicesMap: (f = msg.getDevicesMap()) ? f.toObject(includeInstance, proto.identity.client.ReceiverKeyInfo.toObject) : [] + devicesMap: (f = msg.getDevicesMap()) ? f.toObject(includeInstance, proto.identity.client.InboundKeyInfo.toObject) : [] }; if (includeInstance) { @@ -4894,23 +6148,23 @@ /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.identity.client.ReceiverKeysForUserResponse} + * @return {!proto.identity.client.InboundKeysForUserResponse} */ -proto.identity.client.ReceiverKeysForUserResponse.deserializeBinary = function(bytes) { +proto.identity.client.InboundKeysForUserResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.identity.client.ReceiverKeysForUserResponse; - return proto.identity.client.ReceiverKeysForUserResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.identity.client.InboundKeysForUserResponse; + return proto.identity.client.InboundKeysForUserResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.identity.client.ReceiverKeysForUserResponse} msg The message object to deserialize into. + * @param {!proto.identity.client.InboundKeysForUserResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.identity.client.ReceiverKeysForUserResponse} + * @return {!proto.identity.client.InboundKeysForUserResponse} */ -proto.identity.client.ReceiverKeysForUserResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.identity.client.InboundKeysForUserResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -4920,7 +6174,7 @@ 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.ReceiverKeyInfo.deserializeBinaryFromReader, "", new proto.identity.client.ReceiverKeyInfo()); + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.identity.client.InboundKeyInfo.deserializeBinaryFromReader, "", new proto.identity.client.InboundKeyInfo()); }); break; default: @@ -4936,9 +6190,9 @@ * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.identity.client.ReceiverKeysForUserResponse.prototype.serializeBinary = function() { +proto.identity.client.InboundKeysForUserResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.identity.client.ReceiverKeysForUserResponse.serializeBinaryToWriter(this, writer); + proto.identity.client.InboundKeysForUserResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -4946,320 +6200,49 @@ /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.identity.client.ReceiverKeysForUserResponse} message + * @param {!proto.identity.client.InboundKeysForUserResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.identity.client.ReceiverKeysForUserResponse.serializeBinaryToWriter = function(message, writer) { +proto.identity.client.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.client.ReceiverKeyInfo.serializeBinaryToWriter); - } -}; - - -/** - * map devices = 1; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} - */ -proto.identity.client.ReceiverKeysForUserResponse.prototype.getDevicesMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 1, opt_noLazyCreate, - proto.identity.client.ReceiverKeyInfo)); -}; - - -/** - * Clears values from the map. The map will be non-null. - * @return {!proto.identity.client.ReceiverKeysForUserResponse} returns this - */ -proto.identity.client.ReceiverKeysForUserResponse.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.client.SenderKeyInfo.prototype.toObject = function(opt_includeInstance) { - return proto.identity.client.SenderKeyInfo.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.SenderKeyInfo} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.identity.client.SenderKeyInfo.toObject = function(includeInstance, msg) { - var f, obj = { - identityinfo: (f = msg.getIdentityinfo()) && proto.identity.client.IdentityKeyInfo.toObject(includeInstance, f), - identityprekey: (f = msg.getIdentityprekey()) && proto.identity.client.PreKey.toObject(includeInstance, f), - notifprekey: (f = msg.getNotifprekey()) && proto.identity.client.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.client.SenderKeyInfo} - */ -proto.identity.client.SenderKeyInfo.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.identity.client.SenderKeyInfo; - return proto.identity.client.SenderKeyInfo.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.identity.client.SenderKeyInfo} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.identity.client.SenderKeyInfo} - */ -proto.identity.client.SenderKeyInfo.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.setIdentityprekey(value); - break; - case 3: - var value = new proto.identity.client.PreKey; - reader.readMessage(value,proto.identity.client.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.client.SenderKeyInfo.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.identity.client.SenderKeyInfo.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.SenderKeyInfo} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.identity.client.SenderKeyInfo.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getIdentityinfo(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.identity.client.IdentityKeyInfo.serializeBinaryToWriter - ); - } - f = message.getIdentityprekey(); - 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.serializeBinary(1, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.identity.client.InboundKeyInfo.serializeBinaryToWriter); } }; /** - * optional IdentityKeyInfo identityInfo = 1; - * @return {?proto.identity.client.IdentityKeyInfo} - */ -proto.identity.client.SenderKeyInfo.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.SenderKeyInfo} returns this -*/ -proto.identity.client.SenderKeyInfo.prototype.setIdentityinfo = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.identity.client.SenderKeyInfo} returns this - */ -proto.identity.client.SenderKeyInfo.prototype.clearIdentityinfo = function() { - return this.setIdentityinfo(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.identity.client.SenderKeyInfo.prototype.hasIdentityinfo = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional PreKey identityPrekey = 2; - * @return {?proto.identity.client.PreKey} - */ -proto.identity.client.SenderKeyInfo.prototype.getIdentityprekey = 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.SenderKeyInfo} returns this -*/ -proto.identity.client.SenderKeyInfo.prototype.setIdentityprekey = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.identity.client.SenderKeyInfo} returns this - */ -proto.identity.client.SenderKeyInfo.prototype.clearIdentityprekey = function() { - return this.setIdentityprekey(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.identity.client.SenderKeyInfo.prototype.hasIdentityprekey = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional PreKey notifPrekey = 3; - * @return {?proto.identity.client.PreKey} - */ -proto.identity.client.SenderKeyInfo.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.SenderKeyInfo} returns this -*/ -proto.identity.client.SenderKeyInfo.prototype.setNotifprekey = function(value) { - return jspb.Message.setWrapperField(this, 3, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.identity.client.SenderKeyInfo} returns this - */ -proto.identity.client.SenderKeyInfo.prototype.clearNotifprekey = function() { - return this.setNotifprekey(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.identity.client.SenderKeyInfo.prototype.hasNotifprekey = 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 + * map devices = 1; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} */ -proto.identity.client.SenderKeysForUserRequest.oneofGroups_ = [[1,2]]; +proto.identity.client.InboundKeysForUserResponse.prototype.getDevicesMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 1, opt_noLazyCreate, + proto.identity.client.InboundKeyInfo)); +}; + /** - * @enum {number} + * Clears values from the map. The map will be non-null. + * @return {!proto.identity.client.InboundKeysForUserResponse} returns this */ -proto.identity.client.SenderKeysForUserRequest.IdentifierCase = { - IDENTIFIER_NOT_SET: 0, - USERNAME: 1, - WALLETADDRESS: 2 +proto.identity.client.InboundKeysForUserResponse.prototype.clearDevicesMap = function() { + this.getDevicesMap().clear(); + return this; }; + + /** - * @return {proto.identity.client.SenderKeysForUserRequest.IdentifierCase} + * List of repeated fields within this message type. + * @private {!Array} + * @const */ -proto.identity.client.SenderKeysForUserRequest.prototype.getIdentifierCase = function() { - return /** @type {proto.identity.client.SenderKeysForUserRequest.IdentifierCase} */(jspb.Message.computeOneofCase(this, proto.identity.client.SenderKeysForUserRequest.oneofGroups_[0])); -}; +proto.identity.client.UploadOneTimeKeysRequest.repeatedFields_ = [4,5]; @@ -5276,8 +6259,8 @@ * http://goto/soy-param-migration * @return {!Object} */ -proto.identity.client.SenderKeysForUserRequest.prototype.toObject = function(opt_includeInstance) { - return proto.identity.client.SenderKeysForUserRequest.toObject(opt_includeInstance, this); +proto.identity.client.UploadOneTimeKeysRequest.prototype.toObject = function(opt_includeInstance) { + return proto.identity.client.UploadOneTimeKeysRequest.toObject(opt_includeInstance, this); }; @@ -5286,14 +6269,17 @@ * @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.SenderKeysForUserRequest} msg The msg instance to transform. + * @param {!proto.identity.client.UploadOneTimeKeysRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.identity.client.SenderKeysForUserRequest.toObject = function(includeInstance, msg) { +proto.identity.client.UploadOneTimeKeysRequest.toObject = function(includeInstance, msg) { var f, obj = { - username: jspb.Message.getFieldWithDefault(msg, 1, ""), - walletaddress: jspb.Message.getFieldWithDefault(msg, 2, "") + 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 }; if (includeInstance) { @@ -5307,23 +6293,23 @@ /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.identity.client.SenderKeysForUserRequest} + * @return {!proto.identity.client.UploadOneTimeKeysRequest} */ -proto.identity.client.SenderKeysForUserRequest.deserializeBinary = function(bytes) { +proto.identity.client.UploadOneTimeKeysRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.identity.client.SenderKeysForUserRequest; - return proto.identity.client.SenderKeysForUserRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.identity.client.UploadOneTimeKeysRequest; + return proto.identity.client.UploadOneTimeKeysRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.identity.client.SenderKeysForUserRequest} msg The message object to deserialize into. + * @param {!proto.identity.client.UploadOneTimeKeysRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.identity.client.SenderKeysForUserRequest} + * @return {!proto.identity.client.UploadOneTimeKeysRequest} */ -proto.identity.client.SenderKeysForUserRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.identity.client.UploadOneTimeKeysRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -5332,11 +6318,23 @@ switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setUsername(value); + msg.setUserid(value); break; case 2: var value = /** @type {string} */ (reader.readString()); - msg.setWalletaddress(value); + 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); break; default: reader.skipField(); @@ -5351,9 +6349,9 @@ * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.identity.client.SenderKeysForUserRequest.prototype.serializeBinary = function() { +proto.identity.client.UploadOneTimeKeysRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.identity.client.SenderKeysForUserRequest.serializeBinaryToWriter(this, writer); + proto.identity.client.UploadOneTimeKeysRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -5361,232 +6359,176 @@ /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.identity.client.SenderKeysForUserRequest} message + * @param {!proto.identity.client.UploadOneTimeKeysRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.identity.client.SenderKeysForUserRequest.serializeBinaryToWriter = function(message, writer) { +proto.identity.client.UploadOneTimeKeysRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = /** @type {string} */ (jspb.Message.getField(message, 1)); - if (f != null) { + f = message.getUserid(); + if (f.length > 0) { writer.writeString( 1, f ); } - f = /** @type {string} */ (jspb.Message.getField(message, 2)); - if (f != null) { + 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 username = 1; + * optional string userID = 1; * @return {string} */ -proto.identity.client.SenderKeysForUserRequest.prototype.getUsername = function() { +proto.identity.client.UploadOneTimeKeysRequest.prototype.getUserid = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.identity.client.SenderKeysForUserRequest} returns this - */ -proto.identity.client.SenderKeysForUserRequest.prototype.setUsername = function(value) { - return jspb.Message.setOneofField(this, 1, proto.identity.client.SenderKeysForUserRequest.oneofGroups_[0], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.identity.client.SenderKeysForUserRequest} returns this - */ -proto.identity.client.SenderKeysForUserRequest.prototype.clearUsername = function() { - return jspb.Message.setOneofField(this, 1, proto.identity.client.SenderKeysForUserRequest.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} + * @return {!proto.identity.client.UploadOneTimeKeysRequest} returns this */ -proto.identity.client.SenderKeysForUserRequest.prototype.hasUsername = function() { - return jspb.Message.getField(this, 1) != null; +proto.identity.client.UploadOneTimeKeysRequest.prototype.setUserid = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; /** - * optional string walletAddress = 2; + * optional string deviceID = 2; * @return {string} */ -proto.identity.client.SenderKeysForUserRequest.prototype.getWalletaddress = function() { +proto.identity.client.UploadOneTimeKeysRequest.prototype.getDeviceid = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value - * @return {!proto.identity.client.SenderKeysForUserRequest} returns this + * @return {!proto.identity.client.UploadOneTimeKeysRequest} returns this */ -proto.identity.client.SenderKeysForUserRequest.prototype.setWalletaddress = function(value) { - return jspb.Message.setOneofField(this, 2, proto.identity.client.SenderKeysForUserRequest.oneofGroups_[0], value); +proto.identity.client.UploadOneTimeKeysRequest.prototype.setDeviceid = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); }; /** - * Clears the field making it undefined. - * @return {!proto.identity.client.SenderKeysForUserRequest} returns this + * optional string accessToken = 3; + * @return {string} */ -proto.identity.client.SenderKeysForUserRequest.prototype.clearWalletaddress = function() { - return jspb.Message.setOneofField(this, 2, proto.identity.client.SenderKeysForUserRequest.oneofGroups_[0], undefined); +proto.identity.client.UploadOneTimeKeysRequest.prototype.getAccesstoken = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {string} value + * @return {!proto.identity.client.UploadOneTimeKeysRequest} returns this */ -proto.identity.client.SenderKeysForUserRequest.prototype.hasWalletaddress = function() { - return jspb.Message.getField(this, 2) != null; +proto.identity.client.UploadOneTimeKeysRequest.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} + * repeated string contentOneTimePreKeys = 4; + * @return {!Array} */ -proto.identity.client.SenderKeysForUserResponse.prototype.toObject = function(opt_includeInstance) { - return proto.identity.client.SenderKeysForUserResponse.toObject(opt_includeInstance, this); +proto.identity.client.UploadOneTimeKeysRequest.prototype.getContentonetimeprekeysList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 4)); }; /** - * 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.SenderKeysForUserResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages + * @param {!Array} value + * @return {!proto.identity.client.UploadOneTimeKeysRequest} returns this */ -proto.identity.client.SenderKeysForUserResponse.toObject = function(includeInstance, msg) { - var f, obj = { - devicesMap: (f = msg.getDevicesMap()) ? f.toObject(includeInstance, proto.identity.client.SenderKeyInfo.toObject) : [] - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; +proto.identity.client.UploadOneTimeKeysRequest.prototype.setContentonetimeprekeysList = function(value) { + return jspb.Message.setField(this, 4, value || []); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.identity.client.SenderKeysForUserResponse} + * @param {string} value + * @param {number=} opt_index + * @return {!proto.identity.client.UploadOneTimeKeysRequest} returns this */ -proto.identity.client.SenderKeysForUserResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.identity.client.SenderKeysForUserResponse; - return proto.identity.client.SenderKeysForUserResponse.deserializeBinaryFromReader(msg, reader); +proto.identity.client.UploadOneTimeKeysRequest.prototype.addContentonetimeprekeys = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 4, value, opt_index); }; /** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.identity.client.SenderKeysForUserResponse} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.identity.client.SenderKeysForUserResponse} + * Clears the list making it empty but non-null. + * @return {!proto.identity.client.UploadOneTimeKeysRequest} returns this */ -proto.identity.client.SenderKeysForUserResponse.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.SenderKeyInfo.deserializeBinaryFromReader, "", new proto.identity.client.SenderKeyInfo()); - }); - break; - default: - reader.skipField(); - break; - } - } - return msg; +proto.identity.client.UploadOneTimeKeysRequest.prototype.clearContentonetimeprekeysList = function() { + return this.setContentonetimeprekeysList([]); }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * repeated string notifOneTimePreKeys = 5; + * @return {!Array} */ -proto.identity.client.SenderKeysForUserResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.identity.client.SenderKeysForUserResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.identity.client.UploadOneTimeKeysRequest.prototype.getNotifonetimeprekeysList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 5)); }; /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.identity.client.SenderKeysForUserResponse} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages + * @param {!Array} value + * @return {!proto.identity.client.UploadOneTimeKeysRequest} returns this */ -proto.identity.client.SenderKeysForUserResponse.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.SenderKeyInfo.serializeBinaryToWriter); - } +proto.identity.client.UploadOneTimeKeysRequest.prototype.setNotifonetimeprekeysList = function(value) { + return jspb.Message.setField(this, 5, value || []); }; /** - * map devices = 1; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} + * @param {string} value + * @param {number=} opt_index + * @return {!proto.identity.client.UploadOneTimeKeysRequest} returns this */ -proto.identity.client.SenderKeysForUserResponse.prototype.getDevicesMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 1, opt_noLazyCreate, - proto.identity.client.SenderKeyInfo)); +proto.identity.client.UploadOneTimeKeysRequest.prototype.addNotifonetimeprekeys = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 5, value, opt_index); }; /** - * Clears values from the map. The map will be non-null. - * @return {!proto.identity.client.SenderKeysForUserResponse} returns this + * Clears the list making it empty but non-null. + * @return {!proto.identity.client.UploadOneTimeKeysRequest} returns this */ -proto.identity.client.SenderKeysForUserResponse.prototype.clearDevicesMap = function() { - this.getDevicesMap().clear(); - return this;}; +proto.identity.client.UploadOneTimeKeysRequest.prototype.clearNotifonetimeprekeysList = function() { + return this.setNotifonetimeprekeysList([]); +}; @@ -5605,8 +6547,8 @@ * http://goto/soy-param-migration * @return {!Object} */ -proto.identity.client.KeyserverSessionInfo.prototype.toObject = function(opt_includeInstance) { - return proto.identity.client.KeyserverSessionInfo.toObject(opt_includeInstance, this); +proto.identity.client.RefreshUserPreKeysRequest.prototype.toObject = function(opt_includeInstance) { + return proto.identity.client.RefreshUserPreKeysRequest.toObject(opt_includeInstance, this); }; @@ -5615,15 +6557,14 @@ * @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.KeyserverSessionInfo} msg The msg instance to transform. + * @param {!proto.identity.client.RefreshUserPreKeysRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.identity.client.KeyserverSessionInfo.toObject = function(includeInstance, msg) { +proto.identity.client.RefreshUserPreKeysRequest.toObject = function(includeInstance, msg) { var f, obj = { - identityinfo: (f = msg.getIdentityinfo()) && proto.identity.client.IdentityKeyInfo.toObject(includeInstance, f), - identityprekeys: (f = msg.getIdentityprekeys()) && proto.identity.client.PreKey.toObject(includeInstance, f), - onetimeidentityprekey: jspb.Message.getFieldWithDefault(msg, 5, "") + accesstoken: jspb.Message.getFieldWithDefault(msg, 1, ""), + newprekeys: (f = msg.getNewprekeys()) && proto.identity.client.PreKey.toObject(includeInstance, f) }; if (includeInstance) { @@ -5637,23 +6578,23 @@ /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.identity.client.KeyserverSessionInfo} + * @return {!proto.identity.client.RefreshUserPreKeysRequest} */ -proto.identity.client.KeyserverSessionInfo.deserializeBinary = function(bytes) { +proto.identity.client.RefreshUserPreKeysRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.identity.client.KeyserverSessionInfo; - return proto.identity.client.KeyserverSessionInfo.deserializeBinaryFromReader(msg, reader); + var msg = new proto.identity.client.RefreshUserPreKeysRequest; + return proto.identity.client.RefreshUserPreKeysRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.identity.client.KeyserverSessionInfo} msg The message object to deserialize into. + * @param {!proto.identity.client.RefreshUserPreKeysRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.identity.client.KeyserverSessionInfo} + * @return {!proto.identity.client.RefreshUserPreKeysRequest} */ -proto.identity.client.KeyserverSessionInfo.deserializeBinaryFromReader = function(msg, reader) { +proto.identity.client.RefreshUserPreKeysRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -5661,18 +6602,13 @@ 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.setAccesstoken(value); break; case 2: var value = new proto.identity.client.PreKey; reader.readMessage(value,proto.identity.client.PreKey.deserializeBinaryFromReader); - msg.setIdentityprekeys(value); - break; - case 5: - var value = /** @type {string} */ (reader.readString()); - msg.setOnetimeidentityprekey(value); + msg.setNewprekeys(value); break; default: reader.skipField(); @@ -5687,9 +6623,9 @@ * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.identity.client.KeyserverSessionInfo.prototype.serializeBinary = function() { +proto.identity.client.RefreshUserPreKeysRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.identity.client.KeyserverSessionInfo.serializeBinaryToWriter(this, writer); + proto.identity.client.RefreshUserPreKeysRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -5697,80 +6633,53 @@ /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.identity.client.KeyserverSessionInfo} message + * @param {!proto.identity.client.RefreshUserPreKeysRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.identity.client.KeyserverSessionInfo.serializeBinaryToWriter = function(message, writer) { +proto.identity.client.RefreshUserPreKeysRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getIdentityinfo(); - if (f != null) { - writer.writeMessage( + f = message.getAccesstoken(); + if (f.length > 0) { + writer.writeString( 1, - f, - proto.identity.client.IdentityKeyInfo.serializeBinaryToWriter + f ); } - f = message.getIdentityprekeys(); + f = message.getNewprekeys(); if (f != null) { writer.writeMessage( 2, f, proto.identity.client.PreKey.serializeBinaryToWriter - ); - } - 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.KeyserverSessionInfo.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.KeyserverSessionInfo} returns this -*/ -proto.identity.client.KeyserverSessionInfo.prototype.setIdentityinfo = function(value) { - return jspb.Message.setWrapperField(this, 1, value); + ); + } }; /** - * Clears the message field making it undefined. - * @return {!proto.identity.client.KeyserverSessionInfo} returns this + * optional string accessToken = 1; + * @return {string} */ -proto.identity.client.KeyserverSessionInfo.prototype.clearIdentityinfo = function() { - return this.setIdentityinfo(undefined); +proto.identity.client.RefreshUserPreKeysRequest.prototype.getAccesstoken = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {string} value + * @return {!proto.identity.client.RefreshUserPreKeysRequest} returns this */ -proto.identity.client.KeyserverSessionInfo.prototype.hasIdentityinfo = function() { - return jspb.Message.getField(this, 1) != null; +proto.identity.client.RefreshUserPreKeysRequest.prototype.setAccesstoken = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; /** - * optional PreKey identityPrekeys = 2; + * optional PreKey newPreKeys = 2; * @return {?proto.identity.client.PreKey} */ -proto.identity.client.KeyserverSessionInfo.prototype.getIdentityprekeys = function() { +proto.identity.client.RefreshUserPreKeysRequest.prototype.getNewprekeys = function() { return /** @type{?proto.identity.client.PreKey} */ ( jspb.Message.getWrapperField(this, proto.identity.client.PreKey, 2)); }; @@ -5778,19 +6687,19 @@ /** * @param {?proto.identity.client.PreKey|undefined} value - * @return {!proto.identity.client.KeyserverSessionInfo} returns this + * @return {!proto.identity.client.RefreshUserPreKeysRequest} returns this */ -proto.identity.client.KeyserverSessionInfo.prototype.setIdentityprekeys = function(value) { +proto.identity.client.RefreshUserPreKeysRequest.prototype.setNewprekeys = function(value) { return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. - * @return {!proto.identity.client.KeyserverSessionInfo} returns this + * @return {!proto.identity.client.RefreshUserPreKeysRequest} returns this */ -proto.identity.client.KeyserverSessionInfo.prototype.clearIdentityprekeys = function() { - return this.setIdentityprekeys(undefined); +proto.identity.client.RefreshUserPreKeysRequest.prototype.clearNewprekeys = function() { + return this.setNewprekeys(undefined); }; @@ -5798,73 +6707,11 @@ * Returns whether this field is set. * @return {boolean} */ -proto.identity.client.KeyserverSessionInfo.prototype.hasIdentityprekeys = function() { +proto.identity.client.RefreshUserPreKeysRequest.prototype.hasNewprekeys = function() { return jspb.Message.getField(this, 2) != null; }; -/** - * optional string onetimeIdentityPrekey = 5; - * @return {string} - */ -proto.identity.client.KeyserverSessionInfo.prototype.getOnetimeidentityprekey = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); -}; - - -/** - * @param {string} value - * @return {!proto.identity.client.KeyserverSessionInfo} returns this - */ -proto.identity.client.KeyserverSessionInfo.prototype.setOnetimeidentityprekey = function(value) { - return jspb.Message.setField(this, 5, value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.identity.client.KeyserverSessionInfo} returns this - */ -proto.identity.client.KeyserverSessionInfo.prototype.clearOnetimeidentityprekey = function() { - return jspb.Message.setField(this, 5, undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.identity.client.KeyserverSessionInfo.prototype.hasOnetimeidentityprekey = 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.KeyserverKeysRequest.oneofGroups_ = [[1,2]]; - -/** - * @enum {number} - */ -proto.identity.client.KeyserverKeysRequest.IdentifierCase = { - IDENTIFIER_NOT_SET: 0, - USERNAME: 1, - WALLETADDRESS: 2 -}; - -/** - * @return {proto.identity.client.KeyserverKeysRequest.IdentifierCase} - */ -proto.identity.client.KeyserverKeysRequest.prototype.getIdentifierCase = function() { - return /** @type {proto.identity.client.KeyserverKeysRequest.IdentifierCase} */(jspb.Message.computeOneofCase(this, proto.identity.client.KeyserverKeysRequest.oneofGroups_[0])); -}; @@ -5881,8 +6728,8 @@ * http://goto/soy-param-migration * @return {!Object} */ -proto.identity.client.KeyserverKeysRequest.prototype.toObject = function(opt_includeInstance) { - return proto.identity.client.KeyserverKeysRequest.toObject(opt_includeInstance, this); +proto.identity.client.VerifyUserAccessTokenRequest.prototype.toObject = function(opt_includeInstance) { + return proto.identity.client.VerifyUserAccessTokenRequest.toObject(opt_includeInstance, this); }; @@ -5891,14 +6738,15 @@ * @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.KeyserverKeysRequest} msg The msg instance to transform. + * @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.KeyserverKeysRequest.toObject = function(includeInstance, msg) { +proto.identity.client.VerifyUserAccessTokenRequest.toObject = function(includeInstance, msg) { var f, obj = { - username: jspb.Message.getFieldWithDefault(msg, 1, ""), - walletaddress: jspb.Message.getFieldWithDefault(msg, 2, "") + userid: jspb.Message.getFieldWithDefault(msg, 1, ""), + signingpublickey: jspb.Message.getFieldWithDefault(msg, 2, ""), + accesstoken: jspb.Message.getFieldWithDefault(msg, 3, "") }; if (includeInstance) { @@ -5912,23 +6760,23 @@ /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.identity.client.KeyserverKeysRequest} + * @return {!proto.identity.client.VerifyUserAccessTokenRequest} */ -proto.identity.client.KeyserverKeysRequest.deserializeBinary = function(bytes) { +proto.identity.client.VerifyUserAccessTokenRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.identity.client.KeyserverKeysRequest; - return proto.identity.client.KeyserverKeysRequest.deserializeBinaryFromReader(msg, reader); + 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.KeyserverKeysRequest} msg The message object to deserialize into. + * @param {!proto.identity.client.VerifyUserAccessTokenRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.identity.client.KeyserverKeysRequest} + * @return {!proto.identity.client.VerifyUserAccessTokenRequest} */ -proto.identity.client.KeyserverKeysRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.identity.client.VerifyUserAccessTokenRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -5937,11 +6785,15 @@ switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setUsername(value); + msg.setUserid(value); break; case 2: var value = /** @type {string} */ (reader.readString()); - msg.setWalletaddress(value); + msg.setSigningpublickey(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setAccesstoken(value); break; default: reader.skipField(); @@ -5956,9 +6808,9 @@ * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.identity.client.KeyserverKeysRequest.prototype.serializeBinary = function() { +proto.identity.client.VerifyUserAccessTokenRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.identity.client.KeyserverKeysRequest.serializeBinaryToWriter(this, writer); + proto.identity.client.VerifyUserAccessTokenRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -5966,98 +6818,87 @@ /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.identity.client.KeyserverKeysRequest} message + * @param {!proto.identity.client.VerifyUserAccessTokenRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.identity.client.KeyserverKeysRequest.serializeBinaryToWriter = function(message, writer) { +proto.identity.client.VerifyUserAccessTokenRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = /** @type {string} */ (jspb.Message.getField(message, 1)); - if (f != null) { + f = message.getUserid(); + if (f.length > 0) { writer.writeString( 1, f ); } - f = /** @type {string} */ (jspb.Message.getField(message, 2)); - if (f != null) { + f = message.getSigningpublickey(); + if (f.length > 0) { writer.writeString( 2, f ); } + f = message.getAccesstoken(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } }; /** - * optional string username = 1; + * optional string userID = 1; * @return {string} */ -proto.identity.client.KeyserverKeysRequest.prototype.getUsername = function() { +proto.identity.client.VerifyUserAccessTokenRequest.prototype.getUserid = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.identity.client.KeyserverKeysRequest} returns this + * @return {!proto.identity.client.VerifyUserAccessTokenRequest} returns this */ -proto.identity.client.KeyserverKeysRequest.prototype.setUsername = function(value) { - return jspb.Message.setOneofField(this, 1, proto.identity.client.KeyserverKeysRequest.oneofGroups_[0], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.identity.client.KeyserverKeysRequest} returns this - */ -proto.identity.client.KeyserverKeysRequest.prototype.clearUsername = function() { - return jspb.Message.setOneofField(this, 1, proto.identity.client.KeyserverKeysRequest.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.identity.client.KeyserverKeysRequest.prototype.hasUsername = function() { - return jspb.Message.getField(this, 1) != null; +proto.identity.client.VerifyUserAccessTokenRequest.prototype.setUserid = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; /** - * optional string walletAddress = 2; + * optional string signingPublicKey = 2; * @return {string} */ -proto.identity.client.KeyserverKeysRequest.prototype.getWalletaddress = function() { +proto.identity.client.VerifyUserAccessTokenRequest.prototype.getSigningpublickey = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value - * @return {!proto.identity.client.KeyserverKeysRequest} returns this + * @return {!proto.identity.client.VerifyUserAccessTokenRequest} returns this */ -proto.identity.client.KeyserverKeysRequest.prototype.setWalletaddress = function(value) { - return jspb.Message.setOneofField(this, 2, proto.identity.client.KeyserverKeysRequest.oneofGroups_[0], value); +proto.identity.client.VerifyUserAccessTokenRequest.prototype.setSigningpublickey = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); }; /** - * Clears the field making it undefined. - * @return {!proto.identity.client.KeyserverKeysRequest} returns this + * optional string accessToken = 3; + * @return {string} */ -proto.identity.client.KeyserverKeysRequest.prototype.clearWalletaddress = function() { - return jspb.Message.setOneofField(this, 2, proto.identity.client.KeyserverKeysRequest.oneofGroups_[0], undefined); +proto.identity.client.VerifyUserAccessTokenRequest.prototype.getAccesstoken = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {string} value + * @return {!proto.identity.client.VerifyUserAccessTokenRequest} returns this */ -proto.identity.client.KeyserverKeysRequest.prototype.hasWalletaddress = function() { - return jspb.Message.getField(this, 2) != null; +proto.identity.client.VerifyUserAccessTokenRequest.prototype.setAccesstoken = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); }; @@ -6077,8 +6918,8 @@ * http://goto/soy-param-migration * @return {!Object} */ -proto.identity.client.KeyserverKeysResponse.prototype.toObject = function(opt_includeInstance) { - return proto.identity.client.KeyserverKeysResponse.toObject(opt_includeInstance, this); +proto.identity.client.VerifyUserAccessTokenResponse.prototype.toObject = function(opt_includeInstance) { + return proto.identity.client.VerifyUserAccessTokenResponse.toObject(opt_includeInstance, this); }; @@ -6087,13 +6928,13 @@ * @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.KeyserverKeysResponse} msg The msg instance to transform. + * @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.KeyserverKeysResponse.toObject = function(includeInstance, msg) { +proto.identity.client.VerifyUserAccessTokenResponse.toObject = function(includeInstance, msg) { var f, obj = { - keyserverinfo: (f = msg.getKeyserverinfo()) && proto.identity.client.KeyserverSessionInfo.toObject(includeInstance, f) + tokenvalid: jspb.Message.getBooleanFieldWithDefault(msg, 1, false) }; if (includeInstance) { @@ -6107,23 +6948,23 @@ /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.identity.client.KeyserverKeysResponse} + * @return {!proto.identity.client.VerifyUserAccessTokenResponse} */ -proto.identity.client.KeyserverKeysResponse.deserializeBinary = function(bytes) { +proto.identity.client.VerifyUserAccessTokenResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.identity.client.KeyserverKeysResponse; - return proto.identity.client.KeyserverKeysResponse.deserializeBinaryFromReader(msg, reader); + 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.KeyserverKeysResponse} msg The message object to deserialize into. + * @param {!proto.identity.client.VerifyUserAccessTokenResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.identity.client.KeyserverKeysResponse} + * @return {!proto.identity.client.VerifyUserAccessTokenResponse} */ -proto.identity.client.KeyserverKeysResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.identity.client.VerifyUserAccessTokenResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -6131,9 +6972,8 @@ var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.identity.client.KeyserverSessionInfo; - reader.readMessage(value,proto.identity.client.KeyserverSessionInfo.deserializeBinaryFromReader); - msg.setKeyserverinfo(value); + var value = /** @type {boolean} */ (reader.readBool()); + msg.setTokenvalid(value); break; default: reader.skipField(); @@ -6148,9 +6988,9 @@ * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.identity.client.KeyserverKeysResponse.prototype.serializeBinary = function() { +proto.identity.client.VerifyUserAccessTokenResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.identity.client.KeyserverKeysResponse.serializeBinaryToWriter(this, writer); + proto.identity.client.VerifyUserAccessTokenResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -6158,68 +6998,41 @@ /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.identity.client.KeyserverKeysResponse} message + * @param {!proto.identity.client.VerifyUserAccessTokenResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.identity.client.KeyserverKeysResponse.serializeBinaryToWriter = function(message, writer) { +proto.identity.client.VerifyUserAccessTokenResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getKeyserverinfo(); - if (f != null) { - writer.writeMessage( + f = message.getTokenvalid(); + if (f) { + writer.writeBool( 1, - f, - proto.identity.client.KeyserverSessionInfo.serializeBinaryToWriter + f ); } }; /** - * optional KeyserverSessionInfo keyserverInfo = 1; - * @return {?proto.identity.client.KeyserverSessionInfo} - */ -proto.identity.client.KeyserverKeysResponse.prototype.getKeyserverinfo = function() { - return /** @type{?proto.identity.client.KeyserverSessionInfo} */ ( - jspb.Message.getWrapperField(this, proto.identity.client.KeyserverSessionInfo, 1)); -}; - - -/** - * @param {?proto.identity.client.KeyserverSessionInfo|undefined} value - * @return {!proto.identity.client.KeyserverKeysResponse} returns this -*/ -proto.identity.client.KeyserverKeysResponse.prototype.setKeyserverinfo = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.identity.client.KeyserverKeysResponse} returns this + * optional bool tokenValid = 1; + * @return {boolean} */ -proto.identity.client.KeyserverKeysResponse.prototype.clearKeyserverinfo = function() { - return this.setKeyserverinfo(undefined); +proto.identity.client.VerifyUserAccessTokenResponse.prototype.getTokenvalid = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {boolean} value + * @return {!proto.identity.client.VerifyUserAccessTokenResponse} returns this */ -proto.identity.client.KeyserverKeysResponse.prototype.hasKeyserverinfo = function() { - return jspb.Message.getField(this, 1) != null; +proto.identity.client.VerifyUserAccessTokenResponse.prototype.setTokenvalid = function(value) { + return jspb.Message.setProto3BooleanField(this, 1, value); }; -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.identity.client.UploadOneTimeKeysRequest.repeatedFields_ = [2]; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -6235,8 +7048,8 @@ * 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.AddReservedUsernamesRequest.prototype.toObject = function(opt_includeInstance) { + return proto.identity.client.AddReservedUsernamesRequest.toObject(opt_includeInstance, this); }; @@ -6245,14 +7058,14 @@ * @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.AddReservedUsernamesRequest} 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.AddReservedUsernamesRequest.toObject = function(includeInstance, msg) { var f, obj = { - accesstoken: jspb.Message.getFieldWithDefault(msg, 1, ""), - onetimeprekeysList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f + message: jspb.Message.getFieldWithDefault(msg, 1, ""), + signature: jspb.Message.getFieldWithDefault(msg, 2, "") }; if (includeInstance) { @@ -6266,23 +7079,23 @@ /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.identity.client.UploadOneTimeKeysRequest} + * @return {!proto.identity.client.AddReservedUsernamesRequest} */ -proto.identity.client.UploadOneTimeKeysRequest.deserializeBinary = function(bytes) { +proto.identity.client.AddReservedUsernamesRequest.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.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.UploadOneTimeKeysRequest} msg The message object to deserialize into. + * @param {!proto.identity.client.AddReservedUsernamesRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.identity.client.UploadOneTimeKeysRequest} + * @return {!proto.identity.client.AddReservedUsernamesRequest} */ -proto.identity.client.UploadOneTimeKeysRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.identity.client.AddReservedUsernamesRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -6291,11 +7104,11 @@ switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setAccesstoken(value); + msg.setMessage(value); break; case 2: var value = /** @type {string} */ (reader.readString()); - msg.addOnetimeprekeys(value); + msg.setSignature(value); break; default: reader.skipField(); @@ -6310,9 +7123,9 @@ * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.identity.client.UploadOneTimeKeysRequest.prototype.serializeBinary = function() { +proto.identity.client.AddReservedUsernamesRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.identity.client.UploadOneTimeKeysRequest.serializeBinaryToWriter(this, writer); + proto.identity.client.AddReservedUsernamesRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -6320,22 +7133,22 @@ /** * 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.AddReservedUsernamesRequest} 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.AddReservedUsernamesRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getAccesstoken(); + f = message.getMessage(); if (f.length > 0) { writer.writeString( 1, f ); } - f = message.getOnetimeprekeysList(); + f = message.getSignature(); if (f.length > 0) { - writer.writeRepeatedString( + writer.writeString( 2, f ); @@ -6344,57 +7157,38 @@ /** - * optional string accessToken = 1; + * optional string message = 1; * @return {string} */ -proto.identity.client.UploadOneTimeKeysRequest.prototype.getAccesstoken = function() { +proto.identity.client.AddReservedUsernamesRequest.prototype.getMessage = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.identity.client.UploadOneTimeKeysRequest} returns this + * @return {!proto.identity.client.AddReservedUsernamesRequest} returns this */ -proto.identity.client.UploadOneTimeKeysRequest.prototype.setAccesstoken = function(value) { +proto.identity.client.AddReservedUsernamesRequest.prototype.setMessage = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** - * repeated string oneTimePreKeys = 2; - * @return {!Array} - */ -proto.identity.client.UploadOneTimeKeysRequest.prototype.getOnetimeprekeysList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); -}; - - -/** - * @param {!Array} value - * @return {!proto.identity.client.UploadOneTimeKeysRequest} returns this + * optional string signature = 2; + * @return {string} */ -proto.identity.client.UploadOneTimeKeysRequest.prototype.setOnetimeprekeysList = function(value) { - return jspb.Message.setField(this, 2, value || []); +proto.identity.client.AddReservedUsernamesRequest.prototype.getSignature = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value - * @param {number=} opt_index - * @return {!proto.identity.client.UploadOneTimeKeysRequest} returns this + * @return {!proto.identity.client.AddReservedUsernamesRequest} returns this */ -proto.identity.client.UploadOneTimeKeysRequest.prototype.addOnetimeprekeys = 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.client.UploadOneTimeKeysRequest} returns this - */ -proto.identity.client.UploadOneTimeKeysRequest.prototype.clearOnetimeprekeysList = function() { - return this.setOnetimeprekeysList([]); +proto.identity.client.AddReservedUsernamesRequest.prototype.setSignature = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); }; @@ -6414,8 +7208,8 @@ * http://goto/soy-param-migration * @return {!Object} */ -proto.identity.client.RefreshUserPreKeysRequest.prototype.toObject = function(opt_includeInstance) { - return proto.identity.client.RefreshUserPreKeysRequest.toObject(opt_includeInstance, this); +proto.identity.client.RemoveReservedUsernameRequest.prototype.toObject = function(opt_includeInstance) { + return proto.identity.client.RemoveReservedUsernameRequest.toObject(opt_includeInstance, this); }; @@ -6424,14 +7218,14 @@ * @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.RefreshUserPreKeysRequest} msg The msg instance to transform. + * @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.RefreshUserPreKeysRequest.toObject = function(includeInstance, msg) { +proto.identity.client.RemoveReservedUsernameRequest.toObject = function(includeInstance, msg) { var f, obj = { - accesstoken: jspb.Message.getFieldWithDefault(msg, 1, ""), - newprekeys: (f = msg.getNewprekeys()) && proto.identity.client.PreKey.toObject(includeInstance, f) + message: jspb.Message.getFieldWithDefault(msg, 1, ""), + signature: jspb.Message.getFieldWithDefault(msg, 2, "") }; if (includeInstance) { @@ -6445,23 +7239,23 @@ /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.identity.client.RefreshUserPreKeysRequest} + * @return {!proto.identity.client.RemoveReservedUsernameRequest} */ -proto.identity.client.RefreshUserPreKeysRequest.deserializeBinary = function(bytes) { +proto.identity.client.RemoveReservedUsernameRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.identity.client.RefreshUserPreKeysRequest; - return proto.identity.client.RefreshUserPreKeysRequest.deserializeBinaryFromReader(msg, reader); + 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.RefreshUserPreKeysRequest} msg The message object to deserialize into. + * @param {!proto.identity.client.RemoveReservedUsernameRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.identity.client.RefreshUserPreKeysRequest} + * @return {!proto.identity.client.RemoveReservedUsernameRequest} */ -proto.identity.client.RefreshUserPreKeysRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.identity.client.RemoveReservedUsernameRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -6470,12 +7264,11 @@ switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setAccesstoken(value); + msg.setMessage(value); break; case 2: - var value = new proto.identity.client.PreKey; - reader.readMessage(value,proto.identity.client.PreKey.deserializeBinaryFromReader); - msg.setNewprekeys(value); + var value = /** @type {string} */ (reader.readString()); + msg.setSignature(value); break; default: reader.skipField(); @@ -6490,9 +7283,9 @@ * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.identity.client.RefreshUserPreKeysRequest.prototype.serializeBinary = function() { +proto.identity.client.RemoveReservedUsernameRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.identity.client.RefreshUserPreKeysRequest.serializeBinaryToWriter(this, writer); + proto.identity.client.RemoveReservedUsernameRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -6500,84 +7293,75 @@ /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.identity.client.RefreshUserPreKeysRequest} message + * @param {!proto.identity.client.RemoveReservedUsernameRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.identity.client.RefreshUserPreKeysRequest.serializeBinaryToWriter = function(message, writer) { +proto.identity.client.RemoveReservedUsernameRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getAccesstoken(); + f = message.getMessage(); if (f.length > 0) { writer.writeString( 1, f ); } - f = message.getNewprekeys(); - if (f != null) { - writer.writeMessage( + f = message.getSignature(); + if (f.length > 0) { + writer.writeString( 2, - f, - proto.identity.client.PreKey.serializeBinaryToWriter + f ); } }; /** - * optional string accessToken = 1; + * optional string message = 1; * @return {string} */ -proto.identity.client.RefreshUserPreKeysRequest.prototype.getAccesstoken = function() { +proto.identity.client.RemoveReservedUsernameRequest.prototype.getMessage = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.identity.client.RefreshUserPreKeysRequest} returns this + * @return {!proto.identity.client.RemoveReservedUsernameRequest} returns this */ -proto.identity.client.RefreshUserPreKeysRequest.prototype.setAccesstoken = function(value) { +proto.identity.client.RemoveReservedUsernameRequest.prototype.setMessage = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** - * optional PreKey newPreKeys = 2; - * @return {?proto.identity.client.PreKey} + * optional string signature = 2; + * @return {string} */ -proto.identity.client.RefreshUserPreKeysRequest.prototype.getNewprekeys = 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.RefreshUserPreKeysRequest} returns this -*/ -proto.identity.client.RefreshUserPreKeysRequest.prototype.setNewprekeys = function(value) { - return jspb.Message.setWrapperField(this, 2, value); +proto.identity.client.RemoveReservedUsernameRequest.prototype.getSignature = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * Clears the message field making it undefined. - * @return {!proto.identity.client.RefreshUserPreKeysRequest} returns this + * @param {string} value + * @return {!proto.identity.client.RemoveReservedUsernameRequest} returns this */ -proto.identity.client.RefreshUserPreKeysRequest.prototype.clearNewprekeys = function() { - return this.setNewprekeys(undefined); +proto.identity.client.RemoveReservedUsernameRequest.prototype.setSignature = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); }; /** - * Returns whether this field is set. - * @return {boolean} + * @enum {number} */ -proto.identity.client.RefreshUserPreKeysRequest.prototype.hasNewprekeys = function() { - return jspb.Message.getField(this, 2) != null; +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 --- a/web/protobufs/identity-structs.cjs.flow +++ b/web/protobufs/identity-structs.cjs.flow @@ -68,26 +68,29 @@ hasDevicekeyinfo(): boolean; clearDevicekeyinfo(): DeviceKeyUpload; - getIdentityupload(): PreKey | void; - setIdentityupload(value?: PreKey): DeviceKeyUpload; - hasIdentityupload(): boolean; - clearIdentityupload(): DeviceKeyUpload; + getContentupload(): PreKey | void; + setContentupload(value?: PreKey): DeviceKeyUpload; + hasContentupload(): boolean; + clearContentupload(): DeviceKeyUpload; getNotifupload(): PreKey | void; setNotifupload(value?: PreKey): DeviceKeyUpload; hasNotifupload(): boolean; clearNotifupload(): DeviceKeyUpload; - getOnetimeidentityprekeysList(): Array; - setOnetimeidentityprekeysList(value: Array): DeviceKeyUpload; - clearOnetimeidentityprekeysList(): DeviceKeyUpload; - addOnetimeidentityprekeys(value: string, index?: number): 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; @@ -132,6 +135,42 @@ 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; @@ -177,6 +216,9 @@ }; declare export class RegistrationFinishResponse extends Message { + getUserid(): string; + setUserid(value: string): RegistrationFinishResponse; + getAccesstoken(): string; setAccesstoken(value: string): RegistrationFinishResponse; @@ -189,6 +231,7 @@ } export type RegistrationFinishResponseObject = { + userid: string, accesstoken: string, }; @@ -201,6 +244,12 @@ 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; @@ -212,6 +261,8 @@ export type UpdateUserPasswordStartRequestObject = { opaqueregistrationrequest: Uint8Array | string, accesstoken: string, + userid: string, + deviceidkey: string, }; declare export class UpdateUserPasswordFinishRequest extends Message { @@ -258,22 +309,6 @@ opaqueregistrationresponse: Uint8Array | string, }; -declare export class UpdateUserPasswordFinishResponse extends Message { - getAccesstoken(): string; - setAccesstoken(value: string): UpdateUserPasswordFinishResponse; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): UpdateUserPasswordFinishResponseObject; - static toObject(includeInstance: boolean, msg: UpdateUserPasswordFinishResponse): UpdateUserPasswordFinishResponseObject; - static serializeBinaryToWriter(message: UpdateUserPasswordFinishResponse, writer: BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): UpdateUserPasswordFinishResponse; - static deserializeBinaryFromReader(message: UpdateUserPasswordFinishResponse, reader: BinaryReader): UpdateUserPasswordFinishResponse; -} - -export type UpdateUserPasswordFinishResponseObject = { - accesstoken: string, -}; - declare export class OpaqueLoginStartRequest extends Message { getUsername(): string; setUsername(value: string): OpaqueLoginStartRequest; @@ -347,6 +382,9 @@ }; declare export class OpaqueLoginFinishResponse extends Message { + getUserid(): string; + setUserid(value: string): OpaqueLoginFinishResponse; + getAccesstoken(): string; setAccesstoken(value: string): OpaqueLoginFinishResponse; @@ -359,6 +397,7 @@ } export type OpaqueLoginFinishResponseObject = { + userid: string, accesstoken: string, }; @@ -389,6 +428,9 @@ }; declare export class WalletLoginResponse extends Message { + getUserid(): string; + setUserid(value: string): WalletLoginResponse; + getAccesstoken(): string; setAccesstoken(value: string): WalletLoginResponse; @@ -401,13 +443,44 @@ } 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; @@ -418,6 +491,8 @@ export type DeleteUserRequestObject = { accesstoken: string, + userid: string, + deviceidkey: string, }; declare export class GenerateNonceResponse extends Message { @@ -436,234 +511,176 @@ nonce: string, }; -declare export class ReceiverKeyInfo extends Message { +declare export class OutboundKeyInfo extends Message { getIdentityinfo(): IdentityKeyInfo | void; - setIdentityinfo(value?: IdentityKeyInfo): ReceiverKeyInfo; + setIdentityinfo(value?: IdentityKeyInfo): OutboundKeyInfo; hasIdentityinfo(): boolean; - clearIdentityinfo(): ReceiverKeyInfo; + clearIdentityinfo(): OutboundKeyInfo; - getIdentityprekey(): PreKey | void; - setIdentityprekey(value?: PreKey): ReceiverKeyInfo; - hasIdentityprekey(): boolean; - clearIdentityprekey(): ReceiverKeyInfo; + getContentprekey(): PreKey | void; + setContentprekey(value?: PreKey): OutboundKeyInfo; + hasContentprekey(): boolean; + clearContentprekey(): OutboundKeyInfo; getNotifprekey(): PreKey | void; - setNotifprekey(value?: PreKey): ReceiverKeyInfo; + setNotifprekey(value?: PreKey): OutboundKeyInfo; hasNotifprekey(): boolean; - clearNotifprekey(): ReceiverKeyInfo; + clearNotifprekey(): OutboundKeyInfo; - getOnetimeidentityprekey(): string; - setOnetimeidentityprekey(value: string): ReceiverKeyInfo; - hasOnetimeidentityprekey(): boolean; - clearOnetimeidentityprekey(): ReceiverKeyInfo; + getOnetimecontentprekey(): string; + setOnetimecontentprekey(value: string): OutboundKeyInfo; + hasOnetimecontentprekey(): boolean; + clearOnetimecontentprekey(): OutboundKeyInfo; getOnetimenotifprekey(): string; - setOnetimenotifprekey(value: string): ReceiverKeyInfo; + setOnetimenotifprekey(value: string): OutboundKeyInfo; hasOnetimenotifprekey(): boolean; - clearOnetimenotifprekey(): ReceiverKeyInfo; + clearOnetimenotifprekey(): OutboundKeyInfo; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ReceiverKeyInfoObject; - static toObject(includeInstance: boolean, msg: ReceiverKeyInfo): ReceiverKeyInfoObject; - static serializeBinaryToWriter(message: ReceiverKeyInfo, writer: BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ReceiverKeyInfo; - static deserializeBinaryFromReader(message: ReceiverKeyInfo, reader: BinaryReader): ReceiverKeyInfo; + 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 ReceiverKeyInfoObject = { +export type OutboundKeyInfoObject = { identityinfo?: IdentityKeyInfoObject, - identityprekey?: PreKeyObject, + contentprekey?: PreKeyObject, notifprekey?: PreKeyObject, - onetimeidentityprekey?: string, + onetimecontentprekey?: string, onetimenotifprekey?: string, }; export type IdentifierCase = 0 | 1 | 2; -declare export class ReceiverKeysForUserRequest extends Message { +declare export class OutboundKeysForUserRequest extends Message { getUsername(): string; - setUsername(value: string): ReceiverKeysForUserRequest; + setUsername(value: string): OutboundKeysForUserRequest; getWalletaddress(): string; - setWalletaddress(value: string): ReceiverKeysForUserRequest; + setWalletaddress(value: string): OutboundKeysForUserRequest; getIdentifierCase(): IdentifierCase; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ReceiverKeysForUserRequestObject; - static toObject(includeInstance: boolean, msg: ReceiverKeysForUserRequest): ReceiverKeysForUserRequestObject; - static serializeBinaryToWriter(message: ReceiverKeysForUserRequest, writer: BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ReceiverKeysForUserRequest; - static deserializeBinaryFromReader(message: ReceiverKeysForUserRequest, reader: BinaryReader): ReceiverKeysForUserRequest; + 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 ReceiverKeysForUserRequestObject = { +export type OutboundKeysForUserRequestObject = { username: string, walletaddress: string, }; -declare export class ReceiverKeysForUserResponse extends Message { - getDevicesMap(): ProtoMap; - clearDevicesMap(): ReceiverKeysForUserResponse; +declare export class OutboundKeysForUserResponse extends Message { + getDevicesMap(): ProtoMap; + clearDevicesMap(): OutboundKeysForUserResponse; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ReceiverKeysForUserResponseObject; - static toObject(includeInstance: boolean, msg: ReceiverKeysForUserResponse): ReceiverKeysForUserResponseObject; - static serializeBinaryToWriter(message: ReceiverKeysForUserResponse, writer: BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ReceiverKeysForUserResponse; - static deserializeBinaryFromReader(message: ReceiverKeysForUserResponse, reader: BinaryReader): ReceiverKeysForUserResponse; + 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 ReceiverKeysForUserResponseObject = { - devicesMap: Array<[string, ReceiverKeyInfoObject]>, +export type OutboundKeysForUserResponseObject = { + devicesMap: Array<[string, OutboundKeyInfoObject]>, }; -declare export class SenderKeyInfo extends Message { +declare export class InboundKeyInfo extends Message { getIdentityinfo(): IdentityKeyInfo | void; - setIdentityinfo(value?: IdentityKeyInfo): SenderKeyInfo; + setIdentityinfo(value?: IdentityKeyInfo): InboundKeyInfo; hasIdentityinfo(): boolean; - clearIdentityinfo(): SenderKeyInfo; + clearIdentityinfo(): InboundKeyInfo; - getIdentityprekey(): PreKey | void; - setIdentityprekey(value?: PreKey): SenderKeyInfo; - hasIdentityprekey(): boolean; - clearIdentityprekey(): SenderKeyInfo; + getContentprekey(): PreKey | void; + setContentprekey(value?: PreKey): InboundKeyInfo; + hasContentprekey(): boolean; + clearContentprekey(): InboundKeyInfo; getNotifprekey(): PreKey | void; - setNotifprekey(value?: PreKey): SenderKeyInfo; + setNotifprekey(value?: PreKey): InboundKeyInfo; hasNotifprekey(): boolean; - clearNotifprekey(): SenderKeyInfo; + clearNotifprekey(): InboundKeyInfo; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SenderKeyInfoObject; - static toObject(includeInstance: boolean, msg: SenderKeyInfo): SenderKeyInfoObject; - static serializeBinaryToWriter(message: SenderKeyInfo, writer: BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SenderKeyInfo; - static deserializeBinaryFromReader(message: SenderKeyInfo, reader: BinaryReader): SenderKeyInfo; + 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 SenderKeyInfoObject = { +export type InboundKeyInfoObject = { identityinfo?: IdentityKeyInfoObject, - identityprekey?: PreKeyObject, + contentprekey?: PreKeyObject, notifprekey?: PreKeyObject, }; -declare export class SenderKeysForUserRequest extends Message { + +declare export class InboundKeysForUserRequest extends Message { getUsername(): string; - setUsername(value: string): SenderKeysForUserRequest; + setUsername(value: string): InboundKeysForUserRequest; getWalletaddress(): string; - setWalletaddress(value: string): SenderKeysForUserRequest; + setWalletaddress(value: string): InboundKeysForUserRequest; getIdentifierCase(): IdentifierCase; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SenderKeysForUserRequestObject; - static toObject(includeInstance: boolean, msg: SenderKeysForUserRequest): SenderKeysForUserRequestObject; - static serializeBinaryToWriter(message: SenderKeysForUserRequest, writer: BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SenderKeysForUserRequest; - static deserializeBinaryFromReader(message: SenderKeysForUserRequest, reader: BinaryReader): SenderKeysForUserRequest; + 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 SenderKeysForUserRequestObject = { +export type InboundKeysForUserRequestObject = { username: string, walletaddress: string, }; -declare export class SenderKeysForUserResponse extends Message { - getDevicesMap(): ProtoMap; - clearDevicesMap(): SenderKeysForUserResponse; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SenderKeysForUserResponseObject; - static toObject(includeInstance: boolean, msg: SenderKeysForUserResponse): SenderKeysForUserResponseObject; - static serializeBinaryToWriter(message: SenderKeysForUserResponse, writer: BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SenderKeysForUserResponse; - static deserializeBinaryFromReader(message: SenderKeysForUserResponse, reader: BinaryReader): SenderKeysForUserResponse; -} - -export type SenderKeysForUserResponseObject = { - devicesMap: Array<[string, SenderKeyInfoObject]>, -} - -declare export class KeyserverSessionInfo extends Message { - getIdentityinfo(): IdentityKeyInfo | void; - setIdentityinfo(value?: IdentityKeyInfo): KeyserverSessionInfo; - hasIdentityinfo(): boolean; - clearIdentityinfo(): KeyserverSessionInfo; - - getIdentityprekeys(): PreKey | void; - setIdentityprekeys(value?: PreKey): KeyserverSessionInfo; - hasIdentityprekeys(): boolean; - clearIdentityprekeys(): KeyserverSessionInfo; - - getOnetimeidentityprekey(): string; - setOnetimeidentityprekey(value: string): KeyserverSessionInfo; - hasOnetimeidentityprekey(): boolean; - clearOnetimeidentityprekey(): KeyserverSessionInfo; +declare export class InboundKeysForUserResponse extends Message { + getDevicesMap(): ProtoMap; + clearDevicesMap(): InboundKeysForUserResponse; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): KeyserverSessionInfoObject; - static toObject(includeInstance: boolean, msg: KeyserverSessionInfo): KeyserverSessionInfoObject; - static serializeBinaryToWriter(message: KeyserverSessionInfo, writer: BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): KeyserverSessionInfo; - static deserializeBinaryFromReader(message: KeyserverSessionInfo, reader: BinaryReader): KeyserverSessionInfo; + 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 KeyserverSessionInfoObject = { - identityinfo?: IdentityKeyInfoObject, - identityprekeys?: PreKeyObject, - onetimeidentityprekey?: string, -}; - -declare export class KeyserverKeysRequest extends Message { - getUsername(): string; - setUsername(value: string): KeyserverKeysRequest; - - getWalletaddress(): string; - setWalletaddress(value: string): KeyserverKeysRequest; - - getIdentifierCase(): IdentifierCase; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): KeyserverKeysRequestObject; - static toObject(includeInstance: boolean, msg: KeyserverKeysRequest): KeyserverKeysRequestObject; - static serializeBinaryToWriter(message: KeyserverKeysRequest, writer: BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): KeyserverKeysRequest; - static deserializeBinaryFromReader(message: KeyserverKeysRequest, reader: BinaryReader): KeyserverKeysRequest; +export type InboundKeysForUserResponseObject = { + devicesMap: Array<[string, InboundKeyInfoObject]>, } -export type KeyserverKeysRequestObject = { - username: string, - walletaddress: string, -}; - -declare export class KeyserverKeysResponse extends Message { - getKeyserverinfo(): KeyserverSessionInfo | void; - setKeyserverinfo(value?: KeyserverSessionInfo): 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; -} +declare export class UploadOneTimeKeysRequest extends Message { + getUserid(): string; + setUserid(value: string): UploadOneTimeKeysRequest; -export type KeyserverKeysResponseObject = { - keyserverinfo?: KeyserverSessionInfoObject, -}; + getDeviceid(): string; + setDeviceid(value: string): UploadOneTimeKeysRequest; -declare export class UploadOneTimeKeysRequest extends Message { getAccesstoken(): string; setAccesstoken(value: string): UploadOneTimeKeysRequest; - getOnetimeprekeysList(): Array; - setOnetimeprekeysList(value: Array): UploadOneTimeKeysRequest; - clearOnetimeprekeysList(): UploadOneTimeKeysRequest; - addOnetimeprekeys(value: string, index?: number): 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; @@ -674,8 +691,11 @@ } export type UploadOneTimeKeysRequestObject = { + userid: string, + deviceid: string, accesstoken: string, - onetimeprekeysList: Array, + contentonetimeprekeysList: Array, + notifonetimeprekeysList: Array, }; declare export class RefreshUserPreKeysRequest extends Message { @@ -699,3 +719,85 @@ accesstoken: string, newprekeys?: PreKeyObject, }; + +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;