diff --git a/web/flow-typed/npm/google-protobuf_v3.6.x.js b/web/flow-typed/npm/google-protobuf_v3.6.x.js new file mode 100644 --- /dev/null +++ b/web/flow-typed/npm/google-protobuf_v3.6.x.js @@ -0,0 +1,684 @@ +// flow-typed signature: c87594e65be57d0f43f1dcddf1718096 +// flow-typed version: 1e57dbbb4e/google-protobuf_v3.6.x/flow_>=v0.83.x + +/** + * Based on typescript definitions found at the url below + * https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/google-protobuf + */ + +declare module 'google-protobuf' { + declare type ByteSource = ArrayBuffer | Uint8Array | number[] | string; + declare type ScalarFieldType = boolean | number | string; + declare type RepeatedFieldType = ScalarFieldType[] | Uint8Array[]; + declare type AnyFieldType = ScalarFieldType | RepeatedFieldType | Uint8Array; + declare type FieldValue = + | string + | number + | boolean + | Uint8Array + | FieldValueArray + | typeof undefined; + declare type FieldValueArray = Array; + + declare type Message$MessageArray = any[]; // This type needs to reference itself + declare type Message$StaticToObject = ( + includeInstance: boolean, + msg: Message + ) => {}; + + declare export class Message { + getJsPbMessageId: () => ?string; + static initialize: ( + msg: Message, + data: Message$MessageArray, + messageId: string | number, + suggestedPivot: number, + repeatedFields?: number[], + oneofFields?: number[][] | null + ) => void; + static toObjectList: ( + field: T[], + toObjectFn: (includeInstance: boolean, data: T) => {}, + includeInstance?: boolean + ) => Array<{}>; + static toObjectExtension: ( + msg: Message, + obj: {}, + extensions: { [key: number]: ExtensionFieldInfo }, + getExtensionFn: (fieldInfo: ExtensionFieldInfo) => Message, + includeInstance?: boolean + ) => void; + serializeBinaryExtensions: ( + proto: Message, + writer: BinaryWriter, + extensions: { [key: number]: ExtensionFieldBinaryInfo }, + getExtensionFn: (fieldInfo: ExtensionFieldInfo) => T + ) => void; + readBinaryExtension: ( + proto: Message, + reader: BinaryReader, + extensions: { [key: number]: ExtensionFieldBinaryInfo }, + setExtensionFn: (fieldInfo: ExtensionFieldInfo, val: T) => void + ) => void; + static getField: (msg: Message, fieldNumber: number) => FieldValue | null; + static getOptionalFloatingPointField: ( + msg: Message, + fieldNumber: number + ) => ?number; + static getRepeatedFloatingPointField: ( + msg: Message, + fieldNumber: number + ) => number[]; + static bytesAsB64: (bytes: Uint8Array) => string; + static bytesAsU8: (str: string) => Uint8Array; + static bytesListAsB64: (bytesList: Uint8Array[]) => string[]; + static bytesListAsU8: (strList: string[]) => Uint8Array[]; + static getFieldWithDefault: ( + msg: Message, + fieldNumber: number, + defaultValue: T + ) => T; + static getMapField: ( + msg: Message, + fieldNumber: number, + noLazyCreate: boolean, + valueCtor: typeof Message + ) => Map; + static setField: ( + msg: Message, + fieldNumber: number, + value: FieldValue + ) => void; + static addToRepeatedField: ( + msg: Message, + fieldNumber: number, + value: any, + index?: number + ) => void; + static setOneofField: ( + msg: Message, + fieldNumber: number, + oneof: number[], + value: FieldValue + ) => void; + static computeOneofCase: (msg: Message, oneof: number[]) => number; + static getWrapperField: ( + msg: Message, + ctor: { new(): T }, + fieldNumber: number, + required?: number + ) => T; + static getRepeatedWrapperField: ( + msg: Message, + ctor: { new(): T }, + fieldNumber: number + ) => T[]; + static setWrapperField: ( + msg: Message, + fieldNumber: number, + value?: T | Map + ) => void; + static setOneofWrapperField: ( + msg: Message, + fieldNumber: number, + oneof: number[], + value: any + ) => void; + static setRepeatedWrapperField: ( + msg: Message, + fieldNumber: number, + value?: T[] + ) => void; + static addToRepeatedWrapperField: ( + msg: Message, + fieldNumber: number, + value: ?T, + ctor: { new(): T }, + index?: number + ) => T; + static toMap: ( + field: any[], + mapKeyGetterFn: (field: any) => string, + toObjectFn?: Message$StaticToObject, + includeInstance?: boolean + ) => void; + toArray: () => Message$MessageArray; + toString: () => string; + getExtension: (fieldInfo: ExtensionFieldInfo) => T; + setExtension: (fieldInfo: ExtensionFieldInfo, value: T) => void; + static difference: (m1: T, m2: T) => T; + static equals: (m1: Message, m2: Message) => boolean; + static compareExtensions: (extension1: {}, extension2: {}) => boolean; + static compareFields: (field1: any, field2: any) => boolean; + cloneMessage: () => Message; + clone: () => Message; + static clone: (msg: T) => T; + static cloneMessage: (msg: T) => T; + static copyInto: (fromMessage: Message, toMessage: Message) => void; + static registerMessageType: ( + id: number, + constructor: typeof Message + ) => void; + + // $FlowFixMe: flow doesn't support abstract instance method definitions. + // /*abstract */ serializeBinary: () => Uint8Array; + // /*abstract */ toObject: (includeInstance?: boolean) => {}; + + // These are `abstract static`, but that isn't allowed. Subclasses of Message will have these methods and properties + // and not having them on Message makes using this class for its intended purpose quite difficult. + // static deserializeBinary: (bytes: Uint8Array) => Message; + // static deserializeBinaryFromReader: ( + // message: Message, + // reader: BinaryReader + // ) => Message; + // static serializeBinaryToWriter: ( + // message: Message, + // writer: BinaryWriter + // ) => void; + // static toObject: (includeInstance: boolean, msg: Message) => {}; + // static extensions: { [key: number]: ExtensionFieldInfo }; + // static extensionsBinary: { + // [key: number]: ExtensionFieldBinaryInfo + // }; + } + + declare export class ExtensionFieldInfo { + fieldIndex: number; + fieldName: number; + ctor: typeof Message; + toObjectFn: Message$StaticToObject; + isRepeated: number; + constructor( + fieldIndex: number, + fieldName: { [key: string]: number }, + ctor: typeof Message, + toObjectFn: Message$StaticToObject, + isRepeated: number + ): ExtensionFieldInfo; + isMessageType: () => boolean; + } + + declare export class ExtensionFieldBinaryInfo { + fieldInfo: ExtensionFieldInfo; + binaryReaderFn: BinaryRead; + binaryWriterFn: BinaryWrite; + opt_binaryMessageSerializeFn: (msg: Message, writer: BinaryWriter) => void; + opt_binaryMessageDeserializeFn: ( + msg: Message, + reader: BinaryReader + ) => Message; + opt_isPacked: boolean; + constructor( + fieldInfo: ExtensionFieldInfo, + binaryReaderFn: BinaryRead, + binaryWriterFn: BinaryWrite, + opt_binaryMessageSerializeFn: ( + msg: Message, + writer: BinaryWriter + ) => void, + opt_binaryMessageDeserializeFn: ( + msg: Message, + reader: BinaryReader + ) => Message, + opt_isPacked: boolean + ): ExtensionFieldBinaryInfo; + } + + declare export class Map { + constructor( + arr: Array<[K, V]>, + valueCtor?: { new(init: any): V } + ): Map; + toArray: () => Array<[K, V]>; + toObject: (includeInstance?: boolean) => Array<[K, V]>; + toObject: ( + includeInstance: boolean, + valueToObject: (includeInstance: boolean, valueWrapper: V) => VO + ) => Array<[K, VO]>; + static fromObject: ( + entries: Array<[TK, TV]>, + valueCtor: any, + valueFromObject: any + ) => Map; + getLength: () => number; + clear: () => void; + del: (key: K) => boolean; + getEntryList: () => Array<[K, V]>; + entries: () => Map$Iterator<[K, V]>; + keys: () => Map$Iterator; + forEach: (callback: (entry: V, key: K) => void, thisArg?: {}) => void; + set: (key: K, value: V) => this; + get: (key: K) => ?V; + has: (key: K) => boolean; + } + + // This is implemented by jspb.Map.ArrayIteratorIterable_, but that class shouldn't be exported + declare type Map$Iterator = { + next(): IteratorResult, + }; + + declare type Map$IteratorResult = { + done: boolean, + value: T, + }; + + declare type BinaryReadReader = ( + msg: any, + binaryReader: BinaryReader + ) => void; + + declare type BinaryRead = (msg: any, reader: BinaryReadReader) => void; + + declare type BinaryWriteCallback = ( + value: any, + binaryWriter: BinaryWriter + ) => void; + + declare type BinaryWrite = ( + fieldNumber: number, + value: any, + writerCallback: BinaryWriteCallback + ) => void; + + declare export class BinaryReader { + constructor( + bytes?: ByteSource, + start?: number, + length?: number + ): BinaryReader; + static alloc: ( + bytes?: ByteSource, + start?: number, + length?: number + ) => BinaryReader; + alloc: ( + bytes?: ByteSource, + start?: number, + length?: number + ) => BinaryReader; + free: () => void; + getFieldCursor: () => number; + getCursor: () => number; + getBuffer: () => Uint8Array; + getFieldNumber: () => number; + getWireType: () => BinaryConstants$WireType; + isEndGroup: () => boolean; + getError: () => boolean; + setBlock: (bytes?: ByteSource, start?: number, length?: number) => void; + reset: () => void; + advance(count: number): void; + nextField: () => boolean; + unskipHeader: () => void; + skipMatchingFields: () => void; + skipVarintField: () => void; + skipDelimitedField: () => void; + skipFixed32Field: () => void; + skipFixed64Field: () => void; + skipGroup: () => void; + skipField: () => void; + registerReadCallback( + callbackName: string, + callback: (binaryReader: BinaryReader) => any + ): void; + runReadCallback(callbackName: string): any; + readAny(fieldType: BinaryConstants$FieldType): AnyFieldType; + readMessage: BinaryRead; + readGroup(field: number, message: Message, reader: BinaryReadReader): void; + getFieldDecoder: () => BinaryDecoder; + readInt32: () => number; + readInt32String: () => string; + readInt64: () => number; + readInt64String: () => string; + readUint32: () => number; + readUint32String: () => string; + readUint64: () => number; + readUint64String: () => string; + readSint32: () => number; + readSint64: () => number; + readSint64String: () => string; + readFixed32: () => number; + readFixed64: () => number; + readFixed64String: () => string; + readSfixed32: () => number; + readSfixed32String: () => string; + readSfixed64: () => number; + readSfixed64String: () => string; + readFloat: () => number; + readDouble: () => number; + readBool: () => boolean; + readEnum: () => number; + readString: () => string; + readBytes: () => Uint8Array; + readVarintHash64: () => string; + readFixedHash64: () => string; + readPackedInt32: () => number[]; + readPackedInt32String: () => string[]; + readPackedInt64: () => number[]; + readPackedInt64String: () => string[]; + readPackedUint32: () => number[]; + readPackedUint32String: () => string[]; + readPackedUint64: () => number[]; + readPackedUint64String: () => string[]; + readPackedSint32: () => number[]; + readPackedSint64: () => number[]; + readPackedSint64String: () => string[]; + readPackedFixed32: () => number[]; + readPackedFixed64: () => number[]; + readPackedFixed64String: () => string[]; + readPackedSfixed32: () => number[]; + readPackedSfixed64: () => number[]; + readPackedSfixed64String: () => string[]; + readPackedFloat: () => number[]; + readPackedDouble: () => number[]; + readPackedBool: () => boolean[]; + readPackedEnum: () => number[]; + readPackedVarintHash64: () => string[]; + readPackedFixedHash64: () => string[]; + } + + declare export class BinaryWriter { + constructor(): BinaryWriter; + writeSerializedMessage(bytes: Uint8Array, start: number, end: number): void; + maybeWriteSerializedMessage( + bytes?: Uint8Array, + start?: number, + end?: number + ): void; + reset: () => void; + getResultBuffer: () => Uint8Array; + getResultBase64String: () => string; + beginSubMessage(field: number): void; + endSubMessage(field: number): void; + writeAny( + fieldType: BinaryConstants$FieldType, + field: number, + value: AnyFieldType + ): void; + writeInt32(field: number, value?: number): void; + writeInt32String(field: number, value?: string): void; + writeInt64(field: number, value?: number): void; + writeInt64String(field: number, value?: string): void; + writeUint32(field: number, value?: number): void; + writeUint32String(field: number, value?: string): void; + writeUint64(field: number, value?: number): void; + writeUint64String(field: number, value?: string): void; + writeSint32(field: number, value?: number): void; + writeSint64(field: number, value?: number): void; + writeSint64String(field: number, value?: string): void; + writeFixed32(field: number, value?: number): void; + writeFixed64(field: number, value?: number): void; + writeFixed64String(field: number, value?: string): void; + writeSfixed32(field: number, value?: number): void; + writeSfixed64(field: number, value?: number): void; + writeSfixed64String(field: number, value?: string): void; + writeFloat(field: number, value?: number): void; + writeDouble(field: number, value?: number): void; + writeBool(field: number, value?: boolean): void; + writeEnum(field: number, value?: number): void; + writeString(field: number, value?: string): void; + writeBytes(field: number, value?: ByteSource): void; + writeMessage: BinaryWrite; + writeGroup( + field: number, + value: any, + writeCallback: BinaryWriteCallback + ): void; + writeFixedHash64(field: number, value?: string): void; + writeVarintHash64(field: number, value?: string): void; + writeRepeatedInt32(field: number, value?: number[]): void; + writeRepeatedInt32String(field: number, value?: string[]): void; + writeRepeatedInt64(field: number, value?: number[]): void; + writeRepeatedInt64String(field: number, value?: string[]): void; + writeRepeatedUint32(field: number, value?: number[]): void; + writeRepeatedUint32String(field: number, value?: string[]): void; + writeRepeatedUint64(field: number, value?: number[]): void; + writeRepeatedUint64String(field: number, value?: string[]): void; + writeRepeatedSint32(field: number, value?: number[]): void; + writeRepeatedSint64(field: number, value?: number[]): void; + writeRepeatedSint64String(field: number, value?: string[]): void; + writeRepeatedFixed32(field: number, value?: number[]): void; + writeRepeatedFixed64(field: number, value?: number[]): void; + writeRepeatedFixed64String(field: number, value?: string[]): void; + writeRepeatedSfixed32(field: number, value?: number[]): void; + writeRepeatedSfixed64(field: number, value?: number[]): void; + writeRepeatedSfixed64String(field: number, value?: string[]): void; + writeRepeatedFloat(field: number, value?: number[]): void; + writeRepeatedDouble(field: number, value?: number[]): void; + writeRepeatedBool(field: number, value?: boolean[]): void; + writeRepeatedEnum(field: number, value?: number[]): void; + writeRepeatedString(field: number, value?: string[]): void; + writeRepeatedBytes(field: number, value?: ByteSource[]): void; + writeRepeatedMessage( + field: number, + value: Message[], + writerCallback: BinaryWriteCallback + ): void; + writeRepeatedGroup( + field: number, + value: Message[], + writerCallback: BinaryWriteCallback + ): void; + writeRepeatedFixedHash64(field: number, value?: string[]): void; + writeRepeatedVarintHash64(field: number, value?: string[]): void; + writePackedInt32(field: number, value?: number[]): void; + writePackedInt32String(field: number, value?: string[]): void; + writePackedInt64(field: number, value?: number[]): void; + writePackedInt64String(field: number, value?: string[]): void; + writePackedUint32(field: number, value?: number[]): void; + writePackedUint32String(field: number, value?: string[]): void; + writePackedUint64(field: number, value?: number[]): void; + writePackedUint64String(field: number, value?: string[]): void; + writePackedSint32(field: number, value?: number[]): void; + writePackedSint64(field: number, value?: number[]): void; + writePackedSint64String(field: number, value?: string[]): void; + writePackedFixed32(field: number, value?: number[]): void; + writePackedFixed64(field: number, value?: number[]): void; + writePackedFixed64String(field: number, value?: string[]): void; + writePackedSfixed32(field: number, value?: number[]): void; + writePackedSfixed64(field: number, value?: number[]): void; + writePackedSfixed64String(field: number, value?: string[]): void; + writePackedFloat(field: number, value?: number[]): void; + writePackedDouble(field: number, value?: number[]): void; + writePackedBool(field: number, value?: boolean[]): void; + writePackedEnum(field: number, value?: number[]): void; + writePackedFixedHash64(field: number, value?: string[]): void; + writePackedVarintHash64(field: number, value?: string[]): void; + } + + declare export class BinaryEncoder { + constructor(): BinaryEncoder; + length: () => number; + end: () => number[]; + writeSplitVarint64(lowBits: number, highBits: number): void; + writeSplitFixed64(lowBits: number, highBits: number): void; + writeUnsignedVarint32(value: number): void; + writeSignedVarint32(value: number): void; + writeUnsignedVarint64(value: number): void; + writeSignedVarint64(value: number): void; + writeZigzagVarint32(value: number): void; + writeZigzagVarint64(value: number): void; + writeZigzagVarint64String(value: string): void; + writeUint8(value: number): void; + writeUint16(value: number): void; + writeUint32(value: number): void; + writeUint64(value: number): void; + writeInt8(value: number): void; + writeInt16(value: number): void; + writeInt32(value: number): void; + writeInt64(value: number): void; + writeInt64String(value: string): void; + writeFloat(value: number): void; + writeDouble(value: number): void; + writeBool(value: boolean): void; + writeEnum(value: number): void; + writeBytes(bytes: Uint8Array): void; + writeVarintHash64(hash: string): void; + writeFixedHash64(hash: string): void; + writeString(value: string): number; + } + + declare export class BinaryDecoder { + constructor( + bytes?: ByteSource, + start?: number, + length?: number + ): BinaryDecoder; + static alloc: ( + bytes?: ByteSource, + start?: number, + length?: number + ) => BinaryDecoder; + free: () => void; + clone: () => BinaryDecoder; + clear: () => void; + getBuffer: () => Uint8Array; + setBlock(data: ByteSource, start?: number, length?: number): void; + getEnd: () => number; + setEnd(end: number): void; + reset: () => void; + getCursor: () => number; + setCursor(cursor: number): void; + advance(count: number): void; + atEnd: () => boolean; + pastEnd: () => boolean; + getError: () => boolean; + skipVarint: () => void; + unskipVarint(value: number): void; + readUnsignedVarint32: () => number; + readSignedVarint32: () => number; + readUnsignedVarint32String: () => number; + readSignedVarint32String: () => number; + readZigzagVarint32: () => number; + readUnsignedVarint64: () => number; + readUnsignedVarint64String: () => number; + readSignedVarint64: () => number; + readSignedVarint64String: () => number; + readZigzagVarint64: () => number; + readZigzagVarint64String: () => number; + readUint8: () => number; + readUint16: () => number; + readUint32: () => number; + readUint64: () => number; + readUint64String: () => string; + readInt8: () => number; + readInt16: () => number; + readInt32: () => number; + readInt64: () => number; + readInt64String: () => string; + readFloat: () => number; + readDouble: () => number; + readBool: () => boolean; + readEnum: () => number; + readString(length: number): string; + readStringWithLength: () => string; + readBytes(length: number): Uint8Array; + readVarintHash64: () => string; + readFixedHash64: () => string; + } + + declare export class BinaryIterator { + constructor( + decoder?: BinaryDecoder, + next?: () => number | boolean | string | null, + elements?: Array + ): BinaryIterator; + static alloc: ( + decoder?: BinaryDecoder, + next?: () => number | boolean | string | null, + elements?: Array + ) => BinaryIterator; + free: () => void; + clear: () => void; + get: () => ?ScalarFieldType; + atEnd: () => boolean; + next: () => ?ScalarFieldType; + } + + declare type BinaryConstants$FieldType = { + INVALID: -1, + DOUBLE: 1, + FLOAT: 2, + INT64: 3, + UINT64: 4, + INT32: 5, + FIXED64: 6, + FIXED32: 7, + BOOL: 8, + STRING: 9, + GROUP: 10, + MESSAGE: 11, + BYTES: 12, + UINT32: 13, + ENUM: 14, + SFIXED32: 15, + SFIXED64: 16, + SINT32: 17, + SINT64: 18, + FHASH64: 30, + VHASH64: 31, + }; + + declare type BinaryConstants$WireType = { + INVALID: -1, + VARINT: 0, + FIXED64: 1, + DELIMITED: 2, + START_GROUP: 3, + END_GROUP: 4, + FIXED32: 5, + }; + + // const FieldTypeToWireType: (fieldType: FieldType) => WireType; + + // const INVALID_FIELD_NUMBER: number; + // const FLOAT32_EPS: number; + // const FLOAT32_MIN: number; + // const FLOAT32_MAX: number; + // const FLOAT64_EPS: number; + // const FLOAT64_MIN: number; + // const FLOAT64_MAX: number; + // const TWO_TO_20: number; + // const TWO_TO_23: number; + // const TWO_TO_31: number; + // const TWO_TO_32: number; + // const TWO_TO_52: number; + // const TWO_TO_63: number; + // const TWO_TO_64: number; + // const ZERO_HASH: string; + // } + + // export namespace arith { + // class UInt64 { + // lo: number; + // hi: number; + // constructor(lo: number, hi: number); + // cmp(other: UInt64): number; + // rightShift(): UInt64; + // leftShift(): UInt64; + // msb(): boolean; + // lsb(): boolean; + // zero(): boolean; + // add(other: UInt64): UInt64; + // sub(other: UInt64): UInt64; + // static mul32x32(a: number, b: number): UInt64; + // mul(a: number): UInt64; + // div(divisor: number): [UInt64, UInt64]; + // toString(): string; + // static fromString(str: string): UInt64; + // clone(): UInt64; + // } + + // class Int64 { + // lo: number; + // hi: number; + // constructor(lo: number, hi: number); + // add(other: Int64): Int64; + // sub(other: Int64): Int64; + // clone(): Int64; + // toString(): string; + // static fromString(str: string): Int64; + // } + // } + + // jspb.utils package excluded as it likely shouldn't be called by user code +} diff --git a/web/flow-typed/npm/grpc-web_v1.x.x.js b/web/flow-typed/npm/grpc-web_v1.x.x.js new file mode 100644 --- /dev/null +++ b/web/flow-typed/npm/grpc-web_v1.x.x.js @@ -0,0 +1,60 @@ +// flow-typed signature: 7bfbf382213ab8a2a77e02cc8ce971e4 +// flow-typed version: <>/grpc-web_v1.4.2/flow_v0.182.0 + +declare module 'grpc-web' { + + declare export type Metadata = { +[s: string]: string }; + + declare export type StatusCode = + | 0 // OK + | 1 // CANCELLED + | 2 // UNKNOWN + | 3 // INVALID_ARGUMENT + | 4 // DEADLINE_EXCEEDED + | 5 // NOT_FOUND + | 6 // ALREADY_EXISTS + | 7 // PERMISSION_DENIED + | 8 // RESOURCE_EXHAUSTED + | 9 // FAILED_PRECONDITION + | 10 // ABORTED + | 11 // OUT_OF_RANGE + | 12 // UNIMPLEMENTED + | 13 // INTERNAL + | 14 // UNAVAILABLE + | 15 // DATA_LOSS + | 16; // UNAUTHENTICATED + + declare export type Status = { + +code: number, + +details: string, + +metadata?: Metadata, + }; + + declare export class RpcError extends Error { + constructor(code: StatusCode, message: string, metadata: Metadata): void; + code: StatusCode; + metadata: Metadata; + } + + declare export class ClientReadableStream { + on(eventType: "error", callback: (err: RpcError) => void): this; + on(eventType: "status", callback: (status: Status) => void): this; + on(eventType: "metadata", callback: (status: Metadata) => void): this; + on(eventType: "data", callback: (response: RESP) => void): this; + on(eventType: "end", callback: () => void): this; + + removeListener(eventType: "error", callback: (err: RpcError) => void): void; + removeListener( + eventType: "status", + callback: (status: Status) => void, + ): void; + removeListener( + eventType: "metadata", + callback: (status: Metadata) => void, + ): void; + removeListener(eventType: "data", callback: (response: RESP) => void): void; + removeListener(eventType: "end", callback: () => void): void; + cancel(): void; + } + +} diff --git a/web/package.json b/web/package.json --- a/web/package.json +++ b/web/package.json @@ -52,6 +52,7 @@ "emoji-mart": "^5.5.2", "ethers": "^5.7.2", "exif-js": "^2.3.0", + "google-protobuf": "^3.21.2", "grpc-web": "^1.4.2", "history": "^4.6.3", "invariant": "^2.2.4", diff --git a/web/protobufs/identity-client.cjs b/web/protobufs/identity-client.cjs new file mode 100644 --- /dev/null +++ b/web/protobufs/identity-client.cjs @@ -0,0 +1,929 @@ +/** + * @fileoverview gRPC-Web generated client stub for identity.client + * @enhanceable + * @public + * @generated + */ + +// GENERATED CODE -- DO NOT EDIT! + +/* eslint-disable */ +// @ts-nocheck + + + +const grpc = {}; +grpc.web = require('grpc-web'); + +const proto = {}; +proto.identity = {}; +proto.identity.client = require('./identity-structs.cjs'); + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?grpc.web.ClientOptions} options + * @constructor + * @struct + * @final + */ +proto.identity.client.IdentityClientServiceClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options.format = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @param {string} hostname + * @param {?Object} credentials + * @param {?grpc.web.ClientOptions} options + * @constructor + * @struct + * @final + */ +proto.identity.client.IdentityClientServicePromiseClient = + function(hostname, credentials, options) { + if (!options) options = {}; + options.format = 'text'; + + /** + * @private @const {!grpc.web.GrpcWebClientBase} The client + */ + this.client_ = new grpc.web.GrpcWebClientBase(options); + + /** + * @private @const {string} The hostname + */ + this.hostname_ = hostname; + +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.identity.client.RegistrationStartRequest, + * !proto.identity.client.RegistrationStartResponse>} + */ +const methodDescriptor_IdentityClientService_RegisterPasswordUserStart = new grpc.web.MethodDescriptor( + '/identity.client.IdentityClientService/RegisterPasswordUserStart', + grpc.web.MethodType.UNARY, + proto.identity.client.RegistrationStartRequest, + proto.identity.client.RegistrationStartResponse, + /** + * @param {!proto.identity.client.RegistrationStartRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.identity.client.RegistrationStartResponse.deserializeBinary +); + + +/** + * @param {!proto.identity.client.RegistrationStartRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.identity.client.RegistrationStartResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.identity.client.IdentityClientServiceClient.prototype.registerPasswordUserStart = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/identity.client.IdentityClientService/RegisterPasswordUserStart', + request, + metadata || {}, + methodDescriptor_IdentityClientService_RegisterPasswordUserStart, + callback); +}; + + +/** + * @param {!proto.identity.client.RegistrationStartRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.identity.client.IdentityClientServicePromiseClient.prototype.registerPasswordUserStart = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/identity.client.IdentityClientService/RegisterPasswordUserStart', + request, + metadata || {}, + methodDescriptor_IdentityClientService_RegisterPasswordUserStart); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.identity.client.RegistrationFinishRequest, + * !proto.identity.client.RegistrationFinishResponse>} + */ +const methodDescriptor_IdentityClientService_RegisterPasswordUserFinish = new grpc.web.MethodDescriptor( + '/identity.client.IdentityClientService/RegisterPasswordUserFinish', + grpc.web.MethodType.UNARY, + proto.identity.client.RegistrationFinishRequest, + proto.identity.client.RegistrationFinishResponse, + /** + * @param {!proto.identity.client.RegistrationFinishRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.identity.client.RegistrationFinishResponse.deserializeBinary +); + + +/** + * @param {!proto.identity.client.RegistrationFinishRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.identity.client.RegistrationFinishResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.identity.client.IdentityClientServiceClient.prototype.registerPasswordUserFinish = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/identity.client.IdentityClientService/RegisterPasswordUserFinish', + request, + metadata || {}, + methodDescriptor_IdentityClientService_RegisterPasswordUserFinish, + callback); +}; + + +/** + * @param {!proto.identity.client.RegistrationFinishRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.identity.client.IdentityClientServicePromiseClient.prototype.registerPasswordUserFinish = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/identity.client.IdentityClientService/RegisterPasswordUserFinish', + request, + metadata || {}, + methodDescriptor_IdentityClientService_RegisterPasswordUserFinish); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.identity.client.UpdateUserPasswordStartRequest, + * !proto.identity.client.UpdateUserPasswordStartResponse>} + */ +const methodDescriptor_IdentityClientService_UpdateUserPasswordStart = new grpc.web.MethodDescriptor( + '/identity.client.IdentityClientService/UpdateUserPasswordStart', + grpc.web.MethodType.UNARY, + proto.identity.client.UpdateUserPasswordStartRequest, + proto.identity.client.UpdateUserPasswordStartResponse, + /** + * @param {!proto.identity.client.UpdateUserPasswordStartRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.identity.client.UpdateUserPasswordStartResponse.deserializeBinary +); + + +/** + * @param {!proto.identity.client.UpdateUserPasswordStartRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.identity.client.UpdateUserPasswordStartResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.identity.client.IdentityClientServiceClient.prototype.updateUserPasswordStart = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/identity.client.IdentityClientService/UpdateUserPasswordStart', + request, + metadata || {}, + methodDescriptor_IdentityClientService_UpdateUserPasswordStart, + callback); +}; + + +/** + * @param {!proto.identity.client.UpdateUserPasswordStartRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.identity.client.IdentityClientServicePromiseClient.prototype.updateUserPasswordStart = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/identity.client.IdentityClientService/UpdateUserPasswordStart', + request, + metadata || {}, + methodDescriptor_IdentityClientService_UpdateUserPasswordStart); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.identity.client.UpdateUserPasswordFinishRequest, + * !proto.identity.client.UpdateUserPasswordFinishResponse>} + */ +const methodDescriptor_IdentityClientService_UpdateUserPasswordFinish = new grpc.web.MethodDescriptor( + '/identity.client.IdentityClientService/UpdateUserPasswordFinish', + grpc.web.MethodType.UNARY, + proto.identity.client.UpdateUserPasswordFinishRequest, + proto.identity.client.UpdateUserPasswordFinishResponse, + /** + * @param {!proto.identity.client.UpdateUserPasswordFinishRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.identity.client.UpdateUserPasswordFinishResponse.deserializeBinary +); + + +/** + * @param {!proto.identity.client.UpdateUserPasswordFinishRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.identity.client.UpdateUserPasswordFinishResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.identity.client.IdentityClientServiceClient.prototype.updateUserPasswordFinish = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/identity.client.IdentityClientService/UpdateUserPasswordFinish', + request, + metadata || {}, + methodDescriptor_IdentityClientService_UpdateUserPasswordFinish, + callback); +}; + + +/** + * @param {!proto.identity.client.UpdateUserPasswordFinishRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.identity.client.IdentityClientServicePromiseClient.prototype.updateUserPasswordFinish = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/identity.client.IdentityClientService/UpdateUserPasswordFinish', + request, + metadata || {}, + methodDescriptor_IdentityClientService_UpdateUserPasswordFinish); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.identity.client.OpaqueLoginStartRequest, + * !proto.identity.client.OpaqueLoginStartResponse>} + */ +const methodDescriptor_IdentityClientService_LoginPasswordUserStart = new grpc.web.MethodDescriptor( + '/identity.client.IdentityClientService/LoginPasswordUserStart', + grpc.web.MethodType.UNARY, + proto.identity.client.OpaqueLoginStartRequest, + proto.identity.client.OpaqueLoginStartResponse, + /** + * @param {!proto.identity.client.OpaqueLoginStartRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.identity.client.OpaqueLoginStartResponse.deserializeBinary +); + + +/** + * @param {!proto.identity.client.OpaqueLoginStartRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.identity.client.OpaqueLoginStartResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.identity.client.IdentityClientServiceClient.prototype.loginPasswordUserStart = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/identity.client.IdentityClientService/LoginPasswordUserStart', + request, + metadata || {}, + methodDescriptor_IdentityClientService_LoginPasswordUserStart, + callback); +}; + + +/** + * @param {!proto.identity.client.OpaqueLoginStartRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.identity.client.IdentityClientServicePromiseClient.prototype.loginPasswordUserStart = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/identity.client.IdentityClientService/LoginPasswordUserStart', + request, + metadata || {}, + methodDescriptor_IdentityClientService_LoginPasswordUserStart); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.identity.client.OpaqueLoginFinishRequest, + * !proto.identity.client.OpaqueLoginFinishResponse>} + */ +const methodDescriptor_IdentityClientService_LoginPasswordUserFinish = new grpc.web.MethodDescriptor( + '/identity.client.IdentityClientService/LoginPasswordUserFinish', + grpc.web.MethodType.UNARY, + proto.identity.client.OpaqueLoginFinishRequest, + proto.identity.client.OpaqueLoginFinishResponse, + /** + * @param {!proto.identity.client.OpaqueLoginFinishRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.identity.client.OpaqueLoginFinishResponse.deserializeBinary +); + + +/** + * @param {!proto.identity.client.OpaqueLoginFinishRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.identity.client.OpaqueLoginFinishResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.identity.client.IdentityClientServiceClient.prototype.loginPasswordUserFinish = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/identity.client.IdentityClientService/LoginPasswordUserFinish', + request, + metadata || {}, + methodDescriptor_IdentityClientService_LoginPasswordUserFinish, + callback); +}; + + +/** + * @param {!proto.identity.client.OpaqueLoginFinishRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.identity.client.IdentityClientServicePromiseClient.prototype.loginPasswordUserFinish = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/identity.client.IdentityClientService/LoginPasswordUserFinish', + request, + metadata || {}, + methodDescriptor_IdentityClientService_LoginPasswordUserFinish); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.identity.client.WalletLoginRequest, + * !proto.identity.client.WalletLoginResponse>} + */ +const methodDescriptor_IdentityClientService_LoginWalletUser = new grpc.web.MethodDescriptor( + '/identity.client.IdentityClientService/LoginWalletUser', + grpc.web.MethodType.UNARY, + proto.identity.client.WalletLoginRequest, + proto.identity.client.WalletLoginResponse, + /** + * @param {!proto.identity.client.WalletLoginRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.identity.client.WalletLoginResponse.deserializeBinary +); + + +/** + * @param {!proto.identity.client.WalletLoginRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.identity.client.WalletLoginResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.identity.client.IdentityClientServiceClient.prototype.loginWalletUser = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/identity.client.IdentityClientService/LoginWalletUser', + request, + metadata || {}, + methodDescriptor_IdentityClientService_LoginWalletUser, + callback); +}; + + +/** + * @param {!proto.identity.client.WalletLoginRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.identity.client.IdentityClientServicePromiseClient.prototype.loginWalletUser = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/identity.client.IdentityClientService/LoginWalletUser', + request, + metadata || {}, + methodDescriptor_IdentityClientService_LoginWalletUser); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.identity.client.DeleteUserRequest, + * !proto.identity.client.Empty>} + */ +const methodDescriptor_IdentityClientService_DeleteUser = new grpc.web.MethodDescriptor( + '/identity.client.IdentityClientService/DeleteUser', + grpc.web.MethodType.UNARY, + proto.identity.client.DeleteUserRequest, + proto.identity.client.Empty, + /** + * @param {!proto.identity.client.DeleteUserRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.identity.client.Empty.deserializeBinary +); + + +/** + * @param {!proto.identity.client.DeleteUserRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.identity.client.Empty)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.identity.client.IdentityClientServiceClient.prototype.deleteUser = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/identity.client.IdentityClientService/DeleteUser', + request, + metadata || {}, + methodDescriptor_IdentityClientService_DeleteUser, + callback); +}; + + +/** + * @param {!proto.identity.client.DeleteUserRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.identity.client.IdentityClientServicePromiseClient.prototype.deleteUser = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/identity.client.IdentityClientService/DeleteUser', + request, + metadata || {}, + methodDescriptor_IdentityClientService_DeleteUser); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.identity.client.Empty, + * !proto.identity.client.GenerateNonceResponse>} + */ +const methodDescriptor_IdentityClientService_GenerateNonce = new grpc.web.MethodDescriptor( + '/identity.client.IdentityClientService/GenerateNonce', + grpc.web.MethodType.UNARY, + proto.identity.client.Empty, + proto.identity.client.GenerateNonceResponse, + /** + * @param {!proto.identity.client.Empty} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.identity.client.GenerateNonceResponse.deserializeBinary +); + + +/** + * @param {!proto.identity.client.Empty} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.identity.client.GenerateNonceResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.identity.client.IdentityClientServiceClient.prototype.generateNonce = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/identity.client.IdentityClientService/GenerateNonce', + request, + metadata || {}, + methodDescriptor_IdentityClientService_GenerateNonce, + callback); +}; + + +/** + * @param {!proto.identity.client.Empty} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.identity.client.IdentityClientServicePromiseClient.prototype.generateNonce = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/identity.client.IdentityClientService/GenerateNonce', + request, + metadata || {}, + methodDescriptor_IdentityClientService_GenerateNonce); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.identity.client.ReceiverKeysForUserRequest, + * !proto.identity.client.ReceiverKeysForUserResponse>} + */ +const methodDescriptor_IdentityClientService_GetReceiverKeysForUser = new grpc.web.MethodDescriptor( + '/identity.client.IdentityClientService/GetReceiverKeysForUser', + grpc.web.MethodType.UNARY, + proto.identity.client.ReceiverKeysForUserRequest, + proto.identity.client.ReceiverKeysForUserResponse, + /** + * @param {!proto.identity.client.ReceiverKeysForUserRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.identity.client.ReceiverKeysForUserResponse.deserializeBinary +); + + +/** + * @param {!proto.identity.client.ReceiverKeysForUserRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.identity.client.ReceiverKeysForUserResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.identity.client.IdentityClientServiceClient.prototype.getReceiverKeysForUser = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/identity.client.IdentityClientService/GetReceiverKeysForUser', + request, + metadata || {}, + methodDescriptor_IdentityClientService_GetReceiverKeysForUser, + callback); +}; + + +/** + * @param {!proto.identity.client.ReceiverKeysForUserRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.identity.client.IdentityClientServicePromiseClient.prototype.getReceiverKeysForUser = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/identity.client.IdentityClientService/GetReceiverKeysForUser', + request, + metadata || {}, + methodDescriptor_IdentityClientService_GetReceiverKeysForUser); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.identity.client.SenderKeysForUserRequest, + * !proto.identity.client.SenderKeysForUserResponse>} + */ +const methodDescriptor_IdentityClientService_GetSenderKeysForUser = new grpc.web.MethodDescriptor( + '/identity.client.IdentityClientService/GetSenderKeysForUser', + grpc.web.MethodType.UNARY, + proto.identity.client.SenderKeysForUserRequest, + proto.identity.client.SenderKeysForUserResponse, + /** + * @param {!proto.identity.client.SenderKeysForUserRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.identity.client.SenderKeysForUserResponse.deserializeBinary +); + + +/** + * @param {!proto.identity.client.SenderKeysForUserRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.identity.client.SenderKeysForUserResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.identity.client.IdentityClientServiceClient.prototype.getSenderKeysForUser = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/identity.client.IdentityClientService/GetSenderKeysForUser', + request, + metadata || {}, + methodDescriptor_IdentityClientService_GetSenderKeysForUser, + callback); +}; + + +/** + * @param {!proto.identity.client.SenderKeysForUserRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.identity.client.IdentityClientServicePromiseClient.prototype.getSenderKeysForUser = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/identity.client.IdentityClientService/GetSenderKeysForUser', + request, + metadata || {}, + methodDescriptor_IdentityClientService_GetSenderKeysForUser); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.identity.client.KeyserverKeysRequest, + * !proto.identity.client.KeyserverKeysResponse>} + */ +const methodDescriptor_IdentityClientService_GetKeyserverKeys = new grpc.web.MethodDescriptor( + '/identity.client.IdentityClientService/GetKeyserverKeys', + grpc.web.MethodType.UNARY, + proto.identity.client.KeyserverKeysRequest, + proto.identity.client.KeyserverKeysResponse, + /** + * @param {!proto.identity.client.KeyserverKeysRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.identity.client.KeyserverKeysResponse.deserializeBinary +); + + +/** + * @param {!proto.identity.client.KeyserverKeysRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.identity.client.KeyserverKeysResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.identity.client.IdentityClientServiceClient.prototype.getKeyserverKeys = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/identity.client.IdentityClientService/GetKeyserverKeys', + request, + metadata || {}, + methodDescriptor_IdentityClientService_GetKeyserverKeys, + callback); +}; + + +/** + * @param {!proto.identity.client.KeyserverKeysRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.identity.client.IdentityClientServicePromiseClient.prototype.getKeyserverKeys = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/identity.client.IdentityClientService/GetKeyserverKeys', + request, + metadata || {}, + methodDescriptor_IdentityClientService_GetKeyserverKeys); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.identity.client.UploadOneTimeKeysRequest, + * !proto.identity.client.Empty>} + */ +const methodDescriptor_IdentityClientService_UploadOneTimeKeys = new grpc.web.MethodDescriptor( + '/identity.client.IdentityClientService/UploadOneTimeKeys', + grpc.web.MethodType.UNARY, + proto.identity.client.UploadOneTimeKeysRequest, + proto.identity.client.Empty, + /** + * @param {!proto.identity.client.UploadOneTimeKeysRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.identity.client.Empty.deserializeBinary +); + + +/** + * @param {!proto.identity.client.UploadOneTimeKeysRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.identity.client.Empty)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.identity.client.IdentityClientServiceClient.prototype.uploadOneTimeKeys = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/identity.client.IdentityClientService/UploadOneTimeKeys', + request, + metadata || {}, + methodDescriptor_IdentityClientService_UploadOneTimeKeys, + callback); +}; + + +/** + * @param {!proto.identity.client.UploadOneTimeKeysRequest} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.identity.client.IdentityClientServicePromiseClient.prototype.uploadOneTimeKeys = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/identity.client.IdentityClientService/UploadOneTimeKeys', + request, + metadata || {}, + methodDescriptor_IdentityClientService_UploadOneTimeKeys); +}; + + +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.identity.client.RefreshUserPreKeysRequest, + * !proto.identity.client.Empty>} + */ +const methodDescriptor_IdentityClientService_RefreshUserPreKeys = new grpc.web.MethodDescriptor( + '/identity.client.IdentityClientService/RefreshUserPreKeys', + grpc.web.MethodType.UNARY, + proto.identity.client.RefreshUserPreKeysRequest, + proto.identity.client.Empty, + /** + * @param {!proto.identity.client.RefreshUserPreKeysRequest} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.identity.client.Empty.deserializeBinary +); + + +/** + * @param {!proto.identity.client.RefreshUserPreKeysRequest} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.identity.client.Empty)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.identity.client.IdentityClientServiceClient.prototype.refreshUserPreKeys = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/identity.client.IdentityClientService/RefreshUserPreKeys', + request, + metadata || {}, + methodDescriptor_IdentityClientService_RefreshUserPreKeys, + callback); +}; + + +/** + * @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.refreshUserPreKeys = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/identity.client.IdentityClientService/RefreshUserPreKeys', + request, + metadata || {}, + methodDescriptor_IdentityClientService_RefreshUserPreKeys); +}; + + +module.exports = proto.identity.client; + diff --git a/web/protobufs/identity-client.cjs.flow b/web/protobufs/identity-client.cjs.flow new file mode 100644 --- /dev/null +++ b/web/protobufs/identity-client.cjs.flow @@ -0,0 +1,245 @@ +// @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'; + +declare export class IdentityClientServiceClient { + 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; + + registerPasswordUserFinish( + request: RegistrationFinishRequest, + metadata: Metadata | void, + callback: ( + err: RpcError, + response: RegistrationFinishResponse, + ) => void, + ): ClientReadableStream; + + updateUserPasswordStart( + request: UpdateUserPasswordStartRequest, + metadata: Metadata | void, + callback: ( + err: RpcError, + response: UpdateUserPasswordStartResponse, + ) => void, + ): ClientReadableStream; + + updateUserPasswordFinish( + request: UpdateUserPasswordFinishRequest, + metadata: Metadata | void, + callback: ( + err: RpcError, + response: UpdateUserPasswordFinishResponse, + ) => void, + ): ClientReadableStream; + + loginPasswordUserStart( + request: OpaqueLoginStartRequest, + metadata: Metadata | void, + callback: ( + err: RpcError, + response: OpaqueLoginStartResponse, + ) => void, + ): ClientReadableStream; + + loginPasswordUserFinish( + request: OpaqueLoginFinishRequest, + metadata: Metadata | void, + callback: ( + err: RpcError, + response: OpaqueLoginFinishResponse, + ) => void, + ): ClientReadableStream; + + loginWalletUser( + request: WalletLoginRequest, + metadata: Metadata | void, + callback: ( + err: RpcError, + response: WalletLoginResponse, + ) => void, + ): ClientReadableStream; + + deleteUser( + request: DeleteUserRequest, + metadata: Metadata | void, + callback: ( + err: RpcError, + response: Empty, + ) => void, + ): 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; + + uploadOneTimeKeys( + request: UploadOneTimeKeysRequest, + metadata: Metadata | void, + callback: ( + err: RpcError, + response: Empty, + ) => void, + ): ClientReadableStream; + + refreshUserPreKeys( + request: RefreshUserPreKeysRequest, + metadata: Metadata | void, + callback: ( + err: RpcError, + response: Empty, + ) => void, + ): ClientReadableStream; + +} + +declare export class IdentityClientServicePromiseClient { + constructor( + hostname: string, + credentials?: null | { +[index: string]: string }, + options?: null | { +[index: string]: any }, + ): void; + + registerPasswordUserStart( + request: RegistrationStartRequest, + metadata?: Metadata, + ): Promise; + + registerPasswordUserFinish( + request: RegistrationFinishRequest, + metadata?: Metadata, + ): Promise; + + updateUserPasswordStart( + request: UpdateUserPasswordStartRequest, + metadata?: Metadata, + ): Promise; + + updateUserPasswordFinish( + request: UpdateUserPasswordFinishRequest, + metadata?: Metadata, + ): Promise; + + loginPasswordUserStart( + request: OpaqueLoginStartRequest, + metadata?: Metadata, + ): Promise; + + loginPasswordUserFinish( + request: OpaqueLoginFinishRequest, + metadata?: Metadata, + ): Promise; + + loginWalletUser( + request: WalletLoginRequest, + metadata?: Metadata, + ): Promise; + + deleteUser( + request: DeleteUserRequest, + metadata?: Metadata, + ): Promise; + + generateNonce( + request: Empty, + metadata?: Metadata, + ): Promise; + + getReceiverKeysForUser( + request: ReceiverKeysForUserRequest, + metadata?: Metadata, + ): Promise; + + getSenderKeysForUser( + request: SenderKeysForUserRequest, + metadata?: Metadata, + ): Promise; + + getKeyserverKeys( + request: KeyserverKeysRequest, + metadata?: Metadata, + ): Promise; + + uploadOneTimeKeys( + request: UploadOneTimeKeysRequest, + metadata?: Metadata, + ): Promise; + + refreshUserPreKeys( + request: RefreshUserPreKeysRequest, + metadata?: Metadata, + ): Promise; + +} diff --git a/web/protobufs/identity-structs.cjs b/web/protobufs/identity-structs.cjs new file mode 100644 --- /dev/null +++ b/web/protobufs/identity-structs.cjs @@ -0,0 +1,6583 @@ +// source: identity_client.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + * @generated + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +goog.exportSymbol('proto.identity.client.DeleteUserRequest', null, global); +goog.exportSymbol('proto.identity.client.DeviceKeyUpload', 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.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.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.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.WalletLoginRequest', null, global); +goog.exportSymbol('proto.identity.client.WalletLoginResponse', null, global); +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.identity.client.Empty = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.identity.client.Empty, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.identity.client.Empty.displayName = 'proto.identity.client.Empty'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.identity.client.PreKey = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.identity.client.PreKey, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.identity.client.PreKey.displayName = 'proto.identity.client.PreKey'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.identity.client.IdentityKeyInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.identity.client.IdentityKeyInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.identity.client.IdentityKeyInfo.displayName = 'proto.identity.client.IdentityKeyInfo'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.identity.client.DeviceKeyUpload = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.identity.client.DeviceKeyUpload.repeatedFields_, null); +}; +goog.inherits(proto.identity.client.DeviceKeyUpload, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.identity.client.DeviceKeyUpload.displayName = 'proto.identity.client.DeviceKeyUpload'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.identity.client.RegistrationStartRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.identity.client.RegistrationStartRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.identity.client.RegistrationStartRequest.displayName = 'proto.identity.client.RegistrationStartRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.identity.client.RegistrationFinishRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.identity.client.RegistrationFinishRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.identity.client.RegistrationFinishRequest.displayName = 'proto.identity.client.RegistrationFinishRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.identity.client.RegistrationStartResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.identity.client.RegistrationStartResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.identity.client.RegistrationStartResponse.displayName = 'proto.identity.client.RegistrationStartResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.identity.client.RegistrationFinishResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.identity.client.RegistrationFinishResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.identity.client.RegistrationFinishResponse.displayName = 'proto.identity.client.RegistrationFinishResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.identity.client.UpdateUserPasswordStartRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.identity.client.UpdateUserPasswordStartRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.identity.client.UpdateUserPasswordStartRequest.displayName = 'proto.identity.client.UpdateUserPasswordStartRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.identity.client.UpdateUserPasswordFinishRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.identity.client.UpdateUserPasswordFinishRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.identity.client.UpdateUserPasswordFinishRequest.displayName = 'proto.identity.client.UpdateUserPasswordFinishRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.identity.client.UpdateUserPasswordStartResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.identity.client.UpdateUserPasswordStartResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.identity.client.UpdateUserPasswordStartResponse.displayName = 'proto.identity.client.UpdateUserPasswordStartResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.identity.client.UpdateUserPasswordFinishResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.identity.client.UpdateUserPasswordFinishResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.identity.client.UpdateUserPasswordFinishResponse.displayName = 'proto.identity.client.UpdateUserPasswordFinishResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.identity.client.OpaqueLoginStartRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.identity.client.OpaqueLoginStartRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.identity.client.OpaqueLoginStartRequest.displayName = 'proto.identity.client.OpaqueLoginStartRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.identity.client.OpaqueLoginFinishRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.identity.client.OpaqueLoginFinishRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.identity.client.OpaqueLoginFinishRequest.displayName = 'proto.identity.client.OpaqueLoginFinishRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.identity.client.OpaqueLoginStartResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.identity.client.OpaqueLoginStartResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.identity.client.OpaqueLoginStartResponse.displayName = 'proto.identity.client.OpaqueLoginStartResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.identity.client.OpaqueLoginFinishResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.identity.client.OpaqueLoginFinishResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.identity.client.OpaqueLoginFinishResponse.displayName = 'proto.identity.client.OpaqueLoginFinishResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.identity.client.WalletLoginRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.identity.client.WalletLoginRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.identity.client.WalletLoginRequest.displayName = 'proto.identity.client.WalletLoginRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.identity.client.WalletLoginResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.identity.client.WalletLoginResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.identity.client.WalletLoginResponse.displayName = 'proto.identity.client.WalletLoginResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.identity.client.DeleteUserRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.identity.client.DeleteUserRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.identity.client.DeleteUserRequest.displayName = 'proto.identity.client.DeleteUserRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.identity.client.GenerateNonceResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.identity.client.GenerateNonceResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.identity.client.GenerateNonceResponse.displayName = 'proto.identity.client.GenerateNonceResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.identity.client.ReceiverKeyInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.identity.client.ReceiverKeyInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.identity.client.ReceiverKeyInfo.displayName = 'proto.identity.client.ReceiverKeyInfo'; +} +/** + * 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.ReceiverKeysForUserRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.identity.client.ReceiverKeysForUserRequest.oneofGroups_); +}; +goog.inherits(proto.identity.client.ReceiverKeysForUserRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.identity.client.ReceiverKeysForUserRequest.displayName = 'proto.identity.client.ReceiverKeysForUserRequest'; +} +/** + * 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.ReceiverKeysForUserResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.identity.client.ReceiverKeysForUserResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.identity.client.ReceiverKeysForUserResponse.displayName = 'proto.identity.client.ReceiverKeysForUserResponse'; +} +/** + * 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.SenderKeyInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.identity.client.SenderKeyInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.identity.client.SenderKeyInfo.displayName = 'proto.identity.client.SenderKeyInfo'; +} +/** + * 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.SenderKeysForUserRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.identity.client.SenderKeysForUserRequest.oneofGroups_); +}; +goog.inherits(proto.identity.client.SenderKeysForUserRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.identity.client.SenderKeysForUserRequest.displayName = 'proto.identity.client.SenderKeysForUserRequest'; +} +/** + * 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.SenderKeysForUserResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.identity.client.SenderKeysForUserResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.identity.client.SenderKeysForUserResponse.displayName = 'proto.identity.client.SenderKeysForUserResponse'; +} +/** + * 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.KeyserverSessionInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.identity.client.KeyserverSessionInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.identity.client.KeyserverSessionInfo.displayName = 'proto.identity.client.KeyserverSessionInfo'; +} +/** + * 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.KeyserverKeysRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.identity.client.KeyserverKeysRequest.oneofGroups_); +}; +goog.inherits(proto.identity.client.KeyserverKeysRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.identity.client.KeyserverKeysRequest.displayName = 'proto.identity.client.KeyserverKeysRequest'; +} +/** + * 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.KeyserverKeysResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.identity.client.KeyserverKeysResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.identity.client.KeyserverKeysResponse.displayName = 'proto.identity.client.KeyserverKeysResponse'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.identity.client.UploadOneTimeKeysRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.identity.client.UploadOneTimeKeysRequest.repeatedFields_, null); +}; +goog.inherits(proto.identity.client.UploadOneTimeKeysRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.identity.client.UploadOneTimeKeysRequest.displayName = 'proto.identity.client.UploadOneTimeKeysRequest'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.identity.client.RefreshUserPreKeysRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.identity.client.RefreshUserPreKeysRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.identity.client.RefreshUserPreKeysRequest.displayName = 'proto.identity.client.RefreshUserPreKeysRequest'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.identity.client.Empty.prototype.toObject = function(opt_includeInstance) { + return proto.identity.client.Empty.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.identity.client.Empty} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.identity.client.Empty.toObject = function(includeInstance, msg) { + var f, obj = { + + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.identity.client.Empty} + */ +proto.identity.client.Empty.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.identity.client.Empty; + return proto.identity.client.Empty.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.identity.client.Empty} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.identity.client.Empty} + */ +proto.identity.client.Empty.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.identity.client.Empty.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.identity.client.Empty.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.identity.client.Empty} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.identity.client.Empty.serializeBinaryToWriter = function(message, writer) { + var f = undefined; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.identity.client.PreKey.prototype.toObject = function(opt_includeInstance) { + return proto.identity.client.PreKey.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.identity.client.PreKey} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.identity.client.PreKey.toObject = function(includeInstance, msg) { + var f, obj = { + prekey: jspb.Message.getFieldWithDefault(msg, 1, ""), + prekeysignature: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.identity.client.PreKey} + */ +proto.identity.client.PreKey.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.identity.client.PreKey; + return proto.identity.client.PreKey.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.identity.client.PreKey} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.identity.client.PreKey} + */ +proto.identity.client.PreKey.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setPrekey(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setPrekeysignature(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.identity.client.PreKey.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.identity.client.PreKey.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.identity.client.PreKey} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.identity.client.PreKey.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPrekey(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getPrekeysignature(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string preKey = 1; + * @return {string} + */ +proto.identity.client.PreKey.prototype.getPrekey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.identity.client.PreKey} returns this + */ +proto.identity.client.PreKey.prototype.setPrekey = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string preKeySignature = 2; + * @return {string} + */ +proto.identity.client.PreKey.prototype.getPrekeysignature = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.identity.client.PreKey} returns this + */ +proto.identity.client.PreKey.prototype.setPrekeysignature = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.identity.client.IdentityKeyInfo.prototype.toObject = function(opt_includeInstance) { + return proto.identity.client.IdentityKeyInfo.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.identity.client.IdentityKeyInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.identity.client.IdentityKeyInfo.toObject = function(includeInstance, msg) { + var f, obj = { + payload: jspb.Message.getFieldWithDefault(msg, 1, ""), + payloadsignature: jspb.Message.getFieldWithDefault(msg, 2, ""), + socialproof: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.identity.client.IdentityKeyInfo} + */ +proto.identity.client.IdentityKeyInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.identity.client.IdentityKeyInfo; + return proto.identity.client.IdentityKeyInfo.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.identity.client.IdentityKeyInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.identity.client.IdentityKeyInfo} + */ +proto.identity.client.IdentityKeyInfo.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setPayload(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setPayloadsignature(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setSocialproof(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.identity.client.IdentityKeyInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.identity.client.IdentityKeyInfo.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.identity.client.IdentityKeyInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.identity.client.IdentityKeyInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPayload(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getPayloadsignature(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional string payload = 1; + * @return {string} + */ +proto.identity.client.IdentityKeyInfo.prototype.getPayload = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.identity.client.IdentityKeyInfo} returns this + */ +proto.identity.client.IdentityKeyInfo.prototype.setPayload = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string payloadSignature = 2; + * @return {string} + */ +proto.identity.client.IdentityKeyInfo.prototype.getPayloadsignature = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.identity.client.IdentityKeyInfo} returns this + */ +proto.identity.client.IdentityKeyInfo.prototype.setPayloadsignature = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string socialProof = 3; + * @return {string} + */ +proto.identity.client.IdentityKeyInfo.prototype.getSocialproof = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.identity.client.IdentityKeyInfo} returns this + */ +proto.identity.client.IdentityKeyInfo.prototype.setSocialproof = function(value) { + return jspb.Message.setField(this, 3, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.identity.client.IdentityKeyInfo} returns this + */ +proto.identity.client.IdentityKeyInfo.prototype.clearSocialproof = function() { + return jspb.Message.setField(this, 3, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.identity.client.IdentityKeyInfo.prototype.hasSocialproof = function() { + return jspb.Message.getField(this, 3) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.identity.client.DeviceKeyUpload.repeatedFields_ = [4,5]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.identity.client.DeviceKeyUpload.prototype.toObject = function(opt_includeInstance) { + return proto.identity.client.DeviceKeyUpload.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.identity.client.DeviceKeyUpload} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.identity.client.DeviceKeyUpload.toObject = function(includeInstance, msg) { + var f, obj = { + devicekeyinfo: (f = msg.getDevicekeyinfo()) && proto.identity.client.IdentityKeyInfo.toObject(includeInstance, f), + identityupload: (f = msg.getIdentityupload()) && 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 + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.identity.client.DeviceKeyUpload} + */ +proto.identity.client.DeviceKeyUpload.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.identity.client.DeviceKeyUpload; + return proto.identity.client.DeviceKeyUpload.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.identity.client.DeviceKeyUpload} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.identity.client.DeviceKeyUpload} + */ +proto.identity.client.DeviceKeyUpload.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.identity.client.IdentityKeyInfo; + reader.readMessage(value,proto.identity.client.IdentityKeyInfo.deserializeBinaryFromReader); + msg.setDevicekeyinfo(value); + break; + case 2: + var value = new proto.identity.client.PreKey; + reader.readMessage(value,proto.identity.client.PreKey.deserializeBinaryFromReader); + msg.setIdentityupload(value); + break; + case 3: + var value = new proto.identity.client.PreKey; + reader.readMessage(value,proto.identity.client.PreKey.deserializeBinaryFromReader); + msg.setNotifupload(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.addOnetimeidentityprekeys(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.addOnetimenotifprekeys(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.identity.client.DeviceKeyUpload.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.identity.client.DeviceKeyUpload.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.identity.client.DeviceKeyUpload} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.identity.client.DeviceKeyUpload.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDevicekeyinfo(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.identity.client.IdentityKeyInfo.serializeBinaryToWriter + ); + } + f = message.getIdentityupload(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.identity.client.PreKey.serializeBinaryToWriter + ); + } + f = message.getNotifupload(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.identity.client.PreKey.serializeBinaryToWriter + ); + } + f = message.getOnetimeidentityprekeysList(); + if (f.length > 0) { + writer.writeRepeatedString( + 4, + f + ); + } + f = message.getOnetimenotifprekeysList(); + if (f.length > 0) { + writer.writeRepeatedString( + 5, + f + ); + } +}; + + +/** + * optional IdentityKeyInfo deviceKeyInfo = 1; + * @return {?proto.identity.client.IdentityKeyInfo} + */ +proto.identity.client.DeviceKeyUpload.prototype.getDevicekeyinfo = function() { + return /** @type{?proto.identity.client.IdentityKeyInfo} */ ( + jspb.Message.getWrapperField(this, proto.identity.client.IdentityKeyInfo, 1)); +}; + + +/** + * @param {?proto.identity.client.IdentityKeyInfo|undefined} value + * @return {!proto.identity.client.DeviceKeyUpload} returns this +*/ +proto.identity.client.DeviceKeyUpload.prototype.setDevicekeyinfo = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.identity.client.DeviceKeyUpload} returns this + */ +proto.identity.client.DeviceKeyUpload.prototype.clearDevicekeyinfo = function() { + return this.setDevicekeyinfo(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.identity.client.DeviceKeyUpload.prototype.hasDevicekeyinfo = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional PreKey identityUpload = 2; + * @return {?proto.identity.client.PreKey} + */ +proto.identity.client.DeviceKeyUpload.prototype.getIdentityupload = function() { + return /** @type{?proto.identity.client.PreKey} */ ( + jspb.Message.getWrapperField(this, proto.identity.client.PreKey, 2)); +}; + + +/** + * @param {?proto.identity.client.PreKey|undefined} value + * @return {!proto.identity.client.DeviceKeyUpload} returns this +*/ +proto.identity.client.DeviceKeyUpload.prototype.setIdentityupload = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.identity.client.DeviceKeyUpload} returns this + */ +proto.identity.client.DeviceKeyUpload.prototype.clearIdentityupload = function() { + return this.setIdentityupload(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.identity.client.DeviceKeyUpload.prototype.hasIdentityupload = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional PreKey notifUpload = 3; + * @return {?proto.identity.client.PreKey} + */ +proto.identity.client.DeviceKeyUpload.prototype.getNotifupload = function() { + return /** @type{?proto.identity.client.PreKey} */ ( + jspb.Message.getWrapperField(this, proto.identity.client.PreKey, 3)); +}; + + +/** + * @param {?proto.identity.client.PreKey|undefined} value + * @return {!proto.identity.client.DeviceKeyUpload} returns this +*/ +proto.identity.client.DeviceKeyUpload.prototype.setNotifupload = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.identity.client.DeviceKeyUpload} returns this + */ +proto.identity.client.DeviceKeyUpload.prototype.clearNotifupload = function() { + return this.setNotifupload(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.identity.client.DeviceKeyUpload.prototype.hasNotifupload = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * repeated string onetimeIdentityPrekeys = 4; + * @return {!Array} + */ +proto.identity.client.DeviceKeyUpload.prototype.getOnetimeidentityprekeysList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.identity.client.DeviceKeyUpload} returns this + */ +proto.identity.client.DeviceKeyUpload.prototype.setOnetimeidentityprekeysList = function(value) { + return jspb.Message.setField(this, 4, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.identity.client.DeviceKeyUpload} returns this + */ +proto.identity.client.DeviceKeyUpload.prototype.addOnetimeidentityprekeys = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 4, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.identity.client.DeviceKeyUpload} returns this + */ +proto.identity.client.DeviceKeyUpload.prototype.clearOnetimeidentityprekeysList = function() { + return this.setOnetimeidentityprekeysList([]); +}; + + +/** + * repeated string onetimeNotifPrekeys = 5; + * @return {!Array} + */ +proto.identity.client.DeviceKeyUpload.prototype.getOnetimenotifprekeysList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 5)); +}; + + +/** + * @param {!Array} value + * @return {!proto.identity.client.DeviceKeyUpload} returns this + */ +proto.identity.client.DeviceKeyUpload.prototype.setOnetimenotifprekeysList = function(value) { + return jspb.Message.setField(this, 5, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.identity.client.DeviceKeyUpload} returns this + */ +proto.identity.client.DeviceKeyUpload.prototype.addOnetimenotifprekeys = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 5, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.identity.client.DeviceKeyUpload} returns this + */ +proto.identity.client.DeviceKeyUpload.prototype.clearOnetimenotifprekeysList = function() { + return this.setOnetimenotifprekeysList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.identity.client.RegistrationStartRequest.prototype.toObject = function(opt_includeInstance) { + return proto.identity.client.RegistrationStartRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.identity.client.RegistrationStartRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.identity.client.RegistrationStartRequest.toObject = function(includeInstance, msg) { + var f, obj = { + opaqueregistrationrequest: msg.getOpaqueregistrationrequest_asB64(), + username: jspb.Message.getFieldWithDefault(msg, 2, ""), + devicekeyupload: (f = msg.getDevicekeyupload()) && proto.identity.client.DeviceKeyUpload.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.identity.client.RegistrationStartRequest} + */ +proto.identity.client.RegistrationStartRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.identity.client.RegistrationStartRequest; + return proto.identity.client.RegistrationStartRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.identity.client.RegistrationStartRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.identity.client.RegistrationStartRequest} + */ +proto.identity.client.RegistrationStartRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setOpaqueregistrationrequest(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setUsername(value); + break; + case 3: + var value = new proto.identity.client.DeviceKeyUpload; + reader.readMessage(value,proto.identity.client.DeviceKeyUpload.deserializeBinaryFromReader); + msg.setDevicekeyupload(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.identity.client.RegistrationStartRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.identity.client.RegistrationStartRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.identity.client.RegistrationStartRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.identity.client.RegistrationStartRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOpaqueregistrationrequest_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getUsername(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getDevicekeyupload(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.identity.client.DeviceKeyUpload.serializeBinaryToWriter + ); + } +}; + + +/** + * optional bytes opaqueRegistrationRequest = 1; + * @return {string} + */ +proto.identity.client.RegistrationStartRequest.prototype.getOpaqueregistrationrequest = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes opaqueRegistrationRequest = 1; + * This is a type-conversion wrapper around `getOpaqueregistrationrequest()` + * @return {string} + */ +proto.identity.client.RegistrationStartRequest.prototype.getOpaqueregistrationrequest_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getOpaqueregistrationrequest())); +}; + + +/** + * optional bytes opaqueRegistrationRequest = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getOpaqueregistrationrequest()` + * @return {!Uint8Array} + */ +proto.identity.client.RegistrationStartRequest.prototype.getOpaqueregistrationrequest_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getOpaqueregistrationrequest())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.identity.client.RegistrationStartRequest} returns this + */ +proto.identity.client.RegistrationStartRequest.prototype.setOpaqueregistrationrequest = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional string username = 2; + * @return {string} + */ +proto.identity.client.RegistrationStartRequest.prototype.getUsername = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.identity.client.RegistrationStartRequest} returns this + */ +proto.identity.client.RegistrationStartRequest.prototype.setUsername = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional DeviceKeyUpload deviceKeyUpload = 3; + * @return {?proto.identity.client.DeviceKeyUpload} + */ +proto.identity.client.RegistrationStartRequest.prototype.getDevicekeyupload = function() { + return /** @type{?proto.identity.client.DeviceKeyUpload} */ ( + jspb.Message.getWrapperField(this, proto.identity.client.DeviceKeyUpload, 3)); +}; + + +/** + * @param {?proto.identity.client.DeviceKeyUpload|undefined} value + * @return {!proto.identity.client.RegistrationStartRequest} returns this +*/ +proto.identity.client.RegistrationStartRequest.prototype.setDevicekeyupload = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.identity.client.RegistrationStartRequest} returns this + */ +proto.identity.client.RegistrationStartRequest.prototype.clearDevicekeyupload = function() { + return this.setDevicekeyupload(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.identity.client.RegistrationStartRequest.prototype.hasDevicekeyupload = function() { + return jspb.Message.getField(this, 3) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.identity.client.RegistrationFinishRequest.prototype.toObject = function(opt_includeInstance) { + return proto.identity.client.RegistrationFinishRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.identity.client.RegistrationFinishRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.identity.client.RegistrationFinishRequest.toObject = function(includeInstance, msg) { + var f, obj = { + sessionid: jspb.Message.getFieldWithDefault(msg, 1, ""), + opaqueregistrationupload: msg.getOpaqueregistrationupload_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.identity.client.RegistrationFinishRequest} + */ +proto.identity.client.RegistrationFinishRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.identity.client.RegistrationFinishRequest; + return proto.identity.client.RegistrationFinishRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.identity.client.RegistrationFinishRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.identity.client.RegistrationFinishRequest} + */ +proto.identity.client.RegistrationFinishRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setSessionid(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setOpaqueregistrationupload(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.identity.client.RegistrationFinishRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.identity.client.RegistrationFinishRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.identity.client.RegistrationFinishRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.identity.client.RegistrationFinishRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSessionid(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getOpaqueregistrationupload_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } +}; + + +/** + * optional string sessionID = 1; + * @return {string} + */ +proto.identity.client.RegistrationFinishRequest.prototype.getSessionid = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.identity.client.RegistrationFinishRequest} returns this + */ +proto.identity.client.RegistrationFinishRequest.prototype.setSessionid = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional bytes opaqueRegistrationUpload = 2; + * @return {string} + */ +proto.identity.client.RegistrationFinishRequest.prototype.getOpaqueregistrationupload = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes opaqueRegistrationUpload = 2; + * This is a type-conversion wrapper around `getOpaqueregistrationupload()` + * @return {string} + */ +proto.identity.client.RegistrationFinishRequest.prototype.getOpaqueregistrationupload_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getOpaqueregistrationupload())); +}; + + +/** + * optional bytes opaqueRegistrationUpload = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getOpaqueregistrationupload()` + * @return {!Uint8Array} + */ +proto.identity.client.RegistrationFinishRequest.prototype.getOpaqueregistrationupload_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getOpaqueregistrationupload())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.identity.client.RegistrationFinishRequest} returns this + */ +proto.identity.client.RegistrationFinishRequest.prototype.setOpaqueregistrationupload = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.identity.client.RegistrationStartResponse.prototype.toObject = function(opt_includeInstance) { + return proto.identity.client.RegistrationStartResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.identity.client.RegistrationStartResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.identity.client.RegistrationStartResponse.toObject = function(includeInstance, msg) { + var f, obj = { + sessionid: jspb.Message.getFieldWithDefault(msg, 1, ""), + opaqueregistrationresponse: msg.getOpaqueregistrationresponse_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.identity.client.RegistrationStartResponse} + */ +proto.identity.client.RegistrationStartResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.identity.client.RegistrationStartResponse; + return proto.identity.client.RegistrationStartResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.identity.client.RegistrationStartResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.identity.client.RegistrationStartResponse} + */ +proto.identity.client.RegistrationStartResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setSessionid(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setOpaqueregistrationresponse(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.identity.client.RegistrationStartResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.identity.client.RegistrationStartResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.identity.client.RegistrationStartResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.identity.client.RegistrationStartResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSessionid(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getOpaqueregistrationresponse_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } +}; + + +/** + * optional string sessionID = 1; + * @return {string} + */ +proto.identity.client.RegistrationStartResponse.prototype.getSessionid = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.identity.client.RegistrationStartResponse} returns this + */ +proto.identity.client.RegistrationStartResponse.prototype.setSessionid = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional bytes opaqueRegistrationResponse = 2; + * @return {string} + */ +proto.identity.client.RegistrationStartResponse.prototype.getOpaqueregistrationresponse = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes opaqueRegistrationResponse = 2; + * This is a type-conversion wrapper around `getOpaqueregistrationresponse()` + * @return {string} + */ +proto.identity.client.RegistrationStartResponse.prototype.getOpaqueregistrationresponse_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getOpaqueregistrationresponse())); +}; + + +/** + * optional bytes opaqueRegistrationResponse = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getOpaqueregistrationresponse()` + * @return {!Uint8Array} + */ +proto.identity.client.RegistrationStartResponse.prototype.getOpaqueregistrationresponse_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getOpaqueregistrationresponse())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.identity.client.RegistrationStartResponse} returns this + */ +proto.identity.client.RegistrationStartResponse.prototype.setOpaqueregistrationresponse = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.identity.client.RegistrationFinishResponse.prototype.toObject = function(opt_includeInstance) { + return proto.identity.client.RegistrationFinishResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.identity.client.RegistrationFinishResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.identity.client.RegistrationFinishResponse.toObject = function(includeInstance, msg) { + var f, obj = { + 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 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.getAccesstoken(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * 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); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.identity.client.UpdateUserPasswordStartRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.identity.client.UpdateUserPasswordStartRequest.toObject = function(includeInstance, msg) { + var f, obj = { + opaqueregistrationrequest: msg.getOpaqueregistrationrequest_asB64(), + accesstoken: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.identity.client.UpdateUserPasswordStartRequest} + */ +proto.identity.client.UpdateUserPasswordStartRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.identity.client.UpdateUserPasswordStartRequest; + return proto.identity.client.UpdateUserPasswordStartRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.identity.client.UpdateUserPasswordStartRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.identity.client.UpdateUserPasswordStartRequest} + */ +proto.identity.client.UpdateUserPasswordStartRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setOpaqueregistrationrequest(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setAccesstoken(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.identity.client.UpdateUserPasswordStartRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.identity.client.UpdateUserPasswordStartRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.identity.client.UpdateUserPasswordStartRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.identity.client.UpdateUserPasswordStartRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOpaqueregistrationrequest_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getAccesstoken(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional bytes opaqueRegistrationRequest = 1; + * @return {string} + */ +proto.identity.client.UpdateUserPasswordStartRequest.prototype.getOpaqueregistrationrequest = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes opaqueRegistrationRequest = 1; + * This is a type-conversion wrapper around `getOpaqueregistrationrequest()` + * @return {string} + */ +proto.identity.client.UpdateUserPasswordStartRequest.prototype.getOpaqueregistrationrequest_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getOpaqueregistrationrequest())); +}; + + +/** + * optional bytes opaqueRegistrationRequest = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getOpaqueregistrationrequest()` + * @return {!Uint8Array} + */ +proto.identity.client.UpdateUserPasswordStartRequest.prototype.getOpaqueregistrationrequest_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getOpaqueregistrationrequest())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.identity.client.UpdateUserPasswordStartRequest} returns this + */ +proto.identity.client.UpdateUserPasswordStartRequest.prototype.setOpaqueregistrationrequest = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional string accessToken = 3; + * @return {string} + */ +proto.identity.client.UpdateUserPasswordStartRequest.prototype.getAccesstoken = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.identity.client.UpdateUserPasswordStartRequest} returns this + */ +proto.identity.client.UpdateUserPasswordStartRequest.prototype.setAccesstoken = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.identity.client.UpdateUserPasswordFinishRequest.prototype.toObject = function(opt_includeInstance) { + return proto.identity.client.UpdateUserPasswordFinishRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.identity.client.UpdateUserPasswordFinishRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.identity.client.UpdateUserPasswordFinishRequest.toObject = function(includeInstance, msg) { + 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.UpdateUserPasswordFinishRequest} + */ +proto.identity.client.UpdateUserPasswordFinishRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.identity.client.UpdateUserPasswordFinishRequest; + return proto.identity.client.UpdateUserPasswordFinishRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.identity.client.UpdateUserPasswordFinishRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.identity.client.UpdateUserPasswordFinishRequest} + */ +proto.identity.client.UpdateUserPasswordFinishRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setSessionid(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setOpaqueregistrationupload(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.identity.client.UpdateUserPasswordFinishRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.identity.client.UpdateUserPasswordFinishRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.identity.client.UpdateUserPasswordFinishRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.identity.client.UpdateUserPasswordFinishRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSessionid(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getOpaqueregistrationupload_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } +}; + + +/** + * optional string sessionID = 1; + * @return {string} + */ +proto.identity.client.UpdateUserPasswordFinishRequest.prototype.getSessionid = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.identity.client.UpdateUserPasswordFinishRequest} returns this + */ +proto.identity.client.UpdateUserPasswordFinishRequest.prototype.setSessionid = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional bytes opaqueRegistrationUpload = 2; + * @return {string} + */ +proto.identity.client.UpdateUserPasswordFinishRequest.prototype.getOpaqueregistrationupload = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes opaqueRegistrationUpload = 2; + * This is a type-conversion wrapper around `getOpaqueregistrationupload()` + * @return {string} + */ +proto.identity.client.UpdateUserPasswordFinishRequest.prototype.getOpaqueregistrationupload_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getOpaqueregistrationupload())); +}; + + +/** + * optional bytes opaqueRegistrationUpload = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getOpaqueregistrationupload()` + * @return {!Uint8Array} + */ +proto.identity.client.UpdateUserPasswordFinishRequest.prototype.getOpaqueregistrationupload_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getOpaqueregistrationupload())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.identity.client.UpdateUserPasswordFinishRequest} returns this + */ +proto.identity.client.UpdateUserPasswordFinishRequest.prototype.setOpaqueregistrationupload = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.identity.client.UpdateUserPasswordStartResponse.prototype.toObject = function(opt_includeInstance) { + return proto.identity.client.UpdateUserPasswordStartResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.identity.client.UpdateUserPasswordStartResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.identity.client.UpdateUserPasswordStartResponse.toObject = function(includeInstance, msg) { + var f, obj = { + sessionid: jspb.Message.getFieldWithDefault(msg, 1, ""), + opaqueregistrationresponse: msg.getOpaqueregistrationresponse_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.identity.client.UpdateUserPasswordStartResponse} + */ +proto.identity.client.UpdateUserPasswordStartResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.identity.client.UpdateUserPasswordStartResponse; + return proto.identity.client.UpdateUserPasswordStartResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.identity.client.UpdateUserPasswordStartResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.identity.client.UpdateUserPasswordStartResponse} + */ +proto.identity.client.UpdateUserPasswordStartResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setSessionid(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setOpaqueregistrationresponse(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.identity.client.UpdateUserPasswordStartResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.identity.client.UpdateUserPasswordStartResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.identity.client.UpdateUserPasswordStartResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.identity.client.UpdateUserPasswordStartResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSessionid(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getOpaqueregistrationresponse_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } +}; + + +/** + * optional string sessionID = 1; + * @return {string} + */ +proto.identity.client.UpdateUserPasswordStartResponse.prototype.getSessionid = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.identity.client.UpdateUserPasswordStartResponse} returns this + */ +proto.identity.client.UpdateUserPasswordStartResponse.prototype.setSessionid = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional bytes opaqueRegistrationResponse = 2; + * @return {string} + */ +proto.identity.client.UpdateUserPasswordStartResponse.prototype.getOpaqueregistrationresponse = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes opaqueRegistrationResponse = 2; + * This is a type-conversion wrapper around `getOpaqueregistrationresponse()` + * @return {string} + */ +proto.identity.client.UpdateUserPasswordStartResponse.prototype.getOpaqueregistrationresponse_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getOpaqueregistrationresponse())); +}; + + +/** + * optional bytes opaqueRegistrationResponse = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getOpaqueregistrationresponse()` + * @return {!Uint8Array} + */ +proto.identity.client.UpdateUserPasswordStartResponse.prototype.getOpaqueregistrationresponse_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getOpaqueregistrationresponse())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.identity.client.UpdateUserPasswordStartResponse} returns this + */ +proto.identity.client.UpdateUserPasswordStartResponse.prototype.setOpaqueregistrationresponse = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.identity.client.UpdateUserPasswordFinishResponse.prototype.toObject = function(opt_includeInstance) { + return proto.identity.client.UpdateUserPasswordFinishResponse.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.UpdateUserPasswordFinishResponse} 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) { + var f, obj = { + 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.UpdateUserPasswordFinishResponse} + */ +proto.identity.client.UpdateUserPasswordFinishResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.identity.client.UpdateUserPasswordFinishResponse; + return proto.identity.client.UpdateUserPasswordFinishResponse.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 {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.identity.client.UpdateUserPasswordFinishResponse} + */ +proto.identity.client.UpdateUserPasswordFinishResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + 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.UpdateUserPasswordFinishResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.identity.client.UpdateUserPasswordFinishResponse.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.UpdateUserPasswordFinishResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.identity.client.UpdateUserPasswordFinishResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAccesstoken(); + 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( + 2, + f + ); + } + f = message.getDevicekeyupload(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.identity.client.DeviceKeyUpload.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string username = 1; + * @return {string} + */ +proto.identity.client.OpaqueLoginStartRequest.prototype.getUsername = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.identity.client.OpaqueLoginStartRequest} returns this + */ +proto.identity.client.OpaqueLoginStartRequest.prototype.setUsername = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional bytes opaqueLoginRequest = 2; + * @return {string} + */ +proto.identity.client.OpaqueLoginStartRequest.prototype.getOpaqueloginrequest = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes opaqueLoginRequest = 2; + * This is a type-conversion wrapper around `getOpaqueloginrequest()` + * @return {string} + */ +proto.identity.client.OpaqueLoginStartRequest.prototype.getOpaqueloginrequest_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getOpaqueloginrequest())); +}; + + +/** + * optional bytes opaqueLoginRequest = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getOpaqueloginrequest()` + * @return {!Uint8Array} + */ +proto.identity.client.OpaqueLoginStartRequest.prototype.getOpaqueloginrequest_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getOpaqueloginrequest())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.identity.client.OpaqueLoginStartRequest} returns this + */ +proto.identity.client.OpaqueLoginStartRequest.prototype.setOpaqueloginrequest = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional DeviceKeyUpload deviceKeyUpload = 3; + * @return {?proto.identity.client.DeviceKeyUpload} + */ +proto.identity.client.OpaqueLoginStartRequest.prototype.getDevicekeyupload = function() { + return /** @type{?proto.identity.client.DeviceKeyUpload} */ ( + jspb.Message.getWrapperField(this, proto.identity.client.DeviceKeyUpload, 3)); +}; + + +/** + * @param {?proto.identity.client.DeviceKeyUpload|undefined} value + * @return {!proto.identity.client.OpaqueLoginStartRequest} returns this +*/ +proto.identity.client.OpaqueLoginStartRequest.prototype.setDevicekeyupload = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.identity.client.OpaqueLoginStartRequest} returns this + */ +proto.identity.client.OpaqueLoginStartRequest.prototype.clearDevicekeyupload = function() { + return this.setDevicekeyupload(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.identity.client.OpaqueLoginStartRequest.prototype.hasDevicekeyupload = function() { + return jspb.Message.getField(this, 3) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.identity.client.OpaqueLoginFinishRequest.prototype.toObject = function(opt_includeInstance) { + return proto.identity.client.OpaqueLoginFinishRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.identity.client.OpaqueLoginFinishRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.identity.client.OpaqueLoginFinishRequest.toObject = function(includeInstance, msg) { + var f, obj = { + sessionid: jspb.Message.getFieldWithDefault(msg, 1, ""), + opaqueloginupload: msg.getOpaqueloginupload_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.identity.client.OpaqueLoginFinishRequest} + */ +proto.identity.client.OpaqueLoginFinishRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.identity.client.OpaqueLoginFinishRequest; + return proto.identity.client.OpaqueLoginFinishRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.identity.client.OpaqueLoginFinishRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.identity.client.OpaqueLoginFinishRequest} + */ +proto.identity.client.OpaqueLoginFinishRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setSessionid(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setOpaqueloginupload(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.identity.client.OpaqueLoginFinishRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.identity.client.OpaqueLoginFinishRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.identity.client.OpaqueLoginFinishRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.identity.client.OpaqueLoginFinishRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSessionid(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getOpaqueloginupload_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } +}; + + +/** + * optional string sessionID = 1; + * @return {string} + */ +proto.identity.client.OpaqueLoginFinishRequest.prototype.getSessionid = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.identity.client.OpaqueLoginFinishRequest} returns this + */ +proto.identity.client.OpaqueLoginFinishRequest.prototype.setSessionid = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional bytes opaqueLoginUpload = 2; + * @return {string} + */ +proto.identity.client.OpaqueLoginFinishRequest.prototype.getOpaqueloginupload = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes opaqueLoginUpload = 2; + * This is a type-conversion wrapper around `getOpaqueloginupload()` + * @return {string} + */ +proto.identity.client.OpaqueLoginFinishRequest.prototype.getOpaqueloginupload_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getOpaqueloginupload())); +}; + + +/** + * optional bytes opaqueLoginUpload = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getOpaqueloginupload()` + * @return {!Uint8Array} + */ +proto.identity.client.OpaqueLoginFinishRequest.prototype.getOpaqueloginupload_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getOpaqueloginupload())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.identity.client.OpaqueLoginFinishRequest} returns this + */ +proto.identity.client.OpaqueLoginFinishRequest.prototype.setOpaqueloginupload = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.identity.client.OpaqueLoginStartResponse.prototype.toObject = function(opt_includeInstance) { + return proto.identity.client.OpaqueLoginStartResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.identity.client.OpaqueLoginStartResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.identity.client.OpaqueLoginStartResponse.toObject = function(includeInstance, msg) { + var f, obj = { + sessionid: jspb.Message.getFieldWithDefault(msg, 1, ""), + opaqueloginresponse: msg.getOpaqueloginresponse_asB64() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.identity.client.OpaqueLoginStartResponse} + */ +proto.identity.client.OpaqueLoginStartResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.identity.client.OpaqueLoginStartResponse; + return proto.identity.client.OpaqueLoginStartResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.identity.client.OpaqueLoginStartResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.identity.client.OpaqueLoginStartResponse} + */ +proto.identity.client.OpaqueLoginStartResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setSessionid(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setOpaqueloginresponse(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.identity.client.OpaqueLoginStartResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.identity.client.OpaqueLoginStartResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.identity.client.OpaqueLoginStartResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.identity.client.OpaqueLoginStartResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSessionid(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getOpaqueloginresponse_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } +}; + + +/** + * optional string sessionID = 1; + * @return {string} + */ +proto.identity.client.OpaqueLoginStartResponse.prototype.getSessionid = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.identity.client.OpaqueLoginStartResponse} returns this + */ +proto.identity.client.OpaqueLoginStartResponse.prototype.setSessionid = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional bytes opaqueLoginResponse = 2; + * @return {string} + */ +proto.identity.client.OpaqueLoginStartResponse.prototype.getOpaqueloginresponse = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes opaqueLoginResponse = 2; + * This is a type-conversion wrapper around `getOpaqueloginresponse()` + * @return {string} + */ +proto.identity.client.OpaqueLoginStartResponse.prototype.getOpaqueloginresponse_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getOpaqueloginresponse())); +}; + + +/** + * optional bytes opaqueLoginResponse = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getOpaqueloginresponse()` + * @return {!Uint8Array} + */ +proto.identity.client.OpaqueLoginStartResponse.prototype.getOpaqueloginresponse_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getOpaqueloginresponse())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.identity.client.OpaqueLoginStartResponse} returns this + */ +proto.identity.client.OpaqueLoginStartResponse.prototype.setOpaqueloginresponse = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.identity.client.OpaqueLoginFinishResponse.prototype.toObject = function(opt_includeInstance) { + return proto.identity.client.OpaqueLoginFinishResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.identity.client.OpaqueLoginFinishResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.identity.client.OpaqueLoginFinishResponse.toObject = function(includeInstance, msg) { + var f, obj = { + accesstoken: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.identity.client.OpaqueLoginFinishResponse} + */ +proto.identity.client.OpaqueLoginFinishResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.identity.client.OpaqueLoginFinishResponse; + return proto.identity.client.OpaqueLoginFinishResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.identity.client.OpaqueLoginFinishResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.identity.client.OpaqueLoginFinishResponse} + */ +proto.identity.client.OpaqueLoginFinishResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setAccesstoken(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.identity.client.OpaqueLoginFinishResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.identity.client.OpaqueLoginFinishResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.identity.client.OpaqueLoginFinishResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.identity.client.OpaqueLoginFinishResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAccesstoken(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string accessToken = 2; + * @return {string} + */ +proto.identity.client.OpaqueLoginFinishResponse.prototype.getAccesstoken = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.identity.client.OpaqueLoginFinishResponse} returns this + */ +proto.identity.client.OpaqueLoginFinishResponse.prototype.setAccesstoken = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.identity.client.WalletLoginRequest.prototype.toObject = function(opt_includeInstance) { + return proto.identity.client.WalletLoginRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.identity.client.WalletLoginRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.identity.client.WalletLoginRequest.toObject = function(includeInstance, msg) { + var f, obj = { + siwemessage: jspb.Message.getFieldWithDefault(msg, 1, ""), + siwesignature: jspb.Message.getFieldWithDefault(msg, 2, ""), + devicekeyupload: (f = msg.getDevicekeyupload()) && proto.identity.client.DeviceKeyUpload.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.identity.client.WalletLoginRequest} + */ +proto.identity.client.WalletLoginRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.identity.client.WalletLoginRequest; + return proto.identity.client.WalletLoginRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.identity.client.WalletLoginRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.identity.client.WalletLoginRequest} + */ +proto.identity.client.WalletLoginRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setSiwemessage(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setSiwesignature(value); + break; + case 3: + var value = new proto.identity.client.DeviceKeyUpload; + reader.readMessage(value,proto.identity.client.DeviceKeyUpload.deserializeBinaryFromReader); + msg.setDevicekeyupload(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.identity.client.WalletLoginRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.identity.client.WalletLoginRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.identity.client.WalletLoginRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.identity.client.WalletLoginRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSiwemessage(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getSiwesignature(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getDevicekeyupload(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.identity.client.DeviceKeyUpload.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string siweMessage = 1; + * @return {string} + */ +proto.identity.client.WalletLoginRequest.prototype.getSiwemessage = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.identity.client.WalletLoginRequest} returns this + */ +proto.identity.client.WalletLoginRequest.prototype.setSiwemessage = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string siweSignature = 2; + * @return {string} + */ +proto.identity.client.WalletLoginRequest.prototype.getSiwesignature = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.identity.client.WalletLoginRequest} returns this + */ +proto.identity.client.WalletLoginRequest.prototype.setSiwesignature = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional DeviceKeyUpload deviceKeyUpload = 3; + * @return {?proto.identity.client.DeviceKeyUpload} + */ +proto.identity.client.WalletLoginRequest.prototype.getDevicekeyupload = function() { + return /** @type{?proto.identity.client.DeviceKeyUpload} */ ( + jspb.Message.getWrapperField(this, proto.identity.client.DeviceKeyUpload, 3)); +}; + + +/** + * @param {?proto.identity.client.DeviceKeyUpload|undefined} value + * @return {!proto.identity.client.WalletLoginRequest} returns this +*/ +proto.identity.client.WalletLoginRequest.prototype.setDevicekeyupload = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.identity.client.WalletLoginRequest} returns this + */ +proto.identity.client.WalletLoginRequest.prototype.clearDevicekeyupload = function() { + return this.setDevicekeyupload(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.identity.client.WalletLoginRequest.prototype.hasDevicekeyupload = function() { + return jspb.Message.getField(this, 3) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.identity.client.WalletLoginResponse.prototype.toObject = function(opt_includeInstance) { + return proto.identity.client.WalletLoginResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.identity.client.WalletLoginResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.identity.client.WalletLoginResponse.toObject = function(includeInstance, msg) { + var f, obj = { + accesstoken: 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.WalletLoginResponse} + */ +proto.identity.client.WalletLoginResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.identity.client.WalletLoginResponse; + return proto.identity.client.WalletLoginResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.identity.client.WalletLoginResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.identity.client.WalletLoginResponse} + */ +proto.identity.client.WalletLoginResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setAccesstoken(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.identity.client.WalletLoginResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.identity.client.WalletLoginResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.identity.client.WalletLoginResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.identity.client.WalletLoginResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAccesstoken(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string accessToken = 1; + * @return {string} + */ +proto.identity.client.WalletLoginResponse.prototype.getAccesstoken = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.identity.client.WalletLoginResponse} returns this + */ +proto.identity.client.WalletLoginResponse.prototype.setAccesstoken = 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.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, "") + }; + + 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; + 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 + ); + } +}; + + +/** + * 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); +}; + + + + + +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.ReceiverKeyInfo.prototype.toObject = function(opt_includeInstance) { + return proto.identity.client.ReceiverKeyInfo.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.ReceiverKeyInfo} 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) { + 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, "") + }; + + 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.ReceiverKeyInfo} + */ +proto.identity.client.ReceiverKeyInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.identity.client.ReceiverKeyInfo; + return proto.identity.client.ReceiverKeyInfo.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 {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.identity.client.ReceiverKeyInfo} + */ +proto.identity.client.ReceiverKeyInfo.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; + 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; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.identity.client.ReceiverKeyInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.identity.client.ReceiverKeyInfo.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.ReceiverKeyInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.identity.client.ReceiverKeyInfo.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 = /** @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.ReceiverKeyInfo.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.ReceiverKeyInfo} returns this +*/ +proto.identity.client.ReceiverKeyInfo.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 + */ +proto.identity.client.ReceiverKeyInfo.prototype.clearIdentityinfo = function() { + return this.setIdentityinfo(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.identity.client.ReceiverKeyInfo.prototype.hasIdentityinfo = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional PreKey identityPrekey = 2; + * @return {?proto.identity.client.PreKey} + */ +proto.identity.client.ReceiverKeyInfo.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.ReceiverKeyInfo} returns this +*/ +proto.identity.client.ReceiverKeyInfo.prototype.setIdentityprekey = 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 + */ +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); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.identity.client.ReceiverKeyInfo.prototype.hasOnetimeidentityprekey = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional string onetimeNotifPrekey = 5; + * @return {string} + */ +proto.identity.client.ReceiverKeyInfo.prototype.getOnetimenotifprekey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @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); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.identity.client.ReceiverKeyInfo} returns this + */ +proto.identity.client.ReceiverKeyInfo.prototype.clearOnetimenotifprekey = function() { + return jspb.Message.setField(this, 5, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.identity.client.ReceiverKeyInfo.prototype.hasOnetimenotifprekey = function() { + return jspb.Message.getField(this, 5) != null; +}; + + + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.identity.client.ReceiverKeysForUserRequest.oneofGroups_ = [[1,2]]; + +/** + * @enum {number} + */ +proto.identity.client.ReceiverKeysForUserRequest.IdentifierCase = { + IDENTIFIER_NOT_SET: 0, + USERNAME: 1, + WALLETADDRESS: 2 +}; + +/** + * @return {proto.identity.client.ReceiverKeysForUserRequest.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])); +}; + + + +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.ReceiverKeysForUserRequest.prototype.toObject = function(opt_includeInstance) { + return proto.identity.client.ReceiverKeysForUserRequest.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.ReceiverKeysForUserRequest} 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) { + var f, obj = { + username: jspb.Message.getFieldWithDefault(msg, 1, ""), + walletaddress: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.identity.client.ReceiverKeysForUserRequest} + */ +proto.identity.client.ReceiverKeysForUserRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.identity.client.ReceiverKeysForUserRequest; + return proto.identity.client.ReceiverKeysForUserRequest.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 {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.identity.client.ReceiverKeysForUserRequest} + */ +proto.identity.client.ReceiverKeysForUserRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setUsername(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setWalletaddress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.identity.client.ReceiverKeysForUserRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.identity.client.ReceiverKeysForUserRequest.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.ReceiverKeysForUserRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.identity.client.ReceiverKeysForUserRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {string} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeString( + 1, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string username = 1; + * @return {string} + */ +proto.identity.client.ReceiverKeysForUserRequest.prototype.getUsername = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.identity.client.ReceiverKeysForUserRequest} returns this + */ +proto.identity.client.ReceiverKeysForUserRequest.prototype.setUsername = function(value) { + return jspb.Message.setOneofField(this, 1, proto.identity.client.ReceiverKeysForUserRequest.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.identity.client.ReceiverKeysForUserRequest} returns this + */ +proto.identity.client.ReceiverKeysForUserRequest.prototype.clearUsername = function() { + return jspb.Message.setOneofField(this, 1, proto.identity.client.ReceiverKeysForUserRequest.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.identity.client.ReceiverKeysForUserRequest.prototype.hasUsername = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string walletAddress = 2; + * @return {string} + */ +proto.identity.client.ReceiverKeysForUserRequest.prototype.getWalletaddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.identity.client.ReceiverKeysForUserRequest} returns this + */ +proto.identity.client.ReceiverKeysForUserRequest.prototype.setWalletaddress = function(value) { + return jspb.Message.setOneofField(this, 2, proto.identity.client.ReceiverKeysForUserRequest.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.identity.client.ReceiverKeysForUserRequest} returns this + */ +proto.identity.client.ReceiverKeysForUserRequest.prototype.clearWalletaddress = function() { + return jspb.Message.setOneofField(this, 2, proto.identity.client.ReceiverKeysForUserRequest.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.identity.client.ReceiverKeysForUserRequest.prototype.hasWalletaddress = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.identity.client.ReceiverKeysForUserResponse.prototype.toObject = function(opt_includeInstance) { + return proto.identity.client.ReceiverKeysForUserResponse.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.ReceiverKeysForUserResponse} 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) { + var f, obj = { + devicesMap: (f = msg.getDevicesMap()) ? f.toObject(includeInstance, proto.identity.client.ReceiverKeyInfo.toObject) : [] + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.identity.client.ReceiverKeysForUserResponse} + */ +proto.identity.client.ReceiverKeysForUserResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.identity.client.ReceiverKeysForUserResponse; + return proto.identity.client.ReceiverKeysForUserResponse.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 {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.identity.client.ReceiverKeysForUserResponse} + */ +proto.identity.client.ReceiverKeysForUserResponse.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.ReceiverKeyInfo.deserializeBinaryFromReader, "", new proto.identity.client.ReceiverKeyInfo()); + }); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.identity.client.ReceiverKeysForUserResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.identity.client.ReceiverKeysForUserResponse.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.ReceiverKeysForUserResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.identity.client.ReceiverKeysForUserResponse.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 + ); + } +}; + + +/** + * 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 + */ +proto.identity.client.SenderKeysForUserRequest.oneofGroups_ = [[1,2]]; + +/** + * @enum {number} + */ +proto.identity.client.SenderKeysForUserRequest.IdentifierCase = { + IDENTIFIER_NOT_SET: 0, + USERNAME: 1, + WALLETADDRESS: 2 +}; + +/** + * @return {proto.identity.client.SenderKeysForUserRequest.IdentifierCase} + */ +proto.identity.client.SenderKeysForUserRequest.prototype.getIdentifierCase = function() { + return /** @type {proto.identity.client.SenderKeysForUserRequest.IdentifierCase} */(jspb.Message.computeOneofCase(this, proto.identity.client.SenderKeysForUserRequest.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.identity.client.SenderKeysForUserRequest.prototype.toObject = function(opt_includeInstance) { + return proto.identity.client.SenderKeysForUserRequest.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.SenderKeysForUserRequest} 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) { + var f, obj = { + username: jspb.Message.getFieldWithDefault(msg, 1, ""), + walletaddress: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.identity.client.SenderKeysForUserRequest} + */ +proto.identity.client.SenderKeysForUserRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.identity.client.SenderKeysForUserRequest; + return proto.identity.client.SenderKeysForUserRequest.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 {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.identity.client.SenderKeysForUserRequest} + */ +proto.identity.client.SenderKeysForUserRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setUsername(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setWalletaddress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.identity.client.SenderKeysForUserRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.identity.client.SenderKeysForUserRequest.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.SenderKeysForUserRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.identity.client.SenderKeysForUserRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {string} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeString( + 1, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string username = 1; + * @return {string} + */ +proto.identity.client.SenderKeysForUserRequest.prototype.getUsername = 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} + */ +proto.identity.client.SenderKeysForUserRequest.prototype.hasUsername = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string walletAddress = 2; + * @return {string} + */ +proto.identity.client.SenderKeysForUserRequest.prototype.getWalletaddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.identity.client.SenderKeysForUserRequest} returns this + */ +proto.identity.client.SenderKeysForUserRequest.prototype.setWalletaddress = function(value) { + return jspb.Message.setOneofField(this, 2, 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.clearWalletaddress = function() { + return jspb.Message.setOneofField(this, 2, proto.identity.client.SenderKeysForUserRequest.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.identity.client.SenderKeysForUserRequest.prototype.hasWalletaddress = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.identity.client.SenderKeysForUserResponse.prototype.toObject = function(opt_includeInstance) { + return proto.identity.client.SenderKeysForUserResponse.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.SenderKeysForUserResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +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; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.identity.client.SenderKeysForUserResponse} + */ +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); +}; + + +/** + * 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} + */ +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; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.identity.client.SenderKeysForUserResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.identity.client.SenderKeysForUserResponse.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.SenderKeysForUserResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +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); + } +}; + + +/** + * map devices = 1; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.identity.client.SenderKeysForUserResponse.prototype.getDevicesMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 1, opt_noLazyCreate, + proto.identity.client.SenderKeyInfo)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.identity.client.SenderKeysForUserResponse} returns this + */ +proto.identity.client.SenderKeysForUserResponse.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.KeyserverSessionInfo.prototype.toObject = function(opt_includeInstance) { + return proto.identity.client.KeyserverSessionInfo.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.KeyserverSessionInfo} 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) { + 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, "") + }; + + 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.KeyserverSessionInfo} + */ +proto.identity.client.KeyserverSessionInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.identity.client.KeyserverSessionInfo; + return proto.identity.client.KeyserverSessionInfo.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 {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.identity.client.KeyserverSessionInfo} + */ +proto.identity.client.KeyserverSessionInfo.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.setIdentityprekeys(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setOnetimeidentityprekey(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.identity.client.KeyserverSessionInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.identity.client.KeyserverSessionInfo.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.KeyserverSessionInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.identity.client.KeyserverSessionInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getIdentityinfo(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.identity.client.IdentityKeyInfo.serializeBinaryToWriter + ); + } + f = message.getIdentityprekeys(); + 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 + */ +proto.identity.client.KeyserverSessionInfo.prototype.clearIdentityinfo = function() { + return this.setIdentityinfo(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.identity.client.KeyserverSessionInfo.prototype.hasIdentityinfo = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional PreKey identityPrekeys = 2; + * @return {?proto.identity.client.PreKey} + */ +proto.identity.client.KeyserverSessionInfo.prototype.getIdentityprekeys = 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.KeyserverSessionInfo} returns this +*/ +proto.identity.client.KeyserverSessionInfo.prototype.setIdentityprekeys = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.identity.client.KeyserverSessionInfo} returns this + */ +proto.identity.client.KeyserverSessionInfo.prototype.clearIdentityprekeys = function() { + return this.setIdentityprekeys(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.identity.client.KeyserverSessionInfo.prototype.hasIdentityprekeys = 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])); +}; + + + +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.KeyserverKeysRequest.prototype.toObject = function(opt_includeInstance) { + return proto.identity.client.KeyserverKeysRequest.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.KeyserverKeysRequest} 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) { + var f, obj = { + username: jspb.Message.getFieldWithDefault(msg, 1, ""), + walletaddress: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.identity.client.KeyserverKeysRequest} + */ +proto.identity.client.KeyserverKeysRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.identity.client.KeyserverKeysRequest; + return proto.identity.client.KeyserverKeysRequest.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 {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.identity.client.KeyserverKeysRequest} + */ +proto.identity.client.KeyserverKeysRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setUsername(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setWalletaddress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.identity.client.KeyserverKeysRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.identity.client.KeyserverKeysRequest.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.KeyserverKeysRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.identity.client.KeyserverKeysRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {string} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeString( + 1, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string username = 1; + * @return {string} + */ +proto.identity.client.KeyserverKeysRequest.prototype.getUsername = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.identity.client.KeyserverKeysRequest} 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; +}; + + +/** + * optional string walletAddress = 2; + * @return {string} + */ +proto.identity.client.KeyserverKeysRequest.prototype.getWalletaddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.identity.client.KeyserverKeysRequest} returns this + */ +proto.identity.client.KeyserverKeysRequest.prototype.setWalletaddress = function(value) { + return jspb.Message.setOneofField(this, 2, 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.clearWalletaddress = function() { + return jspb.Message.setOneofField(this, 2, proto.identity.client.KeyserverKeysRequest.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.identity.client.KeyserverKeysRequest.prototype.hasWalletaddress = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.identity.client.KeyserverKeysResponse.prototype.toObject = function(opt_includeInstance) { + return proto.identity.client.KeyserverKeysResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.identity.client.KeyserverKeysResponse} 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) { + var f, obj = { + keyserverinfo: (f = msg.getKeyserverinfo()) && proto.identity.client.KeyserverSessionInfo.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.KeyserverKeysResponse} + */ +proto.identity.client.KeyserverKeysResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.identity.client.KeyserverKeysResponse; + return proto.identity.client.KeyserverKeysResponse.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 {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.identity.client.KeyserverKeysResponse} + */ +proto.identity.client.KeyserverKeysResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.identity.client.KeyserverSessionInfo; + reader.readMessage(value,proto.identity.client.KeyserverSessionInfo.deserializeBinaryFromReader); + msg.setKeyserverinfo(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.identity.client.KeyserverKeysResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.identity.client.KeyserverKeysResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.identity.client.KeyserverKeysResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.identity.client.KeyserverKeysResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getKeyserverinfo(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.identity.client.KeyserverSessionInfo.serializeBinaryToWriter + ); + } +}; + + +/** + * 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 + */ +proto.identity.client.KeyserverKeysResponse.prototype.clearKeyserverinfo = function() { + return this.setKeyserverinfo(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.identity.client.KeyserverKeysResponse.prototype.hasKeyserverinfo = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.identity.client.UploadOneTimeKeysRequest.repeatedFields_ = [2]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.identity.client.UploadOneTimeKeysRequest.prototype.toObject = function(opt_includeInstance) { + return proto.identity.client.UploadOneTimeKeysRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.identity.client.UploadOneTimeKeysRequest} 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) { + var f, obj = { + accesstoken: jspb.Message.getFieldWithDefault(msg, 1, ""), + onetimeprekeysList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.identity.client.UploadOneTimeKeysRequest} + */ +proto.identity.client.UploadOneTimeKeysRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + 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.UploadOneTimeKeysRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.identity.client.UploadOneTimeKeysRequest} + */ +proto.identity.client.UploadOneTimeKeysRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setAccesstoken(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.addOnetimeprekeys(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.identity.client.UploadOneTimeKeysRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.identity.client.UploadOneTimeKeysRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.identity.client.UploadOneTimeKeysRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.identity.client.UploadOneTimeKeysRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAccesstoken(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getOnetimeprekeysList(); + if (f.length > 0) { + writer.writeRepeatedString( + 2, + f + ); + } +}; + + +/** + * optional string accessToken = 1; + * @return {string} + */ +proto.identity.client.UploadOneTimeKeysRequest.prototype.getAccesstoken = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.identity.client.UploadOneTimeKeysRequest} returns this + */ +proto.identity.client.UploadOneTimeKeysRequest.prototype.setAccesstoken = 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 + */ +proto.identity.client.UploadOneTimeKeysRequest.prototype.setOnetimeprekeysList = function(value) { + return jspb.Message.setField(this, 2, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.identity.client.UploadOneTimeKeysRequest} 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([]); +}; + + + + + +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.RefreshUserPreKeysRequest.prototype.toObject = function(opt_includeInstance) { + return proto.identity.client.RefreshUserPreKeysRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.identity.client.RefreshUserPreKeysRequest} 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) { + var f, obj = { + accesstoken: jspb.Message.getFieldWithDefault(msg, 1, ""), + newprekeys: (f = msg.getNewprekeys()) && 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.RefreshUserPreKeysRequest} + */ +proto.identity.client.RefreshUserPreKeysRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + 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.RefreshUserPreKeysRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.identity.client.RefreshUserPreKeysRequest} + */ +proto.identity.client.RefreshUserPreKeysRequest.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 = new proto.identity.client.PreKey; + reader.readMessage(value,proto.identity.client.PreKey.deserializeBinaryFromReader); + msg.setNewprekeys(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.identity.client.RefreshUserPreKeysRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.identity.client.RefreshUserPreKeysRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.identity.client.RefreshUserPreKeysRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.identity.client.RefreshUserPreKeysRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAccesstoken(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getNewprekeys(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.identity.client.PreKey.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string accessToken = 1; + * @return {string} + */ +proto.identity.client.RefreshUserPreKeysRequest.prototype.getAccesstoken = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.identity.client.RefreshUserPreKeysRequest} returns this + */ +proto.identity.client.RefreshUserPreKeysRequest.prototype.setAccesstoken = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional PreKey newPreKeys = 2; + * @return {?proto.identity.client.PreKey} + */ +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); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.identity.client.RefreshUserPreKeysRequest} returns this + */ +proto.identity.client.RefreshUserPreKeysRequest.prototype.clearNewprekeys = function() { + return this.setNewprekeys(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.identity.client.RefreshUserPreKeysRequest.prototype.hasNewprekeys = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +goog.object.extend(exports, proto.identity.client); + diff --git a/web/protobufs/identity-structs.cjs.flow b/web/protobufs/identity-structs.cjs.flow new file mode 100644 --- /dev/null +++ b/web/protobufs/identity-structs.cjs.flow @@ -0,0 +1,701 @@ +// @flow + +import { + Message, + BinaryWriter, + BinaryReader, + Map as ProtoMap, +} from 'google-protobuf'; + +declare export class Empty extends Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): {||}; + static toObject(includeInstance: boolean, msg: Empty): {||}; + static serializeBinaryToWriter(message: Empty, writer: BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Empty; + static deserializeBinaryFromReader(message: Empty, reader: BinaryReader): Empty; +} + +export type PreKeyObject = { + prekey: string, + prekeysignature: string, +} + +declare export class PreKey extends Message { + getPrekey(): string; + setPrekey(value: string): PreKey; + + getPrekeysignature(): string; + setPrekeysignature(value: string): PreKey; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PreKeyObject; + static toObject(includeInstance: boolean, msg: PreKey): PreKeyObject; + static serializeBinaryToWriter(message: PreKey, writer: BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PreKey; + static deserializeBinaryFromReader(message: PreKey, reader: BinaryReader): PreKey; +} + +export type IdentityKeyInfoObject = { + payload: string, + payloadsignature: string, + socialproof?: string, +}; + +declare export class IdentityKeyInfo extends Message { + getPayload(): string; + setPayload(value: string): IdentityKeyInfo; + + getPayloadsignature(): string; + setPayloadsignature(value: string): IdentityKeyInfo; + + getSocialproof(): string; + setSocialproof(value: string): IdentityKeyInfo; + hasSocialproof(): boolean; + clearSocialproof(): IdentityKeyInfo; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): IdentityKeyInfoObject; + static toObject(includeInstance: boolean, msg: IdentityKeyInfo): IdentityKeyInfoObject; + static serializeBinaryToWriter(message: IdentityKeyInfo, writer: BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): IdentityKeyInfo; + static deserializeBinaryFromReader(message: IdentityKeyInfo, reader: BinaryReader): IdentityKeyInfo; +} + +declare export class DeviceKeyUpload extends Message { + getDevicekeyinfo(): IdentityKeyInfo | void; + setDevicekeyinfo(value?: IdentityKeyInfo): DeviceKeyUpload; + hasDevicekeyinfo(): boolean; + clearDevicekeyinfo(): DeviceKeyUpload; + + getIdentityupload(): PreKey | void; + setIdentityupload(value?: PreKey): DeviceKeyUpload; + hasIdentityupload(): boolean; + clearIdentityupload(): 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; + + getOnetimenotifprekeysList(): Array; + setOnetimenotifprekeysList(value: Array): DeviceKeyUpload; + clearOnetimenotifprekeysList(): DeviceKeyUpload; + addOnetimenotifprekeys(value: string, index?: number): DeviceKeyUpload; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DeviceKeyUploadObject; + static toObject(includeInstance: boolean, msg: DeviceKeyUpload): DeviceKeyUploadObject; + static serializeBinaryToWriter(message: DeviceKeyUpload, writer: BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): DeviceKeyUpload; + static deserializeBinaryFromReader(message: DeviceKeyUpload, reader: BinaryReader): DeviceKeyUpload; +} + +export type DeviceKeyUploadObject = { + devicekeyinfo?: IdentityKeyInfoObject, + identityupload?: PreKeyObject, + notifupload?: PreKeyObject, + onetimeidentityprekeysList: Array, + onetimenotifprekeysList: Array, +}; + +declare export class RegistrationStartRequest extends Message { + getOpaqueregistrationrequest(): Uint8Array | string; + getOpaqueregistrationrequest_asU8(): Uint8Array; + getOpaqueregistrationrequest_asB64(): string; + setOpaqueregistrationrequest(value: Uint8Array | string): RegistrationStartRequest; + + getUsername(): string; + setUsername(value: string): RegistrationStartRequest; + + getDevicekeyupload(): DeviceKeyUpload | void; + setDevicekeyupload(value?: DeviceKeyUpload): RegistrationStartRequest; + hasDevicekeyupload(): boolean; + clearDevicekeyupload(): RegistrationStartRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): RegistrationStartRequestObject; + static toObject(includeInstance: boolean, msg: RegistrationStartRequest): RegistrationStartRequestObject; + static serializeBinaryToWriter(message: RegistrationStartRequest, writer: BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): RegistrationStartRequest; + static deserializeBinaryFromReader(message: RegistrationStartRequest, reader: BinaryReader): RegistrationStartRequest; +} + +export type RegistrationStartRequestObject = { + opaqueregistrationrequest: Uint8Array | string, + username: string, + devicekeyupload?: DeviceKeyUploadObject, +}; + +declare export class RegistrationFinishRequest extends Message { + getSessionid(): string; + setSessionid(value: string): RegistrationFinishRequest; + + getOpaqueregistrationupload(): Uint8Array | string; + getOpaqueregistrationupload_asU8(): Uint8Array; + getOpaqueregistrationupload_asB64(): string; + setOpaqueregistrationupload(value: Uint8Array | string): RegistrationFinishRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): RegistrationFinishRequestObject; + static toObject(includeInstance: boolean, msg: RegistrationFinishRequest): RegistrationFinishRequestObject; + static serializeBinaryToWriter(message: RegistrationFinishRequest, writer: BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): RegistrationFinishRequest; + static deserializeBinaryFromReader(message: RegistrationFinishRequest, reader: BinaryReader): RegistrationFinishRequest; +} + +export type RegistrationFinishRequestObject = { + sessionid: string, + opaqueregistrationupload: Uint8Array | string, +}; + +declare export class RegistrationStartResponse extends Message { + getSessionid(): string; + setSessionid(value: string): RegistrationStartResponse; + + getOpaqueregistrationresponse(): Uint8Array | string; + getOpaqueregistrationresponse_asU8(): Uint8Array; + getOpaqueregistrationresponse_asB64(): string; + setOpaqueregistrationresponse(value: Uint8Array | string): RegistrationStartResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): RegistrationStartResponseObject; + static toObject(includeInstance: boolean, msg: RegistrationStartResponse): RegistrationStartResponseObject; + static serializeBinaryToWriter(message: RegistrationStartResponse, writer: BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): RegistrationStartResponse; + static deserializeBinaryFromReader(message: RegistrationStartResponse, reader: BinaryReader): RegistrationStartResponse; +} + +export type RegistrationStartResponseObject = { + sessionid: string, + opaqueregistrationresponse: Uint8Array | string, +}; + +declare export class RegistrationFinishResponse extends Message { + getAccesstoken(): string; + setAccesstoken(value: string): RegistrationFinishResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): RegistrationFinishResponseObject; + static toObject(includeInstance: boolean, msg: RegistrationFinishResponse): RegistrationFinishResponseObject; + static serializeBinaryToWriter(message: RegistrationFinishResponse, writer: BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): RegistrationFinishResponse; + static deserializeBinaryFromReader(message: RegistrationFinishResponse, reader: BinaryReader): RegistrationFinishResponse; +} + +export type RegistrationFinishResponseObject = { + accesstoken: string, +}; + +declare export class UpdateUserPasswordStartRequest extends Message { + getOpaqueregistrationrequest(): Uint8Array | string; + getOpaqueregistrationrequest_asU8(): Uint8Array; + getOpaqueregistrationrequest_asB64(): string; + setOpaqueregistrationrequest(value: Uint8Array | string): UpdateUserPasswordStartRequest; + + getAccesstoken(): string; + setAccesstoken(value: string): UpdateUserPasswordStartRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): UpdateUserPasswordStartRequestObject; + static toObject(includeInstance: boolean, msg: UpdateUserPasswordStartRequest): UpdateUserPasswordStartRequestObject; + static serializeBinaryToWriter(message: UpdateUserPasswordStartRequest, writer: BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): UpdateUserPasswordStartRequest; + static deserializeBinaryFromReader(message: UpdateUserPasswordStartRequest, reader: BinaryReader): UpdateUserPasswordStartRequest; +} + +export type UpdateUserPasswordStartRequestObject = { + opaqueregistrationrequest: Uint8Array | string, + accesstoken: string, +}; + +declare export class UpdateUserPasswordFinishRequest extends Message { + getSessionid(): string; + setSessionid(value: string): UpdateUserPasswordFinishRequest; + + getOpaqueregistrationupload(): Uint8Array | string; + getOpaqueregistrationupload_asU8(): Uint8Array; + getOpaqueregistrationupload_asB64(): string; + setOpaqueregistrationupload(value: Uint8Array | string): UpdateUserPasswordFinishRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): UpdateUserPasswordFinishRequestObject; + static toObject(includeInstance: boolean, msg: UpdateUserPasswordFinishRequest): UpdateUserPasswordFinishRequestObject; + static serializeBinaryToWriter(message: UpdateUserPasswordFinishRequest, writer: BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): UpdateUserPasswordFinishRequest; + static deserializeBinaryFromReader(message: UpdateUserPasswordFinishRequest, reader: BinaryReader): UpdateUserPasswordFinishRequest; +} + +export type UpdateUserPasswordFinishRequestObject = { + sessionid: string, + opaqueregistrationupload: Uint8Array | string, +}; + +declare export class UpdateUserPasswordStartResponse extends Message { + getSessionid(): string; + setSessionid(value: string): UpdateUserPasswordStartResponse; + + getOpaqueregistrationresponse(): Uint8Array | string; + getOpaqueregistrationresponse_asU8(): Uint8Array; + getOpaqueregistrationresponse_asB64(): string; + setOpaqueregistrationresponse(value: Uint8Array | string): UpdateUserPasswordStartResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): UpdateUserPasswordStartResponseObject; + static toObject(includeInstance: boolean, msg: UpdateUserPasswordStartResponse): UpdateUserPasswordStartResponseObject; + static serializeBinaryToWriter(message: UpdateUserPasswordStartResponse, writer: BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): UpdateUserPasswordStartResponse; + static deserializeBinaryFromReader(message: UpdateUserPasswordStartResponse, reader: BinaryReader): UpdateUserPasswordStartResponse; +} + +export type UpdateUserPasswordStartResponseObject = { + sessionid: string, + opaqueregistrationresponse: Uint8Array | string, +}; + +declare export class 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; + + getOpaqueloginrequest(): Uint8Array | string; + getOpaqueloginrequest_asU8(): Uint8Array; + getOpaqueloginrequest_asB64(): string; + setOpaqueloginrequest(value: Uint8Array | string): OpaqueLoginStartRequest; + + getDevicekeyupload(): DeviceKeyUpload | void; + setDevicekeyupload(value?: DeviceKeyUpload): OpaqueLoginStartRequest; + hasDevicekeyupload(): boolean; + clearDevicekeyupload(): OpaqueLoginStartRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): OpaqueLoginStartRequestObject; + static toObject(includeInstance: boolean, msg: OpaqueLoginStartRequest): OpaqueLoginStartRequestObject; + static serializeBinaryToWriter(message: OpaqueLoginStartRequest, writer: BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): OpaqueLoginStartRequest; + static deserializeBinaryFromReader(message: OpaqueLoginStartRequest, reader: BinaryReader): OpaqueLoginStartRequest; +} + +export type OpaqueLoginStartRequestObject = { + username: string, + opaqueloginrequest: Uint8Array | string, + devicekeyupload?: DeviceKeyUploadObject, +}; + +declare export class OpaqueLoginFinishRequest extends Message { + getSessionid(): string; + setSessionid(value: string): OpaqueLoginFinishRequest; + + getOpaqueloginupload(): Uint8Array | string; + getOpaqueloginupload_asU8(): Uint8Array; + getOpaqueloginupload_asB64(): string; + setOpaqueloginupload(value: Uint8Array | string): OpaqueLoginFinishRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): OpaqueLoginFinishRequestObject; + static toObject(includeInstance: boolean, msg: OpaqueLoginFinishRequest): OpaqueLoginFinishRequestObject; + static serializeBinaryToWriter(message: OpaqueLoginFinishRequest, writer: BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): OpaqueLoginFinishRequest; + static deserializeBinaryFromReader(message: OpaqueLoginFinishRequest, reader: BinaryReader): OpaqueLoginFinishRequest; +} + +export type OpaqueLoginFinishRequestObject = { + sessionid: string, + opaqueloginupload: Uint8Array | string, +}; + +declare export class OpaqueLoginStartResponse extends Message { + getSessionid(): string; + setSessionid(value: string): OpaqueLoginStartResponse; + + getOpaqueloginresponse(): Uint8Array | string; + getOpaqueloginresponse_asU8(): Uint8Array; + getOpaqueloginresponse_asB64(): string; + setOpaqueloginresponse(value: Uint8Array | string): OpaqueLoginStartResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): OpaqueLoginStartResponseObject; + static toObject(includeInstance: boolean, msg: OpaqueLoginStartResponse): OpaqueLoginStartResponseObject; + static serializeBinaryToWriter(message: OpaqueLoginStartResponse, writer: BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): OpaqueLoginStartResponse; + static deserializeBinaryFromReader(message: OpaqueLoginStartResponse, reader: BinaryReader): OpaqueLoginStartResponse; +} + +export type OpaqueLoginStartResponseObject = { + sessionid: string, + opaqueloginresponse: Uint8Array | string, +}; + +declare export class OpaqueLoginFinishResponse extends Message { + getAccesstoken(): string; + setAccesstoken(value: string): OpaqueLoginFinishResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): OpaqueLoginFinishResponseObject; + static toObject(includeInstance: boolean, msg: OpaqueLoginFinishResponse): OpaqueLoginFinishResponseObject; + static serializeBinaryToWriter(message: OpaqueLoginFinishResponse, writer: BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): OpaqueLoginFinishResponse; + static deserializeBinaryFromReader(message: OpaqueLoginFinishResponse, reader: BinaryReader): OpaqueLoginFinishResponse; +} + +export type OpaqueLoginFinishResponseObject = { + accesstoken: string, +}; + +declare export class WalletLoginRequest extends Message { + getSiwemessage(): string; + setSiwemessage(value: string): WalletLoginRequest; + + getSiwesignature(): string; + setSiwesignature(value: string): WalletLoginRequest; + + getDevicekeyupload(): DeviceKeyUpload | void; + setDevicekeyupload(value?: DeviceKeyUpload): WalletLoginRequest; + hasDevicekeyupload(): boolean; + clearDevicekeyupload(): WalletLoginRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): WalletLoginRequestObject; + static toObject(includeInstance: boolean, msg: WalletLoginRequest): WalletLoginRequestObject; + static serializeBinaryToWriter(message: WalletLoginRequest, writer: BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): WalletLoginRequest; + static deserializeBinaryFromReader(message: WalletLoginRequest, reader: BinaryReader): WalletLoginRequest; +} + +export type WalletLoginRequestObject = { + siwemessage: string, + siwesignature: string, + devicekeyupload?: DeviceKeyUploadObject, +}; + +declare export class WalletLoginResponse extends Message { + getAccesstoken(): string; + setAccesstoken(value: string): WalletLoginResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): WalletLoginResponseObject; + static toObject(includeInstance: boolean, msg: WalletLoginResponse): WalletLoginResponseObject; + static serializeBinaryToWriter(message: WalletLoginResponse, writer: BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): WalletLoginResponse; + static deserializeBinaryFromReader(message: WalletLoginResponse, reader: BinaryReader): WalletLoginResponse; +} + +export type WalletLoginResponseObject = { + accesstoken: string, +}; + +declare export class DeleteUserRequest extends Message { + getAccesstoken(): string; + setAccesstoken(value: string): DeleteUserRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DeleteUserRequestObject; + static toObject(includeInstance: boolean, msg: DeleteUserRequest): DeleteUserRequestObject; + static serializeBinaryToWriter(message: DeleteUserRequest, writer: BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): DeleteUserRequest; + static deserializeBinaryFromReader(message: DeleteUserRequest, reader: BinaryReader): DeleteUserRequest; +} + +export type DeleteUserRequestObject = { + accesstoken: string, +}; + +declare export class GenerateNonceResponse extends Message { + getNonce(): string; + setNonce(value: string): GenerateNonceResponse; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GenerateNonceResponseObject; + static toObject(includeInstance: boolean, msg: GenerateNonceResponse): GenerateNonceResponseObject; + static serializeBinaryToWriter(message: GenerateNonceResponse, writer: BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GenerateNonceResponse; + static deserializeBinaryFromReader(message: GenerateNonceResponse, reader: BinaryReader): GenerateNonceResponse; +} + +export type GenerateNonceResponseObject = { + nonce: string, +}; + +declare export class ReceiverKeyInfo extends Message { + getIdentityinfo(): IdentityKeyInfo | void; + setIdentityinfo(value?: IdentityKeyInfo): ReceiverKeyInfo; + hasIdentityinfo(): boolean; + clearIdentityinfo(): ReceiverKeyInfo; + + getIdentityprekey(): PreKey | void; + setIdentityprekey(value?: PreKey): ReceiverKeyInfo; + hasIdentityprekey(): boolean; + clearIdentityprekey(): ReceiverKeyInfo; + + getNotifprekey(): PreKey | void; + setNotifprekey(value?: PreKey): ReceiverKeyInfo; + hasNotifprekey(): boolean; + clearNotifprekey(): ReceiverKeyInfo; + + getOnetimeidentityprekey(): string; + setOnetimeidentityprekey(value: string): ReceiverKeyInfo; + hasOnetimeidentityprekey(): boolean; + clearOnetimeidentityprekey(): ReceiverKeyInfo; + + getOnetimenotifprekey(): string; + setOnetimenotifprekey(value: string): ReceiverKeyInfo; + hasOnetimenotifprekey(): boolean; + clearOnetimenotifprekey(): ReceiverKeyInfo; + + 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; +} + +export type ReceiverKeyInfoObject = { + identityinfo?: IdentityKeyInfoObject, + identityprekey?: PreKeyObject, + notifprekey?: PreKeyObject, + onetimeidentityprekey?: string, + onetimenotifprekey?: string, +}; + +export type IdentifierCase = 0 | 1 | 2; + +declare export class ReceiverKeysForUserRequest extends Message { + getUsername(): string; + setUsername(value: string): ReceiverKeysForUserRequest; + + getWalletaddress(): string; + setWalletaddress(value: string): ReceiverKeysForUserRequest; + + 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; +} + +export type ReceiverKeysForUserRequestObject = { + username: string, + walletaddress: string, +}; + +declare export class ReceiverKeysForUserResponse extends Message { + getDevicesMap(): ProtoMap; + clearDevicesMap(): ReceiverKeysForUserResponse; + + 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; +} + +export type ReceiverKeysForUserResponseObject = { + devicesMap: Array<[string, ReceiverKeyInfoObject]>, +}; + +declare export class SenderKeyInfo extends Message { + getIdentityinfo(): IdentityKeyInfo | void; + setIdentityinfo(value?: IdentityKeyInfo): SenderKeyInfo; + hasIdentityinfo(): boolean; + clearIdentityinfo(): SenderKeyInfo; + + getIdentityprekey(): PreKey | void; + setIdentityprekey(value?: PreKey): SenderKeyInfo; + hasIdentityprekey(): boolean; + clearIdentityprekey(): SenderKeyInfo; + + getNotifprekey(): PreKey | void; + setNotifprekey(value?: PreKey): SenderKeyInfo; + hasNotifprekey(): boolean; + clearNotifprekey(): SenderKeyInfo; + + 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; +} + +export type SenderKeyInfoObject = { + identityinfo?: IdentityKeyInfoObject, + identityprekey?: PreKeyObject, + notifprekey?: PreKeyObject, +}; + +declare export class SenderKeysForUserRequest extends Message { + getUsername(): string; + setUsername(value: string): SenderKeysForUserRequest; + + getWalletaddress(): string; + setWalletaddress(value: string): SenderKeysForUserRequest; + + 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; +} + +export type SenderKeysForUserRequestObject = { + 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; + + 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; +} + +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 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; +} + +export type KeyserverKeysResponseObject = { + keyserverinfo?: KeyserverSessionInfoObject, +}; + +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; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): UploadOneTimeKeysRequestObject; + static toObject(includeInstance: boolean, msg: UploadOneTimeKeysRequest): UploadOneTimeKeysRequestObject; + static serializeBinaryToWriter(message: UploadOneTimeKeysRequest, writer: BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): UploadOneTimeKeysRequest; + static deserializeBinaryFromReader(message: UploadOneTimeKeysRequest, reader: BinaryReader): UploadOneTimeKeysRequest; +} + +export type UploadOneTimeKeysRequestObject = { + accesstoken: string, + onetimeprekeysList: Array, +}; + +declare export class RefreshUserPreKeysRequest extends Message { + getAccesstoken(): string; + setAccesstoken(value: string): RefreshUserPreKeysRequest; + + getNewprekeys(): PreKey | void; + setNewprekeys(value?: PreKey): RefreshUserPreKeysRequest; + hasNewprekeys(): boolean; + clearNewprekeys(): RefreshUserPreKeysRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): RefreshUserPreKeysRequestObject; + static toObject(includeInstance: boolean, msg: RefreshUserPreKeysRequest): RefreshUserPreKeysRequestObject; + static serializeBinaryToWriter(message: RefreshUserPreKeysRequest, writer: BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): RefreshUserPreKeysRequest; + static deserializeBinaryFromReader(message: RefreshUserPreKeysRequest, reader: BinaryReader): RefreshUserPreKeysRequest; +} + +export type RefreshUserPreKeysRequestObject = { + accesstoken: string, + newprekeys?: PreKeyObject, +}; diff --git a/yarn.lock b/yarn.lock --- a/yarn.lock +++ b/yarn.lock @@ -12490,6 +12490,11 @@ dependencies: node-forge "^0.10.0" +google-protobuf@^3.21.2: + version "3.21.2" + resolved "https://registry.yarnpkg.com/google-protobuf/-/google-protobuf-3.21.2.tgz#4580a2bea8bbb291ee579d1fefb14d6fa3070ea4" + integrity sha512-3MSOYFO5U9mPGikIYCzK0SaThypfGgS6bHqrUGXG3DPHCrb+txNqeEcns1W0lkGfk0rCyNXm7xB9rMxnCiZOoA== + googleapis-common@^5.0.2: version "5.0.5" resolved "https://registry.yarnpkg.com/googleapis-common/-/googleapis-common-5.0.5.tgz#4c7160be1ed7e4cc8cdbcdb6eac8a4b3a61dd782"