mcps-sdk-js
Version:
MCPS JavaScript SDK
1,627 lines (1,409 loc) • 50.6 kB
JavaScript
// source: wasm/msg.proto
/**
* @fileoverview
* @enhanceable
* @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!
var jspb = require('google-protobuf');
var goog = jspb;
var global = Function('return this')();
var gogoproto_gogo_pb = require('../gogoproto/gogo_pb.js');
goog.object.extend(proto, gogoproto_gogo_pb);
var cosmos_base_v1beta1_coin_pb = require('../cosmos/base/v1beta1/coin_pb.js');
goog.object.extend(proto, cosmos_base_v1beta1_coin_pb);
var wasm_types_pb = require('../wasm/types_pb.js');
goog.object.extend(proto, wasm_types_pb);
goog.exportSymbol('proto.wasmd.x.wasmd.v1beta1.MsgClearAdmin', null, global);
goog.exportSymbol('proto.wasmd.x.wasmd.v1beta1.MsgExecuteContract', null, global);
goog.exportSymbol('proto.wasmd.x.wasmd.v1beta1.MsgInstantiateContract', null, global);
goog.exportSymbol('proto.wasmd.x.wasmd.v1beta1.MsgMigrateContract', null, global);
goog.exportSymbol('proto.wasmd.x.wasmd.v1beta1.MsgStoreCode', null, global);
goog.exportSymbol('proto.wasmd.x.wasmd.v1beta1.MsgUpdateAdmin', 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.wasmd.x.wasmd.v1beta1.MsgStoreCode = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.wasmd.x.wasmd.v1beta1.MsgStoreCode, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.wasmd.x.wasmd.v1beta1.MsgStoreCode.displayName = 'proto.wasmd.x.wasmd.v1beta1.MsgStoreCode';
}
/**
* 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.wasmd.x.wasmd.v1beta1.MsgInstantiateContract = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.wasmd.x.wasmd.v1beta1.MsgInstantiateContract.repeatedFields_, null);
};
goog.inherits(proto.wasmd.x.wasmd.v1beta1.MsgInstantiateContract, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.wasmd.x.wasmd.v1beta1.MsgInstantiateContract.displayName = 'proto.wasmd.x.wasmd.v1beta1.MsgInstantiateContract';
}
/**
* 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.wasmd.x.wasmd.v1beta1.MsgExecuteContract = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.wasmd.x.wasmd.v1beta1.MsgExecuteContract.repeatedFields_, null);
};
goog.inherits(proto.wasmd.x.wasmd.v1beta1.MsgExecuteContract, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.wasmd.x.wasmd.v1beta1.MsgExecuteContract.displayName = 'proto.wasmd.x.wasmd.v1beta1.MsgExecuteContract';
}
/**
* 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.wasmd.x.wasmd.v1beta1.MsgMigrateContract = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.wasmd.x.wasmd.v1beta1.MsgMigrateContract, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.wasmd.x.wasmd.v1beta1.MsgMigrateContract.displayName = 'proto.wasmd.x.wasmd.v1beta1.MsgMigrateContract';
}
/**
* 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.wasmd.x.wasmd.v1beta1.MsgUpdateAdmin = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.wasmd.x.wasmd.v1beta1.MsgUpdateAdmin, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.wasmd.x.wasmd.v1beta1.MsgUpdateAdmin.displayName = 'proto.wasmd.x.wasmd.v1beta1.MsgUpdateAdmin';
}
/**
* 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.wasmd.x.wasmd.v1beta1.MsgClearAdmin = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.wasmd.x.wasmd.v1beta1.MsgClearAdmin, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.wasmd.x.wasmd.v1beta1.MsgClearAdmin.displayName = 'proto.wasmd.x.wasmd.v1beta1.MsgClearAdmin';
}
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.wasmd.x.wasmd.v1beta1.MsgStoreCode.prototype.toObject = function(opt_includeInstance) {
return proto.wasmd.x.wasmd.v1beta1.MsgStoreCode.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.wasmd.x.wasmd.v1beta1.MsgStoreCode} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.wasmd.x.wasmd.v1beta1.MsgStoreCode.toObject = function(includeInstance, msg) {
var f, obj = {
sender: jspb.Message.getFieldWithDefault(msg, 1, ""),
wasmByteCode: msg.getWasmByteCode_asB64(),
source: jspb.Message.getFieldWithDefault(msg, 3, ""),
builder: jspb.Message.getFieldWithDefault(msg, 4, ""),
instantiatePermission: (f = msg.getInstantiatePermission()) && wasm_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.wasmd.x.wasmd.v1beta1.MsgStoreCode}
*/
proto.wasmd.x.wasmd.v1beta1.MsgStoreCode.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.wasmd.x.wasmd.v1beta1.MsgStoreCode;
return proto.wasmd.x.wasmd.v1beta1.MsgStoreCode.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.wasmd.x.wasmd.v1beta1.MsgStoreCode} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.wasmd.x.wasmd.v1beta1.MsgStoreCode}
*/
proto.wasmd.x.wasmd.v1beta1.MsgStoreCode.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.setSender(value);
break;
case 2:
var value = /** @type {!Uint8Array} */ (reader.readBytes());
msg.setWasmByteCode(value);
break;
case 3:
var value = /** @type {string} */ (reader.readString());
msg.setSource(value);
break;
case 4:
var value = /** @type {string} */ (reader.readString());
msg.setBuilder(value);
break;
case 5:
var value = new wasm_types_pb.AccessConfig;
reader.readMessage(value,wasm_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.wasmd.x.wasmd.v1beta1.MsgStoreCode.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.wasmd.x.wasmd.v1beta1.MsgStoreCode.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.wasmd.x.wasmd.v1beta1.MsgStoreCode} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.wasmd.x.wasmd.v1beta1.MsgStoreCode.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getSender();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getWasmByteCode_asU8();
if (f.length > 0) {
writer.writeBytes(
2,
f
);
}
f = message.getSource();
if (f.length > 0) {
writer.writeString(
3,
f
);
}
f = message.getBuilder();
if (f.length > 0) {
writer.writeString(
4,
f
);
}
f = message.getInstantiatePermission();
if (f != null) {
writer.writeMessage(
5,
f,
wasm_types_pb.AccessConfig.serializeBinaryToWriter
);
}
};
/**
* optional string sender = 1;
* @return {string}
*/
proto.wasmd.x.wasmd.v1beta1.MsgStoreCode.prototype.getSender = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.wasmd.x.wasmd.v1beta1.MsgStoreCode} returns this
*/
proto.wasmd.x.wasmd.v1beta1.MsgStoreCode.prototype.setSender = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional bytes wasm_byte_code = 2;
* @return {!(string|Uint8Array)}
*/
proto.wasmd.x.wasmd.v1beta1.MsgStoreCode.prototype.getWasmByteCode = function() {
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* optional bytes wasm_byte_code = 2;
* This is a type-conversion wrapper around `getWasmByteCode()`
* @return {string}
*/
proto.wasmd.x.wasmd.v1beta1.MsgStoreCode.prototype.getWasmByteCode_asB64 = function() {
return /** @type {string} */ (jspb.Message.bytesAsB64(
this.getWasmByteCode()));
};
/**
* optional bytes wasm_byte_code = 2;
* 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.wasmd.x.wasmd.v1beta1.MsgStoreCode.prototype.getWasmByteCode_asU8 = function() {
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
this.getWasmByteCode()));
};
/**
* @param {!(string|Uint8Array)} value
* @return {!proto.wasmd.x.wasmd.v1beta1.MsgStoreCode} returns this
*/
proto.wasmd.x.wasmd.v1beta1.MsgStoreCode.prototype.setWasmByteCode = function(value) {
return jspb.Message.setProto3BytesField(this, 2, value);
};
/**
* optional string source = 3;
* @return {string}
*/
proto.wasmd.x.wasmd.v1beta1.MsgStoreCode.prototype.getSource = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};
/**
* @param {string} value
* @return {!proto.wasmd.x.wasmd.v1beta1.MsgStoreCode} returns this
*/
proto.wasmd.x.wasmd.v1beta1.MsgStoreCode.prototype.setSource = function(value) {
return jspb.Message.setProto3StringField(this, 3, value);
};
/**
* optional string builder = 4;
* @return {string}
*/
proto.wasmd.x.wasmd.v1beta1.MsgStoreCode.prototype.getBuilder = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
};
/**
* @param {string} value
* @return {!proto.wasmd.x.wasmd.v1beta1.MsgStoreCode} returns this
*/
proto.wasmd.x.wasmd.v1beta1.MsgStoreCode.prototype.setBuilder = function(value) {
return jspb.Message.setProto3StringField(this, 4, value);
};
/**
* optional AccessConfig instantiate_permission = 5;
* @return {?proto.wasmd.x.wasmd.v1beta1.AccessConfig}
*/
proto.wasmd.x.wasmd.v1beta1.MsgStoreCode.prototype.getInstantiatePermission = function() {
return /** @type{?proto.wasmd.x.wasmd.v1beta1.AccessConfig} */ (
jspb.Message.getWrapperField(this, wasm_types_pb.AccessConfig, 5));
};
/**
* @param {?proto.wasmd.x.wasmd.v1beta1.AccessConfig|undefined} value
* @return {!proto.wasmd.x.wasmd.v1beta1.MsgStoreCode} returns this
*/
proto.wasmd.x.wasmd.v1beta1.MsgStoreCode.prototype.setInstantiatePermission = function(value) {
return jspb.Message.setWrapperField(this, 5, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.wasmd.x.wasmd.v1beta1.MsgStoreCode} returns this
*/
proto.wasmd.x.wasmd.v1beta1.MsgStoreCode.prototype.clearInstantiatePermission = function() {
return this.setInstantiatePermission(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.wasmd.x.wasmd.v1beta1.MsgStoreCode.prototype.hasInstantiatePermission = function() {
return jspb.Message.getField(this, 5) != null;
};
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.wasmd.x.wasmd.v1beta1.MsgInstantiateContract.repeatedFields_ = [6];
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.wasmd.x.wasmd.v1beta1.MsgInstantiateContract.prototype.toObject = function(opt_includeInstance) {
return proto.wasmd.x.wasmd.v1beta1.MsgInstantiateContract.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.wasmd.x.wasmd.v1beta1.MsgInstantiateContract} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.wasmd.x.wasmd.v1beta1.MsgInstantiateContract.toObject = function(includeInstance, msg) {
var f, obj = {
sender: jspb.Message.getFieldWithDefault(msg, 1, ""),
admin: jspb.Message.getFieldWithDefault(msg, 2, ""),
codeId: jspb.Message.getFieldWithDefault(msg, 3, 0),
label: jspb.Message.getFieldWithDefault(msg, 4, ""),
initMsg: msg.getInitMsg_asB64(),
initFundsList: jspb.Message.toObjectList(msg.getInitFundsList(),
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.wasmd.x.wasmd.v1beta1.MsgInstantiateContract}
*/
proto.wasmd.x.wasmd.v1beta1.MsgInstantiateContract.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.wasmd.x.wasmd.v1beta1.MsgInstantiateContract;
return proto.wasmd.x.wasmd.v1beta1.MsgInstantiateContract.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.wasmd.x.wasmd.v1beta1.MsgInstantiateContract} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.wasmd.x.wasmd.v1beta1.MsgInstantiateContract}
*/
proto.wasmd.x.wasmd.v1beta1.MsgInstantiateContract.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.setSender(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setAdmin(value);
break;
case 3:
var value = /** @type {number} */ (reader.readUint64());
msg.setCodeId(value);
break;
case 4:
var value = /** @type {string} */ (reader.readString());
msg.setLabel(value);
break;
case 5:
var value = /** @type {!Uint8Array} */ (reader.readBytes());
msg.setInitMsg(value);
break;
case 6:
var value = new cosmos_base_v1beta1_coin_pb.Coin;
reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader);
msg.addInitFunds(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.wasmd.x.wasmd.v1beta1.MsgInstantiateContract.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.wasmd.x.wasmd.v1beta1.MsgInstantiateContract.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.wasmd.x.wasmd.v1beta1.MsgInstantiateContract} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.wasmd.x.wasmd.v1beta1.MsgInstantiateContract.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getSender();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getAdmin();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
f = message.getCodeId();
if (f !== 0) {
writer.writeUint64(
3,
f
);
}
f = message.getLabel();
if (f.length > 0) {
writer.writeString(
4,
f
);
}
f = message.getInitMsg_asU8();
if (f.length > 0) {
writer.writeBytes(
5,
f
);
}
f = message.getInitFundsList();
if (f.length > 0) {
writer.writeRepeatedMessage(
6,
f,
cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter
);
}
};
/**
* optional string sender = 1;
* @return {string}
*/
proto.wasmd.x.wasmd.v1beta1.MsgInstantiateContract.prototype.getSender = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.wasmd.x.wasmd.v1beta1.MsgInstantiateContract} returns this
*/
proto.wasmd.x.wasmd.v1beta1.MsgInstantiateContract.prototype.setSender = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional string admin = 2;
* @return {string}
*/
proto.wasmd.x.wasmd.v1beta1.MsgInstantiateContract.prototype.getAdmin = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* @param {string} value
* @return {!proto.wasmd.x.wasmd.v1beta1.MsgInstantiateContract} returns this
*/
proto.wasmd.x.wasmd.v1beta1.MsgInstantiateContract.prototype.setAdmin = function(value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
/**
* optional uint64 code_id = 3;
* @return {number}
*/
proto.wasmd.x.wasmd.v1beta1.MsgInstantiateContract.prototype.getCodeId = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
};
/**
* @param {number} value
* @return {!proto.wasmd.x.wasmd.v1beta1.MsgInstantiateContract} returns this
*/
proto.wasmd.x.wasmd.v1beta1.MsgInstantiateContract.prototype.setCodeId = function(value) {
return jspb.Message.setProto3IntField(this, 3, value);
};
/**
* optional string label = 4;
* @return {string}
*/
proto.wasmd.x.wasmd.v1beta1.MsgInstantiateContract.prototype.getLabel = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
};
/**
* @param {string} value
* @return {!proto.wasmd.x.wasmd.v1beta1.MsgInstantiateContract} returns this
*/
proto.wasmd.x.wasmd.v1beta1.MsgInstantiateContract.prototype.setLabel = function(value) {
return jspb.Message.setProto3StringField(this, 4, value);
};
/**
* optional bytes init_msg = 5;
* @return {!(string|Uint8Array)}
*/
proto.wasmd.x.wasmd.v1beta1.MsgInstantiateContract.prototype.getInitMsg = function() {
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
};
/**
* optional bytes init_msg = 5;
* This is a type-conversion wrapper around `getInitMsg()`
* @return {string}
*/
proto.wasmd.x.wasmd.v1beta1.MsgInstantiateContract.prototype.getInitMsg_asB64 = function() {
return /** @type {string} */ (jspb.Message.bytesAsB64(
this.getInitMsg()));
};
/**
* optional bytes init_msg = 5;
* 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.wasmd.x.wasmd.v1beta1.MsgInstantiateContract.prototype.getInitMsg_asU8 = function() {
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
this.getInitMsg()));
};
/**
* @param {!(string|Uint8Array)} value
* @return {!proto.wasmd.x.wasmd.v1beta1.MsgInstantiateContract} returns this
*/
proto.wasmd.x.wasmd.v1beta1.MsgInstantiateContract.prototype.setInitMsg = function(value) {
return jspb.Message.setProto3BytesField(this, 5, value);
};
/**
* repeated cosmos.base.v1beta1.Coin init_funds = 6;
* @return {!Array<!proto.cosmos.base.v1beta1.Coin>}
*/
proto.wasmd.x.wasmd.v1beta1.MsgInstantiateContract.prototype.getInitFundsList = function() {
return /** @type{!Array<!proto.cosmos.base.v1beta1.Coin>} */ (
jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 6));
};
/**
* @param {!Array<!proto.cosmos.base.v1beta1.Coin>} value
* @return {!proto.wasmd.x.wasmd.v1beta1.MsgInstantiateContract} returns this
*/
proto.wasmd.x.wasmd.v1beta1.MsgInstantiateContract.prototype.setInitFundsList = function(value) {
return jspb.Message.setRepeatedWrapperField(this, 6, value);
};
/**
* @param {!proto.cosmos.base.v1beta1.Coin=} opt_value
* @param {number=} opt_index
* @return {!proto.cosmos.base.v1beta1.Coin}
*/
proto.wasmd.x.wasmd.v1beta1.MsgInstantiateContract.prototype.addInitFunds = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 6, opt_value, proto.cosmos.base.v1beta1.Coin, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.wasmd.x.wasmd.v1beta1.MsgInstantiateContract} returns this
*/
proto.wasmd.x.wasmd.v1beta1.MsgInstantiateContract.prototype.clearInitFundsList = function() {
return this.setInitFundsList([]);
};
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.wasmd.x.wasmd.v1beta1.MsgExecuteContract.repeatedFields_ = [5];
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.wasmd.x.wasmd.v1beta1.MsgExecuteContract.prototype.toObject = function(opt_includeInstance) {
return proto.wasmd.x.wasmd.v1beta1.MsgExecuteContract.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.wasmd.x.wasmd.v1beta1.MsgExecuteContract} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.wasmd.x.wasmd.v1beta1.MsgExecuteContract.toObject = function(includeInstance, msg) {
var f, obj = {
sender: jspb.Message.getFieldWithDefault(msg, 1, ""),
contract: jspb.Message.getFieldWithDefault(msg, 2, ""),
msg: msg.getMsg_asB64(),
sentFundsList: jspb.Message.toObjectList(msg.getSentFundsList(),
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.wasmd.x.wasmd.v1beta1.MsgExecuteContract}
*/
proto.wasmd.x.wasmd.v1beta1.MsgExecuteContract.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.wasmd.x.wasmd.v1beta1.MsgExecuteContract;
return proto.wasmd.x.wasmd.v1beta1.MsgExecuteContract.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.wasmd.x.wasmd.v1beta1.MsgExecuteContract} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.wasmd.x.wasmd.v1beta1.MsgExecuteContract}
*/
proto.wasmd.x.wasmd.v1beta1.MsgExecuteContract.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.setSender(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setContract(value);
break;
case 3:
var value = /** @type {!Uint8Array} */ (reader.readBytes());
msg.setMsg(value);
break;
case 5:
var value = new cosmos_base_v1beta1_coin_pb.Coin;
reader.readMessage(value,cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader);
msg.addSentFunds(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.wasmd.x.wasmd.v1beta1.MsgExecuteContract.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.wasmd.x.wasmd.v1beta1.MsgExecuteContract.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.wasmd.x.wasmd.v1beta1.MsgExecuteContract} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.wasmd.x.wasmd.v1beta1.MsgExecuteContract.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getSender();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getContract();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
f = message.getMsg_asU8();
if (f.length > 0) {
writer.writeBytes(
3,
f
);
}
f = message.getSentFundsList();
if (f.length > 0) {
writer.writeRepeatedMessage(
5,
f,
cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter
);
}
};
/**
* optional string sender = 1;
* @return {string}
*/
proto.wasmd.x.wasmd.v1beta1.MsgExecuteContract.prototype.getSender = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.wasmd.x.wasmd.v1beta1.MsgExecuteContract} returns this
*/
proto.wasmd.x.wasmd.v1beta1.MsgExecuteContract.prototype.setSender = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional string contract = 2;
* @return {string}
*/
proto.wasmd.x.wasmd.v1beta1.MsgExecuteContract.prototype.getContract = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* @param {string} value
* @return {!proto.wasmd.x.wasmd.v1beta1.MsgExecuteContract} returns this
*/
proto.wasmd.x.wasmd.v1beta1.MsgExecuteContract.prototype.setContract = function(value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
/**
* optional bytes msg = 3;
* @return {!(string|Uint8Array)}
*/
proto.wasmd.x.wasmd.v1beta1.MsgExecuteContract.prototype.getMsg = function() {
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};
/**
* optional bytes msg = 3;
* This is a type-conversion wrapper around `getMsg()`
* @return {string}
*/
proto.wasmd.x.wasmd.v1beta1.MsgExecuteContract.prototype.getMsg_asB64 = function() {
return /** @type {string} */ (jspb.Message.bytesAsB64(
this.getMsg()));
};
/**
* optional bytes msg = 3;
* Note that Uint8Array is not supported on all browsers.
* @see http://caniuse.com/Uint8Array
* This is a type-conversion wrapper around `getMsg()`
* @return {!Uint8Array}
*/
proto.wasmd.x.wasmd.v1beta1.MsgExecuteContract.prototype.getMsg_asU8 = function() {
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
this.getMsg()));
};
/**
* @param {!(string|Uint8Array)} value
* @return {!proto.wasmd.x.wasmd.v1beta1.MsgExecuteContract} returns this
*/
proto.wasmd.x.wasmd.v1beta1.MsgExecuteContract.prototype.setMsg = function(value) {
return jspb.Message.setProto3BytesField(this, 3, value);
};
/**
* repeated cosmos.base.v1beta1.Coin sent_funds = 5;
* @return {!Array<!proto.cosmos.base.v1beta1.Coin>}
*/
proto.wasmd.x.wasmd.v1beta1.MsgExecuteContract.prototype.getSentFundsList = function() {
return /** @type{!Array<!proto.cosmos.base.v1beta1.Coin>} */ (
jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 5));
};
/**
* @param {!Array<!proto.cosmos.base.v1beta1.Coin>} value
* @return {!proto.wasmd.x.wasmd.v1beta1.MsgExecuteContract} returns this
*/
proto.wasmd.x.wasmd.v1beta1.MsgExecuteContract.prototype.setSentFundsList = function(value) {
return jspb.Message.setRepeatedWrapperField(this, 5, value);
};
/**
* @param {!proto.cosmos.base.v1beta1.Coin=} opt_value
* @param {number=} opt_index
* @return {!proto.cosmos.base.v1beta1.Coin}
*/
proto.wasmd.x.wasmd.v1beta1.MsgExecuteContract.prototype.addSentFunds = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, proto.cosmos.base.v1beta1.Coin, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.wasmd.x.wasmd.v1beta1.MsgExecuteContract} returns this
*/
proto.wasmd.x.wasmd.v1beta1.MsgExecuteContract.prototype.clearSentFundsList = function() {
return this.setSentFundsList([]);
};
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.wasmd.x.wasmd.v1beta1.MsgMigrateContract.prototype.toObject = function(opt_includeInstance) {
return proto.wasmd.x.wasmd.v1beta1.MsgMigrateContract.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.wasmd.x.wasmd.v1beta1.MsgMigrateContract} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.wasmd.x.wasmd.v1beta1.MsgMigrateContract.toObject = function(includeInstance, msg) {
var f, obj = {
sender: jspb.Message.getFieldWithDefault(msg, 1, ""),
contract: jspb.Message.getFieldWithDefault(msg, 2, ""),
codeId: jspb.Message.getFieldWithDefault(msg, 3, 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.wasmd.x.wasmd.v1beta1.MsgMigrateContract}
*/
proto.wasmd.x.wasmd.v1beta1.MsgMigrateContract.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.wasmd.x.wasmd.v1beta1.MsgMigrateContract;
return proto.wasmd.x.wasmd.v1beta1.MsgMigrateContract.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.wasmd.x.wasmd.v1beta1.MsgMigrateContract} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.wasmd.x.wasmd.v1beta1.MsgMigrateContract}
*/
proto.wasmd.x.wasmd.v1beta1.MsgMigrateContract.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.setSender(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setContract(value);
break;
case 3:
var value = /** @type {number} */ (reader.readUint64());
msg.setCodeId(value);
break;
case 4:
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.wasmd.x.wasmd.v1beta1.MsgMigrateContract.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.wasmd.x.wasmd.v1beta1.MsgMigrateContract.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.wasmd.x.wasmd.v1beta1.MsgMigrateContract} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.wasmd.x.wasmd.v1beta1.MsgMigrateContract.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getSender();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getContract();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
f = message.getCodeId();
if (f !== 0) {
writer.writeUint64(
3,
f
);
}
f = message.getMigrateMsg_asU8();
if (f.length > 0) {
writer.writeBytes(
4,
f
);
}
};
/**
* optional string sender = 1;
* @return {string}
*/
proto.wasmd.x.wasmd.v1beta1.MsgMigrateContract.prototype.getSender = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.wasmd.x.wasmd.v1beta1.MsgMigrateContract} returns this
*/
proto.wasmd.x.wasmd.v1beta1.MsgMigrateContract.prototype.setSender = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional string contract = 2;
* @return {string}
*/
proto.wasmd.x.wasmd.v1beta1.MsgMigrateContract.prototype.getContract = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* @param {string} value
* @return {!proto.wasmd.x.wasmd.v1beta1.MsgMigrateContract} returns this
*/
proto.wasmd.x.wasmd.v1beta1.MsgMigrateContract.prototype.setContract = function(value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
/**
* optional uint64 code_id = 3;
* @return {number}
*/
proto.wasmd.x.wasmd.v1beta1.MsgMigrateContract.prototype.getCodeId = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
};
/**
* @param {number} value
* @return {!proto.wasmd.x.wasmd.v1beta1.MsgMigrateContract} returns this
*/
proto.wasmd.x.wasmd.v1beta1.MsgMigrateContract.prototype.setCodeId = function(value) {
return jspb.Message.setProto3IntField(this, 3, value);
};
/**
* optional bytes migrate_msg = 4;
* @return {!(string|Uint8Array)}
*/
proto.wasmd.x.wasmd.v1beta1.MsgMigrateContract.prototype.getMigrateMsg = function() {
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
};
/**
* optional bytes migrate_msg = 4;
* This is a type-conversion wrapper around `getMigrateMsg()`
* @return {string}
*/
proto.wasmd.x.wasmd.v1beta1.MsgMigrateContract.prototype.getMigrateMsg_asB64 = function() {
return /** @type {string} */ (jspb.Message.bytesAsB64(
this.getMigrateMsg()));
};
/**
* optional bytes migrate_msg = 4;
* 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.wasmd.x.wasmd.v1beta1.MsgMigrateContract.prototype.getMigrateMsg_asU8 = function() {
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
this.getMigrateMsg()));
};
/**
* @param {!(string|Uint8Array)} value
* @return {!proto.wasmd.x.wasmd.v1beta1.MsgMigrateContract} returns this
*/
proto.wasmd.x.wasmd.v1beta1.MsgMigrateContract.prototype.setMigrateMsg = function(value) {
return jspb.Message.setProto3BytesField(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.wasmd.x.wasmd.v1beta1.MsgUpdateAdmin.prototype.toObject = function(opt_includeInstance) {
return proto.wasmd.x.wasmd.v1beta1.MsgUpdateAdmin.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.wasmd.x.wasmd.v1beta1.MsgUpdateAdmin} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.wasmd.x.wasmd.v1beta1.MsgUpdateAdmin.toObject = function(includeInstance, msg) {
var f, obj = {
sender: jspb.Message.getFieldWithDefault(msg, 1, ""),
newAdmin: 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.wasmd.x.wasmd.v1beta1.MsgUpdateAdmin}
*/
proto.wasmd.x.wasmd.v1beta1.MsgUpdateAdmin.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.wasmd.x.wasmd.v1beta1.MsgUpdateAdmin;
return proto.wasmd.x.wasmd.v1beta1.MsgUpdateAdmin.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.wasmd.x.wasmd.v1beta1.MsgUpdateAdmin} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.wasmd.x.wasmd.v1beta1.MsgUpdateAdmin}
*/
proto.wasmd.x.wasmd.v1beta1.MsgUpdateAdmin.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.setSender(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setNewAdmin(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.wasmd.x.wasmd.v1beta1.MsgUpdateAdmin.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.wasmd.x.wasmd.v1beta1.MsgUpdateAdmin.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.wasmd.x.wasmd.v1beta1.MsgUpdateAdmin} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.wasmd.x.wasmd.v1beta1.MsgUpdateAdmin.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getSender();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getNewAdmin();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
f = message.getContract();
if (f.length > 0) {
writer.writeString(
3,
f
);
}
};
/**
* optional string sender = 1;
* @return {string}
*/
proto.wasmd.x.wasmd.v1beta1.MsgUpdateAdmin.prototype.getSender = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.wasmd.x.wasmd.v1beta1.MsgUpdateAdmin} returns this
*/
proto.wasmd.x.wasmd.v1beta1.MsgUpdateAdmin.prototype.setSender = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional string new_admin = 2;
* @return {string}
*/
proto.wasmd.x.wasmd.v1beta1.MsgUpdateAdmin.prototype.getNewAdmin = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* @param {string} value
* @return {!proto.wasmd.x.wasmd.v1beta1.MsgUpdateAdmin} returns this
*/
proto.wasmd.x.wasmd.v1beta1.MsgUpdateAdmin.prototype.setNewAdmin = function(value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
/**
* optional string contract = 3;
* @return {string}
*/
proto.wasmd.x.wasmd.v1beta1.MsgUpdateAdmin.prototype.getContract = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};
/**
* @param {string} value
* @return {!proto.wasmd.x.wasmd.v1beta1.MsgUpdateAdmin} returns this
*/
proto.wasmd.x.wasmd.v1beta1.MsgUpdateAdmin.prototype.setContract = function(value) {
return jspb.Message.setProto3StringField(this, 3, value);
};
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.wasmd.x.wasmd.v1beta1.MsgClearAdmin.prototype.toObject = function(opt_includeInstance) {
return proto.wasmd.x.wasmd.v1beta1.MsgClearAdmin.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.wasmd.x.wasmd.v1beta1.MsgClearAdmin} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.wasmd.x.wasmd.v1beta1.MsgClearAdmin.toObject = function(includeInstance, msg) {
var f, obj = {
sender: jspb.Message.getFieldWithDefault(msg, 1, ""),
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.wasmd.x.wasmd.v1beta1.MsgClearAdmin}
*/
proto.wasmd.x.wasmd.v1beta1.MsgClearAdmin.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.wasmd.x.wasmd.v1beta1.MsgClearAdmin;
return proto.wasmd.x.wasmd.v1beta1.MsgClearAdmin.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.wasmd.x.wasmd.v1beta1.MsgClearAdmin} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.wasmd.x.wasmd.v1beta1.MsgClearAdmin}
*/
proto.wasmd.x.wasmd.v1beta1.MsgClearAdmin.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.setSender(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.wasmd.x.wasmd.v1beta1.MsgClearAdmin.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.wasmd.x.wasmd.v1beta1.MsgClearAdmin.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.wasmd.x.wasmd.v1beta1.MsgClearAdmin} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.wasmd.x.wasmd.v1beta1.MsgClearAdmin.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getSender();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getContract();
if (f.length > 0) {
writer.writeString(
3,
f
);
}
};
/**
* optional string sender = 1;
* @return {string}
*/
proto.wasmd.x.wasmd.v1beta1.MsgClearAdmin.prototype.getSender = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.wasmd.x.wasmd.v1beta1.MsgClearAdmin} returns this
*/
proto.wasmd.x.wasmd.v1beta1.MsgClearAdmin.prototype.setSender = func