@provenanceio/wallet-utils
Version:
Typescript Utilities for Provenance Blockchain Wallet
774 lines (642 loc) • 24.1 kB
JavaScript
"use strict";
// source: provenance/oracle/v1/tx.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 cosmos_proto_cosmos_pb = require('../../../cosmos_proto/cosmos_pb.js');
goog.object.extend(proto, cosmos_proto_cosmos_pb);
var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js');
goog.object.extend(proto, gogoproto_gogo_pb);
goog.exportSymbol('proto.provenance.oracle.v1.MsgSendQueryOracleRequest', null, global);
goog.exportSymbol('proto.provenance.oracle.v1.MsgSendQueryOracleResponse', null, global);
goog.exportSymbol('proto.provenance.oracle.v1.MsgUpdateOracleRequest', null, global);
goog.exportSymbol('proto.provenance.oracle.v1.MsgUpdateOracleResponse', 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.MsgSendQueryOracleRequest = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.provenance.oracle.v1.MsgSendQueryOracleRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.provenance.oracle.v1.MsgSendQueryOracleRequest.displayName = 'proto.provenance.oracle.v1.MsgSendQueryOracleRequest';
}
/**
* 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.MsgSendQueryOracleResponse = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.provenance.oracle.v1.MsgSendQueryOracleResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.provenance.oracle.v1.MsgSendQueryOracleResponse.displayName = 'proto.provenance.oracle.v1.MsgSendQueryOracleResponse';
}
/**
* 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.MsgUpdateOracleRequest = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.provenance.oracle.v1.MsgUpdateOracleRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.provenance.oracle.v1.MsgUpdateOracleRequest.displayName = 'proto.provenance.oracle.v1.MsgUpdateOracleRequest';
}
/**
* 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.MsgUpdateOracleResponse = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.provenance.oracle.v1.MsgUpdateOracleResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.provenance.oracle.v1.MsgUpdateOracleResponse.displayName = 'proto.provenance.oracle.v1.MsgUpdateOracleResponse';
}
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.MsgSendQueryOracleRequest.prototype.toObject = function (opt_includeInstance) {
return proto.provenance.oracle.v1.MsgSendQueryOracleRequest.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.MsgSendQueryOracleRequest} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.provenance.oracle.v1.MsgSendQueryOracleRequest.toObject = function (includeInstance, msg) {
var f,
obj = {
query: msg.getQuery_asB64(),
channel: jspb.Message.getFieldWithDefault(msg, 3, ""),
authority: jspb.Message.getFieldWithDefault(msg, 4, "")
};
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.MsgSendQueryOracleRequest}
*/
proto.provenance.oracle.v1.MsgSendQueryOracleRequest.deserializeBinary = function (bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.provenance.oracle.v1.MsgSendQueryOracleRequest();
return proto.provenance.oracle.v1.MsgSendQueryOracleRequest.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.provenance.oracle.v1.MsgSendQueryOracleRequest} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.provenance.oracle.v1.MsgSendQueryOracleRequest}
*/
proto.provenance.oracle.v1.MsgSendQueryOracleRequest.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;
case 3:
var value =
/** @type {string} */
reader.readString();
msg.setChannel(value);
break;
case 4:
var value =
/** @type {string} */
reader.readString();
msg.setAuthority(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.provenance.oracle.v1.MsgSendQueryOracleRequest.prototype.serializeBinary = function () {
var writer = new jspb.BinaryWriter();
proto.provenance.oracle.v1.MsgSendQueryOracleRequest.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.MsgSendQueryOracleRequest} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.provenance.oracle.v1.MsgSendQueryOracleRequest.serializeBinaryToWriter = function (message, writer) {
var f = undefined;
f = message.getQuery_asU8();
if (f.length > 0) {
writer.writeBytes(1, f);
}
f = message.getChannel();
if (f.length > 0) {
writer.writeString(3, f);
}
f = message.getAuthority();
if (f.length > 0) {
writer.writeString(4, f);
}
};
/**
* optional bytes query = 1;
* @return {!(string|Uint8Array)}
*/
proto.provenance.oracle.v1.MsgSendQueryOracleRequest.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.MsgSendQueryOracleRequest.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.MsgSendQueryOracleRequest.prototype.getQuery_asU8 = function () {
return (
/** @type {!Uint8Array} */
jspb.Message.bytesAsU8(this.getQuery())
);
};
/**
* @param {!(string|Uint8Array)} value
* @return {!proto.provenance.oracle.v1.MsgSendQueryOracleRequest} returns this
*/
proto.provenance.oracle.v1.MsgSendQueryOracleRequest.prototype.setQuery = function (value) {
return jspb.Message.setProto3BytesField(this, 1, value);
};
/**
* optional string channel = 3;
* @return {string}
*/
proto.provenance.oracle.v1.MsgSendQueryOracleRequest.prototype.getChannel = function () {
return (
/** @type {string} */
jspb.Message.getFieldWithDefault(this, 3, "")
);
};
/**
* @param {string} value
* @return {!proto.provenance.oracle.v1.MsgSendQueryOracleRequest} returns this
*/
proto.provenance.oracle.v1.MsgSendQueryOracleRequest.prototype.setChannel = function (value) {
return jspb.Message.setProto3StringField(this, 3, value);
};
/**
* optional string authority = 4;
* @return {string}
*/
proto.provenance.oracle.v1.MsgSendQueryOracleRequest.prototype.getAuthority = function () {
return (
/** @type {string} */
jspb.Message.getFieldWithDefault(this, 4, "")
);
};
/**
* @param {string} value
* @return {!proto.provenance.oracle.v1.MsgSendQueryOracleRequest} returns this
*/
proto.provenance.oracle.v1.MsgSendQueryOracleRequest.prototype.setAuthority = function (value) {
return jspb.Message.setProto3StringField(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.provenance.oracle.v1.MsgSendQueryOracleResponse.prototype.toObject = function (opt_includeInstance) {
return proto.provenance.oracle.v1.MsgSendQueryOracleResponse.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.MsgSendQueryOracleResponse} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.provenance.oracle.v1.MsgSendQueryOracleResponse.toObject = function (includeInstance, msg) {
var f,
obj = {
sequence: jspb.Message.getFieldWithDefault(msg, 1, 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.provenance.oracle.v1.MsgSendQueryOracleResponse}
*/
proto.provenance.oracle.v1.MsgSendQueryOracleResponse.deserializeBinary = function (bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.provenance.oracle.v1.MsgSendQueryOracleResponse();
return proto.provenance.oracle.v1.MsgSendQueryOracleResponse.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.provenance.oracle.v1.MsgSendQueryOracleResponse} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.provenance.oracle.v1.MsgSendQueryOracleResponse}
*/
proto.provenance.oracle.v1.MsgSendQueryOracleResponse.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.setSequence(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.provenance.oracle.v1.MsgSendQueryOracleResponse.prototype.serializeBinary = function () {
var writer = new jspb.BinaryWriter();
proto.provenance.oracle.v1.MsgSendQueryOracleResponse.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.MsgSendQueryOracleResponse} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.provenance.oracle.v1.MsgSendQueryOracleResponse.serializeBinaryToWriter = function (message, writer) {
var f = undefined;
f = message.getSequence();
if (f !== 0) {
writer.writeUint64(1, f);
}
};
/**
* optional uint64 sequence = 1;
* @return {number}
*/
proto.provenance.oracle.v1.MsgSendQueryOracleResponse.prototype.getSequence = function () {
return (
/** @type {number} */
jspb.Message.getFieldWithDefault(this, 1, 0)
);
};
/**
* @param {number} value
* @return {!proto.provenance.oracle.v1.MsgSendQueryOracleResponse} returns this
*/
proto.provenance.oracle.v1.MsgSendQueryOracleResponse.prototype.setSequence = function (value) {
return jspb.Message.setProto3IntField(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.MsgUpdateOracleRequest.prototype.toObject = function (opt_includeInstance) {
return proto.provenance.oracle.v1.MsgUpdateOracleRequest.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.MsgUpdateOracleRequest} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.provenance.oracle.v1.MsgUpdateOracleRequest.toObject = function (includeInstance, msg) {
var f,
obj = {
address: jspb.Message.getFieldWithDefault(msg, 1, ""),
authority: jspb.Message.getFieldWithDefault(msg, 2, "")
};
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.MsgUpdateOracleRequest}
*/
proto.provenance.oracle.v1.MsgUpdateOracleRequest.deserializeBinary = function (bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.provenance.oracle.v1.MsgUpdateOracleRequest();
return proto.provenance.oracle.v1.MsgUpdateOracleRequest.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.provenance.oracle.v1.MsgUpdateOracleRequest} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.provenance.oracle.v1.MsgUpdateOracleRequest}
*/
proto.provenance.oracle.v1.MsgUpdateOracleRequest.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;
case 2:
var value =
/** @type {string} */
reader.readString();
msg.setAuthority(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.provenance.oracle.v1.MsgUpdateOracleRequest.prototype.serializeBinary = function () {
var writer = new jspb.BinaryWriter();
proto.provenance.oracle.v1.MsgUpdateOracleRequest.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.MsgUpdateOracleRequest} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.provenance.oracle.v1.MsgUpdateOracleRequest.serializeBinaryToWriter = function (message, writer) {
var f = undefined;
f = message.getAddress();
if (f.length > 0) {
writer.writeString(1, f);
}
f = message.getAuthority();
if (f.length > 0) {
writer.writeString(2, f);
}
};
/**
* optional string address = 1;
* @return {string}
*/
proto.provenance.oracle.v1.MsgUpdateOracleRequest.prototype.getAddress = function () {
return (
/** @type {string} */
jspb.Message.getFieldWithDefault(this, 1, "")
);
};
/**
* @param {string} value
* @return {!proto.provenance.oracle.v1.MsgUpdateOracleRequest} returns this
*/
proto.provenance.oracle.v1.MsgUpdateOracleRequest.prototype.setAddress = function (value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional string authority = 2;
* @return {string}
*/
proto.provenance.oracle.v1.MsgUpdateOracleRequest.prototype.getAuthority = function () {
return (
/** @type {string} */
jspb.Message.getFieldWithDefault(this, 2, "")
);
};
/**
* @param {string} value
* @return {!proto.provenance.oracle.v1.MsgUpdateOracleRequest} returns this
*/
proto.provenance.oracle.v1.MsgUpdateOracleRequest.prototype.setAuthority = function (value) {
return jspb.Message.setProto3StringField(this, 2, 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.MsgUpdateOracleResponse.prototype.toObject = function (opt_includeInstance) {
return proto.provenance.oracle.v1.MsgUpdateOracleResponse.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.MsgUpdateOracleResponse} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.provenance.oracle.v1.MsgUpdateOracleResponse.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.MsgUpdateOracleResponse}
*/
proto.provenance.oracle.v1.MsgUpdateOracleResponse.deserializeBinary = function (bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.provenance.oracle.v1.MsgUpdateOracleResponse();
return proto.provenance.oracle.v1.MsgUpdateOracleResponse.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.provenance.oracle.v1.MsgUpdateOracleResponse} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.provenance.oracle.v1.MsgUpdateOracleResponse}
*/
proto.provenance.oracle.v1.MsgUpdateOracleResponse.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.MsgUpdateOracleResponse.prototype.serializeBinary = function () {
var writer = new jspb.BinaryWriter();
proto.provenance.oracle.v1.MsgUpdateOracleResponse.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.MsgUpdateOracleResponse} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.provenance.oracle.v1.MsgUpdateOracleResponse.serializeBinaryToWriter = function (message, writer) {
var f = undefined;
};
goog.object.extend(exports, proto.provenance.oracle.v1);