@provenanceio/wallet-utils
Version:
Typescript Utilities for Provenance Blockchain Wallet
1,557 lines (1,272 loc) • 48.6 kB
JavaScript
"use strict";
// source: cosmwasm/wasm/v1beta1/genesis.proto
/**
* @fileoverview
* @enhanceable
* @suppress {missingRequire} reports error on implicit type usages.
* @suppress {messageConventions} JS Compiler reports an error if a variable or
* field starts with 'MSG_' and isn't a translatable message.
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
/* eslint-disable */
// @ts-nocheck
var jspb = require('google-protobuf');
var goog = jspb;
var global = function () {
return this || window || global || self || Function('return this')();
}.call(null);
var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js');
goog.object.extend(proto, gogoproto_gogo_pb);
var cosmwasm_wasm_v1beta1_types_pb = require('../../../cosmwasm/wasm/v1beta1/types_pb.js');
goog.object.extend(proto, cosmwasm_wasm_v1beta1_types_pb);
var cosmwasm_wasm_v1beta1_tx_pb = require('../../../cosmwasm/wasm/v1beta1/tx_pb.js');
goog.object.extend(proto, cosmwasm_wasm_v1beta1_tx_pb);
goog.exportSymbol('proto.cosmwasm.wasm.v1beta1.Code', null, global);
goog.exportSymbol('proto.cosmwasm.wasm.v1beta1.Contract', null, global);
goog.exportSymbol('proto.cosmwasm.wasm.v1beta1.GenesisState', null, global);
goog.exportSymbol('proto.cosmwasm.wasm.v1beta1.GenesisState.GenMsgs', null, global);
goog.exportSymbol('proto.cosmwasm.wasm.v1beta1.GenesisState.GenMsgs.SumCase', null, global);
goog.exportSymbol('proto.cosmwasm.wasm.v1beta1.Sequence', 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.GenesisState = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmwasm.wasm.v1beta1.GenesisState.repeatedFields_, null);
};
goog.inherits(proto.cosmwasm.wasm.v1beta1.GenesisState, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cosmwasm.wasm.v1beta1.GenesisState.displayName = 'proto.cosmwasm.wasm.v1beta1.GenesisState';
}
/**
* 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.GenesisState.GenMsgs = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, proto.cosmwasm.wasm.v1beta1.GenesisState.GenMsgs.oneofGroups_);
};
goog.inherits(proto.cosmwasm.wasm.v1beta1.GenesisState.GenMsgs, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cosmwasm.wasm.v1beta1.GenesisState.GenMsgs.displayName = 'proto.cosmwasm.wasm.v1beta1.GenesisState.GenMsgs';
}
/**
* 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.Code = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.cosmwasm.wasm.v1beta1.Code, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cosmwasm.wasm.v1beta1.Code.displayName = 'proto.cosmwasm.wasm.v1beta1.Code';
}
/**
* 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.Contract = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmwasm.wasm.v1beta1.Contract.repeatedFields_, null);
};
goog.inherits(proto.cosmwasm.wasm.v1beta1.Contract, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cosmwasm.wasm.v1beta1.Contract.displayName = 'proto.cosmwasm.wasm.v1beta1.Contract';
}
/**
* 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.Sequence = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.cosmwasm.wasm.v1beta1.Sequence, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cosmwasm.wasm.v1beta1.Sequence.displayName = 'proto.cosmwasm.wasm.v1beta1.Sequence';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.cosmwasm.wasm.v1beta1.GenesisState.repeatedFields_ = [2, 3, 4, 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.GenesisState.prototype.toObject = function (opt_includeInstance) {
return proto.cosmwasm.wasm.v1beta1.GenesisState.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.GenesisState} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmwasm.wasm.v1beta1.GenesisState.toObject = function (includeInstance, msg) {
var f,
obj = {
params: (f = msg.getParams()) && cosmwasm_wasm_v1beta1_types_pb.Params.toObject(includeInstance, f),
codesList: jspb.Message.toObjectList(msg.getCodesList(), proto.cosmwasm.wasm.v1beta1.Code.toObject, includeInstance),
contractsList: jspb.Message.toObjectList(msg.getContractsList(), proto.cosmwasm.wasm.v1beta1.Contract.toObject, includeInstance),
sequencesList: jspb.Message.toObjectList(msg.getSequencesList(), proto.cosmwasm.wasm.v1beta1.Sequence.toObject, includeInstance),
genMsgsList: jspb.Message.toObjectList(msg.getGenMsgsList(), proto.cosmwasm.wasm.v1beta1.GenesisState.GenMsgs.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.GenesisState}
*/
proto.cosmwasm.wasm.v1beta1.GenesisState.deserializeBinary = function (bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.cosmwasm.wasm.v1beta1.GenesisState();
return proto.cosmwasm.wasm.v1beta1.GenesisState.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.cosmwasm.wasm.v1beta1.GenesisState} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.cosmwasm.wasm.v1beta1.GenesisState}
*/
proto.cosmwasm.wasm.v1beta1.GenesisState.deserializeBinaryFromReader = function (msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new cosmwasm_wasm_v1beta1_types_pb.Params();
reader.readMessage(value, cosmwasm_wasm_v1beta1_types_pb.Params.deserializeBinaryFromReader);
msg.setParams(value);
break;
case 2:
var value = new proto.cosmwasm.wasm.v1beta1.Code();
reader.readMessage(value, proto.cosmwasm.wasm.v1beta1.Code.deserializeBinaryFromReader);
msg.addCodes(value);
break;
case 3:
var value = new proto.cosmwasm.wasm.v1beta1.Contract();
reader.readMessage(value, proto.cosmwasm.wasm.v1beta1.Contract.deserializeBinaryFromReader);
msg.addContracts(value);
break;
case 4:
var value = new proto.cosmwasm.wasm.v1beta1.Sequence();
reader.readMessage(value, proto.cosmwasm.wasm.v1beta1.Sequence.deserializeBinaryFromReader);
msg.addSequences(value);
break;
case 5:
var value = new proto.cosmwasm.wasm.v1beta1.GenesisState.GenMsgs();
reader.readMessage(value, proto.cosmwasm.wasm.v1beta1.GenesisState.GenMsgs.deserializeBinaryFromReader);
msg.addGenMsgs(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.cosmwasm.wasm.v1beta1.GenesisState.prototype.serializeBinary = function () {
var writer = new jspb.BinaryWriter();
proto.cosmwasm.wasm.v1beta1.GenesisState.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.GenesisState} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmwasm.wasm.v1beta1.GenesisState.serializeBinaryToWriter = function (message, writer) {
var f = undefined;
f = message.getParams();
if (f != null) {
writer.writeMessage(1, f, cosmwasm_wasm_v1beta1_types_pb.Params.serializeBinaryToWriter);
}
f = message.getCodesList();
if (f.length > 0) {
writer.writeRepeatedMessage(2, f, proto.cosmwasm.wasm.v1beta1.Code.serializeBinaryToWriter);
}
f = message.getContractsList();
if (f.length > 0) {
writer.writeRepeatedMessage(3, f, proto.cosmwasm.wasm.v1beta1.Contract.serializeBinaryToWriter);
}
f = message.getSequencesList();
if (f.length > 0) {
writer.writeRepeatedMessage(4, f, proto.cosmwasm.wasm.v1beta1.Sequence.serializeBinaryToWriter);
}
f = message.getGenMsgsList();
if (f.length > 0) {
writer.writeRepeatedMessage(5, f, proto.cosmwasm.wasm.v1beta1.GenesisState.GenMsgs.serializeBinaryToWriter);
}
};
/**
* Oneof group definitions for this message. Each group defines the field
* numbers belonging to that group. When of these fields' value is set, all
* other fields in the group are cleared. During deserialization, if multiple
* fields are encountered for a group, only the last value seen will be kept.
* @private {!Array<!Array<number>>}
* @const
*/
proto.cosmwasm.wasm.v1beta1.GenesisState.GenMsgs.oneofGroups_ = [[1, 2, 3]];
/**
* @enum {number}
*/
proto.cosmwasm.wasm.v1beta1.GenesisState.GenMsgs.SumCase = {
SUM_NOT_SET: 0,
STORE_CODE: 1,
INSTANTIATE_CONTRACT: 2,
EXECUTE_CONTRACT: 3
};
/**
* @return {proto.cosmwasm.wasm.v1beta1.GenesisState.GenMsgs.SumCase}
*/
proto.cosmwasm.wasm.v1beta1.GenesisState.GenMsgs.prototype.getSumCase = function () {
return (
/** @type {proto.cosmwasm.wasm.v1beta1.GenesisState.GenMsgs.SumCase} */
jspb.Message.computeOneofCase(this, proto.cosmwasm.wasm.v1beta1.GenesisState.GenMsgs.oneofGroups_[0])
);
};
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.GenesisState.GenMsgs.prototype.toObject = function (opt_includeInstance) {
return proto.cosmwasm.wasm.v1beta1.GenesisState.GenMsgs.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.GenesisState.GenMsgs} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmwasm.wasm.v1beta1.GenesisState.GenMsgs.toObject = function (includeInstance, msg) {
var f,
obj = {
storeCode: (f = msg.getStoreCode()) && cosmwasm_wasm_v1beta1_tx_pb.MsgStoreCode.toObject(includeInstance, f),
instantiateContract: (f = msg.getInstantiateContract()) && cosmwasm_wasm_v1beta1_tx_pb.MsgInstantiateContract.toObject(includeInstance, f),
executeContract: (f = msg.getExecuteContract()) && cosmwasm_wasm_v1beta1_tx_pb.MsgExecuteContract.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.GenesisState.GenMsgs}
*/
proto.cosmwasm.wasm.v1beta1.GenesisState.GenMsgs.deserializeBinary = function (bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.cosmwasm.wasm.v1beta1.GenesisState.GenMsgs();
return proto.cosmwasm.wasm.v1beta1.GenesisState.GenMsgs.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.cosmwasm.wasm.v1beta1.GenesisState.GenMsgs} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.cosmwasm.wasm.v1beta1.GenesisState.GenMsgs}
*/
proto.cosmwasm.wasm.v1beta1.GenesisState.GenMsgs.deserializeBinaryFromReader = function (msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new cosmwasm_wasm_v1beta1_tx_pb.MsgStoreCode();
reader.readMessage(value, cosmwasm_wasm_v1beta1_tx_pb.MsgStoreCode.deserializeBinaryFromReader);
msg.setStoreCode(value);
break;
case 2:
var value = new cosmwasm_wasm_v1beta1_tx_pb.MsgInstantiateContract();
reader.readMessage(value, cosmwasm_wasm_v1beta1_tx_pb.MsgInstantiateContract.deserializeBinaryFromReader);
msg.setInstantiateContract(value);
break;
case 3:
var value = new cosmwasm_wasm_v1beta1_tx_pb.MsgExecuteContract();
reader.readMessage(value, cosmwasm_wasm_v1beta1_tx_pb.MsgExecuteContract.deserializeBinaryFromReader);
msg.setExecuteContract(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.cosmwasm.wasm.v1beta1.GenesisState.GenMsgs.prototype.serializeBinary = function () {
var writer = new jspb.BinaryWriter();
proto.cosmwasm.wasm.v1beta1.GenesisState.GenMsgs.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.GenesisState.GenMsgs} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmwasm.wasm.v1beta1.GenesisState.GenMsgs.serializeBinaryToWriter = function (message, writer) {
var f = undefined;
f = message.getStoreCode();
if (f != null) {
writer.writeMessage(1, f, cosmwasm_wasm_v1beta1_tx_pb.MsgStoreCode.serializeBinaryToWriter);
}
f = message.getInstantiateContract();
if (f != null) {
writer.writeMessage(2, f, cosmwasm_wasm_v1beta1_tx_pb.MsgInstantiateContract.serializeBinaryToWriter);
}
f = message.getExecuteContract();
if (f != null) {
writer.writeMessage(3, f, cosmwasm_wasm_v1beta1_tx_pb.MsgExecuteContract.serializeBinaryToWriter);
}
};
/**
* optional MsgStoreCode store_code = 1;
* @return {?proto.cosmwasm.wasm.v1beta1.MsgStoreCode}
*/
proto.cosmwasm.wasm.v1beta1.GenesisState.GenMsgs.prototype.getStoreCode = function () {
return (
/** @type{?proto.cosmwasm.wasm.v1beta1.MsgStoreCode} */
jspb.Message.getWrapperField(this, cosmwasm_wasm_v1beta1_tx_pb.MsgStoreCode, 1)
);
};
/**
* @param {?proto.cosmwasm.wasm.v1beta1.MsgStoreCode|undefined} value
* @return {!proto.cosmwasm.wasm.v1beta1.GenesisState.GenMsgs} returns this
*/
proto.cosmwasm.wasm.v1beta1.GenesisState.GenMsgs.prototype.setStoreCode = function (value) {
return jspb.Message.setOneofWrapperField(this, 1, proto.cosmwasm.wasm.v1beta1.GenesisState.GenMsgs.oneofGroups_[0], value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.cosmwasm.wasm.v1beta1.GenesisState.GenMsgs} returns this
*/
proto.cosmwasm.wasm.v1beta1.GenesisState.GenMsgs.prototype.clearStoreCode = function () {
return this.setStoreCode(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.cosmwasm.wasm.v1beta1.GenesisState.GenMsgs.prototype.hasStoreCode = function () {
return jspb.Message.getField(this, 1) != null;
};
/**
* optional MsgInstantiateContract instantiate_contract = 2;
* @return {?proto.cosmwasm.wasm.v1beta1.MsgInstantiateContract}
*/
proto.cosmwasm.wasm.v1beta1.GenesisState.GenMsgs.prototype.getInstantiateContract = function () {
return (
/** @type{?proto.cosmwasm.wasm.v1beta1.MsgInstantiateContract} */
jspb.Message.getWrapperField(this, cosmwasm_wasm_v1beta1_tx_pb.MsgInstantiateContract, 2)
);
};
/**
* @param {?proto.cosmwasm.wasm.v1beta1.MsgInstantiateContract|undefined} value
* @return {!proto.cosmwasm.wasm.v1beta1.GenesisState.GenMsgs} returns this
*/
proto.cosmwasm.wasm.v1beta1.GenesisState.GenMsgs.prototype.setInstantiateContract = function (value) {
return jspb.Message.setOneofWrapperField(this, 2, proto.cosmwasm.wasm.v1beta1.GenesisState.GenMsgs.oneofGroups_[0], value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.cosmwasm.wasm.v1beta1.GenesisState.GenMsgs} returns this
*/
proto.cosmwasm.wasm.v1beta1.GenesisState.GenMsgs.prototype.clearInstantiateContract = function () {
return this.setInstantiateContract(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.cosmwasm.wasm.v1beta1.GenesisState.GenMsgs.prototype.hasInstantiateContract = function () {
return jspb.Message.getField(this, 2) != null;
};
/**
* optional MsgExecuteContract execute_contract = 3;
* @return {?proto.cosmwasm.wasm.v1beta1.MsgExecuteContract}
*/
proto.cosmwasm.wasm.v1beta1.GenesisState.GenMsgs.prototype.getExecuteContract = function () {
return (
/** @type{?proto.cosmwasm.wasm.v1beta1.MsgExecuteContract} */
jspb.Message.getWrapperField(this, cosmwasm_wasm_v1beta1_tx_pb.MsgExecuteContract, 3)
);
};
/**
* @param {?proto.cosmwasm.wasm.v1beta1.MsgExecuteContract|undefined} value
* @return {!proto.cosmwasm.wasm.v1beta1.GenesisState.GenMsgs} returns this
*/
proto.cosmwasm.wasm.v1beta1.GenesisState.GenMsgs.prototype.setExecuteContract = function (value) {
return jspb.Message.setOneofWrapperField(this, 3, proto.cosmwasm.wasm.v1beta1.GenesisState.GenMsgs.oneofGroups_[0], value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.cosmwasm.wasm.v1beta1.GenesisState.GenMsgs} returns this
*/
proto.cosmwasm.wasm.v1beta1.GenesisState.GenMsgs.prototype.clearExecuteContract = function () {
return this.setExecuteContract(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.cosmwasm.wasm.v1beta1.GenesisState.GenMsgs.prototype.hasExecuteContract = function () {
return jspb.Message.getField(this, 3) != null;
};
/**
* optional Params params = 1;
* @return {?proto.cosmwasm.wasm.v1beta1.Params}
*/
proto.cosmwasm.wasm.v1beta1.GenesisState.prototype.getParams = function () {
return (
/** @type{?proto.cosmwasm.wasm.v1beta1.Params} */
jspb.Message.getWrapperField(this, cosmwasm_wasm_v1beta1_types_pb.Params, 1)
);
};
/**
* @param {?proto.cosmwasm.wasm.v1beta1.Params|undefined} value
* @return {!proto.cosmwasm.wasm.v1beta1.GenesisState} returns this
*/
proto.cosmwasm.wasm.v1beta1.GenesisState.prototype.setParams = function (value) {
return jspb.Message.setWrapperField(this, 1, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.cosmwasm.wasm.v1beta1.GenesisState} returns this
*/
proto.cosmwasm.wasm.v1beta1.GenesisState.prototype.clearParams = function () {
return this.setParams(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.cosmwasm.wasm.v1beta1.GenesisState.prototype.hasParams = function () {
return jspb.Message.getField(this, 1) != null;
};
/**
* repeated Code codes = 2;
* @return {!Array<!proto.cosmwasm.wasm.v1beta1.Code>}
*/
proto.cosmwasm.wasm.v1beta1.GenesisState.prototype.getCodesList = function () {
return (
/** @type{!Array<!proto.cosmwasm.wasm.v1beta1.Code>} */
jspb.Message.getRepeatedWrapperField(this, proto.cosmwasm.wasm.v1beta1.Code, 2)
);
};
/**
* @param {!Array<!proto.cosmwasm.wasm.v1beta1.Code>} value
* @return {!proto.cosmwasm.wasm.v1beta1.GenesisState} returns this
*/
proto.cosmwasm.wasm.v1beta1.GenesisState.prototype.setCodesList = function (value) {
return jspb.Message.setRepeatedWrapperField(this, 2, value);
};
/**
* @param {!proto.cosmwasm.wasm.v1beta1.Code=} opt_value
* @param {number=} opt_index
* @return {!proto.cosmwasm.wasm.v1beta1.Code}
*/
proto.cosmwasm.wasm.v1beta1.GenesisState.prototype.addCodes = function (opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.cosmwasm.wasm.v1beta1.Code, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.cosmwasm.wasm.v1beta1.GenesisState} returns this
*/
proto.cosmwasm.wasm.v1beta1.GenesisState.prototype.clearCodesList = function () {
return this.setCodesList([]);
};
/**
* repeated Contract contracts = 3;
* @return {!Array<!proto.cosmwasm.wasm.v1beta1.Contract>}
*/
proto.cosmwasm.wasm.v1beta1.GenesisState.prototype.getContractsList = function () {
return (
/** @type{!Array<!proto.cosmwasm.wasm.v1beta1.Contract>} */
jspb.Message.getRepeatedWrapperField(this, proto.cosmwasm.wasm.v1beta1.Contract, 3)
);
};
/**
* @param {!Array<!proto.cosmwasm.wasm.v1beta1.Contract>} value
* @return {!proto.cosmwasm.wasm.v1beta1.GenesisState} returns this
*/
proto.cosmwasm.wasm.v1beta1.GenesisState.prototype.setContractsList = function (value) {
return jspb.Message.setRepeatedWrapperField(this, 3, value);
};
/**
* @param {!proto.cosmwasm.wasm.v1beta1.Contract=} opt_value
* @param {number=} opt_index
* @return {!proto.cosmwasm.wasm.v1beta1.Contract}
*/
proto.cosmwasm.wasm.v1beta1.GenesisState.prototype.addContracts = function (opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.cosmwasm.wasm.v1beta1.Contract, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.cosmwasm.wasm.v1beta1.GenesisState} returns this
*/
proto.cosmwasm.wasm.v1beta1.GenesisState.prototype.clearContractsList = function () {
return this.setContractsList([]);
};
/**
* repeated Sequence sequences = 4;
* @return {!Array<!proto.cosmwasm.wasm.v1beta1.Sequence>}
*/
proto.cosmwasm.wasm.v1beta1.GenesisState.prototype.getSequencesList = function () {
return (
/** @type{!Array<!proto.cosmwasm.wasm.v1beta1.Sequence>} */
jspb.Message.getRepeatedWrapperField(this, proto.cosmwasm.wasm.v1beta1.Sequence, 4)
);
};
/**
* @param {!Array<!proto.cosmwasm.wasm.v1beta1.Sequence>} value
* @return {!proto.cosmwasm.wasm.v1beta1.GenesisState} returns this
*/
proto.cosmwasm.wasm.v1beta1.GenesisState.prototype.setSequencesList = function (value) {
return jspb.Message.setRepeatedWrapperField(this, 4, value);
};
/**
* @param {!proto.cosmwasm.wasm.v1beta1.Sequence=} opt_value
* @param {number=} opt_index
* @return {!proto.cosmwasm.wasm.v1beta1.Sequence}
*/
proto.cosmwasm.wasm.v1beta1.GenesisState.prototype.addSequences = function (opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.cosmwasm.wasm.v1beta1.Sequence, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.cosmwasm.wasm.v1beta1.GenesisState} returns this
*/
proto.cosmwasm.wasm.v1beta1.GenesisState.prototype.clearSequencesList = function () {
return this.setSequencesList([]);
};
/**
* repeated GenMsgs gen_msgs = 5;
* @return {!Array<!proto.cosmwasm.wasm.v1beta1.GenesisState.GenMsgs>}
*/
proto.cosmwasm.wasm.v1beta1.GenesisState.prototype.getGenMsgsList = function () {
return (
/** @type{!Array<!proto.cosmwasm.wasm.v1beta1.GenesisState.GenMsgs>} */
jspb.Message.getRepeatedWrapperField(this, proto.cosmwasm.wasm.v1beta1.GenesisState.GenMsgs, 5)
);
};
/**
* @param {!Array<!proto.cosmwasm.wasm.v1beta1.GenesisState.GenMsgs>} value
* @return {!proto.cosmwasm.wasm.v1beta1.GenesisState} returns this
*/
proto.cosmwasm.wasm.v1beta1.GenesisState.prototype.setGenMsgsList = function (value) {
return jspb.Message.setRepeatedWrapperField(this, 5, value);
};
/**
* @param {!proto.cosmwasm.wasm.v1beta1.GenesisState.GenMsgs=} opt_value
* @param {number=} opt_index
* @return {!proto.cosmwasm.wasm.v1beta1.GenesisState.GenMsgs}
*/
proto.cosmwasm.wasm.v1beta1.GenesisState.prototype.addGenMsgs = function (opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, proto.cosmwasm.wasm.v1beta1.GenesisState.GenMsgs, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.cosmwasm.wasm.v1beta1.GenesisState} returns this
*/
proto.cosmwasm.wasm.v1beta1.GenesisState.prototype.clearGenMsgsList = function () {
return this.setGenMsgsList([]);
};
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.Code.prototype.toObject = function (opt_includeInstance) {
return proto.cosmwasm.wasm.v1beta1.Code.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.Code} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmwasm.wasm.v1beta1.Code.toObject = function (includeInstance, msg) {
var f,
obj = {
codeId: jspb.Message.getFieldWithDefault(msg, 1, 0),
codeInfo: (f = msg.getCodeInfo()) && cosmwasm_wasm_v1beta1_types_pb.CodeInfo.toObject(includeInstance, f),
codeBytes: msg.getCodeBytes_asB64(),
pinned: jspb.Message.getBooleanFieldWithDefault(msg, 4, false)
};
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.Code}
*/
proto.cosmwasm.wasm.v1beta1.Code.deserializeBinary = function (bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.cosmwasm.wasm.v1beta1.Code();
return proto.cosmwasm.wasm.v1beta1.Code.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.cosmwasm.wasm.v1beta1.Code} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.cosmwasm.wasm.v1beta1.Code}
*/
proto.cosmwasm.wasm.v1beta1.Code.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;
case 2:
var value = new cosmwasm_wasm_v1beta1_types_pb.CodeInfo();
reader.readMessage(value, cosmwasm_wasm_v1beta1_types_pb.CodeInfo.deserializeBinaryFromReader);
msg.setCodeInfo(value);
break;
case 3:
var value =
/** @type {!Uint8Array} */
reader.readBytes();
msg.setCodeBytes(value);
break;
case 4:
var value =
/** @type {boolean} */
reader.readBool();
msg.setPinned(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.cosmwasm.wasm.v1beta1.Code.prototype.serializeBinary = function () {
var writer = new jspb.BinaryWriter();
proto.cosmwasm.wasm.v1beta1.Code.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.Code} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmwasm.wasm.v1beta1.Code.serializeBinaryToWriter = function (message, writer) {
var f = undefined;
f = message.getCodeId();
if (f !== 0) {
writer.writeUint64(1, f);
}
f = message.getCodeInfo();
if (f != null) {
writer.writeMessage(2, f, cosmwasm_wasm_v1beta1_types_pb.CodeInfo.serializeBinaryToWriter);
}
f = message.getCodeBytes_asU8();
if (f.length > 0) {
writer.writeBytes(3, f);
}
f = message.getPinned();
if (f) {
writer.writeBool(4, f);
}
};
/**
* optional uint64 code_id = 1;
* @return {number}
*/
proto.cosmwasm.wasm.v1beta1.Code.prototype.getCodeId = function () {
return (
/** @type {number} */
jspb.Message.getFieldWithDefault(this, 1, 0)
);
};
/**
* @param {number} value
* @return {!proto.cosmwasm.wasm.v1beta1.Code} returns this
*/
proto.cosmwasm.wasm.v1beta1.Code.prototype.setCodeId = function (value) {
return jspb.Message.setProto3IntField(this, 1, value);
};
/**
* optional CodeInfo code_info = 2;
* @return {?proto.cosmwasm.wasm.v1beta1.CodeInfo}
*/
proto.cosmwasm.wasm.v1beta1.Code.prototype.getCodeInfo = function () {
return (
/** @type{?proto.cosmwasm.wasm.v1beta1.CodeInfo} */
jspb.Message.getWrapperField(this, cosmwasm_wasm_v1beta1_types_pb.CodeInfo, 2)
);
};
/**
* @param {?proto.cosmwasm.wasm.v1beta1.CodeInfo|undefined} value
* @return {!proto.cosmwasm.wasm.v1beta1.Code} returns this
*/
proto.cosmwasm.wasm.v1beta1.Code.prototype.setCodeInfo = function (value) {
return jspb.Message.setWrapperField(this, 2, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.cosmwasm.wasm.v1beta1.Code} returns this
*/
proto.cosmwasm.wasm.v1beta1.Code.prototype.clearCodeInfo = function () {
return this.setCodeInfo(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.cosmwasm.wasm.v1beta1.Code.prototype.hasCodeInfo = function () {
return jspb.Message.getField(this, 2) != null;
};
/**
* optional bytes code_bytes = 3;
* @return {!(string|Uint8Array)}
*/
proto.cosmwasm.wasm.v1beta1.Code.prototype.getCodeBytes = function () {
return (
/** @type {!(string|Uint8Array)} */
jspb.Message.getFieldWithDefault(this, 3, "")
);
};
/**
* optional bytes code_bytes = 3;
* This is a type-conversion wrapper around `getCodeBytes()`
* @return {string}
*/
proto.cosmwasm.wasm.v1beta1.Code.prototype.getCodeBytes_asB64 = function () {
return (
/** @type {string} */
jspb.Message.bytesAsB64(this.getCodeBytes())
);
};
/**
* optional bytes code_bytes = 3;
* Note that Uint8Array is not supported on all browsers.
* @see http://caniuse.com/Uint8Array
* This is a type-conversion wrapper around `getCodeBytes()`
* @return {!Uint8Array}
*/
proto.cosmwasm.wasm.v1beta1.Code.prototype.getCodeBytes_asU8 = function () {
return (
/** @type {!Uint8Array} */
jspb.Message.bytesAsU8(this.getCodeBytes())
);
};
/**
* @param {!(string|Uint8Array)} value
* @return {!proto.cosmwasm.wasm.v1beta1.Code} returns this
*/
proto.cosmwasm.wasm.v1beta1.Code.prototype.setCodeBytes = function (value) {
return jspb.Message.setProto3BytesField(this, 3, value);
};
/**
* optional bool pinned = 4;
* @return {boolean}
*/
proto.cosmwasm.wasm.v1beta1.Code.prototype.getPinned = function () {
return (
/** @type {boolean} */
jspb.Message.getBooleanFieldWithDefault(this, 4, false)
);
};
/**
* @param {boolean} value
* @return {!proto.cosmwasm.wasm.v1beta1.Code} returns this
*/
proto.cosmwasm.wasm.v1beta1.Code.prototype.setPinned = function (value) {
return jspb.Message.setProto3BooleanField(this, 4, value);
};
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.cosmwasm.wasm.v1beta1.Contract.repeatedFields_ = [3];
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.Contract.prototype.toObject = function (opt_includeInstance) {
return proto.cosmwasm.wasm.v1beta1.Contract.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.Contract} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmwasm.wasm.v1beta1.Contract.toObject = function (includeInstance, msg) {
var f,
obj = {
contractAddress: jspb.Message.getFieldWithDefault(msg, 1, ""),
contractInfo: (f = msg.getContractInfo()) && cosmwasm_wasm_v1beta1_types_pb.ContractInfo.toObject(includeInstance, f),
contractStateList: jspb.Message.toObjectList(msg.getContractStateList(), cosmwasm_wasm_v1beta1_types_pb.Model.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.Contract}
*/
proto.cosmwasm.wasm.v1beta1.Contract.deserializeBinary = function (bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.cosmwasm.wasm.v1beta1.Contract();
return proto.cosmwasm.wasm.v1beta1.Contract.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.cosmwasm.wasm.v1beta1.Contract} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.cosmwasm.wasm.v1beta1.Contract}
*/
proto.cosmwasm.wasm.v1beta1.Contract.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.setContractAddress(value);
break;
case 2:
var value = new cosmwasm_wasm_v1beta1_types_pb.ContractInfo();
reader.readMessage(value, cosmwasm_wasm_v1beta1_types_pb.ContractInfo.deserializeBinaryFromReader);
msg.setContractInfo(value);
break;
case 3:
var value = new cosmwasm_wasm_v1beta1_types_pb.Model();
reader.readMessage(value, cosmwasm_wasm_v1beta1_types_pb.Model.deserializeBinaryFromReader);
msg.addContractState(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.cosmwasm.wasm.v1beta1.Contract.prototype.serializeBinary = function () {
var writer = new jspb.BinaryWriter();
proto.cosmwasm.wasm.v1beta1.Contract.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.Contract} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmwasm.wasm.v1beta1.Contract.serializeBinaryToWriter = function (message, writer) {
var f = undefined;
f = message.getContractAddress();
if (f.length > 0) {
writer.writeString(1, f);
}
f = message.getContractInfo();
if (f != null) {
writer.writeMessage(2, f, cosmwasm_wasm_v1beta1_types_pb.ContractInfo.serializeBinaryToWriter);
}
f = message.getContractStateList();
if (f.length > 0) {
writer.writeRepeatedMessage(3, f, cosmwasm_wasm_v1beta1_types_pb.Model.serializeBinaryToWriter);
}
};
/**
* optional string contract_address = 1;
* @return {string}
*/
proto.cosmwasm.wasm.v1beta1.Contract.prototype.getContractAddress = function () {
return (
/** @type {string} */
jspb.Message.getFieldWithDefault(this, 1, "")
);
};
/**
* @param {string} value
* @return {!proto.cosmwasm.wasm.v1beta1.Contract} returns this
*/
proto.cosmwasm.wasm.v1beta1.Contract.prototype.setContractAddress = function (value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional ContractInfo contract_info = 2;
* @return {?proto.cosmwasm.wasm.v1beta1.ContractInfo}
*/
proto.cosmwasm.wasm.v1beta1.Contract.prototype.getContractInfo = function () {
return (
/** @type{?proto.cosmwasm.wasm.v1beta1.ContractInfo} */
jspb.Message.getWrapperField(this, cosmwasm_wasm_v1beta1_types_pb.ContractInfo, 2)
);
};
/**
* @param {?proto.cosmwasm.wasm.v1beta1.ContractInfo|undefined} value
* @return {!proto.cosmwasm.wasm.v1beta1.Contract} returns this
*/
proto.cosmwasm.wasm.v1beta1.Contract.prototype.setContractInfo = function (value) {
return jspb.Message.setWrapperField(this, 2, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.cosmwasm.wasm.v1beta1.Contract} returns this
*/
proto.cosmwasm.wasm.v1beta1.Contract.prototype.clearContractInfo = function () {
return this.setContractInfo(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.cosmwasm.wasm.v1beta1.Contract.prototype.hasContractInfo = function () {
return jspb.Message.getField(this, 2) != null;
};
/**
* repeated Model contract_state = 3;
* @return {!Array<!proto.cosmwasm.wasm.v1beta1.Model>}
*/
proto.cosmwasm.wasm.v1beta1.Contract.prototype.getContractStateList = function () {
return (
/** @type{!Array<!proto.cosmwasm.wasm.v1beta1.Model>} */
jspb.Message.getRepeatedWrapperField(this, cosmwasm_wasm_v1beta1_types_pb.Model, 3)
);
};
/**
* @param {!Array<!proto.cosmwasm.wasm.v1beta1.Model>} value
* @return {!proto.cosmwasm.wasm.v1beta1.Contract} returns this
*/
proto.cosmwasm.wasm.v1beta1.Contract.prototype.setContractStateList = function (value) {
return jspb.Message.setRepeatedWrapperField(this, 3, value);
};
/**
* @param {!proto.cosmwasm.wasm.v1beta1.Model=} opt_value
* @param {number=} opt_index
* @return {!proto.cosmwasm.wasm.v1beta1.Model}
*/
proto.cosmwasm.wasm.v1beta1.Contract.prototype.addContractState = function (opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.cosmwasm.wasm.v1beta1.Model, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.cosmwasm.wasm.v1beta1.Contract} returns this
*/
proto.cosmwasm.wasm.v1beta1.Contract.prototype.clearContractStateList = function () {
return this.setContractStateList([]);
};
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.Sequence.prototype.toObject = function (opt_includeInstance) {
return proto.cosmwasm.wasm.v1beta1.Sequence.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.Sequence} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmwasm.wasm.v1beta1.Sequence.toObject = function (includeInstance, msg) {
var f,
obj = {
idKey: msg.getIdKey_asB64(),
value: jspb.Message.getFieldWithDefault(msg, 2, 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.Sequence}
*/
proto.cosmwasm.wasm.v1beta1.Sequence.deserializeBinary = function (bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.cosmwasm.wasm.v1beta1.Sequence();
return proto.cosmwasm.wasm.v1beta1.Sequence.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.cosmwasm.wasm.v1beta1.Sequence} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.cosmwasm.wasm.v1beta1.Sequence}
*/
proto.cosmwasm.wasm.v1beta1.Sequence.deserializeBinaryFromReader = function (msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value =
/** @type {!Uint8Array} */
reader.readBytes();
msg.setIdKey(value);
break;
case 2:
var value =
/** @type {number} */
reader.readUint64();
msg.setValue(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.cosmwasm.wasm.v1beta1.Sequence.prototype.serializeBinary = function () {
var writer = new jspb.BinaryWriter();
proto.cosmwasm.wasm.v1beta1.Sequence.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.Sequence} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmwasm.wasm.v1beta1.Sequence.serializeBinaryToWriter = function (message, writer) {
var f = undefined;
f = message.getIdKey_asU8();
if (f.length > 0) {
writer.writeBytes(1, f);
}
f = message.getValue();
if (f !== 0) {
writer.writeUint64(2, f);
}
};
/**
* optional bytes id_key = 1;
* @return {!(string|Uint8Array)}
*/
proto.cosmwasm.wasm.v1beta1.Sequence.prototype.getIdKey = function () {
return (
/** @type {!(string|Uint8Array)} */
jspb.Message.getFieldWithDefault(this, 1, "")
);
};
/**
* optional bytes id_key = 1;
* This is a type-conversion wrapper around `getIdKey()`
* @return {string}
*/
proto.cosmwasm.wasm.v1beta1.Sequence.prototype.getIdKey_asB64 = function () {
return (
/** @type {string} */
jspb.Message.bytesAsB64(this.getIdKey())
);
};
/**
* optional bytes id_key = 1;
* Note that Uint8Array is not supported on all browsers.
* @see http://caniuse.com/Uint8Array
* This is a type-conversion wrapper around `getIdKey()`
* @return {!Uint8Array}
*/
proto.cosmwasm.wasm.v1beta1.Sequence.prototype.getIdKey_asU8 = function () {
return (
/** @type {!Uint8Array} */
jspb.Message.bytesAsU8(this.getIdKey())
);
};
/**
* @param {!(string|Uint8Array)} value
* @return {!proto.cosmwasm.wasm.v1beta1.Sequence} returns this
*/
proto.cosmwasm.wasm.v1beta1.Sequence.prototype.setIdKey = function (value) {
return jspb.Message.setProto3BytesField(this, 1, value);
};
/**
* optional uint64 value = 2;
* @return {number}
*/
proto.cosmwasm.wasm.v1beta1.Sequence.prototype.getValue = function () {
return (
/** @type {number} */
jspb.Message.getFieldWithDefault(this, 2, 0)
);
};
/**
* @param {number} value
* @return {!proto.cosmwasm.wasm.v1beta1.Sequence} returns this
*/
proto.cosmwasm.wasm.v1beta1.Sequence.prototype.setValue = function (value) {
return jspb.Message.setProto3IntField(this, 2, value);
};
goog.object.extend(exports, proto.cosmwasm.wasm.v1beta1);