@provenanceio/wallet-utils
Version:
Typescript Utilities for Provenance Blockchain Wallet
1,745 lines (1,429 loc) • 65.3 kB
JavaScript
"use strict";
// source: cosmwasm/wasm/v1beta1/proposal.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 cosmos_base_v1beta1_coin_pb = require('../../../cosmos/base/v1beta1/coin_pb.js');
goog.object.extend(proto, cosmos_base_v1beta1_coin_pb);
var cosmwasm_wasm_v1beta1_types_pb = require('../../../cosmwasm/wasm/v1beta1/types_pb.js');
goog.object.extend(proto, cosmwasm_wasm_v1beta1_types_pb);
goog.exportSymbol('proto.cosmwasm.wasm.v1beta1.ClearAdminProposal', null, global);
goog.exportSymbol('proto.cosmwasm.wasm.v1beta1.InstantiateContractProposal', null, global);
goog.exportSymbol('proto.cosmwasm.wasm.v1beta1.MigrateContractProposal', null, global);
goog.exportSymbol('proto.cosmwasm.wasm.v1beta1.PinCodesProposal', null, global);
goog.exportSymbol('proto.cosmwasm.wasm.v1beta1.StoreCodeProposal', null, global);
goog.exportSymbol('proto.cosmwasm.wasm.v1beta1.UnpinCodesProposal', null, global);
goog.exportSymbol('proto.cosmwasm.wasm.v1beta1.UpdateAdminProposal', 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.cosmwasm.wasm.v1beta1.StoreCodeProposal = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.cosmwasm.wasm.v1beta1.StoreCodeProposal, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cosmwasm.wasm.v1beta1.StoreCodeProposal.displayName = 'proto.cosmwasm.wasm.v1beta1.StoreCodeProposal';
}
/**
* 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.cosmwasm.wasm.v1beta1.InstantiateContractProposal = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmwasm.wasm.v1beta1.InstantiateContractProposal.repeatedFields_, null);
};
goog.inherits(proto.cosmwasm.wasm.v1beta1.InstantiateContractProposal, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cosmwasm.wasm.v1beta1.InstantiateContractProposal.displayName = 'proto.cosmwasm.wasm.v1beta1.InstantiateContractProposal';
}
/**
* 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.cosmwasm.wasm.v1beta1.MigrateContractProposal = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.cosmwasm.wasm.v1beta1.MigrateContractProposal, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cosmwasm.wasm.v1beta1.MigrateContractProposal.displayName = 'proto.cosmwasm.wasm.v1beta1.MigrateContractProposal';
}
/**
* 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.cosmwasm.wasm.v1beta1.UpdateAdminProposal = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.cosmwasm.wasm.v1beta1.UpdateAdminProposal, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cosmwasm.wasm.v1beta1.UpdateAdminProposal.displayName = 'proto.cosmwasm.wasm.v1beta1.UpdateAdminProposal';
}
/**
* 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.cosmwasm.wasm.v1beta1.ClearAdminProposal = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.cosmwasm.wasm.v1beta1.ClearAdminProposal, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cosmwasm.wasm.v1beta1.ClearAdminProposal.displayName = 'proto.cosmwasm.wasm.v1beta1.ClearAdminProposal';
}
/**
* 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.cosmwasm.wasm.v1beta1.PinCodesProposal = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmwasm.wasm.v1beta1.PinCodesProposal.repeatedFields_, null);
};
goog.inherits(proto.cosmwasm.wasm.v1beta1.PinCodesProposal, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cosmwasm.wasm.v1beta1.PinCodesProposal.displayName = 'proto.cosmwasm.wasm.v1beta1.PinCodesProposal';
}
/**
* 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.cosmwasm.wasm.v1beta1.UnpinCodesProposal = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmwasm.wasm.v1beta1.UnpinCodesProposal.repeatedFields_, null);
};
goog.inherits(proto.cosmwasm.wasm.v1beta1.UnpinCodesProposal, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cosmwasm.wasm.v1beta1.UnpinCodesProposal.displayName = 'proto.cosmwasm.wasm.v1beta1.UnpinCodesProposal';
}
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.cosmwasm.wasm.v1beta1.StoreCodeProposal.prototype.toObject = function (opt_includeInstance) {
return proto.cosmwasm.wasm.v1beta1.StoreCodeProposal.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.cosmwasm.wasm.v1beta1.StoreCodeProposal} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmwasm.wasm.v1beta1.StoreCodeProposal.toObject = function (includeInstance, msg) {
var f,
obj = {
title: jspb.Message.getFieldWithDefault(msg, 1, ""),
description: jspb.Message.getFieldWithDefault(msg, 2, ""),
runAs: jspb.Message.getFieldWithDefault(msg, 3, ""),
wasmByteCode: msg.getWasmByteCode_asB64(),
source: jspb.Message.getFieldWithDefault(msg, 5, ""),
builder: jspb.Message.getFieldWithDefault(msg, 6, ""),
instantiatePermission: (f = msg.getInstantiatePermission()) && cosmwasm_wasm_v1beta1_types_pb.AccessConfig.toObject(includeInstance, f)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.cosmwasm.wasm.v1beta1.StoreCodeProposal}
*/
proto.cosmwasm.wasm.v1beta1.StoreCodeProposal.deserializeBinary = function (bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.cosmwasm.wasm.v1beta1.StoreCodeProposal();
return proto.cosmwasm.wasm.v1beta1.StoreCodeProposal.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.cosmwasm.wasm.v1beta1.StoreCodeProposal} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.cosmwasm.wasm.v1beta1.StoreCodeProposal}
*/
proto.cosmwasm.wasm.v1beta1.StoreCodeProposal.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.setTitle(value);
break;
case 2:
var value =
/** @type {string} */
reader.readString();
msg.setDescription(value);
break;
case 3:
var value =
/** @type {string} */
reader.readString();
msg.setRunAs(value);
break;
case 4:
var value =
/** @type {!Uint8Array} */
reader.readBytes();
msg.setWasmByteCode(value);
break;
case 5:
var value =
/** @type {string} */
reader.readString();
msg.setSource(value);
break;
case 6:
var value =
/** @type {string} */
reader.readString();
msg.setBuilder(value);
break;
case 7:
var value = new cosmwasm_wasm_v1beta1_types_pb.AccessConfig();
reader.readMessage(value, cosmwasm_wasm_v1beta1_types_pb.AccessConfig.deserializeBinaryFromReader);
msg.setInstantiatePermission(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.cosmwasm.wasm.v1beta1.StoreCodeProposal.prototype.serializeBinary = function () {
var writer = new jspb.BinaryWriter();
proto.cosmwasm.wasm.v1beta1.StoreCodeProposal.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.cosmwasm.wasm.v1beta1.StoreCodeProposal} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmwasm.wasm.v1beta1.StoreCodeProposal.serializeBinaryToWriter = function (message, writer) {
var f = undefined;
f = message.getTitle();
if (f.length > 0) {
writer.writeString(1, f);
}
f = message.getDescription();
if (f.length > 0) {
writer.writeString(2, f);
}
f = message.getRunAs();
if (f.length > 0) {
writer.writeString(3, f);
}
f = message.getWasmByteCode_asU8();
if (f.length > 0) {
writer.writeBytes(4, f);
}
f = message.getSource();
if (f.length > 0) {
writer.writeString(5, f);
}
f = message.getBuilder();
if (f.length > 0) {
writer.writeString(6, f);
}
f = message.getInstantiatePermission();
if (f != null) {
writer.writeMessage(7, f, cosmwasm_wasm_v1beta1_types_pb.AccessConfig.serializeBinaryToWriter);
}
};
/**
* optional string title = 1;
* @return {string}
*/
proto.cosmwasm.wasm.v1beta1.StoreCodeProposal.prototype.getTitle = function () {
return (
/** @type {string} */
jspb.Message.getFieldWithDefault(this, 1, "")
);
};
/**
* @param {string} value
* @return {!proto.cosmwasm.wasm.v1beta1.StoreCodeProposal} returns this
*/
proto.cosmwasm.wasm.v1beta1.StoreCodeProposal.prototype.setTitle = function (value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional string description = 2;
* @return {string}
*/
proto.cosmwasm.wasm.v1beta1.StoreCodeProposal.prototype.getDescription = function () {
return (
/** @type {string} */
jspb.Message.getFieldWithDefault(this, 2, "")
);
};
/**
* @param {string} value
* @return {!proto.cosmwasm.wasm.v1beta1.StoreCodeProposal} returns this
*/
proto.cosmwasm.wasm.v1beta1.StoreCodeProposal.prototype.setDescription = function (value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
/**
* optional string run_as = 3;
* @return {string}
*/
proto.cosmwasm.wasm.v1beta1.StoreCodeProposal.prototype.getRunAs = function () {
return (
/** @type {string} */
jspb.Message.getFieldWithDefault(this, 3, "")
);
};
/**
* @param {string} value
* @return {!proto.cosmwasm.wasm.v1beta1.StoreCodeProposal} returns this
*/
proto.cosmwasm.wasm.v1beta1.StoreCodeProposal.prototype.setRunAs = function (value) {
return jspb.Message.setProto3StringField(this, 3, value);
};
/**
* optional bytes wasm_byte_code = 4;
* @return {!(string|Uint8Array)}
*/
proto.cosmwasm.wasm.v1beta1.StoreCodeProposal.prototype.getWasmByteCode = function () {
return (
/** @type {!(string|Uint8Array)} */
jspb.Message.getFieldWithDefault(this, 4, "")
);
};
/**
* optional bytes wasm_byte_code = 4;
* This is a type-conversion wrapper around `getWasmByteCode()`
* @return {string}
*/
proto.cosmwasm.wasm.v1beta1.StoreCodeProposal.prototype.getWasmByteCode_asB64 = function () {
return (
/** @type {string} */
jspb.Message.bytesAsB64(this.getWasmByteCode())
);
};
/**
* optional bytes wasm_byte_code = 4;
* Note that Uint8Array is not supported on all browsers.
* @see http://caniuse.com/Uint8Array
* This is a type-conversion wrapper around `getWasmByteCode()`
* @return {!Uint8Array}
*/
proto.cosmwasm.wasm.v1beta1.StoreCodeProposal.prototype.getWasmByteCode_asU8 = function () {
return (
/** @type {!Uint8Array} */
jspb.Message.bytesAsU8(this.getWasmByteCode())
);
};
/**
* @param {!(string|Uint8Array)} value
* @return {!proto.cosmwasm.wasm.v1beta1.StoreCodeProposal} returns this
*/
proto.cosmwasm.wasm.v1beta1.StoreCodeProposal.prototype.setWasmByteCode = function (value) {
return jspb.Message.setProto3BytesField(this, 4, value);
};
/**
* optional string source = 5;
* @return {string}
*/
proto.cosmwasm.wasm.v1beta1.StoreCodeProposal.prototype.getSource = function () {
return (
/** @type {string} */
jspb.Message.getFieldWithDefault(this, 5, "")
);
};
/**
* @param {string} value
* @return {!proto.cosmwasm.wasm.v1beta1.StoreCodeProposal} returns this
*/
proto.cosmwasm.wasm.v1beta1.StoreCodeProposal.prototype.setSource = function (value) {
return jspb.Message.setProto3StringField(this, 5, value);
};
/**
* optional string builder = 6;
* @return {string}
*/
proto.cosmwasm.wasm.v1beta1.StoreCodeProposal.prototype.getBuilder = function () {
return (
/** @type {string} */
jspb.Message.getFieldWithDefault(this, 6, "")
);
};
/**
* @param {string} value
* @return {!proto.cosmwasm.wasm.v1beta1.StoreCodeProposal} returns this
*/
proto.cosmwasm.wasm.v1beta1.StoreCodeProposal.prototype.setBuilder = function (value) {
return jspb.Message.setProto3StringField(this, 6, value);
};
/**
* optional AccessConfig instantiate_permission = 7;
* @return {?proto.cosmwasm.wasm.v1beta1.AccessConfig}
*/
proto.cosmwasm.wasm.v1beta1.StoreCodeProposal.prototype.getInstantiatePermission = function () {
return (
/** @type{?proto.cosmwasm.wasm.v1beta1.AccessConfig} */
jspb.Message.getWrapperField(this, cosmwasm_wasm_v1beta1_types_pb.AccessConfig, 7)
);
};
/**
* @param {?proto.cosmwasm.wasm.v1beta1.AccessConfig|undefined} value
* @return {!proto.cosmwasm.wasm.v1beta1.StoreCodeProposal} returns this
*/
proto.cosmwasm.wasm.v1beta1.StoreCodeProposal.prototype.setInstantiatePermission = function (value) {
return jspb.Message.setWrapperField(this, 7, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.cosmwasm.wasm.v1beta1.StoreCodeProposal} returns this
*/
proto.cosmwasm.wasm.v1beta1.StoreCodeProposal.prototype.clearInstantiatePermission = function () {
return this.setInstantiatePermission(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.cosmwasm.wasm.v1beta1.StoreCodeProposal.prototype.hasInstantiatePermission = function () {
return jspb.Message.getField(this, 7) != null;
};
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.cosmwasm.wasm.v1beta1.InstantiateContractProposal.repeatedFields_ = [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.cosmwasm.wasm.v1beta1.InstantiateContractProposal.prototype.toObject = function (opt_includeInstance) {
return proto.cosmwasm.wasm.v1beta1.InstantiateContractProposal.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.cosmwasm.wasm.v1beta1.InstantiateContractProposal} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmwasm.wasm.v1beta1.InstantiateContractProposal.toObject = function (includeInstance, msg) {
var f,
obj = {
title: jspb.Message.getFieldWithDefault(msg, 1, ""),
description: jspb.Message.getFieldWithDefault(msg, 2, ""),
runAs: jspb.Message.getFieldWithDefault(msg, 3, ""),
admin: jspb.Message.getFieldWithDefault(msg, 4, ""),
codeId: jspb.Message.getFieldWithDefault(msg, 5, 0),
label: jspb.Message.getFieldWithDefault(msg, 6, ""),
initMsg: msg.getInitMsg_asB64(),
fundsList: jspb.Message.toObjectList(msg.getFundsList(), 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.cosmwasm.wasm.v1beta1.InstantiateContractProposal}
*/
proto.cosmwasm.wasm.v1beta1.InstantiateContractProposal.deserializeBinary = function (bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.cosmwasm.wasm.v1beta1.InstantiateContractProposal();
return proto.cosmwasm.wasm.v1beta1.InstantiateContractProposal.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.cosmwasm.wasm.v1beta1.InstantiateContractProposal} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.cosmwasm.wasm.v1beta1.InstantiateContractProposal}
*/
proto.cosmwasm.wasm.v1beta1.InstantiateContractProposal.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.setTitle(value);
break;
case 2:
var value =
/** @type {string} */
reader.readString();
msg.setDescription(value);
break;
case 3:
var value =
/** @type {string} */
reader.readString();
msg.setRunAs(value);
break;
case 4:
var value =
/** @type {string} */
reader.readString();
msg.setAdmin(value);
break;
case 5:
var value =
/** @type {number} */
reader.readUint64();
msg.setCodeId(value);
break;
case 6:
var value =
/** @type {string} */
reader.readString();
msg.setLabel(value);
break;
case 7:
var value =
/** @type {!Uint8Array} */
reader.readBytes();
msg.setInitMsg(value);
break;
case 8:
var value = new cosmos_base_v1beta1_coin_pb.Coin();
reader.readMessage(value, cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader);
msg.addFunds(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.cosmwasm.wasm.v1beta1.InstantiateContractProposal.prototype.serializeBinary = function () {
var writer = new jspb.BinaryWriter();
proto.cosmwasm.wasm.v1beta1.InstantiateContractProposal.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.cosmwasm.wasm.v1beta1.InstantiateContractProposal} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmwasm.wasm.v1beta1.InstantiateContractProposal.serializeBinaryToWriter = function (message, writer) {
var f = undefined;
f = message.getTitle();
if (f.length > 0) {
writer.writeString(1, f);
}
f = message.getDescription();
if (f.length > 0) {
writer.writeString(2, f);
}
f = message.getRunAs();
if (f.length > 0) {
writer.writeString(3, f);
}
f = message.getAdmin();
if (f.length > 0) {
writer.writeString(4, f);
}
f = message.getCodeId();
if (f !== 0) {
writer.writeUint64(5, f);
}
f = message.getLabel();
if (f.length > 0) {
writer.writeString(6, f);
}
f = message.getInitMsg_asU8();
if (f.length > 0) {
writer.writeBytes(7, f);
}
f = message.getFundsList();
if (f.length > 0) {
writer.writeRepeatedMessage(8, f, cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter);
}
};
/**
* optional string title = 1;
* @return {string}
*/
proto.cosmwasm.wasm.v1beta1.InstantiateContractProposal.prototype.getTitle = function () {
return (
/** @type {string} */
jspb.Message.getFieldWithDefault(this, 1, "")
);
};
/**
* @param {string} value
* @return {!proto.cosmwasm.wasm.v1beta1.InstantiateContractProposal} returns this
*/
proto.cosmwasm.wasm.v1beta1.InstantiateContractProposal.prototype.setTitle = function (value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional string description = 2;
* @return {string}
*/
proto.cosmwasm.wasm.v1beta1.InstantiateContractProposal.prototype.getDescription = function () {
return (
/** @type {string} */
jspb.Message.getFieldWithDefault(this, 2, "")
);
};
/**
* @param {string} value
* @return {!proto.cosmwasm.wasm.v1beta1.InstantiateContractProposal} returns this
*/
proto.cosmwasm.wasm.v1beta1.InstantiateContractProposal.prototype.setDescription = function (value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
/**
* optional string run_as = 3;
* @return {string}
*/
proto.cosmwasm.wasm.v1beta1.InstantiateContractProposal.prototype.getRunAs = function () {
return (
/** @type {string} */
jspb.Message.getFieldWithDefault(this, 3, "")
);
};
/**
* @param {string} value
* @return {!proto.cosmwasm.wasm.v1beta1.InstantiateContractProposal} returns this
*/
proto.cosmwasm.wasm.v1beta1.InstantiateContractProposal.prototype.setRunAs = function (value) {
return jspb.Message.setProto3StringField(this, 3, value);
};
/**
* optional string admin = 4;
* @return {string}
*/
proto.cosmwasm.wasm.v1beta1.InstantiateContractProposal.prototype.getAdmin = function () {
return (
/** @type {string} */
jspb.Message.getFieldWithDefault(this, 4, "")
);
};
/**
* @param {string} value
* @return {!proto.cosmwasm.wasm.v1beta1.InstantiateContractProposal} returns this
*/
proto.cosmwasm.wasm.v1beta1.InstantiateContractProposal.prototype.setAdmin = function (value) {
return jspb.Message.setProto3StringField(this, 4, value);
};
/**
* optional uint64 code_id = 5;
* @return {number}
*/
proto.cosmwasm.wasm.v1beta1.InstantiateContractProposal.prototype.getCodeId = function () {
return (
/** @type {number} */
jspb.Message.getFieldWithDefault(this, 5, 0)
);
};
/**
* @param {number} value
* @return {!proto.cosmwasm.wasm.v1beta1.InstantiateContractProposal} returns this
*/
proto.cosmwasm.wasm.v1beta1.InstantiateContractProposal.prototype.setCodeId = function (value) {
return jspb.Message.setProto3IntField(this, 5, value);
};
/**
* optional string label = 6;
* @return {string}
*/
proto.cosmwasm.wasm.v1beta1.InstantiateContractProposal.prototype.getLabel = function () {
return (
/** @type {string} */
jspb.Message.getFieldWithDefault(this, 6, "")
);
};
/**
* @param {string} value
* @return {!proto.cosmwasm.wasm.v1beta1.InstantiateContractProposal} returns this
*/
proto.cosmwasm.wasm.v1beta1.InstantiateContractProposal.prototype.setLabel = function (value) {
return jspb.Message.setProto3StringField(this, 6, value);
};
/**
* optional bytes init_msg = 7;
* @return {!(string|Uint8Array)}
*/
proto.cosmwasm.wasm.v1beta1.InstantiateContractProposal.prototype.getInitMsg = function () {
return (
/** @type {!(string|Uint8Array)} */
jspb.Message.getFieldWithDefault(this, 7, "")
);
};
/**
* optional bytes init_msg = 7;
* This is a type-conversion wrapper around `getInitMsg()`
* @return {string}
*/
proto.cosmwasm.wasm.v1beta1.InstantiateContractProposal.prototype.getInitMsg_asB64 = function () {
return (
/** @type {string} */
jspb.Message.bytesAsB64(this.getInitMsg())
);
};
/**
* optional bytes init_msg = 7;
* Note that Uint8Array is not supported on all browsers.
* @see http://caniuse.com/Uint8Array
* This is a type-conversion wrapper around `getInitMsg()`
* @return {!Uint8Array}
*/
proto.cosmwasm.wasm.v1beta1.InstantiateContractProposal.prototype.getInitMsg_asU8 = function () {
return (
/** @type {!Uint8Array} */
jspb.Message.bytesAsU8(this.getInitMsg())
);
};
/**
* @param {!(string|Uint8Array)} value
* @return {!proto.cosmwasm.wasm.v1beta1.InstantiateContractProposal} returns this
*/
proto.cosmwasm.wasm.v1beta1.InstantiateContractProposal.prototype.setInitMsg = function (value) {
return jspb.Message.setProto3BytesField(this, 7, value);
};
/**
* repeated cosmos.base.v1beta1.Coin funds = 8;
* @return {!Array<!proto.cosmos.base.v1beta1.Coin>}
*/
proto.cosmwasm.wasm.v1beta1.InstantiateContractProposal.prototype.getFundsList = function () {
return (
/** @type{!Array<!proto.cosmos.base.v1beta1.Coin>} */
jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 8)
);
};
/**
* @param {!Array<!proto.cosmos.base.v1beta1.Coin>} value
* @return {!proto.cosmwasm.wasm.v1beta1.InstantiateContractProposal} returns this
*/
proto.cosmwasm.wasm.v1beta1.InstantiateContractProposal.prototype.setFundsList = function (value) {
return jspb.Message.setRepeatedWrapperField(this, 8, value);
};
/**
* @param {!proto.cosmos.base.v1beta1.Coin=} opt_value
* @param {number=} opt_index
* @return {!proto.cosmos.base.v1beta1.Coin}
*/
proto.cosmwasm.wasm.v1beta1.InstantiateContractProposal.prototype.addFunds = function (opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 8, opt_value, proto.cosmos.base.v1beta1.Coin, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.cosmwasm.wasm.v1beta1.InstantiateContractProposal} returns this
*/
proto.cosmwasm.wasm.v1beta1.InstantiateContractProposal.prototype.clearFundsList = function () {
return this.setFundsList([]);
};
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.cosmwasm.wasm.v1beta1.MigrateContractProposal.prototype.toObject = function (opt_includeInstance) {
return proto.cosmwasm.wasm.v1beta1.MigrateContractProposal.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.cosmwasm.wasm.v1beta1.MigrateContractProposal} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmwasm.wasm.v1beta1.MigrateContractProposal.toObject = function (includeInstance, msg) {
var f,
obj = {
title: jspb.Message.getFieldWithDefault(msg, 1, ""),
description: jspb.Message.getFieldWithDefault(msg, 2, ""),
runAs: jspb.Message.getFieldWithDefault(msg, 3, ""),
contract: jspb.Message.getFieldWithDefault(msg, 4, ""),
codeId: jspb.Message.getFieldWithDefault(msg, 5, 0),
migrateMsg: msg.getMigrateMsg_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.cosmwasm.wasm.v1beta1.MigrateContractProposal}
*/
proto.cosmwasm.wasm.v1beta1.MigrateContractProposal.deserializeBinary = function (bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.cosmwasm.wasm.v1beta1.MigrateContractProposal();
return proto.cosmwasm.wasm.v1beta1.MigrateContractProposal.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.cosmwasm.wasm.v1beta1.MigrateContractProposal} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.cosmwasm.wasm.v1beta1.MigrateContractProposal}
*/
proto.cosmwasm.wasm.v1beta1.MigrateContractProposal.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.setTitle(value);
break;
case 2:
var value =
/** @type {string} */
reader.readString();
msg.setDescription(value);
break;
case 3:
var value =
/** @type {string} */
reader.readString();
msg.setRunAs(value);
break;
case 4:
var value =
/** @type {string} */
reader.readString();
msg.setContract(value);
break;
case 5:
var value =
/** @type {number} */
reader.readUint64();
msg.setCodeId(value);
break;
case 6:
var value =
/** @type {!Uint8Array} */
reader.readBytes();
msg.setMigrateMsg(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.cosmwasm.wasm.v1beta1.MigrateContractProposal.prototype.serializeBinary = function () {
var writer = new jspb.BinaryWriter();
proto.cosmwasm.wasm.v1beta1.MigrateContractProposal.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.cosmwasm.wasm.v1beta1.MigrateContractProposal} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmwasm.wasm.v1beta1.MigrateContractProposal.serializeBinaryToWriter = function (message, writer) {
var f = undefined;
f = message.getTitle();
if (f.length > 0) {
writer.writeString(1, f);
}
f = message.getDescription();
if (f.length > 0) {
writer.writeString(2, f);
}
f = message.getRunAs();
if (f.length > 0) {
writer.writeString(3, f);
}
f = message.getContract();
if (f.length > 0) {
writer.writeString(4, f);
}
f = message.getCodeId();
if (f !== 0) {
writer.writeUint64(5, f);
}
f = message.getMigrateMsg_asU8();
if (f.length > 0) {
writer.writeBytes(6, f);
}
};
/**
* optional string title = 1;
* @return {string}
*/
proto.cosmwasm.wasm.v1beta1.MigrateContractProposal.prototype.getTitle = function () {
return (
/** @type {string} */
jspb.Message.getFieldWithDefault(this, 1, "")
);
};
/**
* @param {string} value
* @return {!proto.cosmwasm.wasm.v1beta1.MigrateContractProposal} returns this
*/
proto.cosmwasm.wasm.v1beta1.MigrateContractProposal.prototype.setTitle = function (value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional string description = 2;
* @return {string}
*/
proto.cosmwasm.wasm.v1beta1.MigrateContractProposal.prototype.getDescription = function () {
return (
/** @type {string} */
jspb.Message.getFieldWithDefault(this, 2, "")
);
};
/**
* @param {string} value
* @return {!proto.cosmwasm.wasm.v1beta1.MigrateContractProposal} returns this
*/
proto.cosmwasm.wasm.v1beta1.MigrateContractProposal.prototype.setDescription = function (value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
/**
* optional string run_as = 3;
* @return {string}
*/
proto.cosmwasm.wasm.v1beta1.MigrateContractProposal.prototype.getRunAs = function () {
return (
/** @type {string} */
jspb.Message.getFieldWithDefault(this, 3, "")
);
};
/**
* @param {string} value
* @return {!proto.cosmwasm.wasm.v1beta1.MigrateContractProposal} returns this
*/
proto.cosmwasm.wasm.v1beta1.MigrateContractProposal.prototype.setRunAs = function (value) {
return jspb.Message.setProto3StringField(this, 3, value);
};
/**
* optional string contract = 4;
* @return {string}
*/
proto.cosmwasm.wasm.v1beta1.MigrateContractProposal.prototype.getContract = function () {
return (
/** @type {string} */
jspb.Message.getFieldWithDefault(this, 4, "")
);
};
/**
* @param {string} value
* @return {!proto.cosmwasm.wasm.v1beta1.MigrateContractProposal} returns this
*/
proto.cosmwasm.wasm.v1beta1.MigrateContractProposal.prototype.setContract = function (value) {
return jspb.Message.setProto3StringField(this, 4, value);
};
/**
* optional uint64 code_id = 5;
* @return {number}
*/
proto.cosmwasm.wasm.v1beta1.MigrateContractProposal.prototype.getCodeId = function () {
return (
/** @type {number} */
jspb.Message.getFieldWithDefault(this, 5, 0)
);
};
/**
* @param {number} value
* @return {!proto.cosmwasm.wasm.v1beta1.MigrateContractProposal} returns this
*/
proto.cosmwasm.wasm.v1beta1.MigrateContractProposal.prototype.setCodeId = function (value) {
return jspb.Message.setProto3IntField(this, 5, value);
};
/**
* optional bytes migrate_msg = 6;
* @return {!(string|Uint8Array)}
*/
proto.cosmwasm.wasm.v1beta1.MigrateContractProposal.prototype.getMigrateMsg = function () {
return (
/** @type {!(string|Uint8Array)} */
jspb.Message.getFieldWithDefault(this, 6, "")
);
};
/**
* optional bytes migrate_msg = 6;
* This is a type-conversion wrapper around `getMigrateMsg()`
* @return {string}
*/
proto.cosmwasm.wasm.v1beta1.MigrateContractProposal.prototype.getMigrateMsg_asB64 = function () {
return (
/** @type {string} */
jspb.Message.bytesAsB64(this.getMigrateMsg())
);
};
/**
* optional bytes migrate_msg = 6;
* Note that Uint8Array is not supported on all browsers.
* @see http://caniuse.com/Uint8Array
* This is a type-conversion wrapper around `getMigrateMsg()`
* @return {!Uint8Array}
*/
proto.cosmwasm.wasm.v1beta1.MigrateContractProposal.prototype.getMigrateMsg_asU8 = function () {
return (
/** @type {!Uint8Array} */
jspb.Message.bytesAsU8(this.getMigrateMsg())
);
};
/**
* @param {!(string|Uint8Array)} value
* @return {!proto.cosmwasm.wasm.v1beta1.MigrateContractProposal} returns this
*/
proto.cosmwasm.wasm.v1beta1.MigrateContractProposal.prototype.setMigrateMsg = function (value) {
return jspb.Message.setProto3BytesField(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.cosmwasm.wasm.v1beta1.UpdateAdminProposal.prototype.toObject = function (opt_includeInstance) {
return proto.cosmwasm.wasm.v1beta1.UpdateAdminProposal.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.cosmwasm.wasm.v1beta1.UpdateAdminProposal} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmwasm.wasm.v1beta1.UpdateAdminProposal.toObject = function (includeInstance, msg) {
var f,
obj = {
title: jspb.Message.getFieldWithDefault(msg, 1, ""),
description: jspb.Message.getFieldWithDefault(msg, 2, ""),
newAdmin: jspb.Message.getFieldWithDefault(msg, 3, ""),
contract: 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.cosmwasm.wasm.v1beta1.UpdateAdminProposal}
*/
proto.cosmwasm.wasm.v1beta1.UpdateAdminProposal.deserializeBinary = function (bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.cosmwasm.wasm.v1beta1.UpdateAdminProposal();
return proto.cosmwasm.wasm.v1beta1.UpdateAdminProposal.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.cosmwasm.wasm.v1beta1.UpdateAdminProposal} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.cosmwasm.wasm.v1beta1.UpdateAdminProposal}
*/
proto.cosmwasm.wasm.v1beta1.UpdateAdminProposal.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.setTitle(value);
break;
case 2:
var value =
/** @type {string} */
reader.readString();
msg.setDescription(value);
break;
case 3:
var value =
/** @type {string} */
reader.readString();
msg.setNewAdmin(value);
break;
case 4:
var value =
/** @type {string} */
reader.readString();
msg.setContract(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.cosmwasm.wasm.v1beta1.UpdateAdminProposal.prototype.serializeBinary = function () {
var writer = new jspb.BinaryWriter();
proto.cosmwasm.wasm.v1beta1.UpdateAdminProposal.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.cosmwasm.wasm.v1beta1.UpdateAdminProposal} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmwasm.wasm.v1beta1.UpdateAdminProposal.serializeBinaryToWriter = function (message, writer) {
var f = undefined;
f = message.getTitle();
if (f.length > 0) {
writer.writeString(1, f);
}
f = message.getDescription();
if (f.length > 0) {
writer.writeString(2, f);
}
f = message.getNewAdmin();
if (f.length > 0) {
writer.writeString(3, f);
}
f = message.getContract();
if (f.length > 0) {
writer.writeString(4, f);
}
};
/**
* optional string title = 1;
* @return {string}
*/
proto.cosmwasm.wasm.v1beta1.UpdateAdminProposal.prototype.getTitle = function () {
return (
/** @type {string} */
jspb.Message.getFieldWithDefault(this, 1, "")
);
};
/**
* @param {string} value
* @return {!proto.cosmwasm.wasm.v1beta1.UpdateAdminProposal} returns this
*/
proto.cosmwasm.wasm.v1beta1.UpdateAdminProposal.prototype.setTitle = function (value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional string description = 2;
* @return {string}
*/
proto.cosmwasm.wasm.v1beta1.UpdateAdminProposal.prototype.getDescription = function () {
return (
/** @type {string} */
jspb.Message.getFieldWithDefault(this, 2, "")
);
};
/**
* @param {string} value
* @return {!proto.cosmwasm.wasm.v1beta1.UpdateAdminProposal} returns this
*/
proto.cosmwasm.wasm.v1beta1.UpdateAdminProposal.prototype.setDescription = function (value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
/**
* optional string new_admin = 3;
* @return {string}
*/
proto.cosmwasm.wasm.v1beta1.UpdateAdminProposal.prototype.getNewAdmin = function () {
return (
/** @type {string} */
jspb.Message.getFieldWithDefault(this, 3, "")
);
};
/**
* @param {string} value
* @return {!proto.cosmwasm.wasm.v1beta1.UpdateAdminProposal} returns this
*/
proto.cosmwasm.wasm.v1beta1.UpdateAdminProposal.prototype.setNewAdmin = function (value) {
return jspb.Message.setProto3StringField(this, 3, value);
};
/**
* optional string contract = 4;
* @return {string}
*/
proto.cosmwasm.wasm.v1beta1.UpdateAdminProposal.prototype.getContract = function () {
return (
/** @type {string} */
jspb.Message.getFieldWithDefault(this, 4, "")
);
};
/**
* @param {string} value
* @return {!proto.cosmwasm.wasm.v1beta1.UpdateAdminProposal} returns this
*/
proto.cosmwasm.wasm.v1beta1.UpdateAdminProposal.prototype.setContract = 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.cosmwasm.wasm.v1beta1.ClearAdminProposal.prototype.toObject = function (opt_includeInstance) {
return proto.cosmwasm.wasm.v1beta1.ClearAdminProposal.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.cosmwasm.wasm.v1beta1.ClearAdminProposal} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmwasm.wasm.v1beta1.ClearAdminProposal.toObject = function (includeInstance, msg) {
var f,
obj = {
title: jspb.Message.getFieldWithDefault(msg, 1, ""),
description: jspb.Message.getFieldWithDefault(msg, 2, ""),
contract: jspb.Message.getFieldWithDefault(msg, 3, "")
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.cosmwasm.wasm.v1beta1.ClearAdminProposal}
*/
proto.cosmwasm.wasm.v1beta1.ClearAdminProposal.deserializeBinary = function (bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.cosmwasm.wasm.v1beta1.ClearAdminProposal();
return proto.cosmwasm.wasm.v1beta1.ClearAdminProposal.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.cosmwasm.wasm.v1beta1.ClearAdminProposal} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.cosmwasm.wasm.v1beta1.ClearAdminProposal}
*/
proto.cosmwasm.wasm.v1beta1.ClearAdminProposal.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.setTitle(value);
break;
case 2:
var value =
/** @type {string} */
reader.readString();
msg.setDescription(value);
break;
case 3:
var value =
/** @type {string} */
reader.readString();
msg.setContract(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.cosmwasm.wasm.v1beta1.ClearAdminProposal.prototype.serializeBinary = function () {
var writer = new jspb.BinaryWriter();
proto.cosmwasm.wasm.v1beta1.ClearAdminProposal.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.cosmwasm.wasm.v1beta1.ClearAdminProposal} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmwasm.wasm.v1beta1.ClearAdminProposal.serializeBinaryToWriter = function (message, writer) {
var f = undefined;
f = message.getTitle();