UNPKG

@provenanceio/wallet-utils

Version:

Typescript Utilities for Provenance Blockchain Wallet

701 lines (584 loc) 22.3 kB
"use strict"; // source: provenance/oracle/v1/query.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 || window || global || self || Function('return this')(); }.call(null); var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js'); goog.object.extend(proto, gogoproto_gogo_pb); var google_api_annotations_pb = require('../../../google/api/annotations_pb.js'); goog.object.extend(proto, google_api_annotations_pb); var cosmos_proto_cosmos_pb = require('../../../cosmos_proto/cosmos_pb.js'); goog.object.extend(proto, cosmos_proto_cosmos_pb); goog.exportSymbol('proto.provenance.oracle.v1.QueryOracleAddressRequest', null, global); goog.exportSymbol('proto.provenance.oracle.v1.QueryOracleAddressResponse', null, global); goog.exportSymbol('proto.provenance.oracle.v1.QueryOracleRequest', null, global); goog.exportSymbol('proto.provenance.oracle.v1.QueryOracleResponse', 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.provenance.oracle.v1.QueryOracleAddressRequest = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.provenance.oracle.v1.QueryOracleAddressRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.provenance.oracle.v1.QueryOracleAddressRequest.displayName = 'proto.provenance.oracle.v1.QueryOracleAddressRequest'; } /** * 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.provenance.oracle.v1.QueryOracleAddressResponse = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.provenance.oracle.v1.QueryOracleAddressResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.provenance.oracle.v1.QueryOracleAddressResponse.displayName = 'proto.provenance.oracle.v1.QueryOracleAddressResponse'; } /** * 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.provenance.oracle.v1.QueryOracleRequest = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.provenance.oracle.v1.QueryOracleRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.provenance.oracle.v1.QueryOracleRequest.displayName = 'proto.provenance.oracle.v1.QueryOracleRequest'; } /** * 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.provenance.oracle.v1.QueryOracleResponse = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.provenance.oracle.v1.QueryOracleResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.provenance.oracle.v1.QueryOracleResponse.displayName = 'proto.provenance.oracle.v1.QueryOracleResponse'; } 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.provenance.oracle.v1.QueryOracleAddressRequest.prototype.toObject = function (opt_includeInstance) { return proto.provenance.oracle.v1.QueryOracleAddressRequest.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.provenance.oracle.v1.QueryOracleAddressRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.provenance.oracle.v1.QueryOracleAddressRequest.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.provenance.oracle.v1.QueryOracleAddressRequest} */ proto.provenance.oracle.v1.QueryOracleAddressRequest.deserializeBinary = function (bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.provenance.oracle.v1.QueryOracleAddressRequest(); return proto.provenance.oracle.v1.QueryOracleAddressRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.provenance.oracle.v1.QueryOracleAddressRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.provenance.oracle.v1.QueryOracleAddressRequest} */ proto.provenance.oracle.v1.QueryOracleAddressRequest.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.provenance.oracle.v1.QueryOracleAddressRequest.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter(); proto.provenance.oracle.v1.QueryOracleAddressRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.provenance.oracle.v1.QueryOracleAddressRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.provenance.oracle.v1.QueryOracleAddressRequest.serializeBinaryToWriter = function (message, writer) { var f = undefined; }; 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.provenance.oracle.v1.QueryOracleAddressResponse.prototype.toObject = function (opt_includeInstance) { return proto.provenance.oracle.v1.QueryOracleAddressResponse.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.provenance.oracle.v1.QueryOracleAddressResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.provenance.oracle.v1.QueryOracleAddressResponse.toObject = function (includeInstance, msg) { var f, obj = { address: 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.provenance.oracle.v1.QueryOracleAddressResponse} */ proto.provenance.oracle.v1.QueryOracleAddressResponse.deserializeBinary = function (bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.provenance.oracle.v1.QueryOracleAddressResponse(); return proto.provenance.oracle.v1.QueryOracleAddressResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.provenance.oracle.v1.QueryOracleAddressResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.provenance.oracle.v1.QueryOracleAddressResponse} */ proto.provenance.oracle.v1.QueryOracleAddressResponse.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.setAddress(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.provenance.oracle.v1.QueryOracleAddressResponse.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter(); proto.provenance.oracle.v1.QueryOracleAddressResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.provenance.oracle.v1.QueryOracleAddressResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.provenance.oracle.v1.QueryOracleAddressResponse.serializeBinaryToWriter = function (message, writer) { var f = undefined; f = message.getAddress(); if (f.length > 0) { writer.writeString(1, f); } }; /** * optional string address = 1; * @return {string} */ proto.provenance.oracle.v1.QueryOracleAddressResponse.prototype.getAddress = function () { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 1, "") ); }; /** * @param {string} value * @return {!proto.provenance.oracle.v1.QueryOracleAddressResponse} returns this */ proto.provenance.oracle.v1.QueryOracleAddressResponse.prototype.setAddress = 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.provenance.oracle.v1.QueryOracleRequest.prototype.toObject = function (opt_includeInstance) { return proto.provenance.oracle.v1.QueryOracleRequest.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.provenance.oracle.v1.QueryOracleRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.provenance.oracle.v1.QueryOracleRequest.toObject = function (includeInstance, msg) { var f, obj = { query: msg.getQuery_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.provenance.oracle.v1.QueryOracleRequest} */ proto.provenance.oracle.v1.QueryOracleRequest.deserializeBinary = function (bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.provenance.oracle.v1.QueryOracleRequest(); return proto.provenance.oracle.v1.QueryOracleRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.provenance.oracle.v1.QueryOracleRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.provenance.oracle.v1.QueryOracleRequest} */ proto.provenance.oracle.v1.QueryOracleRequest.deserializeBinaryFromReader = function (msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {!Uint8Array} */ reader.readBytes(); msg.setQuery(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.provenance.oracle.v1.QueryOracleRequest.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter(); proto.provenance.oracle.v1.QueryOracleRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.provenance.oracle.v1.QueryOracleRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.provenance.oracle.v1.QueryOracleRequest.serializeBinaryToWriter = function (message, writer) { var f = undefined; f = message.getQuery_asU8(); if (f.length > 0) { writer.writeBytes(1, f); } }; /** * optional bytes query = 1; * @return {!(string|Uint8Array)} */ proto.provenance.oracle.v1.QueryOracleRequest.prototype.getQuery = function () { return ( /** @type {!(string|Uint8Array)} */ jspb.Message.getFieldWithDefault(this, 1, "") ); }; /** * optional bytes query = 1; * This is a type-conversion wrapper around `getQuery()` * @return {string} */ proto.provenance.oracle.v1.QueryOracleRequest.prototype.getQuery_asB64 = function () { return ( /** @type {string} */ jspb.Message.bytesAsB64(this.getQuery()) ); }; /** * optional bytes query = 1; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getQuery()` * @return {!Uint8Array} */ proto.provenance.oracle.v1.QueryOracleRequest.prototype.getQuery_asU8 = function () { return ( /** @type {!Uint8Array} */ jspb.Message.bytesAsU8(this.getQuery()) ); }; /** * @param {!(string|Uint8Array)} value * @return {!proto.provenance.oracle.v1.QueryOracleRequest} returns this */ proto.provenance.oracle.v1.QueryOracleRequest.prototype.setQuery = function (value) { return jspb.Message.setProto3BytesField(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.provenance.oracle.v1.QueryOracleResponse.prototype.toObject = function (opt_includeInstance) { return proto.provenance.oracle.v1.QueryOracleResponse.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.provenance.oracle.v1.QueryOracleResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.provenance.oracle.v1.QueryOracleResponse.toObject = function (includeInstance, msg) { var f, obj = { 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.provenance.oracle.v1.QueryOracleResponse} */ proto.provenance.oracle.v1.QueryOracleResponse.deserializeBinary = function (bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.provenance.oracle.v1.QueryOracleResponse(); return proto.provenance.oracle.v1.QueryOracleResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.provenance.oracle.v1.QueryOracleResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.provenance.oracle.v1.QueryOracleResponse} */ proto.provenance.oracle.v1.QueryOracleResponse.deserializeBinaryFromReader = function (msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: 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.provenance.oracle.v1.QueryOracleResponse.prototype.serializeBinary = function () { var writer = new jspb.BinaryWriter(); proto.provenance.oracle.v1.QueryOracleResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.provenance.oracle.v1.QueryOracleResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.provenance.oracle.v1.QueryOracleResponse.serializeBinaryToWriter = function (message, writer) { var f = undefined; f = message.getData_asU8(); if (f.length > 0) { writer.writeBytes(1, f); } }; /** * optional bytes data = 1; * @return {!(string|Uint8Array)} */ proto.provenance.oracle.v1.QueryOracleResponse.prototype.getData = function () { return ( /** @type {!(string|Uint8Array)} */ jspb.Message.getFieldWithDefault(this, 1, "") ); }; /** * optional bytes data = 1; * This is a type-conversion wrapper around `getData()` * @return {string} */ proto.provenance.oracle.v1.QueryOracleResponse.prototype.getData_asB64 = function () { return ( /** @type {string} */ jspb.Message.bytesAsB64(this.getData()) ); }; /** * optional bytes data = 1; * 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.provenance.oracle.v1.QueryOracleResponse.prototype.getData_asU8 = function () { return ( /** @type {!Uint8Array} */ jspb.Message.bytesAsU8(this.getData()) ); }; /** * @param {!(string|Uint8Array)} value * @return {!proto.provenance.oracle.v1.QueryOracleResponse} returns this */ proto.provenance.oracle.v1.QueryOracleResponse.prototype.setData = function (value) { return jspb.Message.setProto3BytesField(this, 1, value); }; goog.object.extend(exports, proto.provenance.oracle.v1);