UNPKG

esp-ble-prov

Version:
1,273 lines (1,059 loc) 158 kB
import * as $protobuf from "protobufjs"; import Long = require("long"); /** Namespace constants. */ export namespace constants { /** Status enum. */ enum Status { Success = 0, InvalidSecScheme = 1, InvalidProto = 2, TooManySessions = 3, InvalidArgument = 4, InternalError = 5, CryptoError = 6, InvalidSession = 7 } /** WifiStationState enum. */ enum WifiStationState { Connected = 0, Connecting = 1, Disconnected = 2, ConnectionFailed = 3 } /** WifiConnectFailedReason enum. */ enum WifiConnectFailedReason { AuthError = 0, NetworkNotFound = 1 } /** Properties of a WifiAttemptFailed. */ interface IWifiAttemptFailed { /** WifiAttemptFailed attemptsRemaining */ attemptsRemaining?: (number|null); } /** Represents a WifiAttemptFailed. */ class WifiAttemptFailed implements IWifiAttemptFailed { /** * Constructs a new WifiAttemptFailed. * @param [properties] Properties to set */ constructor(properties?: constants.IWifiAttemptFailed); /** WifiAttemptFailed attemptsRemaining. */ public attemptsRemaining: number; /** * Creates a new WifiAttemptFailed instance using the specified properties. * @param [properties] Properties to set * @returns WifiAttemptFailed instance */ public static create(properties?: constants.IWifiAttemptFailed): constants.WifiAttemptFailed; /** * Encodes the specified WifiAttemptFailed message. Does not implicitly {@link constants.WifiAttemptFailed.verify|verify} messages. * @param message WifiAttemptFailed message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ public static encode(message: constants.IWifiAttemptFailed, writer?: $protobuf.Writer): $protobuf.Writer; /** * Encodes the specified WifiAttemptFailed message, length delimited. Does not implicitly {@link constants.WifiAttemptFailed.verify|verify} messages. * @param message WifiAttemptFailed message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ public static encodeDelimited(message: constants.IWifiAttemptFailed, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a WifiAttemptFailed message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand * @returns WifiAttemptFailed * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): constants.WifiAttemptFailed; /** * Decodes a WifiAttemptFailed message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from * @returns WifiAttemptFailed * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): constants.WifiAttemptFailed; /** * Verifies a WifiAttemptFailed message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** * Creates a WifiAttemptFailed message from a plain object. Also converts values to their respective internal types. * @param object Plain object * @returns WifiAttemptFailed */ public static fromObject(object: { [k: string]: any }): constants.WifiAttemptFailed; /** * Creates a plain object from a WifiAttemptFailed message. Also converts values to other types if specified. * @param message WifiAttemptFailed * @param [options] Conversion options * @returns Plain object */ public static toObject(message: constants.WifiAttemptFailed, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this WifiAttemptFailed to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** * Gets the default type url for WifiAttemptFailed * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } /** WifiAuthMode enum. */ enum WifiAuthMode { Open = 0, WEP = 1, WPA_PSK = 2, WPA2_PSK = 3, WPA_WPA2_PSK = 4, WPA2_ENTERPRISE = 5, WPA3_PSK = 6, WPA2_WPA3_PSK = 7 } /** Properties of a WifiConnectedState. */ interface IWifiConnectedState { /** WifiConnectedState ip4Addr */ ip4Addr?: (string|null); /** WifiConnectedState authMode */ authMode?: (constants.WifiAuthMode|null); /** WifiConnectedState ssid */ ssid?: (Uint8Array|null); /** WifiConnectedState bssid */ bssid?: (Uint8Array|null); /** WifiConnectedState channel */ channel?: (number|null); } /** Represents a WifiConnectedState. */ class WifiConnectedState implements IWifiConnectedState { /** * Constructs a new WifiConnectedState. * @param [properties] Properties to set */ constructor(properties?: constants.IWifiConnectedState); /** WifiConnectedState ip4Addr. */ public ip4Addr: string; /** WifiConnectedState authMode. */ public authMode: constants.WifiAuthMode; /** WifiConnectedState ssid. */ public ssid: Uint8Array; /** WifiConnectedState bssid. */ public bssid: Uint8Array; /** WifiConnectedState channel. */ public channel: number; /** * Creates a new WifiConnectedState instance using the specified properties. * @param [properties] Properties to set * @returns WifiConnectedState instance */ public static create(properties?: constants.IWifiConnectedState): constants.WifiConnectedState; /** * Encodes the specified WifiConnectedState message. Does not implicitly {@link constants.WifiConnectedState.verify|verify} messages. * @param message WifiConnectedState message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ public static encode(message: constants.IWifiConnectedState, writer?: $protobuf.Writer): $protobuf.Writer; /** * Encodes the specified WifiConnectedState message, length delimited. Does not implicitly {@link constants.WifiConnectedState.verify|verify} messages. * @param message WifiConnectedState message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ public static encodeDelimited(message: constants.IWifiConnectedState, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a WifiConnectedState message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand * @returns WifiConnectedState * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): constants.WifiConnectedState; /** * Decodes a WifiConnectedState message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from * @returns WifiConnectedState * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): constants.WifiConnectedState; /** * Verifies a WifiConnectedState message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** * Creates a WifiConnectedState message from a plain object. Also converts values to their respective internal types. * @param object Plain object * @returns WifiConnectedState */ public static fromObject(object: { [k: string]: any }): constants.WifiConnectedState; /** * Creates a plain object from a WifiConnectedState message. Also converts values to other types if specified. * @param message WifiConnectedState * @param [options] Conversion options * @returns Plain object */ public static toObject(message: constants.WifiConnectedState, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this WifiConnectedState to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** * Gets the default type url for WifiConnectedState * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } } /** Namespace security0. */ export namespace security0 { /** Properties of a S0SessionCmd. */ interface IS0SessionCmd { } /** Represents a S0SessionCmd. */ class S0SessionCmd implements IS0SessionCmd { /** * Constructs a new S0SessionCmd. * @param [properties] Properties to set */ constructor(properties?: security0.IS0SessionCmd); /** * Creates a new S0SessionCmd instance using the specified properties. * @param [properties] Properties to set * @returns S0SessionCmd instance */ public static create(properties?: security0.IS0SessionCmd): security0.S0SessionCmd; /** * Encodes the specified S0SessionCmd message. Does not implicitly {@link security0.S0SessionCmd.verify|verify} messages. * @param message S0SessionCmd message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ public static encode(message: security0.IS0SessionCmd, writer?: $protobuf.Writer): $protobuf.Writer; /** * Encodes the specified S0SessionCmd message, length delimited. Does not implicitly {@link security0.S0SessionCmd.verify|verify} messages. * @param message S0SessionCmd message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ public static encodeDelimited(message: security0.IS0SessionCmd, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a S0SessionCmd message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand * @returns S0SessionCmd * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): security0.S0SessionCmd; /** * Decodes a S0SessionCmd message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from * @returns S0SessionCmd * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): security0.S0SessionCmd; /** * Verifies a S0SessionCmd message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** * Creates a S0SessionCmd message from a plain object. Also converts values to their respective internal types. * @param object Plain object * @returns S0SessionCmd */ public static fromObject(object: { [k: string]: any }): security0.S0SessionCmd; /** * Creates a plain object from a S0SessionCmd message. Also converts values to other types if specified. * @param message S0SessionCmd * @param [options] Conversion options * @returns Plain object */ public static toObject(message: security0.S0SessionCmd, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this S0SessionCmd to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** * Gets the default type url for S0SessionCmd * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a S0SessionResp. */ interface IS0SessionResp { /** S0SessionResp status */ status?: (constants.Status|null); } /** Represents a S0SessionResp. */ class S0SessionResp implements IS0SessionResp { /** * Constructs a new S0SessionResp. * @param [properties] Properties to set */ constructor(properties?: security0.IS0SessionResp); /** S0SessionResp status. */ public status: constants.Status; /** * Creates a new S0SessionResp instance using the specified properties. * @param [properties] Properties to set * @returns S0SessionResp instance */ public static create(properties?: security0.IS0SessionResp): security0.S0SessionResp; /** * Encodes the specified S0SessionResp message. Does not implicitly {@link security0.S0SessionResp.verify|verify} messages. * @param message S0SessionResp message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ public static encode(message: security0.IS0SessionResp, writer?: $protobuf.Writer): $protobuf.Writer; /** * Encodes the specified S0SessionResp message, length delimited. Does not implicitly {@link security0.S0SessionResp.verify|verify} messages. * @param message S0SessionResp message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ public static encodeDelimited(message: security0.IS0SessionResp, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a S0SessionResp message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand * @returns S0SessionResp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): security0.S0SessionResp; /** * Decodes a S0SessionResp message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from * @returns S0SessionResp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): security0.S0SessionResp; /** * Verifies a S0SessionResp message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** * Creates a S0SessionResp message from a plain object. Also converts values to their respective internal types. * @param object Plain object * @returns S0SessionResp */ public static fromObject(object: { [k: string]: any }): security0.S0SessionResp; /** * Creates a plain object from a S0SessionResp message. Also converts values to other types if specified. * @param message S0SessionResp * @param [options] Conversion options * @returns Plain object */ public static toObject(message: security0.S0SessionResp, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this S0SessionResp to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** * Gets the default type url for S0SessionResp * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } /** Sec0MsgType enum. */ enum Sec0MsgType { S0_Session_Command = 0, S0_Session_Response = 1 } /** Properties of a Sec0Payload. */ interface ISec0Payload { /** Sec0Payload msg */ msg?: (security0.Sec0MsgType|null); /** Sec0Payload sc */ sc?: (security0.IS0SessionCmd|null); /** Sec0Payload sr */ sr?: (security0.IS0SessionResp|null); } /** Represents a Sec0Payload. */ class Sec0Payload implements ISec0Payload { /** * Constructs a new Sec0Payload. * @param [properties] Properties to set */ constructor(properties?: security0.ISec0Payload); /** Sec0Payload msg. */ public msg: security0.Sec0MsgType; /** Sec0Payload sc. */ public sc?: (security0.IS0SessionCmd|null); /** Sec0Payload sr. */ public sr?: (security0.IS0SessionResp|null); /** Sec0Payload payload. */ public payload?: ("sc"|"sr"); /** * Creates a new Sec0Payload instance using the specified properties. * @param [properties] Properties to set * @returns Sec0Payload instance */ public static create(properties?: security0.ISec0Payload): security0.Sec0Payload; /** * Encodes the specified Sec0Payload message. Does not implicitly {@link security0.Sec0Payload.verify|verify} messages. * @param message Sec0Payload message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ public static encode(message: security0.ISec0Payload, writer?: $protobuf.Writer): $protobuf.Writer; /** * Encodes the specified Sec0Payload message, length delimited. Does not implicitly {@link security0.Sec0Payload.verify|verify} messages. * @param message Sec0Payload message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ public static encodeDelimited(message: security0.ISec0Payload, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a Sec0Payload message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand * @returns Sec0Payload * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): security0.Sec0Payload; /** * Decodes a Sec0Payload message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from * @returns Sec0Payload * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): security0.Sec0Payload; /** * Verifies a Sec0Payload message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** * Creates a Sec0Payload message from a plain object. Also converts values to their respective internal types. * @param object Plain object * @returns Sec0Payload */ public static fromObject(object: { [k: string]: any }): security0.Sec0Payload; /** * Creates a plain object from a Sec0Payload message. Also converts values to other types if specified. * @param message Sec0Payload * @param [options] Conversion options * @returns Plain object */ public static toObject(message: security0.Sec0Payload, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this Sec0Payload to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** * Gets the default type url for Sec0Payload * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } } /** Namespace security1. */ export namespace security1 { /** Properties of a SessionCmd1. */ interface ISessionCmd1 { /** SessionCmd1 clientVerifyData */ clientVerifyData?: (Uint8Array|null); } /** Represents a SessionCmd1. */ class SessionCmd1 implements ISessionCmd1 { /** * Constructs a new SessionCmd1. * @param [properties] Properties to set */ constructor(properties?: security1.ISessionCmd1); /** SessionCmd1 clientVerifyData. */ public clientVerifyData: Uint8Array; /** * Creates a new SessionCmd1 instance using the specified properties. * @param [properties] Properties to set * @returns SessionCmd1 instance */ public static create(properties?: security1.ISessionCmd1): security1.SessionCmd1; /** * Encodes the specified SessionCmd1 message. Does not implicitly {@link security1.SessionCmd1.verify|verify} messages. * @param message SessionCmd1 message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ public static encode(message: security1.ISessionCmd1, writer?: $protobuf.Writer): $protobuf.Writer; /** * Encodes the specified SessionCmd1 message, length delimited. Does not implicitly {@link security1.SessionCmd1.verify|verify} messages. * @param message SessionCmd1 message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ public static encodeDelimited(message: security1.ISessionCmd1, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a SessionCmd1 message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand * @returns SessionCmd1 * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): security1.SessionCmd1; /** * Decodes a SessionCmd1 message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from * @returns SessionCmd1 * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): security1.SessionCmd1; /** * Verifies a SessionCmd1 message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** * Creates a SessionCmd1 message from a plain object. Also converts values to their respective internal types. * @param object Plain object * @returns SessionCmd1 */ public static fromObject(object: { [k: string]: any }): security1.SessionCmd1; /** * Creates a plain object from a SessionCmd1 message. Also converts values to other types if specified. * @param message SessionCmd1 * @param [options] Conversion options * @returns Plain object */ public static toObject(message: security1.SessionCmd1, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this SessionCmd1 to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** * Gets the default type url for SessionCmd1 * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a SessionResp1. */ interface ISessionResp1 { /** SessionResp1 status */ status?: (constants.Status|null); /** SessionResp1 deviceVerifyData */ deviceVerifyData?: (Uint8Array|null); } /** Represents a SessionResp1. */ class SessionResp1 implements ISessionResp1 { /** * Constructs a new SessionResp1. * @param [properties] Properties to set */ constructor(properties?: security1.ISessionResp1); /** SessionResp1 status. */ public status: constants.Status; /** SessionResp1 deviceVerifyData. */ public deviceVerifyData: Uint8Array; /** * Creates a new SessionResp1 instance using the specified properties. * @param [properties] Properties to set * @returns SessionResp1 instance */ public static create(properties?: security1.ISessionResp1): security1.SessionResp1; /** * Encodes the specified SessionResp1 message. Does not implicitly {@link security1.SessionResp1.verify|verify} messages. * @param message SessionResp1 message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ public static encode(message: security1.ISessionResp1, writer?: $protobuf.Writer): $protobuf.Writer; /** * Encodes the specified SessionResp1 message, length delimited. Does not implicitly {@link security1.SessionResp1.verify|verify} messages. * @param message SessionResp1 message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ public static encodeDelimited(message: security1.ISessionResp1, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a SessionResp1 message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand * @returns SessionResp1 * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): security1.SessionResp1; /** * Decodes a SessionResp1 message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from * @returns SessionResp1 * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): security1.SessionResp1; /** * Verifies a SessionResp1 message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** * Creates a SessionResp1 message from a plain object. Also converts values to their respective internal types. * @param object Plain object * @returns SessionResp1 */ public static fromObject(object: { [k: string]: any }): security1.SessionResp1; /** * Creates a plain object from a SessionResp1 message. Also converts values to other types if specified. * @param message SessionResp1 * @param [options] Conversion options * @returns Plain object */ public static toObject(message: security1.SessionResp1, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this SessionResp1 to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** * Gets the default type url for SessionResp1 * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a SessionCmd0. */ interface ISessionCmd0 { /** SessionCmd0 clientPubkey */ clientPubkey?: (Uint8Array|null); } /** Represents a SessionCmd0. */ class SessionCmd0 implements ISessionCmd0 { /** * Constructs a new SessionCmd0. * @param [properties] Properties to set */ constructor(properties?: security1.ISessionCmd0); /** SessionCmd0 clientPubkey. */ public clientPubkey: Uint8Array; /** * Creates a new SessionCmd0 instance using the specified properties. * @param [properties] Properties to set * @returns SessionCmd0 instance */ public static create(properties?: security1.ISessionCmd0): security1.SessionCmd0; /** * Encodes the specified SessionCmd0 message. Does not implicitly {@link security1.SessionCmd0.verify|verify} messages. * @param message SessionCmd0 message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ public static encode(message: security1.ISessionCmd0, writer?: $protobuf.Writer): $protobuf.Writer; /** * Encodes the specified SessionCmd0 message, length delimited. Does not implicitly {@link security1.SessionCmd0.verify|verify} messages. * @param message SessionCmd0 message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ public static encodeDelimited(message: security1.ISessionCmd0, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a SessionCmd0 message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand * @returns SessionCmd0 * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): security1.SessionCmd0; /** * Decodes a SessionCmd0 message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from * @returns SessionCmd0 * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): security1.SessionCmd0; /** * Verifies a SessionCmd0 message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** * Creates a SessionCmd0 message from a plain object. Also converts values to their respective internal types. * @param object Plain object * @returns SessionCmd0 */ public static fromObject(object: { [k: string]: any }): security1.SessionCmd0; /** * Creates a plain object from a SessionCmd0 message. Also converts values to other types if specified. * @param message SessionCmd0 * @param [options] Conversion options * @returns Plain object */ public static toObject(message: security1.SessionCmd0, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this SessionCmd0 to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** * Gets the default type url for SessionCmd0 * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a SessionResp0. */ interface ISessionResp0 { /** SessionResp0 status */ status?: (constants.Status|null); /** SessionResp0 devicePubkey */ devicePubkey?: (Uint8Array|null); /** SessionResp0 deviceRandom */ deviceRandom?: (Uint8Array|null); } /** Represents a SessionResp0. */ class SessionResp0 implements ISessionResp0 { /** * Constructs a new SessionResp0. * @param [properties] Properties to set */ constructor(properties?: security1.ISessionResp0); /** SessionResp0 status. */ public status: constants.Status; /** SessionResp0 devicePubkey. */ public devicePubkey: Uint8Array; /** SessionResp0 deviceRandom. */ public deviceRandom: Uint8Array; /** * Creates a new SessionResp0 instance using the specified properties. * @param [properties] Properties to set * @returns SessionResp0 instance */ public static create(properties?: security1.ISessionResp0): security1.SessionResp0; /** * Encodes the specified SessionResp0 message. Does not implicitly {@link security1.SessionResp0.verify|verify} messages. * @param message SessionResp0 message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ public static encode(message: security1.ISessionResp0, writer?: $protobuf.Writer): $protobuf.Writer; /** * Encodes the specified SessionResp0 message, length delimited. Does not implicitly {@link security1.SessionResp0.verify|verify} messages. * @param message SessionResp0 message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ public static encodeDelimited(message: security1.ISessionResp0, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a SessionResp0 message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand * @returns SessionResp0 * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): security1.SessionResp0; /** * Decodes a SessionResp0 message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from * @returns SessionResp0 * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): security1.SessionResp0; /** * Verifies a SessionResp0 message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** * Creates a SessionResp0 message from a plain object. Also converts values to their respective internal types. * @param object Plain object * @returns SessionResp0 */ public static fromObject(object: { [k: string]: any }): security1.SessionResp0; /** * Creates a plain object from a SessionResp0 message. Also converts values to other types if specified. * @param message SessionResp0 * @param [options] Conversion options * @returns Plain object */ public static toObject(message: security1.SessionResp0, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this SessionResp0 to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** * Gets the default type url for SessionResp0 * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } /** Sec1MsgType enum. */ enum Sec1MsgType { Session_Command0 = 0, Session_Response0 = 1, Session_Command1 = 2, Session_Response1 = 3 } /** Properties of a Sec1Payload. */ interface ISec1Payload { /** Sec1Payload msg */ msg?: (security1.Sec1MsgType|null); /** Sec1Payload sc0 */ sc0?: (security1.ISessionCmd0|null); /** Sec1Payload sr0 */ sr0?: (security1.ISessionResp0|null); /** Sec1Payload sc1 */ sc1?: (security1.ISessionCmd1|null); /** Sec1Payload sr1 */ sr1?: (security1.ISessionResp1|null); } /** Represents a Sec1Payload. */ class Sec1Payload implements ISec1Payload { /** * Constructs a new Sec1Payload. * @param [properties] Properties to set */ constructor(properties?: security1.ISec1Payload); /** Sec1Payload msg. */ public msg: security1.Sec1MsgType; /** Sec1Payload sc0. */ public sc0?: (security1.ISessionCmd0|null); /** Sec1Payload sr0. */ public sr0?: (security1.ISessionResp0|null); /** Sec1Payload sc1. */ public sc1?: (security1.ISessionCmd1|null); /** Sec1Payload sr1. */ public sr1?: (security1.ISessionResp1|null); /** Sec1Payload payload. */ public payload?: ("sc0"|"sr0"|"sc1"|"sr1"); /** * Creates a new Sec1Payload instance using the specified properties. * @param [properties] Properties to set * @returns Sec1Payload instance */ public static create(properties?: security1.ISec1Payload): security1.Sec1Payload; /** * Encodes the specified Sec1Payload message. Does not implicitly {@link security1.Sec1Payload.verify|verify} messages. * @param message Sec1Payload message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ public static encode(message: security1.ISec1Payload, writer?: $protobuf.Writer): $protobuf.Writer; /** * Encodes the specified Sec1Payload message, length delimited. Does not implicitly {@link security1.Sec1Payload.verify|verify} messages. * @param message Sec1Payload message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ public static encodeDelimited(message: security1.ISec1Payload, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a Sec1Payload message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand * @returns Sec1Payload * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): security1.Sec1Payload; /** * Decodes a Sec1Payload message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from * @returns Sec1Payload * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): security1.Sec1Payload; /** * Verifies a Sec1Payload message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** * Creates a Sec1Payload message from a plain object. Also converts values to their respective internal types. * @param object Plain object * @returns Sec1Payload */ public static fromObject(object: { [k: string]: any }): security1.Sec1Payload; /** * Creates a plain object from a Sec1Payload message. Also converts values to other types if specified. * @param message Sec1Payload * @param [options] Conversion options * @returns Plain object */ public static toObject(message: security1.Sec1Payload, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this Sec1Payload to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** * Gets the default type url for Sec1Payload * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } } /** Namespace security2. */ export namespace security2 { /** Sec2MsgType enum. */ enum Sec2MsgType { S2Session_Command0 = 0, S2Session_Response0 = 1, S2Session_Command1 = 2, S2Session_Response1 = 3 } /** Properties of a S2SessionCmd0. */ interface IS2SessionCmd0 { /** S2SessionCmd0 clientUsername */ clientUsername?: (Uint8Array|null); /** S2SessionCmd0 clientPubkey */ clientPubkey?: (Uint8Array|null); } /** Represents a S2SessionCmd0. */ class S2SessionCmd0 implements IS2SessionCmd0 { /** * Constructs a new S2SessionCmd0. * @param [properties] Properties to set */ constructor(properties?: security2.IS2SessionCmd0); /** S2SessionCmd0 clientUsername. */ public clientUsername: Uint8Array; /** S2SessionCmd0 clientPubkey. */ public clientPubkey: Uint8Array; /** * Creates a new S2SessionCmd0 instance using the specified properties. * @param [properties] Properties to set * @returns S2SessionCmd0 instance */ public static create(properties?: security2.IS2SessionCmd0): security2.S2SessionCmd0; /** * Encodes the specified S2SessionCmd0 message. Does not implicitly {@link security2.S2SessionCmd0.verify|verify} messages. * @param message S2SessionCmd0 message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ public static encode(message: security2.IS2SessionCmd0, writer?: $protobuf.Writer): $protobuf.Writer; /** * Encodes the specified S2SessionCmd0 message, length delimited. Does not implicitly {@link security2.S2SessionCmd0.verify|verify} messages. * @param message S2SessionCmd0 message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ public static encodeDelimited(message: security2.IS2SessionCmd0, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a S2SessionCmd0 message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand * @returns S2SessionCmd0 * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): security2.S2SessionCmd0; /** * Decodes a S2SessionCmd0 message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from * @returns S2SessionCmd0 * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): security2.S2SessionCmd0; /** * Verifies a S2SessionCmd0 message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** * Creates a S2SessionCmd0 message from a plain object. Also converts values to their respective internal types. * @param object Plain object * @returns S2SessionCmd0 */ public static fromObject(object: { [k: string]: any }): security2.S2SessionCmd0; /** * Creates a plain object from a S2SessionCmd0 message. Also converts values to other types if specified. * @param message S2SessionCmd0 * @param [options] Conversion options * @returns Plain object */ public static toObject(message: security2.S2SessionCmd0, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this S2SessionCmd0 to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** * Gets the default type url for S2SessionCmd0 * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a S2SessionResp0. */ interface IS2SessionResp0 { /** S2SessionResp0 status */ status?: (constants.Status|null); /** S2SessionResp0 devicePubkey */ devicePubkey?: (Uint8Array|null); /** S2SessionResp0 deviceSalt */ deviceSalt?: (Uint8Array|null); } /** Represents a S2SessionResp0. */ class S2SessionResp0 implements IS2SessionResp0 { /** * Constructs a new S2SessionResp0. * @param [properties] Properties to set */ constructor(properties?: security2.IS2SessionResp0); /** S2SessionResp0 status. */ public status: constants.Status; /** S2SessionResp0 devicePubkey. */ public devicePubkey: Uint8Array; /** S2SessionResp0 deviceSalt. */ public deviceSalt: Uint8Array; /** * Creates a new S2SessionResp0 instance using the specified properties. * @param [properties] Properties to set * @returns S2SessionResp0 instance */ public static create(properties?: security2.IS2SessionResp0): security2.S2SessionResp0; /** * Encodes the specified S2SessionResp0 message. Does not implicitly {@link security2.S2SessionResp0.verify|verify} messages. * @param message S2SessionResp0 message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ public static encode(message: security2.IS2SessionResp0, writer?: $protobuf.Writer): $protobuf.