UNPKG

echofi-client

Version:

A comprehensive TypeScript/JavaScript client library for EchoFi services with automatic gRPC-Web code generation, unified service access, and real-time WebSocket communication.

1,542 lines (1,385 loc) 149 kB
// source: web3auth/service.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 CODE -- DO NOT EDIT! /* eslint-disable */ // @ts-nocheck var jspb = require('google-protobuf'); var goog = jspb; var global = (function() { if (this) { return this; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } if (typeof self !== 'undefined') { return self; } return Function('return this')(); }.call(null)); var web3auth_wallet_pb = require('../web3auth/wallet_pb.js'); goog.object.extend(proto, web3auth_wallet_pb); var web3auth_auth_proof_pb = require('../web3auth/auth_proof_pb.js'); goog.object.extend(proto, web3auth_auth_proof_pb); goog.exportSymbol('proto.web3auth.AuthProof', null, global); goog.exportSymbol('proto.web3auth.AuthWithProofRequest', null, global); goog.exportSymbol('proto.web3auth.AuthWithProofResponse', null, global); goog.exportSymbol('proto.web3auth.AuthWithSignatureRequest', null, global); goog.exportSymbol('proto.web3auth.AuthWithSignatureResponse', null, global); goog.exportSymbol('proto.web3auth.CheckEmailLinkingStatusRequest', null, global); goog.exportSymbol('proto.web3auth.CheckEmailLinkingStatusResponse', null, global); goog.exportSymbol('proto.web3auth.CheckWalletLinkingStatusRequest', null, global); goog.exportSymbol('proto.web3auth.CheckWalletLinkingStatusResponse', null, global); goog.exportSymbol('proto.web3auth.ConnectWalletToUserRequest', null, global); goog.exportSymbol('proto.web3auth.ConnectWalletToUserResponse', null, global); goog.exportSymbol('proto.web3auth.EmailPasswordAuth', null, global); goog.exportSymbol('proto.web3auth.GetAccountStatusRequest', null, global); goog.exportSymbol('proto.web3auth.GetAccountStatusResponse', null, global); goog.exportSymbol('proto.web3auth.GetChallengeRequest', null, global); goog.exportSymbol('proto.web3auth.GetChallengeResponse', null, global); goog.exportSymbol('proto.web3auth.LinkEmailToWeb3AccountRequest', null, global); goog.exportSymbol('proto.web3auth.LinkEmailToWeb3AccountResponse', null, global); goog.exportSymbol('proto.web3auth.LinkWalletToAccountRequest', null, global); goog.exportSymbol('proto.web3auth.LinkWalletToAccountRequest.AuthMethodCase', null, global); goog.exportSymbol('proto.web3auth.LinkWalletToAccountResponse', null, global); goog.exportSymbol('proto.web3auth.LinkWalletToWeb2AccountRequest', null, global); goog.exportSymbol('proto.web3auth.LinkWalletToWeb2AccountResponse', 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.web3auth.GetChallengeRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.web3auth.GetChallengeRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.web3auth.GetChallengeRequest.displayName = 'proto.web3auth.GetChallengeRequest'; } /** * 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.web3auth.GetChallengeResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.web3auth.GetChallengeResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.web3auth.GetChallengeResponse.displayName = 'proto.web3auth.GetChallengeResponse'; } /** * 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.web3auth.AuthWithSignatureRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.web3auth.AuthWithSignatureRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.web3auth.AuthWithSignatureRequest.displayName = 'proto.web3auth.AuthWithSignatureRequest'; } /** * 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.web3auth.AuthWithSignatureResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.web3auth.AuthWithSignatureResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.web3auth.AuthWithSignatureResponse.displayName = 'proto.web3auth.AuthWithSignatureResponse'; } /** * 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.web3auth.AuthWithProofRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.web3auth.AuthWithProofRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.web3auth.AuthWithProofRequest.displayName = 'proto.web3auth.AuthWithProofRequest'; } /** * 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.web3auth.AuthWithProofResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.web3auth.AuthWithProofResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.web3auth.AuthWithProofResponse.displayName = 'proto.web3auth.AuthWithProofResponse'; } /** * 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.web3auth.AuthProof = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.web3auth.AuthProof, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.web3auth.AuthProof.displayName = 'proto.web3auth.AuthProof'; } /** * 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.web3auth.ConnectWalletToUserRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.web3auth.ConnectWalletToUserRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.web3auth.ConnectWalletToUserRequest.displayName = 'proto.web3auth.ConnectWalletToUserRequest'; } /** * 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.web3auth.ConnectWalletToUserResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.web3auth.ConnectWalletToUserResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.web3auth.ConnectWalletToUserResponse.displayName = 'proto.web3auth.ConnectWalletToUserResponse'; } /** * 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.web3auth.LinkWalletToAccountRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, proto.web3auth.LinkWalletToAccountRequest.oneofGroups_); }; goog.inherits(proto.web3auth.LinkWalletToAccountRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.web3auth.LinkWalletToAccountRequest.displayName = 'proto.web3auth.LinkWalletToAccountRequest'; } /** * 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.web3auth.EmailPasswordAuth = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.web3auth.EmailPasswordAuth, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.web3auth.EmailPasswordAuth.displayName = 'proto.web3auth.EmailPasswordAuth'; } /** * 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.web3auth.LinkWalletToAccountResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.web3auth.LinkWalletToAccountResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.web3auth.LinkWalletToAccountResponse.displayName = 'proto.web3auth.LinkWalletToAccountResponse'; } /** * 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.web3auth.GetAccountStatusRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.web3auth.GetAccountStatusRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.web3auth.GetAccountStatusRequest.displayName = 'proto.web3auth.GetAccountStatusRequest'; } /** * 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.web3auth.GetAccountStatusResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.web3auth.GetAccountStatusResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.web3auth.GetAccountStatusResponse.displayName = 'proto.web3auth.GetAccountStatusResponse'; } /** * 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.web3auth.LinkWalletToWeb2AccountRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.web3auth.LinkWalletToWeb2AccountRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.web3auth.LinkWalletToWeb2AccountRequest.displayName = 'proto.web3auth.LinkWalletToWeb2AccountRequest'; } /** * 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.web3auth.LinkWalletToWeb2AccountResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.web3auth.LinkWalletToWeb2AccountResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.web3auth.LinkWalletToWeb2AccountResponse.displayName = 'proto.web3auth.LinkWalletToWeb2AccountResponse'; } /** * 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.web3auth.CheckWalletLinkingStatusRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.web3auth.CheckWalletLinkingStatusRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.web3auth.CheckWalletLinkingStatusRequest.displayName = 'proto.web3auth.CheckWalletLinkingStatusRequest'; } /** * 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.web3auth.CheckWalletLinkingStatusResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.web3auth.CheckWalletLinkingStatusResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.web3auth.CheckWalletLinkingStatusResponse.displayName = 'proto.web3auth.CheckWalletLinkingStatusResponse'; } /** * 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.web3auth.CheckEmailLinkingStatusRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.web3auth.CheckEmailLinkingStatusRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.web3auth.CheckEmailLinkingStatusRequest.displayName = 'proto.web3auth.CheckEmailLinkingStatusRequest'; } /** * 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.web3auth.CheckEmailLinkingStatusResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.web3auth.CheckEmailLinkingStatusResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.web3auth.CheckEmailLinkingStatusResponse.displayName = 'proto.web3auth.CheckEmailLinkingStatusResponse'; } /** * 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.web3auth.LinkEmailToWeb3AccountRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.web3auth.LinkEmailToWeb3AccountRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.web3auth.LinkEmailToWeb3AccountRequest.displayName = 'proto.web3auth.LinkEmailToWeb3AccountRequest'; } /** * 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.web3auth.LinkEmailToWeb3AccountResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.web3auth.LinkEmailToWeb3AccountResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.web3auth.LinkEmailToWeb3AccountResponse.displayName = 'proto.web3auth.LinkEmailToWeb3AccountResponse'; } 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_<name>, 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.web3auth.GetChallengeRequest.prototype.toObject = function(opt_includeInstance) { return proto.web3auth.GetChallengeRequest.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.web3auth.GetChallengeRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.web3auth.GetChallengeRequest.toObject = function(includeInstance, msg) { var f, obj = { walletAddress: 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.web3auth.GetChallengeRequest} */ proto.web3auth.GetChallengeRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.web3auth.GetChallengeRequest; return proto.web3auth.GetChallengeRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.web3auth.GetChallengeRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.web3auth.GetChallengeRequest} */ proto.web3auth.GetChallengeRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); msg.setWalletAddress(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.web3auth.GetChallengeRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.web3auth.GetChallengeRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.web3auth.GetChallengeRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.web3auth.GetChallengeRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getWalletAddress(); if (f.length > 0) { writer.writeString( 1, f ); } }; /** * optional string wallet_address = 1; * @return {string} */ proto.web3auth.GetChallengeRequest.prototype.getWalletAddress = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.web3auth.GetChallengeRequest} returns this */ proto.web3auth.GetChallengeRequest.prototype.setWalletAddress = 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_<name>, 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.web3auth.GetChallengeResponse.prototype.toObject = function(opt_includeInstance) { return proto.web3auth.GetChallengeResponse.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.web3auth.GetChallengeResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.web3auth.GetChallengeResponse.toObject = function(includeInstance, msg) { var f, obj = { challenge: jspb.Message.getFieldWithDefault(msg, 1, ""), expiresAt: jspb.Message.getFieldWithDefault(msg, 2, 0), proofLifetimeSeconds: jspb.Message.getFieldWithDefault(msg, 3, 0) }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.web3auth.GetChallengeResponse} */ proto.web3auth.GetChallengeResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.web3auth.GetChallengeResponse; return proto.web3auth.GetChallengeResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.web3auth.GetChallengeResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.web3auth.GetChallengeResponse} */ proto.web3auth.GetChallengeResponse.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.setChallenge(value); break; case 2: var value = /** @type {number} */ (reader.readInt64()); msg.setExpiresAt(value); break; case 3: var value = /** @type {number} */ (reader.readInt64()); msg.setProofLifetimeSeconds(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.web3auth.GetChallengeResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.web3auth.GetChallengeResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.web3auth.GetChallengeResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.web3auth.GetChallengeResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getChallenge(); if (f.length > 0) { writer.writeString( 1, f ); } f = message.getExpiresAt(); if (f !== 0) { writer.writeInt64( 2, f ); } f = message.getProofLifetimeSeconds(); if (f !== 0) { writer.writeInt64( 3, f ); } }; /** * optional string challenge = 1; * @return {string} */ proto.web3auth.GetChallengeResponse.prototype.getChallenge = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.web3auth.GetChallengeResponse} returns this */ proto.web3auth.GetChallengeResponse.prototype.setChallenge = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * optional int64 expires_at = 2; * @return {number} */ proto.web3auth.GetChallengeResponse.prototype.getExpiresAt = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** * @param {number} value * @return {!proto.web3auth.GetChallengeResponse} returns this */ proto.web3auth.GetChallengeResponse.prototype.setExpiresAt = function(value) { return jspb.Message.setProto3IntField(this, 2, value); }; /** * optional int64 proof_lifetime_seconds = 3; * @return {number} */ proto.web3auth.GetChallengeResponse.prototype.getProofLifetimeSeconds = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** * @param {number} value * @return {!proto.web3auth.GetChallengeResponse} returns this */ proto.web3auth.GetChallengeResponse.prototype.setProofLifetimeSeconds = function(value) { return jspb.Message.setProto3IntField(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_<name>, 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.web3auth.AuthWithSignatureRequest.prototype.toObject = function(opt_includeInstance) { return proto.web3auth.AuthWithSignatureRequest.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.web3auth.AuthWithSignatureRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.web3auth.AuthWithSignatureRequest.toObject = function(includeInstance, msg) { var f, obj = { walletAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), challenge: jspb.Message.getFieldWithDefault(msg, 2, ""), signature: 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.web3auth.AuthWithSignatureRequest} */ proto.web3auth.AuthWithSignatureRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.web3auth.AuthWithSignatureRequest; return proto.web3auth.AuthWithSignatureRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.web3auth.AuthWithSignatureRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.web3auth.AuthWithSignatureRequest} */ proto.web3auth.AuthWithSignatureRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); msg.setWalletAddress(value); break; case 2: var value = /** @type {string} */ (reader.readString()); msg.setChallenge(value); break; case 3: var value = /** @type {string} */ (reader.readString()); msg.setSignature(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.web3auth.AuthWithSignatureRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.web3auth.AuthWithSignatureRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.web3auth.AuthWithSignatureRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.web3auth.AuthWithSignatureRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getWalletAddress(); if (f.length > 0) { writer.writeString( 1, f ); } f = message.getChallenge(); if (f.length > 0) { writer.writeString( 2, f ); } f = message.getSignature(); if (f.length > 0) { writer.writeString( 3, f ); } }; /** * optional string wallet_address = 1; * @return {string} */ proto.web3auth.AuthWithSignatureRequest.prototype.getWalletAddress = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.web3auth.AuthWithSignatureRequest} returns this */ proto.web3auth.AuthWithSignatureRequest.prototype.setWalletAddress = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * optional string challenge = 2; * @return {string} */ proto.web3auth.AuthWithSignatureRequest.prototype.getChallenge = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value * @return {!proto.web3auth.AuthWithSignatureRequest} returns this */ proto.web3auth.AuthWithSignatureRequest.prototype.setChallenge = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; /** * optional string signature = 3; * @return {string} */ proto.web3auth.AuthWithSignatureRequest.prototype.getSignature = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** * @param {string} value * @return {!proto.web3auth.AuthWithSignatureRequest} returns this */ proto.web3auth.AuthWithSignatureRequest.prototype.setSignature = 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_<name>, 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.web3auth.AuthWithSignatureResponse.prototype.toObject = function(opt_includeInstance) { return proto.web3auth.AuthWithSignatureResponse.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.web3auth.AuthWithSignatureResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.web3auth.AuthWithSignatureResponse.toObject = function(includeInstance, msg) { var f, obj = { user: (f = msg.getUser()) && web3auth_wallet_pb.Web3User.toObject(includeInstance, f), sessionToken: jspb.Message.getFieldWithDefault(msg, 2, ""), sessionExpiresAt: jspb.Message.getFieldWithDefault(msg, 3, 0), isNewUser: jspb.Message.getBooleanFieldWithDefault(msg, 4, false), authProof: (f = msg.getAuthProof()) && proto.web3auth.AuthProof.toObject(includeInstance, f), message: jspb.Message.getFieldWithDefault(msg, 6, "") }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.web3auth.AuthWithSignatureResponse} */ proto.web3auth.AuthWithSignatureResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.web3auth.AuthWithSignatureResponse; return proto.web3auth.AuthWithSignatureResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.web3auth.AuthWithSignatureResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.web3auth.AuthWithSignatureResponse} */ proto.web3auth.AuthWithSignatureResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new web3auth_wallet_pb.Web3User; reader.readMessage(value,web3auth_wallet_pb.Web3User.deserializeBinaryFromReader); msg.setUser(value); break; case 2: var value = /** @type {string} */ (reader.readString()); msg.setSessionToken(value); break; case 3: var value = /** @type {number} */ (reader.readInt64()); msg.setSessionExpiresAt(value); break; case 4: var value = /** @type {boolean} */ (reader.readBool()); msg.setIsNewUser(value); break; case 5: var value = new proto.web3auth.AuthProof; reader.readMessage(value,proto.web3auth.AuthProof.deserializeBinaryFromReader); msg.setAuthProof(value); break; case 6: var value = /** @type {string} */ (reader.readString()); msg.setMessage(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.web3auth.AuthWithSignatureResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.web3auth.AuthWithSignatureResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.web3auth.AuthWithSignatureResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.web3auth.AuthWithSignatureResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getUser(); if (f != null) { writer.writeMessage( 1, f, web3auth_wallet_pb.Web3User.serializeBinaryToWriter ); } f = message.getSessionToken(); if (f.length > 0) { writer.writeString( 2, f ); } f = message.getSessionExpiresAt(); if (f !== 0) { writer.writeInt64( 3, f ); } f = message.getIsNewUser(); if (f) { writer.writeBool( 4, f ); } f = message.getAuthProof(); if (f != null) { writer.writeMessage( 5, f, proto.web3auth.AuthProof.serializeBinaryToWriter ); } f = message.getMessage(); if (f.length > 0) { writer.writeString( 6, f ); } }; /** * optional Web3User user = 1; * @return {?proto.web3auth.Web3User} */ proto.web3auth.AuthWithSignatureResponse.prototype.getUser = function() { return /** @type{?proto.web3auth.Web3User} */ ( jspb.Message.getWrapperField(this, web3auth_wallet_pb.Web3User, 1)); }; /** * @param {?proto.web3auth.Web3User|undefined} value * @return {!proto.web3auth.AuthWithSignatureResponse} returns this */ proto.web3auth.AuthWithSignatureResponse.prototype.setUser = function(value) { return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. * @return {!proto.web3auth.AuthWithSignatureResponse} returns this */ proto.web3auth.AuthWithSignatureResponse.prototype.clearUser = function() { return this.setUser(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.web3auth.AuthWithSignatureResponse.prototype.hasUser = function() { return jspb.Message.getField(this, 1) != null; }; /** * optional string session_token = 2; * @return {string} */ proto.web3auth.AuthWithSignatureResponse.prototype.getSessionToken = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value * @return {!proto.web3auth.AuthWithSignatureResponse} returns this */ proto.web3auth.AuthWithSignatureResponse.prototype.setSessionToken = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; /** * optional int64 session_expires_at = 3; * @return {number} */ proto.web3auth.AuthWithSignatureResponse.prototype.getSessionExpiresAt = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** * @param {number} value * @return {!proto.web3auth.AuthWithSignatureResponse} returns this */ proto.web3auth.AuthWithSignatureResponse.prototype.setSessionExpiresAt = function(value) { return jspb.Message.setProto3IntField(this, 3, value); }; /** * optional bool is_new_user = 4; * @return {boolean} */ proto.web3auth.AuthWithSignatureResponse.prototype.getIsNewUser = function() { return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); }; /** * @param {boolean} value * @return {!proto.web3auth.AuthWithSignatureResponse} returns this */ proto.web3auth.AuthWithSignatureResponse.prototype.setIsNewUser = function(value) { return jspb.Message.setProto3BooleanField(this, 4, value); }; /** * optional AuthProof auth_proof = 5; * @return {?proto.web3auth.AuthProof} */ proto.web3auth.AuthWithSignatureResponse.prototype.getAuthProof = function() { return /** @type{?proto.web3auth.AuthProof} */ ( jspb.Message.getWrapperField(this, proto.web3auth.AuthProof, 5)); }; /** * @param {?proto.web3auth.AuthProof|undefined} value * @return {!proto.web3auth.AuthWithSignatureResponse} returns this */ proto.web3auth.AuthWithSignatureResponse.prototype.setAuthProof = function(value) { return jspb.Message.setWrapperField(this, 5, value); }; /** * Clears the message field making it undefined. * @return {!proto.web3auth.AuthWithSignatureResponse} returns this */ proto.web3auth.AuthWithSignatureResponse.prototype.clearAuthProof = function() { return this.setAuthProof(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.web3auth.AuthWithSignatureResponse.prototype.hasAuthProof = function() { return jspb.Message.getField(this, 5) != null; }; /** * optional string message = 6; * @return {string} */ proto.web3auth.AuthWithSignatureResponse.prototype.getMessage = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); }; /** * @param {string} value * @return {!proto.web3auth.AuthWithSignatureResponse} returns this */ proto.web3auth.AuthWithSignatureResponse.prototype.setMessage = function(value) { return jspb.Message.setProto3StringField(this, 6, value); }; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_<name>, 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.web3auth.AuthWithProofRequest.prototype.toObject = function(opt_includeInstance) { return proto.web3auth.AuthWithProofRequest.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.web3auth.AuthWithProofRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.web3auth.AuthWithProofRequest.toObject = function(includeInstance, msg) { var f, obj = { walletAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), authProof: (f = msg.getAuthProof()) && proto.web3auth.AuthProof.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.web3auth.AuthWithProofRequest} */ proto.web3auth.AuthWithProofRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.web3auth.AuthWithProofRequest; return proto.web3auth.AuthWithProofRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.web3auth.AuthWithProofRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.web3auth.AuthWithProofRequest} */ proto.web3auth.AuthWithProofRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); msg.setWalletAddress(value); break; case 2: var value = new proto.web3auth.AuthProof; reader.readMessage(value,proto.web3auth.AuthProof.deserializeBinaryFromReader); msg.setAuthProof(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.web3auth.AuthWithProofRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.web3auth.AuthWithProofRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.web3auth.AuthWithProofRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.web3auth.AuthWithProofRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getWalletAddress(); if (f.length > 0) { writer.writeString( 1, f ); } f = message.getAuthProof(); if (f != null) { writer.writeMessage( 2, f, proto.web3auth.AuthProof.serializeBinaryToWriter ); } }; /** * optional string wallet_address = 1; * @return {string} */ proto.web3auth.AuthWithProofRequest.prototype.getWalletAddress = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.web3auth.AuthWithProofRequest} returns this */ proto.web3auth.AuthWithProofRequest.prototype.setWalletAddress = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * optional AuthProof auth_proof = 2; * @return {?proto.web3auth.AuthProof} */ proto.web3auth.AuthWithProofRequest.prototype.getAuthProof = function() { return /** @type{?proto.web3auth.AuthProof} */ ( jspb.Message.getWrapperField(this, proto.web3auth.AuthProof, 2)); }; /** * @param {?proto.web3auth.AuthProof|undefined} value * @return {!proto.web3auth.AuthWithProofRequest} returns this */ proto.web3auth.AuthWithProofRequest.prototype.setAuthProof = function(value) { return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. * @return {!proto.web3auth.AuthWithProofRequest} returns this */ proto.web3auth.AuthWithProofRequest.prototype.clearAuthProof = function() { return this.setAuthProof(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.web3auth.AuthWithProofRequest.prototype.hasAuthProof = 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_<name>, 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.web3auth.AuthWithProofResponse.prototype.to