UNPKG

@injectivelabs/exchange-api

Version:

Injective Exchange API client with generated gRPC bindings.

1,390 lines (1,205 loc) 43.3 kB
// source: injective_oracle_rpc.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.injective_oracle_rpc.Oracle', null, global); goog.exportSymbol('proto.injective_oracle_rpc.OracleListRequest', null, global); goog.exportSymbol('proto.injective_oracle_rpc.OracleListResponse', null, global); goog.exportSymbol('proto.injective_oracle_rpc.PriceRequest', null, global); goog.exportSymbol('proto.injective_oracle_rpc.PriceResponse', null, global); goog.exportSymbol('proto.injective_oracle_rpc.StreamPricesRequest', null, global); goog.exportSymbol('proto.injective_oracle_rpc.StreamPricesResponse', 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.injective_oracle_rpc.OracleListRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.injective_oracle_rpc.OracleListRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.injective_oracle_rpc.OracleListRequest.displayName = 'proto.injective_oracle_rpc.OracleListRequest'; } /** * 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.injective_oracle_rpc.OracleListResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.injective_oracle_rpc.OracleListResponse.repeatedFields_, null); }; goog.inherits(proto.injective_oracle_rpc.OracleListResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.injective_oracle_rpc.OracleListResponse.displayName = 'proto.injective_oracle_rpc.OracleListResponse'; } /** * 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.injective_oracle_rpc.Oracle = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.injective_oracle_rpc.Oracle, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.injective_oracle_rpc.Oracle.displayName = 'proto.injective_oracle_rpc.Oracle'; } /** * 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.injective_oracle_rpc.PriceRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.injective_oracle_rpc.PriceRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.injective_oracle_rpc.PriceRequest.displayName = 'proto.injective_oracle_rpc.PriceRequest'; } /** * 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.injective_oracle_rpc.PriceResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.injective_oracle_rpc.PriceResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.injective_oracle_rpc.PriceResponse.displayName = 'proto.injective_oracle_rpc.PriceResponse'; } /** * 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.injective_oracle_rpc.StreamPricesRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.injective_oracle_rpc.StreamPricesRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.injective_oracle_rpc.StreamPricesRequest.displayName = 'proto.injective_oracle_rpc.StreamPricesRequest'; } /** * 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.injective_oracle_rpc.StreamPricesResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.injective_oracle_rpc.StreamPricesResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.injective_oracle_rpc.StreamPricesResponse.displayName = 'proto.injective_oracle_rpc.StreamPricesResponse'; } 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.injective_oracle_rpc.OracleListRequest.prototype.toObject = function(opt_includeInstance) { return proto.injective_oracle_rpc.OracleListRequest.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.injective_oracle_rpc.OracleListRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.injective_oracle_rpc.OracleListRequest.toObject = function(includeInstance, msg) { var f, obj = { }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.injective_oracle_rpc.OracleListRequest} */ proto.injective_oracle_rpc.OracleListRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.injective_oracle_rpc.OracleListRequest; return proto.injective_oracle_rpc.OracleListRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.injective_oracle_rpc.OracleListRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.injective_oracle_rpc.OracleListRequest} */ proto.injective_oracle_rpc.OracleListRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.injective_oracle_rpc.OracleListRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.injective_oracle_rpc.OracleListRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.injective_oracle_rpc.OracleListRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.injective_oracle_rpc.OracleListRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; }; /** * List of repeated fields within this message type. * @private {!Array<number>} * @const */ proto.injective_oracle_rpc.OracleListResponse.repeatedFields_ = [1]; 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.injective_oracle_rpc.OracleListResponse.prototype.toObject = function(opt_includeInstance) { return proto.injective_oracle_rpc.OracleListResponse.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.injective_oracle_rpc.OracleListResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.injective_oracle_rpc.OracleListResponse.toObject = function(includeInstance, msg) { var f, obj = { oraclesList: jspb.Message.toObjectList(msg.getOraclesList(), proto.injective_oracle_rpc.Oracle.toObject, includeInstance) }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.injective_oracle_rpc.OracleListResponse} */ proto.injective_oracle_rpc.OracleListResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.injective_oracle_rpc.OracleListResponse; return proto.injective_oracle_rpc.OracleListResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.injective_oracle_rpc.OracleListResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.injective_oracle_rpc.OracleListResponse} */ proto.injective_oracle_rpc.OracleListResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new proto.injective_oracle_rpc.Oracle; reader.readMessage(value,proto.injective_oracle_rpc.Oracle.deserializeBinaryFromReader); msg.addOracles(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.injective_oracle_rpc.OracleListResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.injective_oracle_rpc.OracleListResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.injective_oracle_rpc.OracleListResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.injective_oracle_rpc.OracleListResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getOraclesList(); if (f.length > 0) { writer.writeRepeatedMessage( 1, f, proto.injective_oracle_rpc.Oracle.serializeBinaryToWriter ); } }; /** * repeated Oracle oracles = 1; * @return {!Array<!proto.injective_oracle_rpc.Oracle>} */ proto.injective_oracle_rpc.OracleListResponse.prototype.getOraclesList = function() { return /** @type{!Array<!proto.injective_oracle_rpc.Oracle>} */ ( jspb.Message.getRepeatedWrapperField(this, proto.injective_oracle_rpc.Oracle, 1)); }; /** * @param {!Array<!proto.injective_oracle_rpc.Oracle>} value * @return {!proto.injective_oracle_rpc.OracleListResponse} returns this */ proto.injective_oracle_rpc.OracleListResponse.prototype.setOraclesList = function(value) { return jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** * @param {!proto.injective_oracle_rpc.Oracle=} opt_value * @param {number=} opt_index * @return {!proto.injective_oracle_rpc.Oracle} */ proto.injective_oracle_rpc.OracleListResponse.prototype.addOracles = function(opt_value, opt_index) { return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.injective_oracle_rpc.Oracle, opt_index); }; /** * Clears the list making it empty but non-null. * @return {!proto.injective_oracle_rpc.OracleListResponse} returns this */ proto.injective_oracle_rpc.OracleListResponse.prototype.clearOraclesList = function() { return this.setOraclesList([]); }; 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.injective_oracle_rpc.Oracle.prototype.toObject = function(opt_includeInstance) { return proto.injective_oracle_rpc.Oracle.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.injective_oracle_rpc.Oracle} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.injective_oracle_rpc.Oracle.toObject = function(includeInstance, msg) { var f, obj = { symbol: jspb.Message.getFieldWithDefault(msg, 1, ""), baseSymbol: jspb.Message.getFieldWithDefault(msg, 2, ""), quoteSymbol: jspb.Message.getFieldWithDefault(msg, 3, ""), oracleType: jspb.Message.getFieldWithDefault(msg, 4, ""), price: jspb.Message.getFieldWithDefault(msg, 5, "") }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.injective_oracle_rpc.Oracle} */ proto.injective_oracle_rpc.Oracle.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.injective_oracle_rpc.Oracle; return proto.injective_oracle_rpc.Oracle.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.injective_oracle_rpc.Oracle} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.injective_oracle_rpc.Oracle} */ proto.injective_oracle_rpc.Oracle.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.setSymbol(value); break; case 2: var value = /** @type {string} */ (reader.readString()); msg.setBaseSymbol(value); break; case 3: var value = /** @type {string} */ (reader.readString()); msg.setQuoteSymbol(value); break; case 4: var value = /** @type {string} */ (reader.readString()); msg.setOracleType(value); break; case 5: var value = /** @type {string} */ (reader.readString()); msg.setPrice(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.injective_oracle_rpc.Oracle.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.injective_oracle_rpc.Oracle.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.injective_oracle_rpc.Oracle} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.injective_oracle_rpc.Oracle.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getSymbol(); if (f.length > 0) { writer.writeString( 1, f ); } f = message.getBaseSymbol(); if (f.length > 0) { writer.writeString( 2, f ); } f = message.getQuoteSymbol(); if (f.length > 0) { writer.writeString( 3, f ); } f = message.getOracleType(); if (f.length > 0) { writer.writeString( 4, f ); } f = message.getPrice(); if (f.length > 0) { writer.writeString( 5, f ); } }; /** * optional string symbol = 1; * @return {string} */ proto.injective_oracle_rpc.Oracle.prototype.getSymbol = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.injective_oracle_rpc.Oracle} returns this */ proto.injective_oracle_rpc.Oracle.prototype.setSymbol = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * optional string base_symbol = 2; * @return {string} */ proto.injective_oracle_rpc.Oracle.prototype.getBaseSymbol = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value * @return {!proto.injective_oracle_rpc.Oracle} returns this */ proto.injective_oracle_rpc.Oracle.prototype.setBaseSymbol = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; /** * optional string quote_symbol = 3; * @return {string} */ proto.injective_oracle_rpc.Oracle.prototype.getQuoteSymbol = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** * @param {string} value * @return {!proto.injective_oracle_rpc.Oracle} returns this */ proto.injective_oracle_rpc.Oracle.prototype.setQuoteSymbol = function(value) { return jspb.Message.setProto3StringField(this, 3, value); }; /** * optional string oracle_type = 4; * @return {string} */ proto.injective_oracle_rpc.Oracle.prototype.getOracleType = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); }; /** * @param {string} value * @return {!proto.injective_oracle_rpc.Oracle} returns this */ proto.injective_oracle_rpc.Oracle.prototype.setOracleType = function(value) { return jspb.Message.setProto3StringField(this, 4, value); }; /** * optional string price = 5; * @return {string} */ proto.injective_oracle_rpc.Oracle.prototype.getPrice = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); }; /** * @param {string} value * @return {!proto.injective_oracle_rpc.Oracle} returns this */ proto.injective_oracle_rpc.Oracle.prototype.setPrice = function(value) { return jspb.Message.setProto3StringField(this, 5, value); }; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_<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.injective_oracle_rpc.PriceRequest.prototype.toObject = function(opt_includeInstance) { return proto.injective_oracle_rpc.PriceRequest.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.injective_oracle_rpc.PriceRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.injective_oracle_rpc.PriceRequest.toObject = function(includeInstance, msg) { var f, obj = { baseSymbol: jspb.Message.getFieldWithDefault(msg, 1, ""), quoteSymbol: jspb.Message.getFieldWithDefault(msg, 2, ""), oracleType: jspb.Message.getFieldWithDefault(msg, 3, ""), oracleScaleFactor: jspb.Message.getFieldWithDefault(msg, 4, 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.injective_oracle_rpc.PriceRequest} */ proto.injective_oracle_rpc.PriceRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.injective_oracle_rpc.PriceRequest; return proto.injective_oracle_rpc.PriceRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.injective_oracle_rpc.PriceRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.injective_oracle_rpc.PriceRequest} */ proto.injective_oracle_rpc.PriceRequest.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.setBaseSymbol(value); break; case 2: var value = /** @type {string} */ (reader.readString()); msg.setQuoteSymbol(value); break; case 3: var value = /** @type {string} */ (reader.readString()); msg.setOracleType(value); break; case 4: var value = /** @type {number} */ (reader.readUint32()); msg.setOracleScaleFactor(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.injective_oracle_rpc.PriceRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.injective_oracle_rpc.PriceRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.injective_oracle_rpc.PriceRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.injective_oracle_rpc.PriceRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getBaseSymbol(); if (f.length > 0) { writer.writeString( 1, f ); } f = message.getQuoteSymbol(); if (f.length > 0) { writer.writeString( 2, f ); } f = message.getOracleType(); if (f.length > 0) { writer.writeString( 3, f ); } f = message.getOracleScaleFactor(); if (f !== 0) { writer.writeUint32( 4, f ); } }; /** * optional string base_symbol = 1; * @return {string} */ proto.injective_oracle_rpc.PriceRequest.prototype.getBaseSymbol = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.injective_oracle_rpc.PriceRequest} returns this */ proto.injective_oracle_rpc.PriceRequest.prototype.setBaseSymbol = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * optional string quote_symbol = 2; * @return {string} */ proto.injective_oracle_rpc.PriceRequest.prototype.getQuoteSymbol = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value * @return {!proto.injective_oracle_rpc.PriceRequest} returns this */ proto.injective_oracle_rpc.PriceRequest.prototype.setQuoteSymbol = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; /** * optional string oracle_type = 3; * @return {string} */ proto.injective_oracle_rpc.PriceRequest.prototype.getOracleType = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** * @param {string} value * @return {!proto.injective_oracle_rpc.PriceRequest} returns this */ proto.injective_oracle_rpc.PriceRequest.prototype.setOracleType = function(value) { return jspb.Message.setProto3StringField(this, 3, value); }; /** * optional uint32 oracle_scale_factor = 4; * @return {number} */ proto.injective_oracle_rpc.PriceRequest.prototype.getOracleScaleFactor = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; /** * @param {number} value * @return {!proto.injective_oracle_rpc.PriceRequest} returns this */ proto.injective_oracle_rpc.PriceRequest.prototype.setOracleScaleFactor = function(value) { return jspb.Message.setProto3IntField(this, 4, 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.injective_oracle_rpc.PriceResponse.prototype.toObject = function(opt_includeInstance) { return proto.injective_oracle_rpc.PriceResponse.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.injective_oracle_rpc.PriceResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.injective_oracle_rpc.PriceResponse.toObject = function(includeInstance, msg) { var f, obj = { price: 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.injective_oracle_rpc.PriceResponse} */ proto.injective_oracle_rpc.PriceResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.injective_oracle_rpc.PriceResponse; return proto.injective_oracle_rpc.PriceResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.injective_oracle_rpc.PriceResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.injective_oracle_rpc.PriceResponse} */ proto.injective_oracle_rpc.PriceResponse.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.setPrice(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.injective_oracle_rpc.PriceResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.injective_oracle_rpc.PriceResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.injective_oracle_rpc.PriceResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.injective_oracle_rpc.PriceResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getPrice(); if (f.length > 0) { writer.writeString( 1, f ); } }; /** * optional string price = 1; * @return {string} */ proto.injective_oracle_rpc.PriceResponse.prototype.getPrice = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.injective_oracle_rpc.PriceResponse} returns this */ proto.injective_oracle_rpc.PriceResponse.prototype.setPrice = 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.injective_oracle_rpc.StreamPricesRequest.prototype.toObject = function(opt_includeInstance) { return proto.injective_oracle_rpc.StreamPricesRequest.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.injective_oracle_rpc.StreamPricesRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.injective_oracle_rpc.StreamPricesRequest.toObject = function(includeInstance, msg) { var f, obj = { baseSymbol: jspb.Message.getFieldWithDefault(msg, 1, ""), quoteSymbol: jspb.Message.getFieldWithDefault(msg, 2, ""), oracleType: 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.injective_oracle_rpc.StreamPricesRequest} */ proto.injective_oracle_rpc.StreamPricesRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.injective_oracle_rpc.StreamPricesRequest; return proto.injective_oracle_rpc.StreamPricesRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.injective_oracle_rpc.StreamPricesRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.injective_oracle_rpc.StreamPricesRequest} */ proto.injective_oracle_rpc.StreamPricesRequest.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.setBaseSymbol(value); break; case 2: var value = /** @type {string} */ (reader.readString()); msg.setQuoteSymbol(value); break; case 3: var value = /** @type {string} */ (reader.readString()); msg.setOracleType(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.injective_oracle_rpc.StreamPricesRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.injective_oracle_rpc.StreamPricesRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.injective_oracle_rpc.StreamPricesRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.injective_oracle_rpc.StreamPricesRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getBaseSymbol(); if (f.length > 0) { writer.writeString( 1, f ); } f = message.getQuoteSymbol(); if (f.length > 0) { writer.writeString( 2, f ); } f = message.getOracleType(); if (f.length > 0) { writer.writeString( 3, f ); } }; /** * optional string base_symbol = 1; * @return {string} */ proto.injective_oracle_rpc.StreamPricesRequest.prototype.getBaseSymbol = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.injective_oracle_rpc.StreamPricesRequest} returns this */ proto.injective_oracle_rpc.StreamPricesRequest.prototype.setBaseSymbol = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * optional string quote_symbol = 2; * @return {string} */ proto.injective_oracle_rpc.StreamPricesRequest.prototype.getQuoteSymbol = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value * @return {!proto.injective_oracle_rpc.StreamPricesRequest} returns this */ proto.injective_oracle_rpc.StreamPricesRequest.prototype.setQuoteSymbol = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; /** * optional string oracle_type = 3; * @return {string} */ proto.injective_oracle_rpc.StreamPricesRequest.prototype.getOracleType = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** * @param {string} value * @return {!proto.injective_oracle_rpc.StreamPricesRequest} returns this */ proto.injective_oracle_rpc.StreamPricesRequest.prototype.setOracleType = 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.injective_oracle_rpc.StreamPricesResponse.prototype.toObject = function(opt_includeInstance) { return proto.injective_oracle_rpc.StreamPricesResponse.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.injective_oracle_rpc.StreamPricesResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.injective_oracle_rpc.StreamPricesResponse.toObject = function(includeInstance, msg) { var f, obj = { price: jspb.Message.getFieldWithDefault(msg, 1, ""), timestamp: jspb.Message.getFieldWithDefault(msg, 2, 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.injective_oracle_rpc.StreamPricesResponse} */ proto.injective_oracle_rpc.StreamPricesResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.injective_oracle_rpc.StreamPricesResponse; return proto.injective_oracle_rpc.StreamPricesResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.injective_oracle_rpc.StreamPricesResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.injective_oracle_rpc.StreamPricesResponse} */ proto.injective_oracle_rpc.StreamPricesResponse.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.setPrice(value); break; case 2: var value = /** @type {number} */ (reader.readSint64()); msg.setTimestamp(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.injective_oracle_rpc.StreamPricesResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.injective_oracle_rpc.StreamPricesResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.injective_oracle_rpc.StreamPricesResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.injective_oracle_rpc.StreamPricesResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getPrice(); if (f.length > 0) { writer.writeString( 1, f ); } f = message.getTimestamp(); if (f !== 0) { writer.writeSint64( 2, f ); } }; /** * optional string price = 1; * @return {string} */ proto.injective_oracle_rpc.StreamPricesResponse.prototype.getPrice = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.injective_oracle_rpc.StreamPricesResponse} returns this */ proto.injective_oracle_rpc.StreamPricesResponse.prototype.setPrice = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * optional sint64 timestamp = 2; * @return {number} */ proto.injective_oracle_rpc.StreamPricesResponse.prototype.getTimestamp = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** * @param {number} value * @return {!proto.injective_oracle_rpc.StreamPricesResponse} returns this */ proto.injective_oracle_rpc.StreamPricesResponse.prototype.setTimestamp = function(value) { return jspb.Message.setProto3IntField(this, 2, value); }; goog.object.extend(exports, proto.injective_oracle_rpc);