@provenanceio/wallet-utils
Version:
Typescript Utilities for Provenance Blockchain Wallet
1,073 lines (887 loc) • 34.4 kB
JavaScript
"use strict";
// source: cosmos/sanction/v1beta1/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_msg_v1_msg_pb = require('../../../cosmos/msg/v1/msg_pb.js');
goog.object.extend(proto, cosmos_msg_v1_msg_pb);
var cosmos_sanction_v1beta1_sanction_pb = require('../../../cosmos/sanction/v1beta1/sanction_pb.js');
goog.object.extend(proto, cosmos_sanction_v1beta1_sanction_pb);
var cosmos_proto_cosmos_pb = require('../../../cosmos_proto/cosmos_pb.js');
goog.object.extend(proto, cosmos_proto_cosmos_pb);
goog.exportSymbol('proto.cosmos.sanction.v1beta1.MsgSanction', null, global);
goog.exportSymbol('proto.cosmos.sanction.v1beta1.MsgSanctionResponse', null, global);
goog.exportSymbol('proto.cosmos.sanction.v1beta1.MsgUnsanction', null, global);
goog.exportSymbol('proto.cosmos.sanction.v1beta1.MsgUnsanctionResponse', null, global);
goog.exportSymbol('proto.cosmos.sanction.v1beta1.MsgUpdateParams', null, global);
goog.exportSymbol('proto.cosmos.sanction.v1beta1.MsgUpdateParamsResponse', 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.cosmos.sanction.v1beta1.MsgSanction = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.sanction.v1beta1.MsgSanction.repeatedFields_, null);
};
goog.inherits(proto.cosmos.sanction.v1beta1.MsgSanction, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cosmos.sanction.v1beta1.MsgSanction.displayName = 'proto.cosmos.sanction.v1beta1.MsgSanction';
}
/**
* 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.cosmos.sanction.v1beta1.MsgSanctionResponse = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.cosmos.sanction.v1beta1.MsgSanctionResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cosmos.sanction.v1beta1.MsgSanctionResponse.displayName = 'proto.cosmos.sanction.v1beta1.MsgSanctionResponse';
}
/**
* 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.cosmos.sanction.v1beta1.MsgUnsanction = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.sanction.v1beta1.MsgUnsanction.repeatedFields_, null);
};
goog.inherits(proto.cosmos.sanction.v1beta1.MsgUnsanction, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cosmos.sanction.v1beta1.MsgUnsanction.displayName = 'proto.cosmos.sanction.v1beta1.MsgUnsanction';
}
/**
* 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.cosmos.sanction.v1beta1.MsgUnsanctionResponse = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.cosmos.sanction.v1beta1.MsgUnsanctionResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cosmos.sanction.v1beta1.MsgUnsanctionResponse.displayName = 'proto.cosmos.sanction.v1beta1.MsgUnsanctionResponse';
}
/**
* 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.cosmos.sanction.v1beta1.MsgUpdateParams = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.cosmos.sanction.v1beta1.MsgUpdateParams, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cosmos.sanction.v1beta1.MsgUpdateParams.displayName = 'proto.cosmos.sanction.v1beta1.MsgUpdateParams';
}
/**
* 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.cosmos.sanction.v1beta1.MsgUpdateParamsResponse = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.cosmos.sanction.v1beta1.MsgUpdateParamsResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cosmos.sanction.v1beta1.MsgUpdateParamsResponse.displayName = 'proto.cosmos.sanction.v1beta1.MsgUpdateParamsResponse';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.cosmos.sanction.v1beta1.MsgSanction.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.cosmos.sanction.v1beta1.MsgSanction.prototype.toObject = function (opt_includeInstance) {
return proto.cosmos.sanction.v1beta1.MsgSanction.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.cosmos.sanction.v1beta1.MsgSanction} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmos.sanction.v1beta1.MsgSanction.toObject = function (includeInstance, msg) {
var f,
obj = {
addressesList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f,
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.cosmos.sanction.v1beta1.MsgSanction}
*/
proto.cosmos.sanction.v1beta1.MsgSanction.deserializeBinary = function (bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.cosmos.sanction.v1beta1.MsgSanction();
return proto.cosmos.sanction.v1beta1.MsgSanction.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.cosmos.sanction.v1beta1.MsgSanction} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.cosmos.sanction.v1beta1.MsgSanction}
*/
proto.cosmos.sanction.v1beta1.MsgSanction.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.addAddresses(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.cosmos.sanction.v1beta1.MsgSanction.prototype.serializeBinary = function () {
var writer = new jspb.BinaryWriter();
proto.cosmos.sanction.v1beta1.MsgSanction.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.cosmos.sanction.v1beta1.MsgSanction} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmos.sanction.v1beta1.MsgSanction.serializeBinaryToWriter = function (message, writer) {
var f = undefined;
f = message.getAddressesList();
if (f.length > 0) {
writer.writeRepeatedString(1, f);
}
f = message.getAuthority();
if (f.length > 0) {
writer.writeString(2, f);
}
};
/**
* repeated string addresses = 1;
* @return {!Array<string>}
*/
proto.cosmos.sanction.v1beta1.MsgSanction.prototype.getAddressesList = function () {
return (
/** @type {!Array<string>} */
jspb.Message.getRepeatedField(this, 1)
);
};
/**
* @param {!Array<string>} value
* @return {!proto.cosmos.sanction.v1beta1.MsgSanction} returns this
*/
proto.cosmos.sanction.v1beta1.MsgSanction.prototype.setAddressesList = function (value) {
return jspb.Message.setField(this, 1, value || []);
};
/**
* @param {string} value
* @param {number=} opt_index
* @return {!proto.cosmos.sanction.v1beta1.MsgSanction} returns this
*/
proto.cosmos.sanction.v1beta1.MsgSanction.prototype.addAddresses = function (value, opt_index) {
return jspb.Message.addToRepeatedField(this, 1, value, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.cosmos.sanction.v1beta1.MsgSanction} returns this
*/
proto.cosmos.sanction.v1beta1.MsgSanction.prototype.clearAddressesList = function () {
return this.setAddressesList([]);
};
/**
* optional string authority = 2;
* @return {string}
*/
proto.cosmos.sanction.v1beta1.MsgSanction.prototype.getAuthority = function () {
return (
/** @type {string} */
jspb.Message.getFieldWithDefault(this, 2, "")
);
};
/**
* @param {string} value
* @return {!proto.cosmos.sanction.v1beta1.MsgSanction} returns this
*/
proto.cosmos.sanction.v1beta1.MsgSanction.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.cosmos.sanction.v1beta1.MsgSanctionResponse.prototype.toObject = function (opt_includeInstance) {
return proto.cosmos.sanction.v1beta1.MsgSanctionResponse.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.cosmos.sanction.v1beta1.MsgSanctionResponse} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmos.sanction.v1beta1.MsgSanctionResponse.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.cosmos.sanction.v1beta1.MsgSanctionResponse}
*/
proto.cosmos.sanction.v1beta1.MsgSanctionResponse.deserializeBinary = function (bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.cosmos.sanction.v1beta1.MsgSanctionResponse();
return proto.cosmos.sanction.v1beta1.MsgSanctionResponse.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.cosmos.sanction.v1beta1.MsgSanctionResponse} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.cosmos.sanction.v1beta1.MsgSanctionResponse}
*/
proto.cosmos.sanction.v1beta1.MsgSanctionResponse.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.cosmos.sanction.v1beta1.MsgSanctionResponse.prototype.serializeBinary = function () {
var writer = new jspb.BinaryWriter();
proto.cosmos.sanction.v1beta1.MsgSanctionResponse.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.cosmos.sanction.v1beta1.MsgSanctionResponse} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmos.sanction.v1beta1.MsgSanctionResponse.serializeBinaryToWriter = function (message, writer) {
var f = undefined;
};
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.cosmos.sanction.v1beta1.MsgUnsanction.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.cosmos.sanction.v1beta1.MsgUnsanction.prototype.toObject = function (opt_includeInstance) {
return proto.cosmos.sanction.v1beta1.MsgUnsanction.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.cosmos.sanction.v1beta1.MsgUnsanction} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmos.sanction.v1beta1.MsgUnsanction.toObject = function (includeInstance, msg) {
var f,
obj = {
addressesList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f,
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.cosmos.sanction.v1beta1.MsgUnsanction}
*/
proto.cosmos.sanction.v1beta1.MsgUnsanction.deserializeBinary = function (bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.cosmos.sanction.v1beta1.MsgUnsanction();
return proto.cosmos.sanction.v1beta1.MsgUnsanction.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.cosmos.sanction.v1beta1.MsgUnsanction} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.cosmos.sanction.v1beta1.MsgUnsanction}
*/
proto.cosmos.sanction.v1beta1.MsgUnsanction.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.addAddresses(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.cosmos.sanction.v1beta1.MsgUnsanction.prototype.serializeBinary = function () {
var writer = new jspb.BinaryWriter();
proto.cosmos.sanction.v1beta1.MsgUnsanction.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.cosmos.sanction.v1beta1.MsgUnsanction} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmos.sanction.v1beta1.MsgUnsanction.serializeBinaryToWriter = function (message, writer) {
var f = undefined;
f = message.getAddressesList();
if (f.length > 0) {
writer.writeRepeatedString(1, f);
}
f = message.getAuthority();
if (f.length > 0) {
writer.writeString(2, f);
}
};
/**
* repeated string addresses = 1;
* @return {!Array<string>}
*/
proto.cosmos.sanction.v1beta1.MsgUnsanction.prototype.getAddressesList = function () {
return (
/** @type {!Array<string>} */
jspb.Message.getRepeatedField(this, 1)
);
};
/**
* @param {!Array<string>} value
* @return {!proto.cosmos.sanction.v1beta1.MsgUnsanction} returns this
*/
proto.cosmos.sanction.v1beta1.MsgUnsanction.prototype.setAddressesList = function (value) {
return jspb.Message.setField(this, 1, value || []);
};
/**
* @param {string} value
* @param {number=} opt_index
* @return {!proto.cosmos.sanction.v1beta1.MsgUnsanction} returns this
*/
proto.cosmos.sanction.v1beta1.MsgUnsanction.prototype.addAddresses = function (value, opt_index) {
return jspb.Message.addToRepeatedField(this, 1, value, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.cosmos.sanction.v1beta1.MsgUnsanction} returns this
*/
proto.cosmos.sanction.v1beta1.MsgUnsanction.prototype.clearAddressesList = function () {
return this.setAddressesList([]);
};
/**
* optional string authority = 2;
* @return {string}
*/
proto.cosmos.sanction.v1beta1.MsgUnsanction.prototype.getAuthority = function () {
return (
/** @type {string} */
jspb.Message.getFieldWithDefault(this, 2, "")
);
};
/**
* @param {string} value
* @return {!proto.cosmos.sanction.v1beta1.MsgUnsanction} returns this
*/
proto.cosmos.sanction.v1beta1.MsgUnsanction.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.cosmos.sanction.v1beta1.MsgUnsanctionResponse.prototype.toObject = function (opt_includeInstance) {
return proto.cosmos.sanction.v1beta1.MsgUnsanctionResponse.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.cosmos.sanction.v1beta1.MsgUnsanctionResponse} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmos.sanction.v1beta1.MsgUnsanctionResponse.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.cosmos.sanction.v1beta1.MsgUnsanctionResponse}
*/
proto.cosmos.sanction.v1beta1.MsgUnsanctionResponse.deserializeBinary = function (bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.cosmos.sanction.v1beta1.MsgUnsanctionResponse();
return proto.cosmos.sanction.v1beta1.MsgUnsanctionResponse.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.cosmos.sanction.v1beta1.MsgUnsanctionResponse} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.cosmos.sanction.v1beta1.MsgUnsanctionResponse}
*/
proto.cosmos.sanction.v1beta1.MsgUnsanctionResponse.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.cosmos.sanction.v1beta1.MsgUnsanctionResponse.prototype.serializeBinary = function () {
var writer = new jspb.BinaryWriter();
proto.cosmos.sanction.v1beta1.MsgUnsanctionResponse.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.cosmos.sanction.v1beta1.MsgUnsanctionResponse} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmos.sanction.v1beta1.MsgUnsanctionResponse.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.cosmos.sanction.v1beta1.MsgUpdateParams.prototype.toObject = function (opt_includeInstance) {
return proto.cosmos.sanction.v1beta1.MsgUpdateParams.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.cosmos.sanction.v1beta1.MsgUpdateParams} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmos.sanction.v1beta1.MsgUpdateParams.toObject = function (includeInstance, msg) {
var f,
obj = {
params: (f = msg.getParams()) && cosmos_sanction_v1beta1_sanction_pb.Params.toObject(includeInstance, f),
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.cosmos.sanction.v1beta1.MsgUpdateParams}
*/
proto.cosmos.sanction.v1beta1.MsgUpdateParams.deserializeBinary = function (bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.cosmos.sanction.v1beta1.MsgUpdateParams();
return proto.cosmos.sanction.v1beta1.MsgUpdateParams.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.cosmos.sanction.v1beta1.MsgUpdateParams} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.cosmos.sanction.v1beta1.MsgUpdateParams}
*/
proto.cosmos.sanction.v1beta1.MsgUpdateParams.deserializeBinaryFromReader = function (msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new cosmos_sanction_v1beta1_sanction_pb.Params();
reader.readMessage(value, cosmos_sanction_v1beta1_sanction_pb.Params.deserializeBinaryFromReader);
msg.setParams(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.cosmos.sanction.v1beta1.MsgUpdateParams.prototype.serializeBinary = function () {
var writer = new jspb.BinaryWriter();
proto.cosmos.sanction.v1beta1.MsgUpdateParams.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.cosmos.sanction.v1beta1.MsgUpdateParams} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmos.sanction.v1beta1.MsgUpdateParams.serializeBinaryToWriter = function (message, writer) {
var f = undefined;
f = message.getParams();
if (f != null) {
writer.writeMessage(1, f, cosmos_sanction_v1beta1_sanction_pb.Params.serializeBinaryToWriter);
}
f = message.getAuthority();
if (f.length > 0) {
writer.writeString(2, f);
}
};
/**
* optional Params params = 1;
* @return {?proto.cosmos.sanction.v1beta1.Params}
*/
proto.cosmos.sanction.v1beta1.MsgUpdateParams.prototype.getParams = function () {
return (
/** @type{?proto.cosmos.sanction.v1beta1.Params} */
jspb.Message.getWrapperField(this, cosmos_sanction_v1beta1_sanction_pb.Params, 1)
);
};
/**
* @param {?proto.cosmos.sanction.v1beta1.Params|undefined} value
* @return {!proto.cosmos.sanction.v1beta1.MsgUpdateParams} returns this
*/
proto.cosmos.sanction.v1beta1.MsgUpdateParams.prototype.setParams = function (value) {
return jspb.Message.setWrapperField(this, 1, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.cosmos.sanction.v1beta1.MsgUpdateParams} returns this
*/
proto.cosmos.sanction.v1beta1.MsgUpdateParams.prototype.clearParams = function () {
return this.setParams(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.cosmos.sanction.v1beta1.MsgUpdateParams.prototype.hasParams = function () {
return jspb.Message.getField(this, 1) != null;
};
/**
* optional string authority = 2;
* @return {string}
*/
proto.cosmos.sanction.v1beta1.MsgUpdateParams.prototype.getAuthority = function () {
return (
/** @type {string} */
jspb.Message.getFieldWithDefault(this, 2, "")
);
};
/**
* @param {string} value
* @return {!proto.cosmos.sanction.v1beta1.MsgUpdateParams} returns this
*/
proto.cosmos.sanction.v1beta1.MsgUpdateParams.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.cosmos.sanction.v1beta1.MsgUpdateParamsResponse.prototype.toObject = function (opt_includeInstance) {
return proto.cosmos.sanction.v1beta1.MsgUpdateParamsResponse.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.cosmos.sanction.v1beta1.MsgUpdateParamsResponse} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmos.sanction.v1beta1.MsgUpdateParamsResponse.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.cosmos.sanction.v1beta1.MsgUpdateParamsResponse}
*/
proto.cosmos.sanction.v1beta1.MsgUpdateParamsResponse.deserializeBinary = function (bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.cosmos.sanction.v1beta1.MsgUpdateParamsResponse();
return proto.cosmos.sanction.v1beta1.MsgUpdateParamsResponse.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.cosmos.sanction.v1beta1.MsgUpdateParamsResponse} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.cosmos.sanction.v1beta1.MsgUpdateParamsResponse}
*/
proto.cosmos.sanction.v1beta1.MsgUpdateParamsResponse.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.cosmos.sanction.v1beta1.MsgUpdateParamsResponse.prototype.serializeBinary = function () {
var writer = new jspb.BinaryWriter();
proto.cosmos.sanction.v1beta1.MsgUpdateParamsResponse.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.cosmos.sanction.v1beta1.MsgUpdateParamsResponse} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmos.sanction.v1beta1.MsgUpdateParamsResponse.serializeBinaryToWriter = function (message, writer) {
var f = undefined;
};
goog.object.extend(exports, proto.cosmos.sanction.v1beta1);