UNPKG

@bandprotocol/bandchain.js

Version:

Library for interacting with BandChain in browser and Node.js environments

1,628 lines (1,543 loc) 144 kB
// source: oracle/v1/oracle.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('return this')() var gogoproto_gogo_pb = require('../../gogoproto/gogo_pb.js') goog.object.extend(proto, gogoproto_gogo_pb) var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js') goog.object.extend(proto, google_protobuf_timestamp_pb) var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js') goog.object.extend(proto, google_protobuf_any_pb) var cosmos_base_v1beta1_coin_pb = require('../../cosmos/base/v1beta1/coin_pb.js') goog.object.extend(proto, cosmos_base_v1beta1_coin_pb) goog.exportSymbol('proto.oracle.v1.ActiveValidator', null, global) goog.exportSymbol('proto.oracle.v1.DataSource', null, global) goog.exportSymbol('proto.oracle.v1.IBCChannel', null, global) goog.exportSymbol( 'proto.oracle.v1.OracleRequestPacketAcknowledgement', null, global, ) goog.exportSymbol('proto.oracle.v1.OracleRequestPacketData', null, global) goog.exportSymbol('proto.oracle.v1.OracleResponsePacketData', null, global) goog.exportSymbol('proto.oracle.v1.OracleScript', null, global) goog.exportSymbol('proto.oracle.v1.Params', null, global) goog.exportSymbol('proto.oracle.v1.PendingResolveList', null, global) goog.exportSymbol('proto.oracle.v1.PriceResult', null, global) goog.exportSymbol('proto.oracle.v1.RawReport', null, global) goog.exportSymbol('proto.oracle.v1.RawRequest', null, global) goog.exportSymbol('proto.oracle.v1.Report', null, global) goog.exportSymbol('proto.oracle.v1.Request', null, global) goog.exportSymbol('proto.oracle.v1.RequestVerification', null, global) goog.exportSymbol('proto.oracle.v1.ResolveStatus', null, global) goog.exportSymbol('proto.oracle.v1.Result', null, global) goog.exportSymbol('proto.oracle.v1.ValidatorStatus', 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.oracle.v1.DataSource = function (opt_data) { jspb.Message.initialize( this, opt_data, 0, -1, proto.oracle.v1.DataSource.repeatedFields_, null, ) } goog.inherits(proto.oracle.v1.DataSource, jspb.Message) if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.oracle.v1.DataSource.displayName = 'proto.oracle.v1.DataSource' } /** * 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.oracle.v1.OracleScript = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null) } goog.inherits(proto.oracle.v1.OracleScript, jspb.Message) if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.oracle.v1.OracleScript.displayName = 'proto.oracle.v1.OracleScript' } /** * 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.oracle.v1.RawRequest = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null) } goog.inherits(proto.oracle.v1.RawRequest, jspb.Message) if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.oracle.v1.RawRequest.displayName = 'proto.oracle.v1.RawRequest' } /** * 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.oracle.v1.RawReport = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null) } goog.inherits(proto.oracle.v1.RawReport, jspb.Message) if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.oracle.v1.RawReport.displayName = 'proto.oracle.v1.RawReport' } /** * 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.oracle.v1.Request = function (opt_data) { jspb.Message.initialize( this, opt_data, 0, -1, proto.oracle.v1.Request.repeatedFields_, null, ) } goog.inherits(proto.oracle.v1.Request, jspb.Message) if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.oracle.v1.Request.displayName = 'proto.oracle.v1.Request' } /** * 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.oracle.v1.Report = function (opt_data) { jspb.Message.initialize( this, opt_data, 0, -1, proto.oracle.v1.Report.repeatedFields_, null, ) } goog.inherits(proto.oracle.v1.Report, jspb.Message) if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.oracle.v1.Report.displayName = 'proto.oracle.v1.Report' } /** * 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.oracle.v1.OracleRequestPacketData = function (opt_data) { jspb.Message.initialize( this, opt_data, 0, -1, proto.oracle.v1.OracleRequestPacketData.repeatedFields_, null, ) } goog.inherits(proto.oracle.v1.OracleRequestPacketData, jspb.Message) if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.oracle.v1.OracleRequestPacketData.displayName = 'proto.oracle.v1.OracleRequestPacketData' } /** * 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.oracle.v1.OracleRequestPacketAcknowledgement = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null) } goog.inherits(proto.oracle.v1.OracleRequestPacketAcknowledgement, jspb.Message) if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.oracle.v1.OracleRequestPacketAcknowledgement.displayName = 'proto.oracle.v1.OracleRequestPacketAcknowledgement' } /** * 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.oracle.v1.OracleResponsePacketData = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null) } goog.inherits(proto.oracle.v1.OracleResponsePacketData, jspb.Message) if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.oracle.v1.OracleResponsePacketData.displayName = 'proto.oracle.v1.OracleResponsePacketData' } /** * 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.oracle.v1.Result = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null) } goog.inherits(proto.oracle.v1.Result, jspb.Message) if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.oracle.v1.Result.displayName = 'proto.oracle.v1.Result' } /** * 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.oracle.v1.ValidatorStatus = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null) } goog.inherits(proto.oracle.v1.ValidatorStatus, jspb.Message) if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.oracle.v1.ValidatorStatus.displayName = 'proto.oracle.v1.ValidatorStatus' } /** * 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.oracle.v1.ActiveValidator = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null) } goog.inherits(proto.oracle.v1.ActiveValidator, jspb.Message) if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.oracle.v1.ActiveValidator.displayName = 'proto.oracle.v1.ActiveValidator' } /** * 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.oracle.v1.Params = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null) } goog.inherits(proto.oracle.v1.Params, jspb.Message) if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.oracle.v1.Params.displayName = 'proto.oracle.v1.Params' } /** * 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.oracle.v1.PendingResolveList = function (opt_data) { jspb.Message.initialize( this, opt_data, 0, -1, proto.oracle.v1.PendingResolveList.repeatedFields_, null, ) } goog.inherits(proto.oracle.v1.PendingResolveList, jspb.Message) if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.oracle.v1.PendingResolveList.displayName = 'proto.oracle.v1.PendingResolveList' } /** * 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.oracle.v1.IBCChannel = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null) } goog.inherits(proto.oracle.v1.IBCChannel, jspb.Message) if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.oracle.v1.IBCChannel.displayName = 'proto.oracle.v1.IBCChannel' } /** * 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.oracle.v1.RequestVerification = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null) } goog.inherits(proto.oracle.v1.RequestVerification, jspb.Message) if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.oracle.v1.RequestVerification.displayName = 'proto.oracle.v1.RequestVerification' } /** * 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.oracle.v1.PriceResult = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null) } goog.inherits(proto.oracle.v1.PriceResult, jspb.Message) if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.oracle.v1.PriceResult.displayName = 'proto.oracle.v1.PriceResult' } /** * List of repeated fields within this message type. * @private {!Array<number>} * @const */ proto.oracle.v1.DataSource.repeatedFields_ = [6] 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.oracle.v1.DataSource.prototype.toObject = function ( opt_includeInstance, ) { return proto.oracle.v1.DataSource.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.oracle.v1.DataSource} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.oracle.v1.DataSource.toObject = function (includeInstance, msg) { var f, obj = { owner: jspb.Message.getFieldWithDefault(msg, 1, ''), name: jspb.Message.getFieldWithDefault(msg, 2, ''), description: jspb.Message.getFieldWithDefault(msg, 3, ''), filename: jspb.Message.getFieldWithDefault(msg, 4, ''), treasury: jspb.Message.getFieldWithDefault(msg, 5, ''), feeList: jspb.Message.toObjectList( msg.getFeeList(), cosmos_base_v1beta1_coin_pb.Coin.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.oracle.v1.DataSource} */ proto.oracle.v1.DataSource.deserializeBinary = function (bytes) { var reader = new jspb.BinaryReader(bytes) var msg = new proto.oracle.v1.DataSource() return proto.oracle.v1.DataSource.deserializeBinaryFromReader(msg, reader) } /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.oracle.v1.DataSource} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.oracle.v1.DataSource} */ proto.oracle.v1.DataSource.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.setOwner(value) break case 2: var value = /** @type {string} */ (reader.readString()) msg.setName(value) break case 3: var value = /** @type {string} */ (reader.readString()) msg.setDescription(value) break case 4: var value = /** @type {string} */ (reader.readString()) msg.setFilename(value) break case 5: var value = /** @type {string} */ (reader.readString()) msg.setTreasury(value) break case 6: var value = new cosmos_base_v1beta1_coin_pb.Coin() reader.readMessage( value, cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader, ) msg.addFee(value) break default: reader.skipField() break } } return msg } /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.oracle.v1.DataSource.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter() proto.oracle.v1.DataSource.serializeBinaryToWriter(this, writer) return writer.getResultBuffer() } /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.oracle.v1.DataSource} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.oracle.v1.DataSource.serializeBinaryToWriter = function ( message, writer, ) { var f = undefined f = message.getOwner() if (f.length > 0) { writer.writeString(1, f) } f = message.getName() if (f.length > 0) { writer.writeString(2, f) } f = message.getDescription() if (f.length > 0) { writer.writeString(3, f) } f = message.getFilename() if (f.length > 0) { writer.writeString(4, f) } f = message.getTreasury() if (f.length > 0) { writer.writeString(5, f) } f = message.getFeeList() if (f.length > 0) { writer.writeRepeatedMessage( 6, f, cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter, ) } } /** * optional string owner = 1; * @return {string} */ proto.oracle.v1.DataSource.prototype.getOwner = function () { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, '')) } /** * @param {string} value * @return {!proto.oracle.v1.DataSource} returns this */ proto.oracle.v1.DataSource.prototype.setOwner = function (value) { return jspb.Message.setProto3StringField(this, 1, value) } /** * optional string name = 2; * @return {string} */ proto.oracle.v1.DataSource.prototype.getName = function () { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, '')) } /** * @param {string} value * @return {!proto.oracle.v1.DataSource} returns this */ proto.oracle.v1.DataSource.prototype.setName = function (value) { return jspb.Message.setProto3StringField(this, 2, value) } /** * optional string description = 3; * @return {string} */ proto.oracle.v1.DataSource.prototype.getDescription = function () { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, '')) } /** * @param {string} value * @return {!proto.oracle.v1.DataSource} returns this */ proto.oracle.v1.DataSource.prototype.setDescription = function (value) { return jspb.Message.setProto3StringField(this, 3, value) } /** * optional string filename = 4; * @return {string} */ proto.oracle.v1.DataSource.prototype.getFilename = function () { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, '')) } /** * @param {string} value * @return {!proto.oracle.v1.DataSource} returns this */ proto.oracle.v1.DataSource.prototype.setFilename = function (value) { return jspb.Message.setProto3StringField(this, 4, value) } /** * optional string treasury = 5; * @return {string} */ proto.oracle.v1.DataSource.prototype.getTreasury = function () { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, '')) } /** * @param {string} value * @return {!proto.oracle.v1.DataSource} returns this */ proto.oracle.v1.DataSource.prototype.setTreasury = function (value) { return jspb.Message.setProto3StringField(this, 5, value) } /** * repeated cosmos.base.v1beta1.Coin fee = 6; * @return {!Array<!proto.cosmos.base.v1beta1.Coin>} */ proto.oracle.v1.DataSource.prototype.getFeeList = function () { return /** @type{!Array<!proto.cosmos.base.v1beta1.Coin>} */ ( jspb.Message.getRepeatedWrapperField( this, cosmos_base_v1beta1_coin_pb.Coin, 6, ) ) } /** * @param {!Array<!proto.cosmos.base.v1beta1.Coin>} value * @return {!proto.oracle.v1.DataSource} returns this */ proto.oracle.v1.DataSource.prototype.setFeeList = function (value) { return jspb.Message.setRepeatedWrapperField(this, 6, value) } /** * @param {!proto.cosmos.base.v1beta1.Coin=} opt_value * @param {number=} opt_index * @return {!proto.cosmos.base.v1beta1.Coin} */ proto.oracle.v1.DataSource.prototype.addFee = function (opt_value, opt_index) { return jspb.Message.addToRepeatedWrapperField( this, 6, opt_value, proto.cosmos.base.v1beta1.Coin, opt_index, ) } /** * Clears the list making it empty but non-null. * @return {!proto.oracle.v1.DataSource} returns this */ proto.oracle.v1.DataSource.prototype.clearFeeList = function () { return this.setFeeList([]) } 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.oracle.v1.OracleScript.prototype.toObject = function ( opt_includeInstance, ) { return proto.oracle.v1.OracleScript.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.oracle.v1.OracleScript} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.oracle.v1.OracleScript.toObject = function (includeInstance, msg) { var f, obj = { owner: jspb.Message.getFieldWithDefault(msg, 1, ''), name: jspb.Message.getFieldWithDefault(msg, 2, ''), description: jspb.Message.getFieldWithDefault(msg, 3, ''), filename: jspb.Message.getFieldWithDefault(msg, 4, ''), schema: jspb.Message.getFieldWithDefault(msg, 5, ''), sourceCodeUrl: 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.oracle.v1.OracleScript} */ proto.oracle.v1.OracleScript.deserializeBinary = function (bytes) { var reader = new jspb.BinaryReader(bytes) var msg = new proto.oracle.v1.OracleScript() return proto.oracle.v1.OracleScript.deserializeBinaryFromReader(msg, reader) } /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.oracle.v1.OracleScript} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.oracle.v1.OracleScript} */ proto.oracle.v1.OracleScript.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.setOwner(value) break case 2: var value = /** @type {string} */ (reader.readString()) msg.setName(value) break case 3: var value = /** @type {string} */ (reader.readString()) msg.setDescription(value) break case 4: var value = /** @type {string} */ (reader.readString()) msg.setFilename(value) break case 5: var value = /** @type {string} */ (reader.readString()) msg.setSchema(value) break case 6: var value = /** @type {string} */ (reader.readString()) msg.setSourceCodeUrl(value) break default: reader.skipField() break } } return msg } /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.oracle.v1.OracleScript.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter() proto.oracle.v1.OracleScript.serializeBinaryToWriter(this, writer) return writer.getResultBuffer() } /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.oracle.v1.OracleScript} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.oracle.v1.OracleScript.serializeBinaryToWriter = function ( message, writer, ) { var f = undefined f = message.getOwner() if (f.length > 0) { writer.writeString(1, f) } f = message.getName() if (f.length > 0) { writer.writeString(2, f) } f = message.getDescription() if (f.length > 0) { writer.writeString(3, f) } f = message.getFilename() if (f.length > 0) { writer.writeString(4, f) } f = message.getSchema() if (f.length > 0) { writer.writeString(5, f) } f = message.getSourceCodeUrl() if (f.length > 0) { writer.writeString(6, f) } } /** * optional string owner = 1; * @return {string} */ proto.oracle.v1.OracleScript.prototype.getOwner = function () { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, '')) } /** * @param {string} value * @return {!proto.oracle.v1.OracleScript} returns this */ proto.oracle.v1.OracleScript.prototype.setOwner = function (value) { return jspb.Message.setProto3StringField(this, 1, value) } /** * optional string name = 2; * @return {string} */ proto.oracle.v1.OracleScript.prototype.getName = function () { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, '')) } /** * @param {string} value * @return {!proto.oracle.v1.OracleScript} returns this */ proto.oracle.v1.OracleScript.prototype.setName = function (value) { return jspb.Message.setProto3StringField(this, 2, value) } /** * optional string description = 3; * @return {string} */ proto.oracle.v1.OracleScript.prototype.getDescription = function () { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, '')) } /** * @param {string} value * @return {!proto.oracle.v1.OracleScript} returns this */ proto.oracle.v1.OracleScript.prototype.setDescription = function (value) { return jspb.Message.setProto3StringField(this, 3, value) } /** * optional string filename = 4; * @return {string} */ proto.oracle.v1.OracleScript.prototype.getFilename = function () { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, '')) } /** * @param {string} value * @return {!proto.oracle.v1.OracleScript} returns this */ proto.oracle.v1.OracleScript.prototype.setFilename = function (value) { return jspb.Message.setProto3StringField(this, 4, value) } /** * optional string schema = 5; * @return {string} */ proto.oracle.v1.OracleScript.prototype.getSchema = function () { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, '')) } /** * @param {string} value * @return {!proto.oracle.v1.OracleScript} returns this */ proto.oracle.v1.OracleScript.prototype.setSchema = function (value) { return jspb.Message.setProto3StringField(this, 5, value) } /** * optional string source_code_url = 6; * @return {string} */ proto.oracle.v1.OracleScript.prototype.getSourceCodeUrl = function () { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, '')) } /** * @param {string} value * @return {!proto.oracle.v1.OracleScript} returns this */ proto.oracle.v1.OracleScript.prototype.setSourceCodeUrl = 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.oracle.v1.RawRequest.prototype.toObject = function ( opt_includeInstance, ) { return proto.oracle.v1.RawRequest.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.oracle.v1.RawRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.oracle.v1.RawRequest.toObject = function (includeInstance, msg) { var f, obj = { externalId: jspb.Message.getFieldWithDefault(msg, 1, 0), dataSourceId: jspb.Message.getFieldWithDefault(msg, 2, 0), calldata: msg.getCalldata_asB64(), } if (includeInstance) { obj.$jspbMessageInstance = msg } return obj } } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.oracle.v1.RawRequest} */ proto.oracle.v1.RawRequest.deserializeBinary = function (bytes) { var reader = new jspb.BinaryReader(bytes) var msg = new proto.oracle.v1.RawRequest() return proto.oracle.v1.RawRequest.deserializeBinaryFromReader(msg, reader) } /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.oracle.v1.RawRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.oracle.v1.RawRequest} */ proto.oracle.v1.RawRequest.deserializeBinaryFromReader = function ( msg, reader, ) { while (reader.nextField()) { if (reader.isEndGroup()) { break } var field = reader.getFieldNumber() switch (field) { case 1: var value = /** @type {number} */ (reader.readUint64()) msg.setExternalId(value) break case 2: var value = /** @type {number} */ (reader.readUint64()) msg.setDataSourceId(value) break case 3: var value = /** @type {!Uint8Array} */ (reader.readBytes()) msg.setCalldata(value) break default: reader.skipField() break } } return msg } /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.oracle.v1.RawRequest.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter() proto.oracle.v1.RawRequest.serializeBinaryToWriter(this, writer) return writer.getResultBuffer() } /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.oracle.v1.RawRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.oracle.v1.RawRequest.serializeBinaryToWriter = function ( message, writer, ) { var f = undefined f = message.getExternalId() if (f !== 0) { writer.writeUint64(1, f) } f = message.getDataSourceId() if (f !== 0) { writer.writeUint64(2, f) } f = message.getCalldata_asU8() if (f.length > 0) { writer.writeBytes(3, f) } } /** * optional uint64 external_id = 1; * @return {number} */ proto.oracle.v1.RawRequest.prototype.getExternalId = function () { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)) } /** * @param {number} value * @return {!proto.oracle.v1.RawRequest} returns this */ proto.oracle.v1.RawRequest.prototype.setExternalId = function (value) { return jspb.Message.setProto3IntField(this, 1, value) } /** * optional uint64 data_source_id = 2; * @return {number} */ proto.oracle.v1.RawRequest.prototype.getDataSourceId = function () { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)) } /** * @param {number} value * @return {!proto.oracle.v1.RawRequest} returns this */ proto.oracle.v1.RawRequest.prototype.setDataSourceId = function (value) { return jspb.Message.setProto3IntField(this, 2, value) } /** * optional bytes calldata = 3; * @return {!(string|Uint8Array)} */ proto.oracle.v1.RawRequest.prototype.getCalldata = function () { return /** @type {!(string|Uint8Array)} */ ( jspb.Message.getFieldWithDefault(this, 3, '') ) } /** * optional bytes calldata = 3; * This is a type-conversion wrapper around `getCalldata()` * @return {string} */ proto.oracle.v1.RawRequest.prototype.getCalldata_asB64 = function () { return /** @type {string} */ (jspb.Message.bytesAsB64(this.getCalldata())) } /** * optional bytes calldata = 3; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getCalldata()` * @return {!Uint8Array} */ proto.oracle.v1.RawRequest.prototype.getCalldata_asU8 = function () { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(this.getCalldata())) } /** * @param {!(string|Uint8Array)} value * @return {!proto.oracle.v1.RawRequest} returns this */ proto.oracle.v1.RawRequest.prototype.setCalldata = function (value) { return jspb.Message.setProto3BytesField(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.oracle.v1.RawReport.prototype.toObject = function ( opt_includeInstance, ) { return proto.oracle.v1.RawReport.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.oracle.v1.RawReport} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.oracle.v1.RawReport.toObject = function (includeInstance, msg) { var f, obj = { externalId: jspb.Message.getFieldWithDefault(msg, 1, 0), exitCode: jspb.Message.getFieldWithDefault(msg, 2, 0), data: msg.getData_asB64(), } if (includeInstance) { obj.$jspbMessageInstance = msg } return obj } } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.oracle.v1.RawReport} */ proto.oracle.v1.RawReport.deserializeBinary = function (bytes) { var reader = new jspb.BinaryReader(bytes) var msg = new proto.oracle.v1.RawReport() return proto.oracle.v1.RawReport.deserializeBinaryFromReader(msg, reader) } /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.oracle.v1.RawReport} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.oracle.v1.RawReport} */ proto.oracle.v1.RawReport.deserializeBinaryFromReader = function (msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break } var field = reader.getFieldNumber() switch (field) { case 1: var value = /** @type {number} */ (reader.readUint64()) msg.setExternalId(value) break case 2: var value = /** @type {number} */ (reader.readUint32()) msg.setExitCode(value) break case 3: var value = /** @type {!Uint8Array} */ (reader.readBytes()) msg.setData(value) break default: reader.skipField() break } } return msg } /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.oracle.v1.RawReport.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter() proto.oracle.v1.RawReport.serializeBinaryToWriter(this, writer) return writer.getResultBuffer() } /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.oracle.v1.RawReport} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.oracle.v1.RawReport.serializeBinaryToWriter = function (message, writer) { var f = undefined f = message.getExternalId() if (f !== 0) { writer.writeUint64(1, f) } f = message.getExitCode() if (f !== 0) { writer.writeUint32(2, f) } f = message.getData_asU8() if (f.length > 0) { writer.writeBytes(3, f) } } /** * optional uint64 external_id = 1; * @return {number} */ proto.oracle.v1.RawReport.prototype.getExternalId = function () { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)) } /** * @param {number} value * @return {!proto.oracle.v1.RawReport} returns this */ proto.oracle.v1.RawReport.prototype.setExternalId = function (value) { return jspb.Message.setProto3IntField(this, 1, value) } /** * optional uint32 exit_code = 2; * @return {number} */ proto.oracle.v1.RawReport.prototype.getExitCode = function () { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)) } /** * @param {number} value * @return {!proto.oracle.v1.RawReport} returns this */ proto.oracle.v1.RawReport.prototype.setExitCode = function (value) { return jspb.Message.setProto3IntField(this, 2, value) } /** * optional bytes data = 3; * @return {!(string|Uint8Array)} */ proto.oracle.v1.RawReport.prototype.getData = function () { return /** @type {!(string|Uint8Array)} */ ( jspb.Message.getFieldWithDefault(this, 3, '') ) } /** * optional bytes data = 3; * This is a type-conversion wrapper around `getData()` * @return {string} */ proto.oracle.v1.RawReport.prototype.getData_asB64 = function () { return /** @type {string} */ (jspb.Message.bytesAsB64(this.getData())) } /** * optional bytes data = 3; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getData()` * @return {!Uint8Array} */ proto.oracle.v1.RawReport.prototype.getData_asU8 = function () { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(this.getData())) } /** * @param {!(string|Uint8Array)} value * @return {!proto.oracle.v1.RawReport} returns this */ proto.oracle.v1.RawReport.prototype.setData = function (value) { return jspb.Message.setProto3BytesField(this, 3, value) } /** * List of repeated fields within this message type. * @private {!Array<number>} * @const */ proto.oracle.v1.Request.repeatedFields_ = [3, 8] 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.oracle.v1.Request.prototype.toObject = function (opt_includeInstance) { return proto.oracle.v1.Request.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.oracle.v1.Request} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.oracle.v1.Request.toObject = function (includeInstance, msg) { var f, obj = { oracleScriptId: jspb.Message.getFieldWithDefault(msg, 1, 0), calldata: msg.getCalldata_asB64(), requestedValidatorsList: (f = jspb.Message.getRepeatedField(msg, 3)) == null ? undefined : f, minCount: jspb.Message.getFieldWithDefault(msg, 4, 0), requestHeight: jspb.Message.getFieldWithDefault(msg, 5, 0), requestTime: jspb.Message.getFieldWithDefault(msg, 6, 0), clientId: jspb.Message.getFieldWithDefault(msg, 7, ''), rawRequestsList: jspb.Message.toObjectList( msg.getRawRequestsList(), proto.oracle.v1.RawRequest.toObject, includeInstance, ), ibcChannel: (f = msg.getIbcChannel()) && proto.oracle.v1.IBCChannel.toObject(includeInstance, f), executeGas: jspb.Message.getFieldWithDefault(msg, 10, 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.oracle.v1.Request} */ proto.oracle.v1.Request.deserializeBinary = function (bytes) { var reader = new jspb.BinaryReader(bytes) var msg = new proto.oracle.v1.Request() return proto.oracle.v1.Request.deserializeBinaryFromReader(msg, reader) } /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.oracle.v1.Request} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.oracle.v1.Request} */ proto.oracle.v1.Request.deserializeBinaryFromReader = function (msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break } var field = reader.getFieldNumber() switch (field) { case 1: var value = /** @type {number} */ (reader.readUint64()) msg.setOracleScriptId(value) break case 2: var value = /** @type {!Uint8Array} */ (reader.readBytes()) msg.setCalldata(value) break case 3: var value = /** @type {string} */ (reader.readString()) msg.addRequestedValidators(value) break case 4: var value = /** @type {number} */ (reader.readUint64()) msg.setMinCount(value) break case 5: var value = /** @type {number} */ (reader.readInt64()) msg.setRequestHeight(value) break case 6: var value = /** @type {number} */ (reader.readInt64()) msg.setRequestTime(value) break case 7: var value = /** @type {string} */ (reader.readString()) msg.setClientId(value) break case 8: var value = new proto.oracle.v1.RawRequest() reader.readMessage( value, proto.oracle.v1.RawRequest.deserializeBinaryFromReader, ) msg.addRawRequests(value) break case 9: var value = new proto.oracle.v1.IBCChannel() reader.readMessage( value, proto.oracle.v1.IBCChannel.deserializeBinaryFromReader, ) msg.setIbcChannel(value) break case 10: var value = /** @type {number} */ (reader.readUint64()) msg.setExecuteGas(value) break default: reader.skipField() break } } return msg } /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.oracle.v1.Request.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter() proto.oracle.v1.Request.serializeBinaryToWriter(this, writer) return writer.getResultBuffer() } /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.oracle.v1.Request} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.oracle.v1.Request.serializeBinaryToWriter = function (message, writer) { var f = undefined f = message.getOracleScriptId() if (f !== 0) { writer.writeUint64(1, f) } f = message.getCalldata_asU8() if (f.length > 0) { writer.writeBytes(2, f) } f = message.getRequestedValidatorsList() if (f.length > 0) { writer.writeRepeatedString(3, f) } f = message.getMinCount() if (f !== 0) { writer.writeUint64(4, f) } f = message.getRequestHeight() if (f !== 0) { writer.writeInt64(5, f) } f = message.getRequestTime() if (f !== 0) { writer.writeInt64(6, f) } f = message.getClientId() if (f.length > 0) { writer.writeString(7, f) } f = message.getRawRequestsList() if (f.length > 0) { writer.writeRepeatedMessage( 8, f, proto.oracle.v1.RawRequest.serializeBinaryToWriter, ) } f = message.getIbcChannel() if (f != null) { writer.writeMessage( 9, f, proto.oracle.v1.IBCChannel.serializeBinaryToWriter, ) } f = message.getExecuteGas() if (f !== 0) { writer.writeUint64(10, f) } } /** * optional uint64 oracle_script_id = 1; * @return {number} */ proto.oracle.v1.Request.prototype.getOracleScriptId = function () { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)) } /** * @param {number} value * @return {!proto.oracle.v1.Request} returns this */ proto.oracle.v1.Request.prototype.setOracleScriptId = function (value) { return jspb.Message.setProto3IntField(this, 1, value) } /** * optional bytes calldata = 2; * @return {!(string|Uint8Array)} */ proto.oracle.v1.Request.prototype.getCalldata = function () { return /** @type {!(string|Uint8Array)} */ ( jspb.Message.getFieldWithDefault(this, 2, '') ) } /** * optional bytes calldata = 2; * This is a type-conversion wrapper around `getCalldata()` * @return {string} */ proto.oracle.v1.Request.prototype.getCalldata_asB64 = function () { return /** @type