@routerprotocol/chain-api
Version:
Router Chain API Query client with generated gRPC bindings.
1,670 lines (1,446 loc) • 61.6 kB
JavaScript
// source: ibc/core/channel/v1/channel.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')();
var gogoproto_gogo_pb = require('../../../../gogoproto/gogo_pb.js');
goog.object.extend(proto, gogoproto_gogo_pb);
var ibc_core_client_v1_client_pb = require('../../../../ibc/core/client/v1/client_pb.js');
goog.object.extend(proto, ibc_core_client_v1_client_pb);
goog.exportSymbol('proto.ibc.core.channel.v1.Acknowledgement', null, global);
goog.exportSymbol('proto.ibc.core.channel.v1.Acknowledgement.ResponseCase', null, global);
goog.exportSymbol('proto.ibc.core.channel.v1.Channel', null, global);
goog.exportSymbol('proto.ibc.core.channel.v1.Counterparty', null, global);
goog.exportSymbol('proto.ibc.core.channel.v1.IdentifiedChannel', null, global);
goog.exportSymbol('proto.ibc.core.channel.v1.Order', null, global);
goog.exportSymbol('proto.ibc.core.channel.v1.Packet', null, global);
goog.exportSymbol('proto.ibc.core.channel.v1.PacketId', null, global);
goog.exportSymbol('proto.ibc.core.channel.v1.PacketState', null, global);
goog.exportSymbol('proto.ibc.core.channel.v1.State', 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.ibc.core.channel.v1.Channel = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.ibc.core.channel.v1.Channel.repeatedFields_, null);
};
goog.inherits(proto.ibc.core.channel.v1.Channel, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.ibc.core.channel.v1.Channel.displayName = 'proto.ibc.core.channel.v1.Channel';
}
/**
* 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.ibc.core.channel.v1.IdentifiedChannel = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.ibc.core.channel.v1.IdentifiedChannel.repeatedFields_, null);
};
goog.inherits(proto.ibc.core.channel.v1.IdentifiedChannel, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.ibc.core.channel.v1.IdentifiedChannel.displayName = 'proto.ibc.core.channel.v1.IdentifiedChannel';
}
/**
* 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.ibc.core.channel.v1.Counterparty = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.ibc.core.channel.v1.Counterparty, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.ibc.core.channel.v1.Counterparty.displayName = 'proto.ibc.core.channel.v1.Counterparty';
}
/**
* 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.ibc.core.channel.v1.Packet = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.ibc.core.channel.v1.Packet, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.ibc.core.channel.v1.Packet.displayName = 'proto.ibc.core.channel.v1.Packet';
}
/**
* 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.ibc.core.channel.v1.PacketState = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.ibc.core.channel.v1.PacketState, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.ibc.core.channel.v1.PacketState.displayName = 'proto.ibc.core.channel.v1.PacketState';
}
/**
* 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.ibc.core.channel.v1.PacketId = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.ibc.core.channel.v1.PacketId, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.ibc.core.channel.v1.PacketId.displayName = 'proto.ibc.core.channel.v1.PacketId';
}
/**
* 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.ibc.core.channel.v1.Acknowledgement = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, proto.ibc.core.channel.v1.Acknowledgement.oneofGroups_);
};
goog.inherits(proto.ibc.core.channel.v1.Acknowledgement, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.ibc.core.channel.v1.Acknowledgement.displayName = 'proto.ibc.core.channel.v1.Acknowledgement';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.ibc.core.channel.v1.Channel.repeatedFields_ = [4];
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.ibc.core.channel.v1.Channel.prototype.toObject = function(opt_includeInstance) {
return proto.ibc.core.channel.v1.Channel.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.ibc.core.channel.v1.Channel} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.ibc.core.channel.v1.Channel.toObject = function(includeInstance, msg) {
var f, obj = {
state: jspb.Message.getFieldWithDefault(msg, 1, 0),
ordering: jspb.Message.getFieldWithDefault(msg, 2, 0),
counterparty: (f = msg.getCounterparty()) && proto.ibc.core.channel.v1.Counterparty.toObject(includeInstance, f),
connectionHopsList: (f = jspb.Message.getRepeatedField(msg, 4)) == null ? undefined : f,
version: jspb.Message.getFieldWithDefault(msg, 5, "")
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.ibc.core.channel.v1.Channel}
*/
proto.ibc.core.channel.v1.Channel.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.ibc.core.channel.v1.Channel;
return proto.ibc.core.channel.v1.Channel.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.ibc.core.channel.v1.Channel} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.ibc.core.channel.v1.Channel}
*/
proto.ibc.core.channel.v1.Channel.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {!proto.ibc.core.channel.v1.State} */ (reader.readEnum());
msg.setState(value);
break;
case 2:
var value = /** @type {!proto.ibc.core.channel.v1.Order} */ (reader.readEnum());
msg.setOrdering(value);
break;
case 3:
var value = new proto.ibc.core.channel.v1.Counterparty;
reader.readMessage(value,proto.ibc.core.channel.v1.Counterparty.deserializeBinaryFromReader);
msg.setCounterparty(value);
break;
case 4:
var value = /** @type {string} */ (reader.readString());
msg.addConnectionHops(value);
break;
case 5:
var value = /** @type {string} */ (reader.readString());
msg.setVersion(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.ibc.core.channel.v1.Channel.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.ibc.core.channel.v1.Channel.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.ibc.core.channel.v1.Channel} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.ibc.core.channel.v1.Channel.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getState();
if (f !== 0.0) {
writer.writeEnum(
1,
f
);
}
f = message.getOrdering();
if (f !== 0.0) {
writer.writeEnum(
2,
f
);
}
f = message.getCounterparty();
if (f != null) {
writer.writeMessage(
3,
f,
proto.ibc.core.channel.v1.Counterparty.serializeBinaryToWriter
);
}
f = message.getConnectionHopsList();
if (f.length > 0) {
writer.writeRepeatedString(
4,
f
);
}
f = message.getVersion();
if (f.length > 0) {
writer.writeString(
5,
f
);
}
};
/**
* optional State state = 1;
* @return {!proto.ibc.core.channel.v1.State}
*/
proto.ibc.core.channel.v1.Channel.prototype.getState = function() {
return /** @type {!proto.ibc.core.channel.v1.State} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};
/**
* @param {!proto.ibc.core.channel.v1.State} value
* @return {!proto.ibc.core.channel.v1.Channel} returns this
*/
proto.ibc.core.channel.v1.Channel.prototype.setState = function(value) {
return jspb.Message.setProto3EnumField(this, 1, value);
};
/**
* optional Order ordering = 2;
* @return {!proto.ibc.core.channel.v1.Order}
*/
proto.ibc.core.channel.v1.Channel.prototype.getOrdering = function() {
return /** @type {!proto.ibc.core.channel.v1.Order} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
};
/**
* @param {!proto.ibc.core.channel.v1.Order} value
* @return {!proto.ibc.core.channel.v1.Channel} returns this
*/
proto.ibc.core.channel.v1.Channel.prototype.setOrdering = function(value) {
return jspb.Message.setProto3EnumField(this, 2, value);
};
/**
* optional Counterparty counterparty = 3;
* @return {?proto.ibc.core.channel.v1.Counterparty}
*/
proto.ibc.core.channel.v1.Channel.prototype.getCounterparty = function() {
return /** @type{?proto.ibc.core.channel.v1.Counterparty} */ (
jspb.Message.getWrapperField(this, proto.ibc.core.channel.v1.Counterparty, 3));
};
/**
* @param {?proto.ibc.core.channel.v1.Counterparty|undefined} value
* @return {!proto.ibc.core.channel.v1.Channel} returns this
*/
proto.ibc.core.channel.v1.Channel.prototype.setCounterparty = function(value) {
return jspb.Message.setWrapperField(this, 3, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.ibc.core.channel.v1.Channel} returns this
*/
proto.ibc.core.channel.v1.Channel.prototype.clearCounterparty = function() {
return this.setCounterparty(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.ibc.core.channel.v1.Channel.prototype.hasCounterparty = function() {
return jspb.Message.getField(this, 3) != null;
};
/**
* repeated string connection_hops = 4;
* @return {!Array<string>}
*/
proto.ibc.core.channel.v1.Channel.prototype.getConnectionHopsList = function() {
return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 4));
};
/**
* @param {!Array<string>} value
* @return {!proto.ibc.core.channel.v1.Channel} returns this
*/
proto.ibc.core.channel.v1.Channel.prototype.setConnectionHopsList = function(value) {
return jspb.Message.setField(this, 4, value || []);
};
/**
* @param {string} value
* @param {number=} opt_index
* @return {!proto.ibc.core.channel.v1.Channel} returns this
*/
proto.ibc.core.channel.v1.Channel.prototype.addConnectionHops = function(value, opt_index) {
return jspb.Message.addToRepeatedField(this, 4, value, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.ibc.core.channel.v1.Channel} returns this
*/
proto.ibc.core.channel.v1.Channel.prototype.clearConnectionHopsList = function() {
return this.setConnectionHopsList([]);
};
/**
* optional string version = 5;
* @return {string}
*/
proto.ibc.core.channel.v1.Channel.prototype.getVersion = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
};
/**
* @param {string} value
* @return {!proto.ibc.core.channel.v1.Channel} returns this
*/
proto.ibc.core.channel.v1.Channel.prototype.setVersion = function(value) {
return jspb.Message.setProto3StringField(this, 5, value);
};
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.ibc.core.channel.v1.IdentifiedChannel.repeatedFields_ = [4];
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.ibc.core.channel.v1.IdentifiedChannel.prototype.toObject = function(opt_includeInstance) {
return proto.ibc.core.channel.v1.IdentifiedChannel.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.ibc.core.channel.v1.IdentifiedChannel} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.ibc.core.channel.v1.IdentifiedChannel.toObject = function(includeInstance, msg) {
var f, obj = {
state: jspb.Message.getFieldWithDefault(msg, 1, 0),
ordering: jspb.Message.getFieldWithDefault(msg, 2, 0),
counterparty: (f = msg.getCounterparty()) && proto.ibc.core.channel.v1.Counterparty.toObject(includeInstance, f),
connectionHopsList: (f = jspb.Message.getRepeatedField(msg, 4)) == null ? undefined : f,
version: jspb.Message.getFieldWithDefault(msg, 5, ""),
portId: jspb.Message.getFieldWithDefault(msg, 6, ""),
channelId: jspb.Message.getFieldWithDefault(msg, 7, "")
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.ibc.core.channel.v1.IdentifiedChannel}
*/
proto.ibc.core.channel.v1.IdentifiedChannel.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.ibc.core.channel.v1.IdentifiedChannel;
return proto.ibc.core.channel.v1.IdentifiedChannel.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.ibc.core.channel.v1.IdentifiedChannel} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.ibc.core.channel.v1.IdentifiedChannel}
*/
proto.ibc.core.channel.v1.IdentifiedChannel.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {!proto.ibc.core.channel.v1.State} */ (reader.readEnum());
msg.setState(value);
break;
case 2:
var value = /** @type {!proto.ibc.core.channel.v1.Order} */ (reader.readEnum());
msg.setOrdering(value);
break;
case 3:
var value = new proto.ibc.core.channel.v1.Counterparty;
reader.readMessage(value,proto.ibc.core.channel.v1.Counterparty.deserializeBinaryFromReader);
msg.setCounterparty(value);
break;
case 4:
var value = /** @type {string} */ (reader.readString());
msg.addConnectionHops(value);
break;
case 5:
var value = /** @type {string} */ (reader.readString());
msg.setVersion(value);
break;
case 6:
var value = /** @type {string} */ (reader.readString());
msg.setPortId(value);
break;
case 7:
var value = /** @type {string} */ (reader.readString());
msg.setChannelId(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.ibc.core.channel.v1.IdentifiedChannel.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.ibc.core.channel.v1.IdentifiedChannel.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.ibc.core.channel.v1.IdentifiedChannel} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.ibc.core.channel.v1.IdentifiedChannel.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getState();
if (f !== 0.0) {
writer.writeEnum(
1,
f
);
}
f = message.getOrdering();
if (f !== 0.0) {
writer.writeEnum(
2,
f
);
}
f = message.getCounterparty();
if (f != null) {
writer.writeMessage(
3,
f,
proto.ibc.core.channel.v1.Counterparty.serializeBinaryToWriter
);
}
f = message.getConnectionHopsList();
if (f.length > 0) {
writer.writeRepeatedString(
4,
f
);
}
f = message.getVersion();
if (f.length > 0) {
writer.writeString(
5,
f
);
}
f = message.getPortId();
if (f.length > 0) {
writer.writeString(
6,
f
);
}
f = message.getChannelId();
if (f.length > 0) {
writer.writeString(
7,
f
);
}
};
/**
* optional State state = 1;
* @return {!proto.ibc.core.channel.v1.State}
*/
proto.ibc.core.channel.v1.IdentifiedChannel.prototype.getState = function() {
return /** @type {!proto.ibc.core.channel.v1.State} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};
/**
* @param {!proto.ibc.core.channel.v1.State} value
* @return {!proto.ibc.core.channel.v1.IdentifiedChannel} returns this
*/
proto.ibc.core.channel.v1.IdentifiedChannel.prototype.setState = function(value) {
return jspb.Message.setProto3EnumField(this, 1, value);
};
/**
* optional Order ordering = 2;
* @return {!proto.ibc.core.channel.v1.Order}
*/
proto.ibc.core.channel.v1.IdentifiedChannel.prototype.getOrdering = function() {
return /** @type {!proto.ibc.core.channel.v1.Order} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
};
/**
* @param {!proto.ibc.core.channel.v1.Order} value
* @return {!proto.ibc.core.channel.v1.IdentifiedChannel} returns this
*/
proto.ibc.core.channel.v1.IdentifiedChannel.prototype.setOrdering = function(value) {
return jspb.Message.setProto3EnumField(this, 2, value);
};
/**
* optional Counterparty counterparty = 3;
* @return {?proto.ibc.core.channel.v1.Counterparty}
*/
proto.ibc.core.channel.v1.IdentifiedChannel.prototype.getCounterparty = function() {
return /** @type{?proto.ibc.core.channel.v1.Counterparty} */ (
jspb.Message.getWrapperField(this, proto.ibc.core.channel.v1.Counterparty, 3));
};
/**
* @param {?proto.ibc.core.channel.v1.Counterparty|undefined} value
* @return {!proto.ibc.core.channel.v1.IdentifiedChannel} returns this
*/
proto.ibc.core.channel.v1.IdentifiedChannel.prototype.setCounterparty = function(value) {
return jspb.Message.setWrapperField(this, 3, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.ibc.core.channel.v1.IdentifiedChannel} returns this
*/
proto.ibc.core.channel.v1.IdentifiedChannel.prototype.clearCounterparty = function() {
return this.setCounterparty(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.ibc.core.channel.v1.IdentifiedChannel.prototype.hasCounterparty = function() {
return jspb.Message.getField(this, 3) != null;
};
/**
* repeated string connection_hops = 4;
* @return {!Array<string>}
*/
proto.ibc.core.channel.v1.IdentifiedChannel.prototype.getConnectionHopsList = function() {
return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 4));
};
/**
* @param {!Array<string>} value
* @return {!proto.ibc.core.channel.v1.IdentifiedChannel} returns this
*/
proto.ibc.core.channel.v1.IdentifiedChannel.prototype.setConnectionHopsList = function(value) {
return jspb.Message.setField(this, 4, value || []);
};
/**
* @param {string} value
* @param {number=} opt_index
* @return {!proto.ibc.core.channel.v1.IdentifiedChannel} returns this
*/
proto.ibc.core.channel.v1.IdentifiedChannel.prototype.addConnectionHops = function(value, opt_index) {
return jspb.Message.addToRepeatedField(this, 4, value, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.ibc.core.channel.v1.IdentifiedChannel} returns this
*/
proto.ibc.core.channel.v1.IdentifiedChannel.prototype.clearConnectionHopsList = function() {
return this.setConnectionHopsList([]);
};
/**
* optional string version = 5;
* @return {string}
*/
proto.ibc.core.channel.v1.IdentifiedChannel.prototype.getVersion = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
};
/**
* @param {string} value
* @return {!proto.ibc.core.channel.v1.IdentifiedChannel} returns this
*/
proto.ibc.core.channel.v1.IdentifiedChannel.prototype.setVersion = function(value) {
return jspb.Message.setProto3StringField(this, 5, value);
};
/**
* optional string port_id = 6;
* @return {string}
*/
proto.ibc.core.channel.v1.IdentifiedChannel.prototype.getPortId = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
};
/**
* @param {string} value
* @return {!proto.ibc.core.channel.v1.IdentifiedChannel} returns this
*/
proto.ibc.core.channel.v1.IdentifiedChannel.prototype.setPortId = function(value) {
return jspb.Message.setProto3StringField(this, 6, value);
};
/**
* optional string channel_id = 7;
* @return {string}
*/
proto.ibc.core.channel.v1.IdentifiedChannel.prototype.getChannelId = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, ""));
};
/**
* @param {string} value
* @return {!proto.ibc.core.channel.v1.IdentifiedChannel} returns this
*/
proto.ibc.core.channel.v1.IdentifiedChannel.prototype.setChannelId = function(value) {
return jspb.Message.setProto3StringField(this, 7, 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.ibc.core.channel.v1.Counterparty.prototype.toObject = function(opt_includeInstance) {
return proto.ibc.core.channel.v1.Counterparty.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.ibc.core.channel.v1.Counterparty} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.ibc.core.channel.v1.Counterparty.toObject = function(includeInstance, msg) {
var f, obj = {
portId: jspb.Message.getFieldWithDefault(msg, 1, ""),
channelId: 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.ibc.core.channel.v1.Counterparty}
*/
proto.ibc.core.channel.v1.Counterparty.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.ibc.core.channel.v1.Counterparty;
return proto.ibc.core.channel.v1.Counterparty.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.ibc.core.channel.v1.Counterparty} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.ibc.core.channel.v1.Counterparty}
*/
proto.ibc.core.channel.v1.Counterparty.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.setPortId(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setChannelId(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.ibc.core.channel.v1.Counterparty.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.ibc.core.channel.v1.Counterparty.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.ibc.core.channel.v1.Counterparty} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.ibc.core.channel.v1.Counterparty.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getPortId();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getChannelId();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
};
/**
* optional string port_id = 1;
* @return {string}
*/
proto.ibc.core.channel.v1.Counterparty.prototype.getPortId = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.ibc.core.channel.v1.Counterparty} returns this
*/
proto.ibc.core.channel.v1.Counterparty.prototype.setPortId = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional string channel_id = 2;
* @return {string}
*/
proto.ibc.core.channel.v1.Counterparty.prototype.getChannelId = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* @param {string} value
* @return {!proto.ibc.core.channel.v1.Counterparty} returns this
*/
proto.ibc.core.channel.v1.Counterparty.prototype.setChannelId = 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.ibc.core.channel.v1.Packet.prototype.toObject = function(opt_includeInstance) {
return proto.ibc.core.channel.v1.Packet.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.ibc.core.channel.v1.Packet} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.ibc.core.channel.v1.Packet.toObject = function(includeInstance, msg) {
var f, obj = {
sequence: jspb.Message.getFieldWithDefault(msg, 1, 0),
sourcePort: jspb.Message.getFieldWithDefault(msg, 2, ""),
sourceChannel: jspb.Message.getFieldWithDefault(msg, 3, ""),
destinationPort: jspb.Message.getFieldWithDefault(msg, 4, ""),
destinationChannel: jspb.Message.getFieldWithDefault(msg, 5, ""),
data: msg.getData_asB64(),
timeoutHeight: (f = msg.getTimeoutHeight()) && ibc_core_client_v1_client_pb.Height.toObject(includeInstance, f),
timeoutTimestamp: jspb.Message.getFieldWithDefault(msg, 8, 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.ibc.core.channel.v1.Packet}
*/
proto.ibc.core.channel.v1.Packet.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.ibc.core.channel.v1.Packet;
return proto.ibc.core.channel.v1.Packet.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.ibc.core.channel.v1.Packet} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.ibc.core.channel.v1.Packet}
*/
proto.ibc.core.channel.v1.Packet.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.setSequence(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setSourcePort(value);
break;
case 3:
var value = /** @type {string} */ (reader.readString());
msg.setSourceChannel(value);
break;
case 4:
var value = /** @type {string} */ (reader.readString());
msg.setDestinationPort(value);
break;
case 5:
var value = /** @type {string} */ (reader.readString());
msg.setDestinationChannel(value);
break;
case 6:
var value = /** @type {!Uint8Array} */ (reader.readBytes());
msg.setData(value);
break;
case 7:
var value = new ibc_core_client_v1_client_pb.Height;
reader.readMessage(value,ibc_core_client_v1_client_pb.Height.deserializeBinaryFromReader);
msg.setTimeoutHeight(value);
break;
case 8:
var value = /** @type {number} */ (reader.readUint64());
msg.setTimeoutTimestamp(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.ibc.core.channel.v1.Packet.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.ibc.core.channel.v1.Packet.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.ibc.core.channel.v1.Packet} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.ibc.core.channel.v1.Packet.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getSequence();
if (f !== 0) {
writer.writeUint64(
1,
f
);
}
f = message.getSourcePort();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
f = message.getSourceChannel();
if (f.length > 0) {
writer.writeString(
3,
f
);
}
f = message.getDestinationPort();
if (f.length > 0) {
writer.writeString(
4,
f
);
}
f = message.getDestinationChannel();
if (f.length > 0) {
writer.writeString(
5,
f
);
}
f = message.getData_asU8();
if (f.length > 0) {
writer.writeBytes(
6,
f
);
}
f = message.getTimeoutHeight();
if (f != null) {
writer.writeMessage(
7,
f,
ibc_core_client_v1_client_pb.Height.serializeBinaryToWriter
);
}
f = message.getTimeoutTimestamp();
if (f !== 0) {
writer.writeUint64(
8,
f
);
}
};
/**
* optional uint64 sequence = 1;
* @return {number}
*/
proto.ibc.core.channel.v1.Packet.prototype.getSequence = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};
/**
* @param {number} value
* @return {!proto.ibc.core.channel.v1.Packet} returns this
*/
proto.ibc.core.channel.v1.Packet.prototype.setSequence = function(value) {
return jspb.Message.setProto3IntField(this, 1, value);
};
/**
* optional string source_port = 2;
* @return {string}
*/
proto.ibc.core.channel.v1.Packet.prototype.getSourcePort = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* @param {string} value
* @return {!proto.ibc.core.channel.v1.Packet} returns this
*/
proto.ibc.core.channel.v1.Packet.prototype.setSourcePort = function(value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
/**
* optional string source_channel = 3;
* @return {string}
*/
proto.ibc.core.channel.v1.Packet.prototype.getSourceChannel = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};
/**
* @param {string} value
* @return {!proto.ibc.core.channel.v1.Packet} returns this
*/
proto.ibc.core.channel.v1.Packet.prototype.setSourceChannel = function(value) {
return jspb.Message.setProto3StringField(this, 3, value);
};
/**
* optional string destination_port = 4;
* @return {string}
*/
proto.ibc.core.channel.v1.Packet.prototype.getDestinationPort = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
};
/**
* @param {string} value
* @return {!proto.ibc.core.channel.v1.Packet} returns this
*/
proto.ibc.core.channel.v1.Packet.prototype.setDestinationPort = function(value) {
return jspb.Message.setProto3StringField(this, 4, value);
};
/**
* optional string destination_channel = 5;
* @return {string}
*/
proto.ibc.core.channel.v1.Packet.prototype.getDestinationChannel = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
};
/**
* @param {string} value
* @return {!proto.ibc.core.channel.v1.Packet} returns this
*/
proto.ibc.core.channel.v1.Packet.prototype.setDestinationChannel = function(value) {
return jspb.Message.setProto3StringField(this, 5, value);
};
/**
* optional bytes data = 6;
* @return {!(string|Uint8Array)}
*/
proto.ibc.core.channel.v1.Packet.prototype.getData = function() {
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
};
/**
* optional bytes data = 6;
* This is a type-conversion wrapper around `getData()`
* @return {string}
*/
proto.ibc.core.channel.v1.Packet.prototype.getData_asB64 = function() {
return /** @type {string} */ (jspb.Message.bytesAsB64(
this.getData()));
};
/**
* optional bytes data = 6;
* Note that Uint8Array is not supported on all browsers.
* @see http://caniuse.com/Uint8Array
* This is a type-conversion wrapper around `getData()`
* @return {!Uint8Array}
*/
proto.ibc.core.channel.v1.Packet.prototype.getData_asU8 = function() {
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
this.getData()));
};
/**
* @param {!(string|Uint8Array)} value
* @return {!proto.ibc.core.channel.v1.Packet} returns this
*/
proto.ibc.core.channel.v1.Packet.prototype.setData = function(value) {
return jspb.Message.setProto3BytesField(this, 6, value);
};
/**
* optional ibc.core.client.v1.Height timeout_height = 7;
* @return {?proto.ibc.core.client.v1.Height}
*/
proto.ibc.core.channel.v1.Packet.prototype.getTimeoutHeight = function() {
return /** @type{?proto.ibc.core.client.v1.Height} */ (
jspb.Message.getWrapperField(this, ibc_core_client_v1_client_pb.Height, 7));
};
/**
* @param {?proto.ibc.core.client.v1.Height|undefined} value
* @return {!proto.ibc.core.channel.v1.Packet} returns this
*/
proto.ibc.core.channel.v1.Packet.prototype.setTimeoutHeight = function(value) {
return jspb.Message.setWrapperField(this, 7, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.ibc.core.channel.v1.Packet} returns this
*/
proto.ibc.core.channel.v1.Packet.prototype.clearTimeoutHeight = function() {
return this.setTimeoutHeight(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.ibc.core.channel.v1.Packet.prototype.hasTimeoutHeight = function() {
return jspb.Message.getField(this, 7) != null;
};
/**
* optional uint64 timeout_timestamp = 8;
* @return {number}
*/
proto.ibc.core.channel.v1.Packet.prototype.getTimeoutTimestamp = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0));
};
/**
* @param {number} value
* @return {!proto.ibc.core.channel.v1.Packet} returns this
*/
proto.ibc.core.channel.v1.Packet.prototype.setTimeoutTimestamp = function(value) {
return jspb.Message.setProto3IntField(this, 8, 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.ibc.core.channel.v1.PacketState.prototype.toObject = function(opt_includeInstance) {
return proto.ibc.core.channel.v1.PacketState.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.ibc.core.channel.v1.PacketState} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.ibc.core.channel.v1.PacketState.toObject = function(includeInstance, msg) {
var f, obj = {
portId: jspb.Message.getFieldWithDefault(msg, 1, ""),
channelId: jspb.Message.getFieldWithDefault(msg, 2, ""),
sequence: jspb.Message.getFieldWithDefault(msg, 3, 0),
data: msg.getData_asB64()
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.ibc.core.channel.v1.PacketState}
*/
proto.ibc.core.channel.v1.PacketState.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.ibc.core.channel.v1.PacketState;
return proto.ibc.core.channel.v1.PacketState.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.ibc.core.channel.v1.PacketState} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.ibc.core.channel.v1.PacketState}
*/
proto.ibc.core.channel.v1.PacketState.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.setPortId(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setChannelId(value);
break;
case 3:
var value = /** @type {number} */ (reader.readUint64());
msg.setSequence(value);
break;
case 4:
var value = /** @type {!Uint8Array} */ (reader.readBytes());
msg.setData(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.ibc.core.channel.v1.PacketState.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.ibc.core.channel.v1.PacketState.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.ibc.core.channel.v1.PacketState} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.ibc.core.channel.v1.PacketState.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getPortId();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getChannelId();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
f = message.getSequence();
if (f !== 0) {
writer.writeUint64(
3,
f
);
}
f = message.getData_asU8();
if (f.length > 0) {
writer.writeBytes(
4,
f
);
}
};
/**
* optional string port_id = 1;
* @return {string}
*/
proto.ibc.core.channel.v1.PacketState.prototype.getPortId = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.ibc.core.channel.v1.PacketState} returns this
*/
proto.ibc.core.channel.v1.PacketState.prototype.setPortId = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional string channel_id = 2;
* @return {string}
*/
proto.ibc.core.channel.v1.PacketState.prototype.getChannelId = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* @param {string} value
* @return {!proto.ibc.core.channel.v1.PacketState} returns this
*/
proto.ibc.core.channel.v1.PacketState.prototype.setChannelId = function(value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
/**
* optional uint64 sequence = 3;
* @return {number}
*/
proto.ibc.core.channel.v1.PacketState.prototype.getSequence = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
};
/**
* @param {number} value
* @return {!proto.ibc.core.channel.v1.PacketState} returns this
*/
proto.ibc.core.channel.v1.PacketState.prototype.setSequence = function(value) {
return jspb.Message.setProto3IntField(this, 3, value);
};
/**
* optional bytes data = 4;
* @return {!(string|Uint8Array)}
*/
proto.ibc.core.channel.v1.PacketState.prototype.getData = function() {
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
};
/**
* optional bytes data = 4;
* This is a type-conversion wrapper around `getData()`
* @return {string}
*/
proto.ibc.core.channel.v1.PacketState.prototype.getData_asB64 = function() {
return /** @type {string} */ (jspb.Message.bytesAsB64(
this.getData()));
};
/**
* optional bytes data = 4;
* Note that Uint8Array is not supported on all browsers.
* @see http://caniuse.com/Uint8Array
* This is a type-conversion wrapper around `getData()`
* @return {!Uint8Array}
*/
proto.ibc.core.channel.v1.PacketState.prototype.getData_asU8 = function() {
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
this.getData()));
};
/**
* @param {!(string|Uint8Array)} value
* @return {!proto.ibc.core.channel.v1.PacketState} returns this
*/
proto.ibc.core.channel.v1.PacketState.prototype.setData = 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.ibc.core.channel.v1.PacketId.prototype.toObject = function(opt_includeInstance) {
return proto.ibc.core.channel.v1.PacketId.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.ibc.core.channel.v1.PacketId} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.ibc.core.channel.v1.PacketId.toObject = function(includeInstance, msg) {
var f, obj = {
portId: jspb.Message.getFieldWithDefault(msg, 1, ""),
channelId: jspb.Message.getFieldWithDefault(msg, 2, ""),
sequence: 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.ibc.core.channel.v1.Pac