@provenanceio/wallet-utils
Version:
Typescript Utilities for Provenance Blockchain Wallet
1,666 lines (1,374 loc) • 84.9 kB
JavaScript
"use strict";
// source: cosmwasm/wasm/v1beta1/tx.proto
/**
* @fileoverview
* @enhanceable
* @suppress {missingRequire} reports error on implicit type usages.
* @suppress {messageConventions} JS Compiler reports an error if a variable or
* field starts with 'MSG_' and isn't a translatable message.
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
/* eslint-disable */
// @ts-nocheck
var jspb = require('google-protobuf');
var goog = jspb;
var global = function () {
return this || window || global || self || Function('return this')();
}.call(null);
var cosmos_base_v1beta1_coin_pb = require('../../../cosmos/base/v1beta1/coin_pb.js');
goog.object.extend(proto, cosmos_base_v1beta1_coin_pb);
var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js');
goog.object.extend(proto, gogoproto_gogo_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.MsgClearAdmin', null, global);
goog.exportSymbol('proto.cosmwasm.wasm.v1beta1.MsgClearAdminResponse', null, global);
goog.exportSymbol('proto.cosmwasm.wasm.v1beta1.MsgExecuteContract', null, global);
goog.exportSymbol('proto.cosmwasm.wasm.v1beta1.MsgExecuteContractResponse', null, global);
goog.exportSymbol('proto.cosmwasm.wasm.v1beta1.MsgInstantiateContract', null, global);
goog.exportSymbol('proto.cosmwasm.wasm.v1beta1.MsgInstantiateContractResponse', null, global);
goog.exportSymbol('proto.cosmwasm.wasm.v1beta1.MsgMigrateContract', null, global);
goog.exportSymbol('proto.cosmwasm.wasm.v1beta1.MsgMigrateContractResponse', null, global);
goog.exportSymbol('proto.cosmwasm.wasm.v1beta1.MsgStoreCode', null, global);
goog.exportSymbol('proto.cosmwasm.wasm.v1beta1.MsgStoreCodeResponse', null, global);
goog.exportSymbol('proto.cosmwasm.wasm.v1beta1.MsgUpdateAdmin', null, global);
goog.exportSymbol('proto.cosmwasm.wasm.v1beta1.MsgUpdateAdminResponse', 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.MsgStoreCode = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.cosmwasm.wasm.v1beta1.MsgStoreCode, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cosmwasm.wasm.v1beta1.MsgStoreCode.displayName = 'proto.cosmwasm.wasm.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.cosmwasm.wasm.v1beta1.MsgStoreCodeResponse = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.cosmwasm.wasm.v1beta1.MsgStoreCodeResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cosmwasm.wasm.v1beta1.MsgStoreCodeResponse.displayName = 'proto.cosmwasm.wasm.v1beta1.MsgStoreCodeResponse';
}
/**
* 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.MsgInstantiateContract = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmwasm.wasm.v1beta1.MsgInstantiateContract.repeatedFields_, null);
};
goog.inherits(proto.cosmwasm.wasm.v1beta1.MsgInstantiateContract, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cosmwasm.wasm.v1beta1.MsgInstantiateContract.displayName = 'proto.cosmwasm.wasm.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.cosmwasm.wasm.v1beta1.MsgInstantiateContractResponse = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.cosmwasm.wasm.v1beta1.MsgInstantiateContractResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cosmwasm.wasm.v1beta1.MsgInstantiateContractResponse.displayName = 'proto.cosmwasm.wasm.v1beta1.MsgInstantiateContractResponse';
}
/**
* 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.MsgExecuteContract = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmwasm.wasm.v1beta1.MsgExecuteContract.repeatedFields_, null);
};
goog.inherits(proto.cosmwasm.wasm.v1beta1.MsgExecuteContract, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cosmwasm.wasm.v1beta1.MsgExecuteContract.displayName = 'proto.cosmwasm.wasm.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.cosmwasm.wasm.v1beta1.MsgExecuteContractResponse = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.cosmwasm.wasm.v1beta1.MsgExecuteContractResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cosmwasm.wasm.v1beta1.MsgExecuteContractResponse.displayName = 'proto.cosmwasm.wasm.v1beta1.MsgExecuteContractResponse';
}
/**
* 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.MsgMigrateContract = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.cosmwasm.wasm.v1beta1.MsgMigrateContract, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cosmwasm.wasm.v1beta1.MsgMigrateContract.displayName = 'proto.cosmwasm.wasm.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.cosmwasm.wasm.v1beta1.MsgMigrateContractResponse = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.cosmwasm.wasm.v1beta1.MsgMigrateContractResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cosmwasm.wasm.v1beta1.MsgMigrateContractResponse.displayName = 'proto.cosmwasm.wasm.v1beta1.MsgMigrateContractResponse';
}
/**
* 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.MsgUpdateAdmin = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.cosmwasm.wasm.v1beta1.MsgUpdateAdmin, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cosmwasm.wasm.v1beta1.MsgUpdateAdmin.displayName = 'proto.cosmwasm.wasm.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.cosmwasm.wasm.v1beta1.MsgUpdateAdminResponse = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.cosmwasm.wasm.v1beta1.MsgUpdateAdminResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cosmwasm.wasm.v1beta1.MsgUpdateAdminResponse.displayName = 'proto.cosmwasm.wasm.v1beta1.MsgUpdateAdminResponse';
}
/**
* 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.MsgClearAdmin = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.cosmwasm.wasm.v1beta1.MsgClearAdmin, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cosmwasm.wasm.v1beta1.MsgClearAdmin.displayName = 'proto.cosmwasm.wasm.v1beta1.MsgClearAdmin';
}
/**
* 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.MsgClearAdminResponse = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.cosmwasm.wasm.v1beta1.MsgClearAdminResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cosmwasm.wasm.v1beta1.MsgClearAdminResponse.displayName = 'proto.cosmwasm.wasm.v1beta1.MsgClearAdminResponse';
}
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.MsgStoreCode.prototype.toObject = function (opt_includeInstance) {
return proto.cosmwasm.wasm.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.cosmwasm.wasm.v1beta1.MsgStoreCode} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmwasm.wasm.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()) && 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.MsgStoreCode}
*/
proto.cosmwasm.wasm.v1beta1.MsgStoreCode.deserializeBinary = function (bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.cosmwasm.wasm.v1beta1.MsgStoreCode();
return proto.cosmwasm.wasm.v1beta1.MsgStoreCode.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.cosmwasm.wasm.v1beta1.MsgStoreCode} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.cosmwasm.wasm.v1beta1.MsgStoreCode}
*/
proto.cosmwasm.wasm.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 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.MsgStoreCode.prototype.serializeBinary = function () {
var writer = new jspb.BinaryWriter();
proto.cosmwasm.wasm.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.cosmwasm.wasm.v1beta1.MsgStoreCode} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmwasm.wasm.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, cosmwasm_wasm_v1beta1_types_pb.AccessConfig.serializeBinaryToWriter);
}
};
/**
* optional string sender = 1;
* @return {string}
*/
proto.cosmwasm.wasm.v1beta1.MsgStoreCode.prototype.getSender = function () {
return (
/** @type {string} */
jspb.Message.getFieldWithDefault(this, 1, "")
);
};
/**
* @param {string} value
* @return {!proto.cosmwasm.wasm.v1beta1.MsgStoreCode} returns this
*/
proto.cosmwasm.wasm.v1beta1.MsgStoreCode.prototype.setSender = function (value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional bytes wasm_byte_code = 2;
* @return {!(string|Uint8Array)}
*/
proto.cosmwasm.wasm.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.cosmwasm.wasm.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.cosmwasm.wasm.v1beta1.MsgStoreCode.prototype.getWasmByteCode_asU8 = function () {
return (
/** @type {!Uint8Array} */
jspb.Message.bytesAsU8(this.getWasmByteCode())
);
};
/**
* @param {!(string|Uint8Array)} value
* @return {!proto.cosmwasm.wasm.v1beta1.MsgStoreCode} returns this
*/
proto.cosmwasm.wasm.v1beta1.MsgStoreCode.prototype.setWasmByteCode = function (value) {
return jspb.Message.setProto3BytesField(this, 2, value);
};
/**
* optional string source = 3;
* @return {string}
*/
proto.cosmwasm.wasm.v1beta1.MsgStoreCode.prototype.getSource = function () {
return (
/** @type {string} */
jspb.Message.getFieldWithDefault(this, 3, "")
);
};
/**
* @param {string} value
* @return {!proto.cosmwasm.wasm.v1beta1.MsgStoreCode} returns this
*/
proto.cosmwasm.wasm.v1beta1.MsgStoreCode.prototype.setSource = function (value) {
return jspb.Message.setProto3StringField(this, 3, value);
};
/**
* optional string builder = 4;
* @return {string}
*/
proto.cosmwasm.wasm.v1beta1.MsgStoreCode.prototype.getBuilder = function () {
return (
/** @type {string} */
jspb.Message.getFieldWithDefault(this, 4, "")
);
};
/**
* @param {string} value
* @return {!proto.cosmwasm.wasm.v1beta1.MsgStoreCode} returns this
*/
proto.cosmwasm.wasm.v1beta1.MsgStoreCode.prototype.setBuilder = function (value) {
return jspb.Message.setProto3StringField(this, 4, value);
};
/**
* optional AccessConfig instantiate_permission = 5;
* @return {?proto.cosmwasm.wasm.v1beta1.AccessConfig}
*/
proto.cosmwasm.wasm.v1beta1.MsgStoreCode.prototype.getInstantiatePermission = function () {
return (
/** @type{?proto.cosmwasm.wasm.v1beta1.AccessConfig} */
jspb.Message.getWrapperField(this, cosmwasm_wasm_v1beta1_types_pb.AccessConfig, 5)
);
};
/**
* @param {?proto.cosmwasm.wasm.v1beta1.AccessConfig|undefined} value
* @return {!proto.cosmwasm.wasm.v1beta1.MsgStoreCode} returns this
*/
proto.cosmwasm.wasm.v1beta1.MsgStoreCode.prototype.setInstantiatePermission = function (value) {
return jspb.Message.setWrapperField(this, 5, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.cosmwasm.wasm.v1beta1.MsgStoreCode} returns this
*/
proto.cosmwasm.wasm.v1beta1.MsgStoreCode.prototype.clearInstantiatePermission = function () {
return this.setInstantiatePermission(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.cosmwasm.wasm.v1beta1.MsgStoreCode.prototype.hasInstantiatePermission = function () {
return jspb.Message.getField(this, 5) != null;
};
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.MsgStoreCodeResponse.prototype.toObject = function (opt_includeInstance) {
return proto.cosmwasm.wasm.v1beta1.MsgStoreCodeResponse.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.MsgStoreCodeResponse} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmwasm.wasm.v1beta1.MsgStoreCodeResponse.toObject = function (includeInstance, msg) {
var f,
obj = {
codeId: jspb.Message.getFieldWithDefault(msg, 1, 0)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.cosmwasm.wasm.v1beta1.MsgStoreCodeResponse}
*/
proto.cosmwasm.wasm.v1beta1.MsgStoreCodeResponse.deserializeBinary = function (bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.cosmwasm.wasm.v1beta1.MsgStoreCodeResponse();
return proto.cosmwasm.wasm.v1beta1.MsgStoreCodeResponse.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.cosmwasm.wasm.v1beta1.MsgStoreCodeResponse} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.cosmwasm.wasm.v1beta1.MsgStoreCodeResponse}
*/
proto.cosmwasm.wasm.v1beta1.MsgStoreCodeResponse.deserializeBinaryFromReader = function (msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value =
/** @type {number} */
reader.readUint64();
msg.setCodeId(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.cosmwasm.wasm.v1beta1.MsgStoreCodeResponse.prototype.serializeBinary = function () {
var writer = new jspb.BinaryWriter();
proto.cosmwasm.wasm.v1beta1.MsgStoreCodeResponse.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.MsgStoreCodeResponse} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmwasm.wasm.v1beta1.MsgStoreCodeResponse.serializeBinaryToWriter = function (message, writer) {
var f = undefined;
f = message.getCodeId();
if (f !== 0) {
writer.writeUint64(1, f);
}
};
/**
* optional uint64 code_id = 1;
* @return {number}
*/
proto.cosmwasm.wasm.v1beta1.MsgStoreCodeResponse.prototype.getCodeId = function () {
return (
/** @type {number} */
jspb.Message.getFieldWithDefault(this, 1, 0)
);
};
/**
* @param {number} value
* @return {!proto.cosmwasm.wasm.v1beta1.MsgStoreCodeResponse} returns this
*/
proto.cosmwasm.wasm.v1beta1.MsgStoreCodeResponse.prototype.setCodeId = function (value) {
return jspb.Message.setProto3IntField(this, 1, value);
};
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.cosmwasm.wasm.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.cosmwasm.wasm.v1beta1.MsgInstantiateContract.prototype.toObject = function (opt_includeInstance) {
return proto.cosmwasm.wasm.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.cosmwasm.wasm.v1beta1.MsgInstantiateContract} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmwasm.wasm.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(),
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.MsgInstantiateContract}
*/
proto.cosmwasm.wasm.v1beta1.MsgInstantiateContract.deserializeBinary = function (bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.cosmwasm.wasm.v1beta1.MsgInstantiateContract();
return proto.cosmwasm.wasm.v1beta1.MsgInstantiateContract.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.cosmwasm.wasm.v1beta1.MsgInstantiateContract} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.cosmwasm.wasm.v1beta1.MsgInstantiateContract}
*/
proto.cosmwasm.wasm.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.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.MsgInstantiateContract.prototype.serializeBinary = function () {
var writer = new jspb.BinaryWriter();
proto.cosmwasm.wasm.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.cosmwasm.wasm.v1beta1.MsgInstantiateContract} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmwasm.wasm.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.getFundsList();
if (f.length > 0) {
writer.writeRepeatedMessage(6, f, cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter);
}
};
/**
* optional string sender = 1;
* @return {string}
*/
proto.cosmwasm.wasm.v1beta1.MsgInstantiateContract.prototype.getSender = function () {
return (
/** @type {string} */
jspb.Message.getFieldWithDefault(this, 1, "")
);
};
/**
* @param {string} value
* @return {!proto.cosmwasm.wasm.v1beta1.MsgInstantiateContract} returns this
*/
proto.cosmwasm.wasm.v1beta1.MsgInstantiateContract.prototype.setSender = function (value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional string admin = 2;
* @return {string}
*/
proto.cosmwasm.wasm.v1beta1.MsgInstantiateContract.prototype.getAdmin = function () {
return (
/** @type {string} */
jspb.Message.getFieldWithDefault(this, 2, "")
);
};
/**
* @param {string} value
* @return {!proto.cosmwasm.wasm.v1beta1.MsgInstantiateContract} returns this
*/
proto.cosmwasm.wasm.v1beta1.MsgInstantiateContract.prototype.setAdmin = function (value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
/**
* optional uint64 code_id = 3;
* @return {number}
*/
proto.cosmwasm.wasm.v1beta1.MsgInstantiateContract.prototype.getCodeId = function () {
return (
/** @type {number} */
jspb.Message.getFieldWithDefault(this, 3, 0)
);
};
/**
* @param {number} value
* @return {!proto.cosmwasm.wasm.v1beta1.MsgInstantiateContract} returns this
*/
proto.cosmwasm.wasm.v1beta1.MsgInstantiateContract.prototype.setCodeId = function (value) {
return jspb.Message.setProto3IntField(this, 3, value);
};
/**
* optional string label = 4;
* @return {string}
*/
proto.cosmwasm.wasm.v1beta1.MsgInstantiateContract.prototype.getLabel = function () {
return (
/** @type {string} */
jspb.Message.getFieldWithDefault(this, 4, "")
);
};
/**
* @param {string} value
* @return {!proto.cosmwasm.wasm.v1beta1.MsgInstantiateContract} returns this
*/
proto.cosmwasm.wasm.v1beta1.MsgInstantiateContract.prototype.setLabel = function (value) {
return jspb.Message.setProto3StringField(this, 4, value);
};
/**
* optional bytes init_msg = 5;
* @return {!(string|Uint8Array)}
*/
proto.cosmwasm.wasm.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.cosmwasm.wasm.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.cosmwasm.wasm.v1beta1.MsgInstantiateContract.prototype.getInitMsg_asU8 = function () {
return (
/** @type {!Uint8Array} */
jspb.Message.bytesAsU8(this.getInitMsg())
);
};
/**
* @param {!(string|Uint8Array)} value
* @return {!proto.cosmwasm.wasm.v1beta1.MsgInstantiateContract} returns this
*/
proto.cosmwasm.wasm.v1beta1.MsgInstantiateContract.prototype.setInitMsg = function (value) {
return jspb.Message.setProto3BytesField(this, 5, value);
};
/**
* repeated cosmos.base.v1beta1.Coin funds = 6;
* @return {!Array<!proto.cosmos.base.v1beta1.Coin>}
*/
proto.cosmwasm.wasm.v1beta1.MsgInstantiateContract.prototype.getFundsList = 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.cosmwasm.wasm.v1beta1.MsgInstantiateContract} returns this
*/
proto.cosmwasm.wasm.v1beta1.MsgInstantiateContract.prototype.setFundsList = 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.cosmwasm.wasm.v1beta1.MsgInstantiateContract.prototype.addFunds = 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.cosmwasm.wasm.v1beta1.MsgInstantiateContract} returns this
*/
proto.cosmwasm.wasm.v1beta1.MsgInstantiateContract.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.MsgInstantiateContractResponse.prototype.toObject = function (opt_includeInstance) {
return proto.cosmwasm.wasm.v1beta1.MsgInstantiateContractResponse.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.MsgInstantiateContractResponse} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmwasm.wasm.v1beta1.MsgInstantiateContractResponse.toObject = function (includeInstance, msg) {
var f,
obj = {
address: jspb.Message.getFieldWithDefault(msg, 1, ""),
data: msg.getData_asB64()
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.cosmwasm.wasm.v1beta1.MsgInstantiateContractResponse}
*/
proto.cosmwasm.wasm.v1beta1.MsgInstantiateContractResponse.deserializeBinary = function (bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.cosmwasm.wasm.v1beta1.MsgInstantiateContractResponse();
return proto.cosmwasm.wasm.v1beta1.MsgInstantiateContractResponse.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.cosmwasm.wasm.v1beta1.MsgInstantiateContractResponse} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.cosmwasm.wasm.v1beta1.MsgInstantiateContractResponse}
*/
proto.cosmwasm.wasm.v1beta1.MsgInstantiateContractResponse.deserializeBinaryFromReader = function (msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value =
/** @type {string} */
reader.readString();
msg.setAddress(value);
break;
case 2:
var value =
/** @type {!Uint8Array} */
reader.readBytes();
msg.setData(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.cosmwasm.wasm.v1beta1.MsgInstantiateContractResponse.prototype.serializeBinary = function () {
var writer = new jspb.BinaryWriter();
proto.cosmwasm.wasm.v1beta1.MsgInstantiateContractResponse.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.MsgInstantiateContractResponse} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmwasm.wasm.v1beta1.MsgInstantiateContractResponse.serializeBinaryToWriter = function (message, writer) {
var f = undefined;
f = message.getAddress();
if (f.length > 0) {
writer.writeString(1, f);
}
f = message.getData_asU8();
if (f.length > 0) {
writer.writeBytes(2, f);
}
};
/**
* optional string address = 1;
* @return {string}
*/
proto.cosmwasm.wasm.v1beta1.MsgInstantiateContractResponse.prototype.getAddress = function () {
return (
/** @type {string} */
jspb.Message.getFieldWithDefault(this, 1, "")
);
};
/**
* @param {string} value
* @return {!proto.cosmwasm.wasm.v1beta1.MsgInstantiateContractResponse} returns this
*/
proto.cosmwasm.wasm.v1beta1.MsgInstantiateContractResponse.prototype.setAddress = function (value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional bytes data = 2;
* @return {!(string|Uint8Array)}
*/
proto.cosmwasm.wasm.v1beta1.MsgInstantiateContractResponse.prototype.getData = function () {
return (
/** @type {!(string|Uint8Array)} */
jspb.Message.getFieldWithDefault(this, 2, "")
);
};
/**
* optional bytes data = 2;
* This is a type-conversion wrapper around `getData()`
* @return {string}
*/
proto.cosmwasm.wasm.v1beta1.MsgInstantiateContractResponse.prototype.getData_asB64 = function () {
return (
/** @type {string} */
jspb.Message.bytesAsB64(this.getData())
);
};
/**
* optional bytes data = 2;
* Note that Uint8Array is not supported on all browsers.
* @see http://caniuse.com/Uint8Array
* This is a type-conversion wrapper around `getData()`
* @return {!Uint8Array}
*/
proto.cosmwasm.wasm.v1beta1.MsgInstantiateContractResponse.prototype.getData_asU8 = function () {
return (
/** @type {!Uint8Array} */
jspb.Message.bytesAsU8(this.getData())
);
};
/**
* @param {!(string|Uint8Array)} value
* @return {!proto.cosmwasm.wasm.v1beta1.MsgInstantiateContractResponse} returns this
*/
proto.cosmwasm.wasm.v1beta1.MsgInstantiateContractResponse.prototype.setData = function (value) {
return jspb.Message.setProto3BytesField(this, 2, value);
};
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.cosmwasm.wasm.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.cosmwasm.wasm.v1beta1.MsgExecuteContract.prototype.toObject = function (opt_includeInstance) {
return proto.cosmwasm.wasm.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.cosmwasm.wasm.v1beta1.MsgExecuteContract} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmwasm.wasm.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(),
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.MsgExecuteContract}
*/
proto.cosmwasm.wasm.v1beta1.MsgExecuteContract.deserializeBinary = function (bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.cosmwasm.wasm.v1beta1.MsgExecuteContract();
return proto.cosmwasm.wasm.v1beta1.MsgExecuteContract.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.cosmwasm.wasm.v1beta1.MsgExecuteContract} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.cosmwasm.wasm.v1beta1.MsgExecuteContract}
*/
proto.cosmwasm.wasm.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.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.MsgExecuteContract.prototype.serializeBinary = function () {
var writer = new jspb.BinaryWriter();
proto.cosmwasm.wasm.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.cosmwasm.wasm.v1beta1.MsgExecuteContract} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmwasm.wasm.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.getFundsList();
if (f.length > 0) {
writer.writeRepeatedMessage(5, f, cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter);
}
};
/**
* optional string sender = 1;
* @return {string}
*/
proto.cosmwasm.wasm.v1beta1.MsgExecuteContract.prototype.getSender = function () {
return (
/** @type {string} */
jspb.Message.getFieldWithDefault(this, 1, "")
);
};
/**
* @param {string} value
* @return {!proto.cosmwasm.wasm.v1beta1.MsgExecuteContract} returns this
*/
proto.cosmwasm.wasm.v1beta1.MsgExecuteContract.prototype.setSender = function (value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional string contract = 2;
* @return {string}
*/
proto.cosmwasm.wasm.v1beta1.MsgExecuteContract.prototype.getContract = function () {
return (
/** @type {string} */
jspb.Message.getFieldWithDefault(this, 2, "")
);
};
/**
* @param {string} value
* @return {!proto.cosmwasm.wasm.v1beta1.MsgExecuteContract} returns this
*/
proto.cosmwasm.wasm.v1beta1.MsgExecuteContract.prototype.setContract = function (value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
/**
* optional bytes msg = 3;
* @return {!(string|Uint8Array)}
*/
proto.cosmwasm.wasm.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.cosmwasm.wasm.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.cosmwasm.wasm.v1beta1.MsgExecuteContract.prototype.getMsg_asU8 = function () {
return (
/** @type {!Uint8Array} */
jspb.Message.bytesAsU8(this.getMsg())
);
};
/**
* @param {!(string|Uint8Array)} value
* @return {!proto.cosmwasm.wasm.v1beta1.MsgExecuteContract} returns this
*/
proto.cosmwasm.wasm.v1beta1.MsgExecuteContract.prototype.setMsg = function (value) {
return jspb.Message.setProto3BytesField(this, 3, value);
};
/**
* repeated cosmos.base.v1beta1.Coin funds = 5;
* @return {!Array<!proto.cosmos.base.v1beta1.Coin>}
*/
proto.cosmwasm.wasm.v1beta1.MsgExecuteContract.prototype.getFundsList = 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.cosmwasm.wasm.v1beta1.MsgExecuteContract} returns this
*/
proto.cosmwasm.wasm.v1beta1.MsgExecuteContract.prototype.setFundsList = 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.cosmwasm.wasm.v1beta1.MsgExecuteContract.prototype.addFunds = 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.cosmwasm.wasm.v1beta1.MsgExecuteContract} returns this
*/
proto.cosmwasm.wasm.v1beta1.MsgExecuteContract.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:
*