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.

435 lines (376 loc) 11.6 kB
// source: web3auth/auth_proof.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)); goog.exportSymbol('proto.web3auth.WalletAuthProof', 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.WalletAuthProof = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.web3auth.WalletAuthProof, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.web3auth.WalletAuthProof.displayName = 'proto.web3auth.WalletAuthProof'; } 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.WalletAuthProof.prototype.toObject = function(opt_includeInstance) { return proto.web3auth.WalletAuthProof.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.WalletAuthProof} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.web3auth.WalletAuthProof.toObject = function(includeInstance, msg) { var f, obj = { id: jspb.Message.getFieldWithDefault(msg, 1, ""), walletAddress: jspb.Message.getFieldWithDefault(msg, 2, ""), userId: jspb.Message.getFieldWithDefault(msg, 3, ""), challenge: jspb.Message.getFieldWithDefault(msg, 4, ""), signature: jspb.Message.getFieldWithDefault(msg, 5, ""), createdAt: jspb.Message.getFieldWithDefault(msg, 6, 0), expiresAt: jspb.Message.getFieldWithDefault(msg, 7, 0), isValid: jspb.Message.getBooleanFieldWithDefault(msg, 8, false), lastUsedAt: jspb.Message.getFieldWithDefault(msg, 9, 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.WalletAuthProof} */ proto.web3auth.WalletAuthProof.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.web3auth.WalletAuthProof; return proto.web3auth.WalletAuthProof.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.web3auth.WalletAuthProof} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.web3auth.WalletAuthProof} */ proto.web3auth.WalletAuthProof.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.setId(value); break; case 2: var value = /** @type {string} */ (reader.readString()); msg.setWalletAddress(value); break; case 3: var value = /** @type {string} */ (reader.readString()); msg.setUserId(value); break; case 4: var value = /** @type {string} */ (reader.readString()); msg.setChallenge(value); break; case 5: var value = /** @type {string} */ (reader.readString()); msg.setSignature(value); break; case 6: var value = /** @type {number} */ (reader.readInt64()); msg.setCreatedAt(value); break; case 7: var value = /** @type {number} */ (reader.readInt64()); msg.setExpiresAt(value); break; case 8: var value = /** @type {boolean} */ (reader.readBool()); msg.setIsValid(value); break; case 9: var value = /** @type {number} */ (reader.readInt64()); msg.setLastUsedAt(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.web3auth.WalletAuthProof.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.web3auth.WalletAuthProof.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.WalletAuthProof} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.web3auth.WalletAuthProof.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getId(); if (f.length > 0) { writer.writeString( 1, f ); } f = message.getWalletAddress(); if (f.length > 0) { writer.writeString( 2, f ); } f = message.getUserId(); if (f.length > 0) { writer.writeString( 3, f ); } f = message.getChallenge(); if (f.length > 0) { writer.writeString( 4, f ); } f = message.getSignature(); if (f.length > 0) { writer.writeString( 5, f ); } f = message.getCreatedAt(); if (f !== 0) { writer.writeInt64( 6, f ); } f = message.getExpiresAt(); if (f !== 0) { writer.writeInt64( 7, f ); } f = message.getIsValid(); if (f) { writer.writeBool( 8, f ); } f = /** @type {number} */ (jspb.Message.getField(message, 9)); if (f != null) { writer.writeInt64( 9, f ); } }; /** * optional string id = 1; * @return {string} */ proto.web3auth.WalletAuthProof.prototype.getId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.web3auth.WalletAuthProof} returns this */ proto.web3auth.WalletAuthProof.prototype.setId = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * optional string wallet_address = 2; * @return {string} */ proto.web3auth.WalletAuthProof.prototype.getWalletAddress = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value * @return {!proto.web3auth.WalletAuthProof} returns this */ proto.web3auth.WalletAuthProof.prototype.setWalletAddress = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; /** * optional string user_id = 3; * @return {string} */ proto.web3auth.WalletAuthProof.prototype.getUserId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** * @param {string} value * @return {!proto.web3auth.WalletAuthProof} returns this */ proto.web3auth.WalletAuthProof.prototype.setUserId = function(value) { return jspb.Message.setProto3StringField(this, 3, value); }; /** * optional string challenge = 4; * @return {string} */ proto.web3auth.WalletAuthProof.prototype.getChallenge = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); }; /** * @param {string} value * @return {!proto.web3auth.WalletAuthProof} returns this */ proto.web3auth.WalletAuthProof.prototype.setChallenge = function(value) { return jspb.Message.setProto3StringField(this, 4, value); }; /** * optional string signature = 5; * @return {string} */ proto.web3auth.WalletAuthProof.prototype.getSignature = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); }; /** * @param {string} value * @return {!proto.web3auth.WalletAuthProof} returns this */ proto.web3auth.WalletAuthProof.prototype.setSignature = function(value) { return jspb.Message.setProto3StringField(this, 5, value); }; /** * optional int64 created_at = 6; * @return {number} */ proto.web3auth.WalletAuthProof.prototype.getCreatedAt = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); }; /** * @param {number} value * @return {!proto.web3auth.WalletAuthProof} returns this */ proto.web3auth.WalletAuthProof.prototype.setCreatedAt = function(value) { return jspb.Message.setProto3IntField(this, 6, value); }; /** * optional int64 expires_at = 7; * @return {number} */ proto.web3auth.WalletAuthProof.prototype.getExpiresAt = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); }; /** * @param {number} value * @return {!proto.web3auth.WalletAuthProof} returns this */ proto.web3auth.WalletAuthProof.prototype.setExpiresAt = function(value) { return jspb.Message.setProto3IntField(this, 7, value); }; /** * optional bool is_valid = 8; * @return {boolean} */ proto.web3auth.WalletAuthProof.prototype.getIsValid = function() { return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false)); }; /** * @param {boolean} value * @return {!proto.web3auth.WalletAuthProof} returns this */ proto.web3auth.WalletAuthProof.prototype.setIsValid = function(value) { return jspb.Message.setProto3BooleanField(this, 8, value); }; /** * optional int64 last_used_at = 9; * @return {number} */ proto.web3auth.WalletAuthProof.prototype.getLastUsedAt = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); }; /** * @param {number} value * @return {!proto.web3auth.WalletAuthProof} returns this */ proto.web3auth.WalletAuthProof.prototype.setLastUsedAt = function(value) { return jspb.Message.setField(this, 9, value); }; /** * Clears the field making it undefined. * @return {!proto.web3auth.WalletAuthProof} returns this */ proto.web3auth.WalletAuthProof.prototype.clearLastUsedAt = function() { return jspb.Message.setField(this, 9, undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.web3auth.WalletAuthProof.prototype.hasLastUsedAt = function() { return jspb.Message.getField(this, 9) != null; }; goog.object.extend(exports, proto.web3auth);