mcps-sdk-js
Version:
MCPS JavaScript SDK
1,585 lines (1,373 loc) • 59.2 kB
JavaScript
// source: wasm/types.proto
/**
* @fileoverview
* @enhanceable
* @suppress {messageConventions} JS Compiler reports an error if a variable or
* field starts with 'MSG_' and isn't a translatable message.
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
var jspb = require('google-protobuf');
var goog = jspb;
var global = Function('return this')();
var gogoproto_gogo_pb = require('../gogoproto/gogo_pb.js');
goog.object.extend(proto, gogoproto_gogo_pb);
goog.exportSymbol('proto.wasmd.x.wasmd.v1beta1.AbsoluteTxPosition', null, global);
goog.exportSymbol('proto.wasmd.x.wasmd.v1beta1.AccessConfig', null, global);
goog.exportSymbol('proto.wasmd.x.wasmd.v1beta1.AccessType', null, global);
goog.exportSymbol('proto.wasmd.x.wasmd.v1beta1.AccessTypeParam', null, global);
goog.exportSymbol('proto.wasmd.x.wasmd.v1beta1.CodeInfo', null, global);
goog.exportSymbol('proto.wasmd.x.wasmd.v1beta1.ContractCodeHistoryEntry', null, global);
goog.exportSymbol('proto.wasmd.x.wasmd.v1beta1.ContractCodeHistoryOperationType', null, global);
goog.exportSymbol('proto.wasmd.x.wasmd.v1beta1.ContractInfo', null, global);
goog.exportSymbol('proto.wasmd.x.wasmd.v1beta1.Model', null, global);
goog.exportSymbol('proto.wasmd.x.wasmd.v1beta1.Params', null, global);
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.wasmd.x.wasmd.v1beta1.AccessTypeParam = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.wasmd.x.wasmd.v1beta1.AccessTypeParam, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.wasmd.x.wasmd.v1beta1.AccessTypeParam.displayName = 'proto.wasmd.x.wasmd.v1beta1.AccessTypeParam';
}
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.wasmd.x.wasmd.v1beta1.AccessConfig = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.wasmd.x.wasmd.v1beta1.AccessConfig, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.wasmd.x.wasmd.v1beta1.AccessConfig.displayName = 'proto.wasmd.x.wasmd.v1beta1.AccessConfig';
}
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.wasmd.x.wasmd.v1beta1.Params = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.wasmd.x.wasmd.v1beta1.Params, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.wasmd.x.wasmd.v1beta1.Params.displayName = 'proto.wasmd.x.wasmd.v1beta1.Params';
}
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.wasmd.x.wasmd.v1beta1.CodeInfo = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.wasmd.x.wasmd.v1beta1.CodeInfo, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.wasmd.x.wasmd.v1beta1.CodeInfo.displayName = 'proto.wasmd.x.wasmd.v1beta1.CodeInfo';
}
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.wasmd.x.wasmd.v1beta1.ContractInfo = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.wasmd.x.wasmd.v1beta1.ContractInfo, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.wasmd.x.wasmd.v1beta1.ContractInfo.displayName = 'proto.wasmd.x.wasmd.v1beta1.ContractInfo';
}
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.wasmd.x.wasmd.v1beta1.ContractCodeHistoryEntry = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.wasmd.x.wasmd.v1beta1.ContractCodeHistoryEntry, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.wasmd.x.wasmd.v1beta1.ContractCodeHistoryEntry.displayName = 'proto.wasmd.x.wasmd.v1beta1.ContractCodeHistoryEntry';
}
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.wasmd.x.wasmd.v1beta1.AbsoluteTxPosition = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.wasmd.x.wasmd.v1beta1.AbsoluteTxPosition, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.wasmd.x.wasmd.v1beta1.AbsoluteTxPosition.displayName = 'proto.wasmd.x.wasmd.v1beta1.AbsoluteTxPosition';
}
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.wasmd.x.wasmd.v1beta1.Model = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.wasmd.x.wasmd.v1beta1.Model, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.wasmd.x.wasmd.v1beta1.Model.displayName = 'proto.wasmd.x.wasmd.v1beta1.Model';
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.wasmd.x.wasmd.v1beta1.AccessTypeParam.prototype.toObject = function(opt_includeInstance) {
return proto.wasmd.x.wasmd.v1beta1.AccessTypeParam.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.wasmd.x.wasmd.v1beta1.AccessTypeParam} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.wasmd.x.wasmd.v1beta1.AccessTypeParam.toObject = function(includeInstance, msg) {
var f, obj = {
value: 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.wasmd.x.wasmd.v1beta1.AccessTypeParam}
*/
proto.wasmd.x.wasmd.v1beta1.AccessTypeParam.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.wasmd.x.wasmd.v1beta1.AccessTypeParam;
return proto.wasmd.x.wasmd.v1beta1.AccessTypeParam.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.wasmd.x.wasmd.v1beta1.AccessTypeParam} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.wasmd.x.wasmd.v1beta1.AccessTypeParam}
*/
proto.wasmd.x.wasmd.v1beta1.AccessTypeParam.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {!proto.wasmd.x.wasmd.v1beta1.AccessType} */ (reader.readEnum());
msg.setValue(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.wasmd.x.wasmd.v1beta1.AccessTypeParam.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.wasmd.x.wasmd.v1beta1.AccessTypeParam.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.wasmd.x.wasmd.v1beta1.AccessTypeParam} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.wasmd.x.wasmd.v1beta1.AccessTypeParam.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getValue();
if (f !== 0.0) {
writer.writeEnum(
1,
f
);
}
};
/**
* optional AccessType value = 1;
* @return {!proto.wasmd.x.wasmd.v1beta1.AccessType}
*/
proto.wasmd.x.wasmd.v1beta1.AccessTypeParam.prototype.getValue = function() {
return /** @type {!proto.wasmd.x.wasmd.v1beta1.AccessType} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};
/**
* @param {!proto.wasmd.x.wasmd.v1beta1.AccessType} value
* @return {!proto.wasmd.x.wasmd.v1beta1.AccessTypeParam} returns this
*/
proto.wasmd.x.wasmd.v1beta1.AccessTypeParam.prototype.setValue = function(value) {
return jspb.Message.setProto3EnumField(this, 1, value);
};
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.wasmd.x.wasmd.v1beta1.AccessConfig.prototype.toObject = function(opt_includeInstance) {
return proto.wasmd.x.wasmd.v1beta1.AccessConfig.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.wasmd.x.wasmd.v1beta1.AccessConfig} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.wasmd.x.wasmd.v1beta1.AccessConfig.toObject = function(includeInstance, msg) {
var f, obj = {
permission: jspb.Message.getFieldWithDefault(msg, 1, 0),
address: jspb.Message.getFieldWithDefault(msg, 2, "")
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.wasmd.x.wasmd.v1beta1.AccessConfig}
*/
proto.wasmd.x.wasmd.v1beta1.AccessConfig.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.wasmd.x.wasmd.v1beta1.AccessConfig;
return proto.wasmd.x.wasmd.v1beta1.AccessConfig.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.wasmd.x.wasmd.v1beta1.AccessConfig} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.wasmd.x.wasmd.v1beta1.AccessConfig}
*/
proto.wasmd.x.wasmd.v1beta1.AccessConfig.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {!proto.wasmd.x.wasmd.v1beta1.AccessType} */ (reader.readEnum());
msg.setPermission(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setAddress(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.wasmd.x.wasmd.v1beta1.AccessConfig.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.wasmd.x.wasmd.v1beta1.AccessConfig.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.wasmd.x.wasmd.v1beta1.AccessConfig} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.wasmd.x.wasmd.v1beta1.AccessConfig.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getPermission();
if (f !== 0.0) {
writer.writeEnum(
1,
f
);
}
f = message.getAddress();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
};
/**
* optional AccessType permission = 1;
* @return {!proto.wasmd.x.wasmd.v1beta1.AccessType}
*/
proto.wasmd.x.wasmd.v1beta1.AccessConfig.prototype.getPermission = function() {
return /** @type {!proto.wasmd.x.wasmd.v1beta1.AccessType} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};
/**
* @param {!proto.wasmd.x.wasmd.v1beta1.AccessType} value
* @return {!proto.wasmd.x.wasmd.v1beta1.AccessConfig} returns this
*/
proto.wasmd.x.wasmd.v1beta1.AccessConfig.prototype.setPermission = function(value) {
return jspb.Message.setProto3EnumField(this, 1, value);
};
/**
* optional string address = 2;
* @return {string}
*/
proto.wasmd.x.wasmd.v1beta1.AccessConfig.prototype.getAddress = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* @param {string} value
* @return {!proto.wasmd.x.wasmd.v1beta1.AccessConfig} returns this
*/
proto.wasmd.x.wasmd.v1beta1.AccessConfig.prototype.setAddress = function(value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.wasmd.x.wasmd.v1beta1.Params.prototype.toObject = function(opt_includeInstance) {
return proto.wasmd.x.wasmd.v1beta1.Params.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.wasmd.x.wasmd.v1beta1.Params} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.wasmd.x.wasmd.v1beta1.Params.toObject = function(includeInstance, msg) {
var f, obj = {
codeUploadAccess: (f = msg.getCodeUploadAccess()) && proto.wasmd.x.wasmd.v1beta1.AccessConfig.toObject(includeInstance, f),
instantiateDefaultPermission: jspb.Message.getFieldWithDefault(msg, 2, 0),
maxWasmCodeSize: jspb.Message.getFieldWithDefault(msg, 3, 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.wasmd.x.wasmd.v1beta1.Params}
*/
proto.wasmd.x.wasmd.v1beta1.Params.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.wasmd.x.wasmd.v1beta1.Params;
return proto.wasmd.x.wasmd.v1beta1.Params.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.wasmd.x.wasmd.v1beta1.Params} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.wasmd.x.wasmd.v1beta1.Params}
*/
proto.wasmd.x.wasmd.v1beta1.Params.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new proto.wasmd.x.wasmd.v1beta1.AccessConfig;
reader.readMessage(value,proto.wasmd.x.wasmd.v1beta1.AccessConfig.deserializeBinaryFromReader);
msg.setCodeUploadAccess(value);
break;
case 2:
var value = /** @type {!proto.wasmd.x.wasmd.v1beta1.AccessType} */ (reader.readEnum());
msg.setInstantiateDefaultPermission(value);
break;
case 3:
var value = /** @type {number} */ (reader.readUint64());
msg.setMaxWasmCodeSize(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.wasmd.x.wasmd.v1beta1.Params.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.wasmd.x.wasmd.v1beta1.Params.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.wasmd.x.wasmd.v1beta1.Params} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.wasmd.x.wasmd.v1beta1.Params.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getCodeUploadAccess();
if (f != null) {
writer.writeMessage(
1,
f,
proto.wasmd.x.wasmd.v1beta1.AccessConfig.serializeBinaryToWriter
);
}
f = message.getInstantiateDefaultPermission();
if (f !== 0.0) {
writer.writeEnum(
2,
f
);
}
f = message.getMaxWasmCodeSize();
if (f !== 0) {
writer.writeUint64(
3,
f
);
}
};
/**
* optional AccessConfig code_upload_access = 1;
* @return {?proto.wasmd.x.wasmd.v1beta1.AccessConfig}
*/
proto.wasmd.x.wasmd.v1beta1.Params.prototype.getCodeUploadAccess = function() {
return /** @type{?proto.wasmd.x.wasmd.v1beta1.AccessConfig} */ (
jspb.Message.getWrapperField(this, proto.wasmd.x.wasmd.v1beta1.AccessConfig, 1));
};
/**
* @param {?proto.wasmd.x.wasmd.v1beta1.AccessConfig|undefined} value
* @return {!proto.wasmd.x.wasmd.v1beta1.Params} returns this
*/
proto.wasmd.x.wasmd.v1beta1.Params.prototype.setCodeUploadAccess = function(value) {
return jspb.Message.setWrapperField(this, 1, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.wasmd.x.wasmd.v1beta1.Params} returns this
*/
proto.wasmd.x.wasmd.v1beta1.Params.prototype.clearCodeUploadAccess = function() {
return this.setCodeUploadAccess(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.wasmd.x.wasmd.v1beta1.Params.prototype.hasCodeUploadAccess = function() {
return jspb.Message.getField(this, 1) != null;
};
/**
* optional AccessType instantiate_default_permission = 2;
* @return {!proto.wasmd.x.wasmd.v1beta1.AccessType}
*/
proto.wasmd.x.wasmd.v1beta1.Params.prototype.getInstantiateDefaultPermission = function() {
return /** @type {!proto.wasmd.x.wasmd.v1beta1.AccessType} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
};
/**
* @param {!proto.wasmd.x.wasmd.v1beta1.AccessType} value
* @return {!proto.wasmd.x.wasmd.v1beta1.Params} returns this
*/
proto.wasmd.x.wasmd.v1beta1.Params.prototype.setInstantiateDefaultPermission = function(value) {
return jspb.Message.setProto3EnumField(this, 2, value);
};
/**
* optional uint64 max_wasm_code_size = 3;
* @return {number}
*/
proto.wasmd.x.wasmd.v1beta1.Params.prototype.getMaxWasmCodeSize = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
};
/**
* @param {number} value
* @return {!proto.wasmd.x.wasmd.v1beta1.Params} returns this
*/
proto.wasmd.x.wasmd.v1beta1.Params.prototype.setMaxWasmCodeSize = function(value) {
return jspb.Message.setProto3IntField(this, 3, value);
};
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.wasmd.x.wasmd.v1beta1.CodeInfo.prototype.toObject = function(opt_includeInstance) {
return proto.wasmd.x.wasmd.v1beta1.CodeInfo.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.wasmd.x.wasmd.v1beta1.CodeInfo} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.wasmd.x.wasmd.v1beta1.CodeInfo.toObject = function(includeInstance, msg) {
var f, obj = {
codeHash: msg.getCodeHash_asB64(),
creator: jspb.Message.getFieldWithDefault(msg, 2, ""),
source: jspb.Message.getFieldWithDefault(msg, 3, ""),
builder: jspb.Message.getFieldWithDefault(msg, 4, ""),
instantiateConfig: (f = msg.getInstantiateConfig()) && proto.wasmd.x.wasmd.v1beta1.AccessConfig.toObject(includeInstance, f)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.wasmd.x.wasmd.v1beta1.CodeInfo}
*/
proto.wasmd.x.wasmd.v1beta1.CodeInfo.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.wasmd.x.wasmd.v1beta1.CodeInfo;
return proto.wasmd.x.wasmd.v1beta1.CodeInfo.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.wasmd.x.wasmd.v1beta1.CodeInfo} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.wasmd.x.wasmd.v1beta1.CodeInfo}
*/
proto.wasmd.x.wasmd.v1beta1.CodeInfo.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.setCodeHash(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setCreator(value);
break;
case 3:
var value = /** @type {string} */ (reader.readString());
msg.setSource(value);
break;
case 4:
var value = /** @type {string} */ (reader.readString());
msg.setBuilder(value);
break;
case 5:
var value = new proto.wasmd.x.wasmd.v1beta1.AccessConfig;
reader.readMessage(value,proto.wasmd.x.wasmd.v1beta1.AccessConfig.deserializeBinaryFromReader);
msg.setInstantiateConfig(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.wasmd.x.wasmd.v1beta1.CodeInfo.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.wasmd.x.wasmd.v1beta1.CodeInfo.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.wasmd.x.wasmd.v1beta1.CodeInfo} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.wasmd.x.wasmd.v1beta1.CodeInfo.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getCodeHash_asU8();
if (f.length > 0) {
writer.writeBytes(
1,
f
);
}
f = message.getCreator();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
f = message.getSource();
if (f.length > 0) {
writer.writeString(
3,
f
);
}
f = message.getBuilder();
if (f.length > 0) {
writer.writeString(
4,
f
);
}
f = message.getInstantiateConfig();
if (f != null) {
writer.writeMessage(
5,
f,
proto.wasmd.x.wasmd.v1beta1.AccessConfig.serializeBinaryToWriter
);
}
};
/**
* optional bytes code_hash = 1;
* @return {!(string|Uint8Array)}
*/
proto.wasmd.x.wasmd.v1beta1.CodeInfo.prototype.getCodeHash = function() {
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* optional bytes code_hash = 1;
* This is a type-conversion wrapper around `getCodeHash()`
* @return {string}
*/
proto.wasmd.x.wasmd.v1beta1.CodeInfo.prototype.getCodeHash_asB64 = function() {
return /** @type {string} */ (jspb.Message.bytesAsB64(
this.getCodeHash()));
};
/**
* optional bytes code_hash = 1;
* Note that Uint8Array is not supported on all browsers.
* @see http://caniuse.com/Uint8Array
* This is a type-conversion wrapper around `getCodeHash()`
* @return {!Uint8Array}
*/
proto.wasmd.x.wasmd.v1beta1.CodeInfo.prototype.getCodeHash_asU8 = function() {
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
this.getCodeHash()));
};
/**
* @param {!(string|Uint8Array)} value
* @return {!proto.wasmd.x.wasmd.v1beta1.CodeInfo} returns this
*/
proto.wasmd.x.wasmd.v1beta1.CodeInfo.prototype.setCodeHash = function(value) {
return jspb.Message.setProto3BytesField(this, 1, value);
};
/**
* optional string creator = 2;
* @return {string}
*/
proto.wasmd.x.wasmd.v1beta1.CodeInfo.prototype.getCreator = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* @param {string} value
* @return {!proto.wasmd.x.wasmd.v1beta1.CodeInfo} returns this
*/
proto.wasmd.x.wasmd.v1beta1.CodeInfo.prototype.setCreator = function(value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
/**
* optional string source = 3;
* @return {string}
*/
proto.wasmd.x.wasmd.v1beta1.CodeInfo.prototype.getSource = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};
/**
* @param {string} value
* @return {!proto.wasmd.x.wasmd.v1beta1.CodeInfo} returns this
*/
proto.wasmd.x.wasmd.v1beta1.CodeInfo.prototype.setSource = function(value) {
return jspb.Message.setProto3StringField(this, 3, value);
};
/**
* optional string builder = 4;
* @return {string}
*/
proto.wasmd.x.wasmd.v1beta1.CodeInfo.prototype.getBuilder = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
};
/**
* @param {string} value
* @return {!proto.wasmd.x.wasmd.v1beta1.CodeInfo} returns this
*/
proto.wasmd.x.wasmd.v1beta1.CodeInfo.prototype.setBuilder = function(value) {
return jspb.Message.setProto3StringField(this, 4, value);
};
/**
* optional AccessConfig instantiate_config = 5;
* @return {?proto.wasmd.x.wasmd.v1beta1.AccessConfig}
*/
proto.wasmd.x.wasmd.v1beta1.CodeInfo.prototype.getInstantiateConfig = function() {
return /** @type{?proto.wasmd.x.wasmd.v1beta1.AccessConfig} */ (
jspb.Message.getWrapperField(this, proto.wasmd.x.wasmd.v1beta1.AccessConfig, 5));
};
/**
* @param {?proto.wasmd.x.wasmd.v1beta1.AccessConfig|undefined} value
* @return {!proto.wasmd.x.wasmd.v1beta1.CodeInfo} returns this
*/
proto.wasmd.x.wasmd.v1beta1.CodeInfo.prototype.setInstantiateConfig = function(value) {
return jspb.Message.setWrapperField(this, 5, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.wasmd.x.wasmd.v1beta1.CodeInfo} returns this
*/
proto.wasmd.x.wasmd.v1beta1.CodeInfo.prototype.clearInstantiateConfig = function() {
return this.setInstantiateConfig(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.wasmd.x.wasmd.v1beta1.CodeInfo.prototype.hasInstantiateConfig = function() {
return jspb.Message.getField(this, 5) != null;
};
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.wasmd.x.wasmd.v1beta1.ContractInfo.prototype.toObject = function(opt_includeInstance) {
return proto.wasmd.x.wasmd.v1beta1.ContractInfo.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.wasmd.x.wasmd.v1beta1.ContractInfo} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.wasmd.x.wasmd.v1beta1.ContractInfo.toObject = function(includeInstance, msg) {
var f, obj = {
codeId: jspb.Message.getFieldWithDefault(msg, 1, 0),
creator: jspb.Message.getFieldWithDefault(msg, 2, ""),
admin: jspb.Message.getFieldWithDefault(msg, 3, ""),
label: jspb.Message.getFieldWithDefault(msg, 4, ""),
created: (f = msg.getCreated()) && proto.wasmd.x.wasmd.v1beta1.AbsoluteTxPosition.toObject(includeInstance, f)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.wasmd.x.wasmd.v1beta1.ContractInfo}
*/
proto.wasmd.x.wasmd.v1beta1.ContractInfo.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.wasmd.x.wasmd.v1beta1.ContractInfo;
return proto.wasmd.x.wasmd.v1beta1.ContractInfo.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.wasmd.x.wasmd.v1beta1.ContractInfo} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.wasmd.x.wasmd.v1beta1.ContractInfo}
*/
proto.wasmd.x.wasmd.v1beta1.ContractInfo.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 = /** @type {string} */ (reader.readString());
msg.setCreator(value);
break;
case 3:
var value = /** @type {string} */ (reader.readString());
msg.setAdmin(value);
break;
case 4:
var value = /** @type {string} */ (reader.readString());
msg.setLabel(value);
break;
case 5:
var value = new proto.wasmd.x.wasmd.v1beta1.AbsoluteTxPosition;
reader.readMessage(value,proto.wasmd.x.wasmd.v1beta1.AbsoluteTxPosition.deserializeBinaryFromReader);
msg.setCreated(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.wasmd.x.wasmd.v1beta1.ContractInfo.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.wasmd.x.wasmd.v1beta1.ContractInfo.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.wasmd.x.wasmd.v1beta1.ContractInfo} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.wasmd.x.wasmd.v1beta1.ContractInfo.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getCodeId();
if (f !== 0) {
writer.writeUint64(
1,
f
);
}
f = message.getCreator();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
f = message.getAdmin();
if (f.length > 0) {
writer.writeString(
3,
f
);
}
f = message.getLabel();
if (f.length > 0) {
writer.writeString(
4,
f
);
}
f = message.getCreated();
if (f != null) {
writer.writeMessage(
5,
f,
proto.wasmd.x.wasmd.v1beta1.AbsoluteTxPosition.serializeBinaryToWriter
);
}
};
/**
* optional uint64 code_id = 1;
* @return {number}
*/
proto.wasmd.x.wasmd.v1beta1.ContractInfo.prototype.getCodeId = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};
/**
* @param {number} value
* @return {!proto.wasmd.x.wasmd.v1beta1.ContractInfo} returns this
*/
proto.wasmd.x.wasmd.v1beta1.ContractInfo.prototype.setCodeId = function(value) {
return jspb.Message.setProto3IntField(this, 1, value);
};
/**
* optional string creator = 2;
* @return {string}
*/
proto.wasmd.x.wasmd.v1beta1.ContractInfo.prototype.getCreator = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* @param {string} value
* @return {!proto.wasmd.x.wasmd.v1beta1.ContractInfo} returns this
*/
proto.wasmd.x.wasmd.v1beta1.ContractInfo.prototype.setCreator = function(value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
/**
* optional string admin = 3;
* @return {string}
*/
proto.wasmd.x.wasmd.v1beta1.ContractInfo.prototype.getAdmin = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};
/**
* @param {string} value
* @return {!proto.wasmd.x.wasmd.v1beta1.ContractInfo} returns this
*/
proto.wasmd.x.wasmd.v1beta1.ContractInfo.prototype.setAdmin = function(value) {
return jspb.Message.setProto3StringField(this, 3, value);
};
/**
* optional string label = 4;
* @return {string}
*/
proto.wasmd.x.wasmd.v1beta1.ContractInfo.prototype.getLabel = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
};
/**
* @param {string} value
* @return {!proto.wasmd.x.wasmd.v1beta1.ContractInfo} returns this
*/
proto.wasmd.x.wasmd.v1beta1.ContractInfo.prototype.setLabel = function(value) {
return jspb.Message.setProto3StringField(this, 4, value);
};
/**
* optional AbsoluteTxPosition created = 5;
* @return {?proto.wasmd.x.wasmd.v1beta1.AbsoluteTxPosition}
*/
proto.wasmd.x.wasmd.v1beta1.ContractInfo.prototype.getCreated = function() {
return /** @type{?proto.wasmd.x.wasmd.v1beta1.AbsoluteTxPosition} */ (
jspb.Message.getWrapperField(this, proto.wasmd.x.wasmd.v1beta1.AbsoluteTxPosition, 5));
};
/**
* @param {?proto.wasmd.x.wasmd.v1beta1.AbsoluteTxPosition|undefined} value
* @return {!proto.wasmd.x.wasmd.v1beta1.ContractInfo} returns this
*/
proto.wasmd.x.wasmd.v1beta1.ContractInfo.prototype.setCreated = function(value) {
return jspb.Message.setWrapperField(this, 5, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.wasmd.x.wasmd.v1beta1.ContractInfo} returns this
*/
proto.wasmd.x.wasmd.v1beta1.ContractInfo.prototype.clearCreated = function() {
return this.setCreated(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.wasmd.x.wasmd.v1beta1.ContractInfo.prototype.hasCreated = function() {
return jspb.Message.getField(this, 5) != null;
};
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.wasmd.x.wasmd.v1beta1.ContractCodeHistoryEntry.prototype.toObject = function(opt_includeInstance) {
return proto.wasmd.x.wasmd.v1beta1.ContractCodeHistoryEntry.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.wasmd.x.wasmd.v1beta1.ContractCodeHistoryEntry} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.wasmd.x.wasmd.v1beta1.ContractCodeHistoryEntry.toObject = function(includeInstance, msg) {
var f, obj = {
operation: jspb.Message.getFieldWithDefault(msg, 1, 0),
codeId: jspb.Message.getFieldWithDefault(msg, 2, 0),
updated: (f = msg.getUpdated()) && proto.wasmd.x.wasmd.v1beta1.AbsoluteTxPosition.toObject(includeInstance, f),
msg: msg.getMsg_asB64()
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.wasmd.x.wasmd.v1beta1.ContractCodeHistoryEntry}
*/
proto.wasmd.x.wasmd.v1beta1.ContractCodeHistoryEntry.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.wasmd.x.wasmd.v1beta1.ContractCodeHistoryEntry;
return proto.wasmd.x.wasmd.v1beta1.ContractCodeHistoryEntry.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.wasmd.x.wasmd.v1beta1.ContractCodeHistoryEntry} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.wasmd.x.wasmd.v1beta1.ContractCodeHistoryEntry}
*/
proto.wasmd.x.wasmd.v1beta1.ContractCodeHistoryEntry.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {!proto.wasmd.x.wasmd.v1beta1.ContractCodeHistoryOperationType} */ (reader.readEnum());
msg.setOperation(value);
break;
case 2:
var value = /** @type {number} */ (reader.readUint64());
msg.setCodeId(value);
break;
case 3:
var value = new proto.wasmd.x.wasmd.v1beta1.AbsoluteTxPosition;
reader.readMessage(value,proto.wasmd.x.wasmd.v1beta1.AbsoluteTxPosition.deserializeBinaryFromReader);
msg.setUpdated(value);
break;
case 4:
var value = /** @type {!Uint8Array} */ (reader.readBytes());
msg.setMsg(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.wasmd.x.wasmd.v1beta1.ContractCodeHistoryEntry.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.wasmd.x.wasmd.v1beta1.ContractCodeHistoryEntry.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.wasmd.x.wasmd.v1beta1.ContractCodeHistoryEntry} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.wasmd.x.wasmd.v1beta1.ContractCodeHistoryEntry.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getOperation();
if (f !== 0.0) {
writer.writeEnum(
1,
f
);
}
f = message.getCodeId();
if (f !== 0) {
writer.writeUint64(
2,
f
);
}
f = message.getUpdated();
if (f != null) {
writer.writeMessage(
3,
f,
proto.wasmd.x.wasmd.v1beta1.AbsoluteTxPosition.serializeBinaryToWriter
);
}
f = message.getMsg_asU8();
if (f.length > 0) {
writer.writeBytes(
4,
f
);
}
};
/**
* optional ContractCodeHistoryOperationType operation = 1;
* @return {!proto.wasmd.x.wasmd.v1beta1.ContractCodeHistoryOperationType}
*/
proto.wasmd.x.wasmd.v1beta1.ContractCodeHistoryEntry.prototype.getOperation = function() {
return /** @type {!proto.wasmd.x.wasmd.v1beta1.ContractCodeHistoryOperationType} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};
/**
* @param {!proto.wasmd.x.wasmd.v1beta1.ContractCodeHistoryOperationType} value
* @return {!proto.wasmd.x.wasmd.v1beta1.ContractCodeHistoryEntry} returns this
*/
proto.wasmd.x.wasmd.v1beta1.ContractCodeHistoryEntry.prototype.setOperation = function(value) {
return jspb.Message.setProto3EnumField(this, 1, value);
};
/**
* optional uint64 code_id = 2;
* @return {number}
*/
proto.wasmd.x.wasmd.v1beta1.ContractCodeHistoryEntry.prototype.getCodeId = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
};
/**
* @param {number} value
* @return {!proto.wasmd.x.wasmd.v1beta1.ContractCodeHistoryEntry} returns this
*/
proto.wasmd.x.wasmd.v1beta1.ContractCodeHistoryEntry.prototype.setCodeId = function(value) {
return jspb.Message.setProto3IntField(this, 2, value);
};
/**
* optional AbsoluteTxPosition updated = 3;
* @return {?proto.wasmd.x.wasmd.v1beta1.AbsoluteTxPosition}
*/
proto.wasmd.x.wasmd.v1beta1.ContractCodeHistoryEntry.prototype.getUpdated = function() {
return /** @type{?proto.wasmd.x.wasmd.v1beta1.AbsoluteTxPosition} */ (
jspb.Message.getWrapperField(this, proto.wasmd.x.wasmd.v1beta1.AbsoluteTxPosition, 3));
};
/**
* @param {?proto.wasmd.x.wasmd.v1beta1.AbsoluteTxPosition|undefined} value
* @return {!proto.wasmd.x.wasmd.v1beta1.ContractCodeHistoryEntry} returns this
*/
proto.wasmd.x.wasmd.v1beta1.ContractCodeHistoryEntry.prototype.setUpdated = function(value) {
return jspb.Message.setWrapperField(this, 3, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.wasmd.x.wasmd.v1beta1.ContractCodeHistoryEntry} returns this
*/
proto.wasmd.x.wasmd.v1beta1.ContractCodeHistoryEntry.prototype.clearUpdated = function() {
return this.setUpdated(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.wasmd.x.wasmd.v1beta1.ContractCodeHistoryEntry.prototype.hasUpdated = function() {
return jspb.Message.getField(this, 3) != null;
};
/**
* optional bytes msg = 4;
* @return {!(string|Uint8Array)}
*/
proto.wasmd.x.wasmd.v1beta1.ContractCodeHistoryEntry.prototype.getMsg = function() {
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
};
/**
* optional bytes msg = 4;
* This is a type-conversion wrapper around `getMsg()`
* @return {string}
*/
proto.wasmd.x.wasmd.v1beta1.ContractCodeHistoryEntry.prototype.getMsg_asB64 = function() {
return /** @type {string} */ (jspb.Message.bytesAsB64(
this.getMsg()));
};
/**
* optional bytes msg = 4;
* Note that Uint8Array is not supported on all browsers.
* @see http://caniuse.com/Uint8Array
* This is a type-conversion wrapper around `getMsg()`
* @return {!Uint8Array}
*/
proto.wasmd.x.wasmd.v1beta1.ContractCodeHistoryEntry.prototype.getMsg_asU8 = function() {
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
this.getMsg()));
};
/**
* @param {!(string|Uint8Array)} value
* @return {!proto.wasmd.x.wasmd.v1beta1.ContractCodeHistoryEntry} returns this
*/
proto.wasmd.x.wasmd.v1beta1.ContractCodeHistoryEntry.prototype.setMsg = function(value) {
return jspb.Message.setProto3BytesField(this, 4, value);
};
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.wasmd.x.wasmd.v1beta1.AbsoluteTxPosition.prototype.toObject = function(opt_includeInstance) {
return proto.wasmd.x.wasmd.v1beta1.AbsoluteTxPosition.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.wasmd.x.wasmd.v1beta1.AbsoluteTxPosition} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.wasmd.x.wasmd.v1beta1.AbsoluteTxPosition.toObject = function(includeInstance, msg) {
var f, obj = {
blockHeight: jspb.Message.getFieldWithDefault(msg, 1, 0),
txIndex: 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.wasmd.x.wasmd.v1beta1.AbsoluteTxPosition}
*/
proto.wasmd.x.wasmd.v1beta1.AbsoluteTxPosition.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.wasmd.x.wasmd.v1beta1.AbsoluteTxPosition;
return proto.wasmd.x.wasmd.v1beta1.AbsoluteTxPosition.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the give