@provenanceio/wallet-utils
Version:
Typescript Utilities for Provenance Blockchain Wallet
1,550 lines (1,280 loc) • 57 kB
JavaScript
"use strict";
// source: cosmwasm/wasm/v1/authz.proto
/**
* @fileoverview
* @enhanceable
* @suppress {missingRequire} reports error on implicit type usages.
* @suppress {messageConventions} JS Compiler reports an error if a variable or
* field starts with 'MSG_' and isn't a translatable message.
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
/* eslint-disable */
// @ts-nocheck
var jspb = require('google-protobuf');
var goog = jspb;
var global = function () {
return this || window || global || self || Function('return this')();
}.call(null);
var gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js');
goog.object.extend(proto, gogoproto_gogo_pb);
var cosmos_proto_cosmos_pb = require('../../../cosmos_proto/cosmos_pb.js');
goog.object.extend(proto, cosmos_proto_cosmos_pb);
var cosmos_base_v1beta1_coin_pb = require('../../../cosmos/base/v1beta1/coin_pb.js');
goog.object.extend(proto, cosmos_base_v1beta1_coin_pb);
var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js');
goog.object.extend(proto, google_protobuf_any_pb);
goog.exportSymbol('proto.cosmwasm.wasm.v1.AcceptedMessageKeysFilter', null, global);
goog.exportSymbol('proto.cosmwasm.wasm.v1.AcceptedMessagesFilter', null, global);
goog.exportSymbol('proto.cosmwasm.wasm.v1.AllowAllMessagesFilter', null, global);
goog.exportSymbol('proto.cosmwasm.wasm.v1.CombinedLimit', null, global);
goog.exportSymbol('proto.cosmwasm.wasm.v1.ContractExecutionAuthorization', null, global);
goog.exportSymbol('proto.cosmwasm.wasm.v1.ContractGrant', null, global);
goog.exportSymbol('proto.cosmwasm.wasm.v1.ContractMigrationAuthorization', null, global);
goog.exportSymbol('proto.cosmwasm.wasm.v1.MaxCallsLimit', null, global);
goog.exportSymbol('proto.cosmwasm.wasm.v1.MaxFundsLimit', 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.v1.ContractExecutionAuthorization = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmwasm.wasm.v1.ContractExecutionAuthorization.repeatedFields_, null);
};
goog.inherits(proto.cosmwasm.wasm.v1.ContractExecutionAuthorization, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cosmwasm.wasm.v1.ContractExecutionAuthorization.displayName = 'proto.cosmwasm.wasm.v1.ContractExecutionAuthorization';
}
/**
* 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.v1.ContractMigrationAuthorization = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmwasm.wasm.v1.ContractMigrationAuthorization.repeatedFields_, null);
};
goog.inherits(proto.cosmwasm.wasm.v1.ContractMigrationAuthorization, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cosmwasm.wasm.v1.ContractMigrationAuthorization.displayName = 'proto.cosmwasm.wasm.v1.ContractMigrationAuthorization';
}
/**
* 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.v1.ContractGrant = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.cosmwasm.wasm.v1.ContractGrant, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cosmwasm.wasm.v1.ContractGrant.displayName = 'proto.cosmwasm.wasm.v1.ContractGrant';
}
/**
* 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.v1.MaxCallsLimit = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.cosmwasm.wasm.v1.MaxCallsLimit, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cosmwasm.wasm.v1.MaxCallsLimit.displayName = 'proto.cosmwasm.wasm.v1.MaxCallsLimit';
}
/**
* 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.v1.MaxFundsLimit = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmwasm.wasm.v1.MaxFundsLimit.repeatedFields_, null);
};
goog.inherits(proto.cosmwasm.wasm.v1.MaxFundsLimit, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cosmwasm.wasm.v1.MaxFundsLimit.displayName = 'proto.cosmwasm.wasm.v1.MaxFundsLimit';
}
/**
* 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.v1.CombinedLimit = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmwasm.wasm.v1.CombinedLimit.repeatedFields_, null);
};
goog.inherits(proto.cosmwasm.wasm.v1.CombinedLimit, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cosmwasm.wasm.v1.CombinedLimit.displayName = 'proto.cosmwasm.wasm.v1.CombinedLimit';
}
/**
* 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.v1.AllowAllMessagesFilter = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.cosmwasm.wasm.v1.AllowAllMessagesFilter, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cosmwasm.wasm.v1.AllowAllMessagesFilter.displayName = 'proto.cosmwasm.wasm.v1.AllowAllMessagesFilter';
}
/**
* 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.v1.AcceptedMessageKeysFilter = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmwasm.wasm.v1.AcceptedMessageKeysFilter.repeatedFields_, null);
};
goog.inherits(proto.cosmwasm.wasm.v1.AcceptedMessageKeysFilter, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cosmwasm.wasm.v1.AcceptedMessageKeysFilter.displayName = 'proto.cosmwasm.wasm.v1.AcceptedMessageKeysFilter';
}
/**
* 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.v1.AcceptedMessagesFilter = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmwasm.wasm.v1.AcceptedMessagesFilter.repeatedFields_, null);
};
goog.inherits(proto.cosmwasm.wasm.v1.AcceptedMessagesFilter, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.cosmwasm.wasm.v1.AcceptedMessagesFilter.displayName = 'proto.cosmwasm.wasm.v1.AcceptedMessagesFilter';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.cosmwasm.wasm.v1.ContractExecutionAuthorization.repeatedFields_ = [1];
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.cosmwasm.wasm.v1.ContractExecutionAuthorization.prototype.toObject = function (opt_includeInstance) {
return proto.cosmwasm.wasm.v1.ContractExecutionAuthorization.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.v1.ContractExecutionAuthorization} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmwasm.wasm.v1.ContractExecutionAuthorization.toObject = function (includeInstance, msg) {
var f,
obj = {
grantsList: jspb.Message.toObjectList(msg.getGrantsList(), proto.cosmwasm.wasm.v1.ContractGrant.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.v1.ContractExecutionAuthorization}
*/
proto.cosmwasm.wasm.v1.ContractExecutionAuthorization.deserializeBinary = function (bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.cosmwasm.wasm.v1.ContractExecutionAuthorization();
return proto.cosmwasm.wasm.v1.ContractExecutionAuthorization.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.cosmwasm.wasm.v1.ContractExecutionAuthorization} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.cosmwasm.wasm.v1.ContractExecutionAuthorization}
*/
proto.cosmwasm.wasm.v1.ContractExecutionAuthorization.deserializeBinaryFromReader = function (msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new proto.cosmwasm.wasm.v1.ContractGrant();
reader.readMessage(value, proto.cosmwasm.wasm.v1.ContractGrant.deserializeBinaryFromReader);
msg.addGrants(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.cosmwasm.wasm.v1.ContractExecutionAuthorization.prototype.serializeBinary = function () {
var writer = new jspb.BinaryWriter();
proto.cosmwasm.wasm.v1.ContractExecutionAuthorization.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.v1.ContractExecutionAuthorization} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmwasm.wasm.v1.ContractExecutionAuthorization.serializeBinaryToWriter = function (message, writer) {
var f = undefined;
f = message.getGrantsList();
if (f.length > 0) {
writer.writeRepeatedMessage(1, f, proto.cosmwasm.wasm.v1.ContractGrant.serializeBinaryToWriter);
}
};
/**
* repeated ContractGrant grants = 1;
* @return {!Array<!proto.cosmwasm.wasm.v1.ContractGrant>}
*/
proto.cosmwasm.wasm.v1.ContractExecutionAuthorization.prototype.getGrantsList = function () {
return (
/** @type{!Array<!proto.cosmwasm.wasm.v1.ContractGrant>} */
jspb.Message.getRepeatedWrapperField(this, proto.cosmwasm.wasm.v1.ContractGrant, 1)
);
};
/**
* @param {!Array<!proto.cosmwasm.wasm.v1.ContractGrant>} value
* @return {!proto.cosmwasm.wasm.v1.ContractExecutionAuthorization} returns this
*/
proto.cosmwasm.wasm.v1.ContractExecutionAuthorization.prototype.setGrantsList = function (value) {
return jspb.Message.setRepeatedWrapperField(this, 1, value);
};
/**
* @param {!proto.cosmwasm.wasm.v1.ContractGrant=} opt_value
* @param {number=} opt_index
* @return {!proto.cosmwasm.wasm.v1.ContractGrant}
*/
proto.cosmwasm.wasm.v1.ContractExecutionAuthorization.prototype.addGrants = function (opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cosmwasm.wasm.v1.ContractGrant, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.cosmwasm.wasm.v1.ContractExecutionAuthorization} returns this
*/
proto.cosmwasm.wasm.v1.ContractExecutionAuthorization.prototype.clearGrantsList = function () {
return this.setGrantsList([]);
};
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.cosmwasm.wasm.v1.ContractMigrationAuthorization.repeatedFields_ = [1];
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.cosmwasm.wasm.v1.ContractMigrationAuthorization.prototype.toObject = function (opt_includeInstance) {
return proto.cosmwasm.wasm.v1.ContractMigrationAuthorization.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.v1.ContractMigrationAuthorization} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmwasm.wasm.v1.ContractMigrationAuthorization.toObject = function (includeInstance, msg) {
var f,
obj = {
grantsList: jspb.Message.toObjectList(msg.getGrantsList(), proto.cosmwasm.wasm.v1.ContractGrant.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.v1.ContractMigrationAuthorization}
*/
proto.cosmwasm.wasm.v1.ContractMigrationAuthorization.deserializeBinary = function (bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.cosmwasm.wasm.v1.ContractMigrationAuthorization();
return proto.cosmwasm.wasm.v1.ContractMigrationAuthorization.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.cosmwasm.wasm.v1.ContractMigrationAuthorization} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.cosmwasm.wasm.v1.ContractMigrationAuthorization}
*/
proto.cosmwasm.wasm.v1.ContractMigrationAuthorization.deserializeBinaryFromReader = function (msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new proto.cosmwasm.wasm.v1.ContractGrant();
reader.readMessage(value, proto.cosmwasm.wasm.v1.ContractGrant.deserializeBinaryFromReader);
msg.addGrants(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.cosmwasm.wasm.v1.ContractMigrationAuthorization.prototype.serializeBinary = function () {
var writer = new jspb.BinaryWriter();
proto.cosmwasm.wasm.v1.ContractMigrationAuthorization.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.v1.ContractMigrationAuthorization} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmwasm.wasm.v1.ContractMigrationAuthorization.serializeBinaryToWriter = function (message, writer) {
var f = undefined;
f = message.getGrantsList();
if (f.length > 0) {
writer.writeRepeatedMessage(1, f, proto.cosmwasm.wasm.v1.ContractGrant.serializeBinaryToWriter);
}
};
/**
* repeated ContractGrant grants = 1;
* @return {!Array<!proto.cosmwasm.wasm.v1.ContractGrant>}
*/
proto.cosmwasm.wasm.v1.ContractMigrationAuthorization.prototype.getGrantsList = function () {
return (
/** @type{!Array<!proto.cosmwasm.wasm.v1.ContractGrant>} */
jspb.Message.getRepeatedWrapperField(this, proto.cosmwasm.wasm.v1.ContractGrant, 1)
);
};
/**
* @param {!Array<!proto.cosmwasm.wasm.v1.ContractGrant>} value
* @return {!proto.cosmwasm.wasm.v1.ContractMigrationAuthorization} returns this
*/
proto.cosmwasm.wasm.v1.ContractMigrationAuthorization.prototype.setGrantsList = function (value) {
return jspb.Message.setRepeatedWrapperField(this, 1, value);
};
/**
* @param {!proto.cosmwasm.wasm.v1.ContractGrant=} opt_value
* @param {number=} opt_index
* @return {!proto.cosmwasm.wasm.v1.ContractGrant}
*/
proto.cosmwasm.wasm.v1.ContractMigrationAuthorization.prototype.addGrants = function (opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cosmwasm.wasm.v1.ContractGrant, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.cosmwasm.wasm.v1.ContractMigrationAuthorization} returns this
*/
proto.cosmwasm.wasm.v1.ContractMigrationAuthorization.prototype.clearGrantsList = function () {
return this.setGrantsList([]);
};
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.v1.ContractGrant.prototype.toObject = function (opt_includeInstance) {
return proto.cosmwasm.wasm.v1.ContractGrant.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.v1.ContractGrant} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmwasm.wasm.v1.ContractGrant.toObject = function (includeInstance, msg) {
var f,
obj = {
contract: jspb.Message.getFieldWithDefault(msg, 1, ""),
limit: (f = msg.getLimit()) && google_protobuf_any_pb.Any.toObject(includeInstance, f),
filter: (f = msg.getFilter()) && google_protobuf_any_pb.Any.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.v1.ContractGrant}
*/
proto.cosmwasm.wasm.v1.ContractGrant.deserializeBinary = function (bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.cosmwasm.wasm.v1.ContractGrant();
return proto.cosmwasm.wasm.v1.ContractGrant.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.cosmwasm.wasm.v1.ContractGrant} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.cosmwasm.wasm.v1.ContractGrant}
*/
proto.cosmwasm.wasm.v1.ContractGrant.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.setContract(value);
break;
case 2:
var value = new google_protobuf_any_pb.Any();
reader.readMessage(value, google_protobuf_any_pb.Any.deserializeBinaryFromReader);
msg.setLimit(value);
break;
case 3:
var value = new google_protobuf_any_pb.Any();
reader.readMessage(value, google_protobuf_any_pb.Any.deserializeBinaryFromReader);
msg.setFilter(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.cosmwasm.wasm.v1.ContractGrant.prototype.serializeBinary = function () {
var writer = new jspb.BinaryWriter();
proto.cosmwasm.wasm.v1.ContractGrant.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.v1.ContractGrant} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmwasm.wasm.v1.ContractGrant.serializeBinaryToWriter = function (message, writer) {
var f = undefined;
f = message.getContract();
if (f.length > 0) {
writer.writeString(1, f);
}
f = message.getLimit();
if (f != null) {
writer.writeMessage(2, f, google_protobuf_any_pb.Any.serializeBinaryToWriter);
}
f = message.getFilter();
if (f != null) {
writer.writeMessage(3, f, google_protobuf_any_pb.Any.serializeBinaryToWriter);
}
};
/**
* optional string contract = 1;
* @return {string}
*/
proto.cosmwasm.wasm.v1.ContractGrant.prototype.getContract = function () {
return (
/** @type {string} */
jspb.Message.getFieldWithDefault(this, 1, "")
);
};
/**
* @param {string} value
* @return {!proto.cosmwasm.wasm.v1.ContractGrant} returns this
*/
proto.cosmwasm.wasm.v1.ContractGrant.prototype.setContract = function (value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional google.protobuf.Any limit = 2;
* @return {?proto.google.protobuf.Any}
*/
proto.cosmwasm.wasm.v1.ContractGrant.prototype.getLimit = function () {
return (
/** @type{?proto.google.protobuf.Any} */
jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 2)
);
};
/**
* @param {?proto.google.protobuf.Any|undefined} value
* @return {!proto.cosmwasm.wasm.v1.ContractGrant} returns this
*/
proto.cosmwasm.wasm.v1.ContractGrant.prototype.setLimit = function (value) {
return jspb.Message.setWrapperField(this, 2, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.cosmwasm.wasm.v1.ContractGrant} returns this
*/
proto.cosmwasm.wasm.v1.ContractGrant.prototype.clearLimit = function () {
return this.setLimit(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.cosmwasm.wasm.v1.ContractGrant.prototype.hasLimit = function () {
return jspb.Message.getField(this, 2) != null;
};
/**
* optional google.protobuf.Any filter = 3;
* @return {?proto.google.protobuf.Any}
*/
proto.cosmwasm.wasm.v1.ContractGrant.prototype.getFilter = function () {
return (
/** @type{?proto.google.protobuf.Any} */
jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 3)
);
};
/**
* @param {?proto.google.protobuf.Any|undefined} value
* @return {!proto.cosmwasm.wasm.v1.ContractGrant} returns this
*/
proto.cosmwasm.wasm.v1.ContractGrant.prototype.setFilter = function (value) {
return jspb.Message.setWrapperField(this, 3, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.cosmwasm.wasm.v1.ContractGrant} returns this
*/
proto.cosmwasm.wasm.v1.ContractGrant.prototype.clearFilter = function () {
return this.setFilter(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.cosmwasm.wasm.v1.ContractGrant.prototype.hasFilter = function () {
return jspb.Message.getField(this, 3) != 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.v1.MaxCallsLimit.prototype.toObject = function (opt_includeInstance) {
return proto.cosmwasm.wasm.v1.MaxCallsLimit.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.v1.MaxCallsLimit} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmwasm.wasm.v1.MaxCallsLimit.toObject = function (includeInstance, msg) {
var f,
obj = {
remaining: 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.v1.MaxCallsLimit}
*/
proto.cosmwasm.wasm.v1.MaxCallsLimit.deserializeBinary = function (bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.cosmwasm.wasm.v1.MaxCallsLimit();
return proto.cosmwasm.wasm.v1.MaxCallsLimit.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.cosmwasm.wasm.v1.MaxCallsLimit} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.cosmwasm.wasm.v1.MaxCallsLimit}
*/
proto.cosmwasm.wasm.v1.MaxCallsLimit.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.setRemaining(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.cosmwasm.wasm.v1.MaxCallsLimit.prototype.serializeBinary = function () {
var writer = new jspb.BinaryWriter();
proto.cosmwasm.wasm.v1.MaxCallsLimit.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.v1.MaxCallsLimit} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmwasm.wasm.v1.MaxCallsLimit.serializeBinaryToWriter = function (message, writer) {
var f = undefined;
f = message.getRemaining();
if (f !== 0) {
writer.writeUint64(1, f);
}
};
/**
* optional uint64 remaining = 1;
* @return {number}
*/
proto.cosmwasm.wasm.v1.MaxCallsLimit.prototype.getRemaining = function () {
return (
/** @type {number} */
jspb.Message.getFieldWithDefault(this, 1, 0)
);
};
/**
* @param {number} value
* @return {!proto.cosmwasm.wasm.v1.MaxCallsLimit} returns this
*/
proto.cosmwasm.wasm.v1.MaxCallsLimit.prototype.setRemaining = function (value) {
return jspb.Message.setProto3IntField(this, 1, value);
};
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.cosmwasm.wasm.v1.MaxFundsLimit.repeatedFields_ = [1];
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.cosmwasm.wasm.v1.MaxFundsLimit.prototype.toObject = function (opt_includeInstance) {
return proto.cosmwasm.wasm.v1.MaxFundsLimit.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.v1.MaxFundsLimit} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmwasm.wasm.v1.MaxFundsLimit.toObject = function (includeInstance, msg) {
var f,
obj = {
amountsList: jspb.Message.toObjectList(msg.getAmountsList(), 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.v1.MaxFundsLimit}
*/
proto.cosmwasm.wasm.v1.MaxFundsLimit.deserializeBinary = function (bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.cosmwasm.wasm.v1.MaxFundsLimit();
return proto.cosmwasm.wasm.v1.MaxFundsLimit.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.cosmwasm.wasm.v1.MaxFundsLimit} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.cosmwasm.wasm.v1.MaxFundsLimit}
*/
proto.cosmwasm.wasm.v1.MaxFundsLimit.deserializeBinaryFromReader = function (msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new cosmos_base_v1beta1_coin_pb.Coin();
reader.readMessage(value, cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader);
msg.addAmounts(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.cosmwasm.wasm.v1.MaxFundsLimit.prototype.serializeBinary = function () {
var writer = new jspb.BinaryWriter();
proto.cosmwasm.wasm.v1.MaxFundsLimit.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.v1.MaxFundsLimit} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmwasm.wasm.v1.MaxFundsLimit.serializeBinaryToWriter = function (message, writer) {
var f = undefined;
f = message.getAmountsList();
if (f.length > 0) {
writer.writeRepeatedMessage(1, f, cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter);
}
};
/**
* repeated cosmos.base.v1beta1.Coin amounts = 1;
* @return {!Array<!proto.cosmos.base.v1beta1.Coin>}
*/
proto.cosmwasm.wasm.v1.MaxFundsLimit.prototype.getAmountsList = function () {
return (
/** @type{!Array<!proto.cosmos.base.v1beta1.Coin>} */
jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 1)
);
};
/**
* @param {!Array<!proto.cosmos.base.v1beta1.Coin>} value
* @return {!proto.cosmwasm.wasm.v1.MaxFundsLimit} returns this
*/
proto.cosmwasm.wasm.v1.MaxFundsLimit.prototype.setAmountsList = function (value) {
return jspb.Message.setRepeatedWrapperField(this, 1, value);
};
/**
* @param {!proto.cosmos.base.v1beta1.Coin=} opt_value
* @param {number=} opt_index
* @return {!proto.cosmos.base.v1beta1.Coin}
*/
proto.cosmwasm.wasm.v1.MaxFundsLimit.prototype.addAmounts = function (opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cosmos.base.v1beta1.Coin, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.cosmwasm.wasm.v1.MaxFundsLimit} returns this
*/
proto.cosmwasm.wasm.v1.MaxFundsLimit.prototype.clearAmountsList = function () {
return this.setAmountsList([]);
};
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.cosmwasm.wasm.v1.CombinedLimit.repeatedFields_ = [2];
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.v1.CombinedLimit.prototype.toObject = function (opt_includeInstance) {
return proto.cosmwasm.wasm.v1.CombinedLimit.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.v1.CombinedLimit} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmwasm.wasm.v1.CombinedLimit.toObject = function (includeInstance, msg) {
var f,
obj = {
callsRemaining: jspb.Message.getFieldWithDefault(msg, 1, 0),
amountsList: jspb.Message.toObjectList(msg.getAmountsList(), 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.v1.CombinedLimit}
*/
proto.cosmwasm.wasm.v1.CombinedLimit.deserializeBinary = function (bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.cosmwasm.wasm.v1.CombinedLimit();
return proto.cosmwasm.wasm.v1.CombinedLimit.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.cosmwasm.wasm.v1.CombinedLimit} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.cosmwasm.wasm.v1.CombinedLimit}
*/
proto.cosmwasm.wasm.v1.CombinedLimit.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.setCallsRemaining(value);
break;
case 2:
var value = new cosmos_base_v1beta1_coin_pb.Coin();
reader.readMessage(value, cosmos_base_v1beta1_coin_pb.Coin.deserializeBinaryFromReader);
msg.addAmounts(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.cosmwasm.wasm.v1.CombinedLimit.prototype.serializeBinary = function () {
var writer = new jspb.BinaryWriter();
proto.cosmwasm.wasm.v1.CombinedLimit.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.v1.CombinedLimit} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmwasm.wasm.v1.CombinedLimit.serializeBinaryToWriter = function (message, writer) {
var f = undefined;
f = message.getCallsRemaining();
if (f !== 0) {
writer.writeUint64(1, f);
}
f = message.getAmountsList();
if (f.length > 0) {
writer.writeRepeatedMessage(2, f, cosmos_base_v1beta1_coin_pb.Coin.serializeBinaryToWriter);
}
};
/**
* optional uint64 calls_remaining = 1;
* @return {number}
*/
proto.cosmwasm.wasm.v1.CombinedLimit.prototype.getCallsRemaining = function () {
return (
/** @type {number} */
jspb.Message.getFieldWithDefault(this, 1, 0)
);
};
/**
* @param {number} value
* @return {!proto.cosmwasm.wasm.v1.CombinedLimit} returns this
*/
proto.cosmwasm.wasm.v1.CombinedLimit.prototype.setCallsRemaining = function (value) {
return jspb.Message.setProto3IntField(this, 1, value);
};
/**
* repeated cosmos.base.v1beta1.Coin amounts = 2;
* @return {!Array<!proto.cosmos.base.v1beta1.Coin>}
*/
proto.cosmwasm.wasm.v1.CombinedLimit.prototype.getAmountsList = function () {
return (
/** @type{!Array<!proto.cosmos.base.v1beta1.Coin>} */
jspb.Message.getRepeatedWrapperField(this, cosmos_base_v1beta1_coin_pb.Coin, 2)
);
};
/**
* @param {!Array<!proto.cosmos.base.v1beta1.Coin>} value
* @return {!proto.cosmwasm.wasm.v1.CombinedLimit} returns this
*/
proto.cosmwasm.wasm.v1.CombinedLimit.prototype.setAmountsList = function (value) {
return jspb.Message.setRepeatedWrapperField(this, 2, value);
};
/**
* @param {!proto.cosmos.base.v1beta1.Coin=} opt_value
* @param {number=} opt_index
* @return {!proto.cosmos.base.v1beta1.Coin}
*/
proto.cosmwasm.wasm.v1.CombinedLimit.prototype.addAmounts = function (opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.cosmos.base.v1beta1.Coin, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.cosmwasm.wasm.v1.CombinedLimit} returns this
*/
proto.cosmwasm.wasm.v1.CombinedLimit.prototype.clearAmountsList = function () {
return this.setAmountsList([]);
};
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.v1.AllowAllMessagesFilter.prototype.toObject = function (opt_includeInstance) {
return proto.cosmwasm.wasm.v1.AllowAllMessagesFilter.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.v1.AllowAllMessagesFilter} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmwasm.wasm.v1.AllowAllMessagesFilter.toObject = function (includeInstance, msg) {
var f,
obj = {};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.cosmwasm.wasm.v1.AllowAllMessagesFilter}
*/
proto.cosmwasm.wasm.v1.AllowAllMessagesFilter.deserializeBinary = function (bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.cosmwasm.wasm.v1.AllowAllMessagesFilter();
return proto.cosmwasm.wasm.v1.AllowAllMessagesFilter.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.cosmwasm.wasm.v1.AllowAllMessagesFilter} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.cosmwasm.wasm.v1.AllowAllMessagesFilter}
*/
proto.cosmwasm.wasm.v1.AllowAllMessagesFilter.deserializeBinaryFromReader = function (msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.cosmwasm.wasm.v1.AllowAllMessagesFilter.prototype.serializeBinary = function () {
var writer = new jspb.BinaryWriter();
proto.cosmwasm.wasm.v1.AllowAllMessagesFilter.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.v1.AllowAllMessagesFilter} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmwasm.wasm.v1.AllowAllMessagesFilter.serializeBinaryToWriter = function (message, writer) {
var f = undefined;
};
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.cosmwasm.wasm.v1.AcceptedMessageKeysFilter.repeatedFields_ = [1];
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.cosmwasm.wasm.v1.AcceptedMessageKeysFilter.prototype.toObject = function (opt_includeInstance) {
return proto.cosmwasm.wasm.v1.AcceptedMessageKeysFilter.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.v1.AcceptedMessageKeysFilter} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmwasm.wasm.v1.AcceptedMessageKeysFilter.toObject = function (includeInstance, msg) {
var f,
obj = {
keysList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : 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.v1.AcceptedMessageKeysFilter}
*/
proto.cosmwasm.wasm.v1.AcceptedMessageKeysFilter.deserializeBinary = function (bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.cosmwasm.wasm.v1.AcceptedMessageKeysFilter();
return proto.cosmwasm.wasm.v1.AcceptedMessageKeysFilter.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.cosmwasm.wasm.v1.AcceptedMessageKeysFilter} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.cosmwasm.wasm.v1.AcceptedMessageKeysFilter}
*/
proto.cosmwasm.wasm.v1.AcceptedMessageKeysFilter.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.addKeys(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.cosmwasm.wasm.v1.AcceptedMessageKeysFilter.prototype.serializeBinary = function () {
var writer = new jspb.BinaryWriter();
proto.cosmwasm.wasm.v1.AcceptedMessageKeysFilter.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.v1.AcceptedMessageKeysFilter} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.cosmwasm.wasm.v1.AcceptedMessageKeysFilter.serializeBinaryToWriter = function (message, writer) {
var f = undefined;
f = message.getKeysList();
if (f.length > 0) {
writer.writeRepeatedString(1, f);
}
};
/**
* repeated string keys = 1;