UNPKG

@routerprotocol/chain-api

Version:

Router Chain API Query client with generated gRPC bindings.

2,185 lines 72.1 kB
// source: routerprotocol/routerchain/crosschain/ibc_receive_payload.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')();

goog.exportSymbol('proto.routerprotocol.routerchain.crosschain.AckReceiptPayload', null, global);
goog.exportSymbol('proto.routerprotocol.routerchain.crosschain.AckReceivePayload', null, global);
goog.exportSymbol('proto.routerprotocol.routerchain.crosschain.IBCAckReceivePayload', null, global);
goog.exportSymbol('proto.routerprotocol.routerchain.crosschain.IBCAckReceivePayload.ReceiveCase', null, global);
goog.exportSymbol('proto.routerprotocol.routerchain.crosschain.IBCReceivePayload', null, global);
goog.exportSymbol('proto.routerprotocol.routerchain.crosschain.IBCReceivePayload.ReceiveCase', null, global);
goog.exportSymbol('proto.routerprotocol.routerchain.crosschain.ReceiveMetadata', null, global);
goog.exportSymbol('proto.routerprotocol.routerchain.crosschain.ReceivePayload', 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.routerprotocol.routerchain.crosschain.ReceivePayload = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.routerprotocol.routerchain.crosschain.ReceivePayload, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.routerprotocol.routerchain.crosschain.ReceivePayload.displayName = 'proto.routerprotocol.routerchain.crosschain.ReceivePayload';
}
/**
 * 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.routerprotocol.routerchain.crosschain.ReceiveMetadata = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.routerprotocol.routerchain.crosschain.ReceiveMetadata, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.routerprotocol.routerchain.crosschain.ReceiveMetadata.displayName = 'proto.routerprotocol.routerchain.crosschain.ReceiveMetadata';
}
/**
 * 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.routerprotocol.routerchain.crosschain.AckReceivePayload = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.routerprotocol.routerchain.crosschain.AckReceivePayload, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.routerprotocol.routerchain.crosschain.AckReceivePayload.displayName = 'proto.routerprotocol.routerchain.crosschain.AckReceivePayload';
}
/**
 * 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.routerprotocol.routerchain.crosschain.AckReceiptPayload = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.routerprotocol.routerchain.crosschain.AckReceiptPayload, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.routerprotocol.routerchain.crosschain.AckReceiptPayload.displayName = 'proto.routerprotocol.routerchain.crosschain.AckReceiptPayload';
}
/**
 * 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.routerprotocol.routerchain.crosschain.IBCAckReceivePayload = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, proto.routerprotocol.routerchain.crosschain.IBCAckReceivePayload.oneofGroups_);
};
goog.inherits(proto.routerprotocol.routerchain.crosschain.IBCAckReceivePayload, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.routerprotocol.routerchain.crosschain.IBCAckReceivePayload.displayName = 'proto.routerprotocol.routerchain.crosschain.IBCAckReceivePayload';
}
/**
 * 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.routerprotocol.routerchain.crosschain.IBCReceivePayload = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, proto.routerprotocol.routerchain.crosschain.IBCReceivePayload.oneofGroups_);
};
goog.inherits(proto.routerprotocol.routerchain.crosschain.IBCReceivePayload, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.routerprotocol.routerchain.crosschain.IBCReceivePayload.displayName = 'proto.routerprotocol.routerchain.crosschain.IBCReceivePayload';
}



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.routerprotocol.routerchain.crosschain.ReceivePayload.prototype.toObject = function(opt_includeInstance) {
  return proto.routerprotocol.routerchain.crosschain.ReceivePayload.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.routerprotocol.routerchain.crosschain.ReceivePayload} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.routerprotocol.routerchain.crosschain.ReceivePayload.toObject = function(includeInstance, msg) {
  var f, obj = {
    version: jspb.Message.getFieldWithDefault(msg, 1, 0),
    routeAmount: jspb.Message.getFieldWithDefault(msg, 2, ""),
    requestIdentifier: jspb.Message.getFieldWithDefault(msg, 3, 0),
    requestSender: jspb.Message.getFieldWithDefault(msg, 4, ""),
    srcChainId: jspb.Message.getFieldWithDefault(msg, 5, ""),
    destChainId: jspb.Message.getFieldWithDefault(msg, 6, ""),
    routeRecipient: jspb.Message.getFieldWithDefault(msg, 7, ""),
    gatewayContractAddress: jspb.Message.getFieldWithDefault(msg, 8, ""),
    requestMetadata: msg.getRequestMetadata_asB64(),
    requestPacket: msg.getRequestPacket_asB64(),
    blockHeight: jspb.Message.getFieldWithDefault(msg, 11, 0),
    srcTimestamp: jspb.Message.getFieldWithDefault(msg, 12, 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.routerprotocol.routerchain.crosschain.ReceivePayload}
 */
proto.routerprotocol.routerchain.crosschain.ReceivePayload.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.routerprotocol.routerchain.crosschain.ReceivePayload;
  return proto.routerprotocol.routerchain.crosschain.ReceivePayload.deserializeBinaryFromReader(msg, reader);
};


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.routerprotocol.routerchain.crosschain.ReceivePayload} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.routerprotocol.routerchain.crosschain.ReceivePayload}
 */
proto.routerprotocol.routerchain.crosschain.ReceivePayload.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.setVersion(value);
      break;
    case 2:
      var value = /** @type {string} */ (reader.readString());
      msg.setRouteAmount(value);
      break;
    case 3:
      var value = /** @type {number} */ (reader.readUint64());
      msg.setRequestIdentifier(value);
      break;
    case 4:
      var value = /** @type {string} */ (reader.readString());
      msg.setRequestSender(value);
      break;
    case 5:
      var value = /** @type {string} */ (reader.readString());
      msg.setSrcChainId(value);
      break;
    case 6:
      var value = /** @type {string} */ (reader.readString());
      msg.setDestChainId(value);
      break;
    case 7:
      var value = /** @type {string} */ (reader.readString());
      msg.setRouteRecipient(value);
      break;
    case 8:
      var value = /** @type {string} */ (reader.readString());
      msg.setGatewayContractAddress(value);
      break;
    case 9:
      var value = /** @type {!Uint8Array} */ (reader.readBytes());
      msg.setRequestMetadata(value);
      break;
    case 10:
      var value = /** @type {!Uint8Array} */ (reader.readBytes());
      msg.setRequestPacket(value);
      break;
    case 11:
      var value = /** @type {number} */ (reader.readUint64());
      msg.setBlockHeight(value);
      break;
    case 12:
      var value = /** @type {number} */ (reader.readUint64());
      msg.setSrcTimestamp(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


/**
 * Serializes the message to binary data (in protobuf wire format).
 * @return {!Uint8Array}
 */
proto.routerprotocol.routerchain.crosschain.ReceivePayload.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  proto.routerprotocol.routerchain.crosschain.ReceivePayload.serializeBinaryToWriter(this, writer);
  return writer.getResultBuffer();
};


/**
 * Serializes the given message to binary data (in protobuf wire
 * format), writing to the given BinaryWriter.
 * @param {!proto.routerprotocol.routerchain.crosschain.ReceivePayload} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.routerprotocol.routerchain.crosschain.ReceivePayload.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getVersion();
  if (f !== 0) {
    writer.writeUint64(
      1,
      f
    );
  }
  f = message.getRouteAmount();
  if (f.length > 0) {
    writer.writeString(
      2,
      f
    );
  }
  f = message.getRequestIdentifier();
  if (f !== 0) {
    writer.writeUint64(
      3,
      f
    );
  }
  f = message.getRequestSender();
  if (f.length > 0) {
    writer.writeString(
      4,
      f
    );
  }
  f = message.getSrcChainId();
  if (f.length > 0) {
    writer.writeString(
      5,
      f
    );
  }
  f = message.getDestChainId();
  if (f.length > 0) {
    writer.writeString(
      6,
      f
    );
  }
  f = message.getRouteRecipient();
  if (f.length > 0) {
    writer.writeString(
      7,
      f
    );
  }
  f = message.getGatewayContractAddress();
  if (f.length > 0) {
    writer.writeString(
      8,
      f
    );
  }
  f = message.getRequestMetadata_asU8();
  if (f.length > 0) {
    writer.writeBytes(
      9,
      f
    );
  }
  f = message.getRequestPacket_asU8();
  if (f.length > 0) {
    writer.writeBytes(
      10,
      f
    );
  }
  f = message.getBlockHeight();
  if (f !== 0) {
    writer.writeUint64(
      11,
      f
    );
  }
  f = message.getSrcTimestamp();
  if (f !== 0) {
    writer.writeUint64(
      12,
      f
    );
  }
};


/**
 * optional uint64 version = 1;
 * @return {number}
 */
proto.routerprotocol.routerchain.crosschain.ReceivePayload.prototype.getVersion = function() {
  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};


/**
 * @param {number} value
 * @return {!proto.routerprotocol.routerchain.crosschain.ReceivePayload} returns this
 */
proto.routerprotocol.routerchain.crosschain.ReceivePayload.prototype.setVersion = function(value) {
  return jspb.Message.setProto3IntField(this, 1, value);
};


/**
 * optional string route_amount = 2;
 * @return {string}
 */
proto.routerprotocol.routerchain.crosschain.ReceivePayload.prototype.getRouteAmount = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};


/**
 * @param {string} value
 * @return {!proto.routerprotocol.routerchain.crosschain.ReceivePayload} returns this
 */
proto.routerprotocol.routerchain.crosschain.ReceivePayload.prototype.setRouteAmount = function(value) {
  return jspb.Message.setProto3StringField(this, 2, value);
};


/**
 * optional uint64 request_identifier = 3;
 * @return {number}
 */
proto.routerprotocol.routerchain.crosschain.ReceivePayload.prototype.getRequestIdentifier = function() {
  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
};


/**
 * @param {number} value
 * @return {!proto.routerprotocol.routerchain.crosschain.ReceivePayload} returns this
 */
proto.routerprotocol.routerchain.crosschain.ReceivePayload.prototype.setRequestIdentifier = function(value) {
  return jspb.Message.setProto3IntField(this, 3, value);
};


/**
 * optional string request_sender = 4;
 * @return {string}
 */
proto.routerprotocol.routerchain.crosschain.ReceivePayload.prototype.getRequestSender = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
};


/**
 * @param {string} value
 * @return {!proto.routerprotocol.routerchain.crosschain.ReceivePayload} returns this
 */
proto.routerprotocol.routerchain.crosschain.ReceivePayload.prototype.setRequestSender = function(value) {
  return jspb.Message.setProto3StringField(this, 4, value);
};


/**
 * optional string src_chain_id = 5;
 * @return {string}
 */
proto.routerprotocol.routerchain.crosschain.ReceivePayload.prototype.getSrcChainId = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
};


/**
 * @param {string} value
 * @return {!proto.routerprotocol.routerchain.crosschain.ReceivePayload} returns this
 */
proto.routerprotocol.routerchain.crosschain.ReceivePayload.prototype.setSrcChainId = function(value) {
  return jspb.Message.setProto3StringField(this, 5, value);
};


/**
 * optional string dest_chain_id = 6;
 * @return {string}
 */
proto.routerprotocol.routerchain.crosschain.ReceivePayload.prototype.getDestChainId = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
};


/**
 * @param {string} value
 * @return {!proto.routerprotocol.routerchain.crosschain.ReceivePayload} returns this
 */
proto.routerprotocol.routerchain.crosschain.ReceivePayload.prototype.setDestChainId = function(value) {
  return jspb.Message.setProto3StringField(this, 6, value);
};


/**
 * optional string route_recipient = 7;
 * @return {string}
 */
proto.routerprotocol.routerchain.crosschain.ReceivePayload.prototype.getRouteRecipient = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, ""));
};


/**
 * @param {string} value
 * @return {!proto.routerprotocol.routerchain.crosschain.ReceivePayload} returns this
 */
proto.routerprotocol.routerchain.crosschain.ReceivePayload.prototype.setRouteRecipient = function(value) {
  return jspb.Message.setProto3StringField(this, 7, value);
};


/**
 * optional string gateway_contract_address = 8;
 * @return {string}
 */
proto.routerprotocol.routerchain.crosschain.ReceivePayload.prototype.getGatewayContractAddress = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, ""));
};


/**
 * @param {string} value
 * @return {!proto.routerprotocol.routerchain.crosschain.ReceivePayload} returns this
 */
proto.routerprotocol.routerchain.crosschain.ReceivePayload.prototype.setGatewayContractAddress = function(value) {
  return jspb.Message.setProto3StringField(this, 8, value);
};


/**
 * optional bytes request_metadata = 9;
 * @return {!(string|Uint8Array)}
 */
proto.routerprotocol.routerchain.crosschain.ReceivePayload.prototype.getRequestMetadata = function() {
  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 9, ""));
};


/**
 * optional bytes request_metadata = 9;
 * This is a type-conversion wrapper around `getRequestMetadata()`
 * @return {string}
 */
proto.routerprotocol.routerchain.crosschain.ReceivePayload.prototype.getRequestMetadata_asB64 = function() {
  return /** @type {string} */ (jspb.Message.bytesAsB64(
      this.getRequestMetadata()));
};


/**
 * optional bytes request_metadata = 9;
 * Note that Uint8Array is not supported on all browsers.
 * @see http://caniuse.com/Uint8Array
 * This is a type-conversion wrapper around `getRequestMetadata()`
 * @return {!Uint8Array}
 */
proto.routerprotocol.routerchain.crosschain.ReceivePayload.prototype.getRequestMetadata_asU8 = function() {
  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
      this.getRequestMetadata()));
};


/**
 * @param {!(string|Uint8Array)} value
 * @return {!proto.routerprotocol.routerchain.crosschain.ReceivePayload} returns this
 */
proto.routerprotocol.routerchain.crosschain.ReceivePayload.prototype.setRequestMetadata = function(value) {
  return jspb.Message.setProto3BytesField(this, 9, value);
};


/**
 * optional bytes request_packet = 10;
 * @return {!(string|Uint8Array)}
 */
proto.routerprotocol.routerchain.crosschain.ReceivePayload.prototype.getRequestPacket = function() {
  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 10, ""));
};


/**
 * optional bytes request_packet = 10;
 * This is a type-conversion wrapper around `getRequestPacket()`
 * @return {string}
 */
proto.routerprotocol.routerchain.crosschain.ReceivePayload.prototype.getRequestPacket_asB64 = function() {
  return /** @type {string} */ (jspb.Message.bytesAsB64(
      this.getRequestPacket()));
};


/**
 * optional bytes request_packet = 10;
 * Note that Uint8Array is not supported on all browsers.
 * @see http://caniuse.com/Uint8Array
 * This is a type-conversion wrapper around `getRequestPacket()`
 * @return {!Uint8Array}
 */
proto.routerprotocol.routerchain.crosschain.ReceivePayload.prototype.getRequestPacket_asU8 = function() {
  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
      this.getRequestPacket()));
};


/**
 * @param {!(string|Uint8Array)} value
 * @return {!proto.routerprotocol.routerchain.crosschain.ReceivePayload} returns this
 */
proto.routerprotocol.routerchain.crosschain.ReceivePayload.prototype.setRequestPacket = function(value) {
  return jspb.Message.setProto3BytesField(this, 10, value);
};


/**
 * optional uint64 block_height = 11;
 * @return {number}
 */
proto.routerprotocol.routerchain.crosschain.ReceivePayload.prototype.getBlockHeight = function() {
  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0));
};


/**
 * @param {number} value
 * @return {!proto.routerprotocol.routerchain.crosschain.ReceivePayload} returns this
 */
proto.routerprotocol.routerchain.crosschain.ReceivePayload.prototype.setBlockHeight = function(value) {
  return jspb.Message.setProto3IntField(this, 11, value);
};


/**
 * optional uint64 src_timestamp = 12;
 * @return {number}
 */
proto.routerprotocol.routerchain.crosschain.ReceivePayload.prototype.getSrcTimestamp = function() {
  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 12, 0));
};


/**
 * @param {number} value
 * @return {!proto.routerprotocol.routerchain.crosschain.ReceivePayload} returns this
 */
proto.routerprotocol.routerchain.crosschain.ReceivePayload.prototype.setSrcTimestamp = function(value) {
  return jspb.Message.setProto3IntField(this, 12, 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.routerprotocol.routerchain.crosschain.ReceiveMetadata.prototype.toObject = function(opt_includeInstance) {
  return proto.routerprotocol.routerchain.crosschain.ReceiveMetadata.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.routerprotocol.routerchain.crosschain.ReceiveMetadata} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.routerprotocol.routerchain.crosschain.ReceiveMetadata.toObject = function(includeInstance, msg) {
  var f, obj = {
    feePayerAddress: jspb.Message.getFieldWithDefault(msg, 1, ""),
    chainId: jspb.Message.getFieldWithDefault(msg, 2, ""),
    gatewayContractAddress: jspb.Message.getFieldWithDefault(msg, 3, ""),
    dappAddress: jspb.Message.getFieldWithDefault(msg, 4, ""),
    requestIdentifier: jspb.Message.getFieldWithDefault(msg, 5, 0),
    blockHeight: jspb.Message.getFieldWithDefault(msg, 6, 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.routerprotocol.routerchain.crosschain.ReceiveMetadata}
 */
proto.routerprotocol.routerchain.crosschain.ReceiveMetadata.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.routerprotocol.routerchain.crosschain.ReceiveMetadata;
  return proto.routerprotocol.routerchain.crosschain.ReceiveMetadata.deserializeBinaryFromReader(msg, reader);
};


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.routerprotocol.routerchain.crosschain.ReceiveMetadata} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.routerprotocol.routerchain.crosschain.ReceiveMetadata}
 */
proto.routerprotocol.routerchain.crosschain.ReceiveMetadata.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.setFeePayerAddress(value);
      break;
    case 2:
      var value = /** @type {string} */ (reader.readString());
      msg.setChainId(value);
      break;
    case 3:
      var value = /** @type {string} */ (reader.readString());
      msg.setGatewayContractAddress(value);
      break;
    case 4:
      var value = /** @type {string} */ (reader.readString());
      msg.setDappAddress(value);
      break;
    case 5:
      var value = /** @type {number} */ (reader.readUint64());
      msg.setRequestIdentifier(value);
      break;
    case 6:
      var value = /** @type {number} */ (reader.readUint64());
      msg.setBlockHeight(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


/**
 * Serializes the message to binary data (in protobuf wire format).
 * @return {!Uint8Array}
 */
proto.routerprotocol.routerchain.crosschain.ReceiveMetadata.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  proto.routerprotocol.routerchain.crosschain.ReceiveMetadata.serializeBinaryToWriter(this, writer);
  return writer.getResultBuffer();
};


/**
 * Serializes the given message to binary data (in protobuf wire
 * format), writing to the given BinaryWriter.
 * @param {!proto.routerprotocol.routerchain.crosschain.ReceiveMetadata} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.routerprotocol.routerchain.crosschain.ReceiveMetadata.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getFeePayerAddress();
  if (f.length > 0) {
    writer.writeString(
      1,
      f
    );
  }
  f = message.getChainId();
  if (f.length > 0) {
    writer.writeString(
      2,
      f
    );
  }
  f = message.getGatewayContractAddress();
  if (f.length > 0) {
    writer.writeString(
      3,
      f
    );
  }
  f = message.getDappAddress();
  if (f.length > 0) {
    writer.writeString(
      4,
      f
    );
  }
  f = message.getRequestIdentifier();
  if (f !== 0) {
    writer.writeUint64(
      5,
      f
    );
  }
  f = message.getBlockHeight();
  if (f !== 0) {
    writer.writeUint64(
      6,
      f
    );
  }
};


/**
 * optional string fee_payer_address = 1;
 * @return {string}
 */
proto.routerprotocol.routerchain.crosschain.ReceiveMetadata.prototype.getFeePayerAddress = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};


/**
 * @param {string} value
 * @return {!proto.routerprotocol.routerchain.crosschain.ReceiveMetadata} returns this
 */
proto.routerprotocol.routerchain.crosschain.ReceiveMetadata.prototype.setFeePayerAddress = function(value) {
  return jspb.Message.setProto3StringField(this, 1, value);
};


/**
 * optional string chain_id = 2;
 * @return {string}
 */
proto.routerprotocol.routerchain.crosschain.ReceiveMetadata.prototype.getChainId = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};


/**
 * @param {string} value
 * @return {!proto.routerprotocol.routerchain.crosschain.ReceiveMetadata} returns this
 */
proto.routerprotocol.routerchain.crosschain.ReceiveMetadata.prototype.setChainId = function(value) {
  return jspb.Message.setProto3StringField(this, 2, value);
};


/**
 * optional string gateway_contract_address = 3;
 * @return {string}
 */
proto.routerprotocol.routerchain.crosschain.ReceiveMetadata.prototype.getGatewayContractAddress = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};


/**
 * @param {string} value
 * @return {!proto.routerprotocol.routerchain.crosschain.ReceiveMetadata} returns this
 */
proto.routerprotocol.routerchain.crosschain.ReceiveMetadata.prototype.setGatewayContractAddress = function(value) {
  return jspb.Message.setProto3StringField(this, 3, value);
};


/**
 * optional string dapp_address = 4;
 * @return {string}
 */
proto.routerprotocol.routerchain.crosschain.ReceiveMetadata.prototype.getDappAddress = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
};


/**
 * @param {string} value
 * @return {!proto.routerprotocol.routerchain.crosschain.ReceiveMetadata} returns this
 */
proto.routerprotocol.routerchain.crosschain.ReceiveMetadata.prototype.setDappAddress = function(value) {
  return jspb.Message.setProto3StringField(this, 4, value);
};


/**
 * optional uint64 request_identifier = 5;
 * @return {number}
 */
proto.routerprotocol.routerchain.crosschain.ReceiveMetadata.prototype.getRequestIdentifier = function() {
  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
};


/**
 * @param {number} value
 * @return {!proto.routerprotocol.routerchain.crosschain.ReceiveMetadata} returns this
 */
proto.routerprotocol.routerchain.crosschain.ReceiveMetadata.prototype.setRequestIdentifier = function(value) {
  return jspb.Message.setProto3IntField(this, 5, value);
};


/**
 * optional uint64 block_height = 6;
 * @return {number}
 */
proto.routerprotocol.routerchain.crosschain.ReceiveMetadata.prototype.getBlockHeight = function() {
  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0));
};


/**
 * @param {number} value
 * @return {!proto.routerprotocol.routerchain.crosschain.ReceiveMetadata} returns this
 */
proto.routerprotocol.routerchain.crosschain.ReceiveMetadata.prototype.setBlockHeight = function(value) {
  return jspb.Message.setProto3IntField(this, 6, 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.routerprotocol.routerchain.crosschain.AckReceivePayload.prototype.toObject = function(opt_includeInstance) {
  return proto.routerprotocol.routerchain.crosschain.AckReceivePayload.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.routerprotocol.routerchain.crosschain.AckReceivePayload} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.routerprotocol.routerchain.crosschain.AckReceivePayload.toObject = function(includeInstance, msg) {
  var f, obj = {
    requestIdentifier: jspb.Message.getFieldWithDefault(msg, 1, 0),
    ackRequestIdentifier: jspb.Message.getFieldWithDefault(msg, 2, 0),
    srcChainId: jspb.Message.getFieldWithDefault(msg, 3, ""),
    destChainId: jspb.Message.getFieldWithDefault(msg, 4, ""),
    requestSender: jspb.Message.getFieldWithDefault(msg, 5, ""),
    execData: msg.getExecData_asB64(),
    execStatus: jspb.Message.getBooleanFieldWithDefault(msg, 7, false),
    blockHeight: jspb.Message.getFieldWithDefault(msg, 8, 0),
    gatewayContractAddress: jspb.Message.getFieldWithDefault(msg, 9, "")
  };

  if (includeInstance) {
    obj.$jspbMessageInstance = msg;
  }
  return obj;
};
}


/**
 * Deserializes binary data (in protobuf wire format).
 * @param {jspb.ByteSource} bytes The bytes to deserialize.
 * @return {!proto.routerprotocol.routerchain.crosschain.AckReceivePayload}
 */
proto.routerprotocol.routerchain.crosschain.AckReceivePayload.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.routerprotocol.routerchain.crosschain.AckReceivePayload;
  return proto.routerprotocol.routerchain.crosschain.AckReceivePayload.deserializeBinaryFromReader(msg, reader);
};


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.routerprotocol.routerchain.crosschain.AckReceivePayload} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.routerprotocol.routerchain.crosschain.AckReceivePayload}
 */
proto.routerprotocol.routerchain.crosschain.AckReceivePayload.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.setRequestIdentifier(value);
      break;
    case 2:
      var value = /** @type {number} */ (reader.readUint64());
      msg.setAckRequestIdentifier(value);
      break;
    case 3:
      var value = /** @type {string} */ (reader.readString());
      msg.setSrcChainId(value);
      break;
    case 4:
      var value = /** @type {string} */ (reader.readString());
      msg.setDestChainId(value);
      break;
    case 5:
      var value = /** @type {string} */ (reader.readString());
      msg.setRequestSender(value);
      break;
    case 6:
      var value = /** @type {!Uint8Array} */ (reader.readBytes());
      msg.setExecData(value);
      break;
    case 7:
      var value = /** @type {boolean} */ (reader.readBool());
      msg.setExecStatus(value);
      break;
    case 8:
      var value = /** @type {number} */ (reader.readUint64());
      msg.setBlockHeight(value);
      break;
    case 9:
      var value = /** @type {string} */ (reader.readString());
      msg.setGatewayContractAddress(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


/**
 * Serializes the message to binary data (in protobuf wire format).
 * @return {!Uint8Array}
 */
proto.routerprotocol.routerchain.crosschain.AckReceivePayload.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  proto.routerprotocol.routerchain.crosschain.AckReceivePayload.serializeBinaryToWriter(this, writer);
  return writer.getResultBuffer();
};


/**
 * Serializes the given message to binary data (in protobuf wire
 * format), writing to the given BinaryWriter.
 * @param {!proto.routerprotocol.routerchain.crosschain.AckReceivePayload} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.routerprotocol.routerchain.crosschain.AckReceivePayload.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getRequestIdentifier();
  if (f !== 0) {
    writer.writeUint64(
      1,
      f
    );
  }
  f = message.getAckRequestIdentifier();
  if (f !== 0) {
    writer.writeUint64(
      2,
      f
    );
  }
  f = message.getSrcChainId();
  if (f.length > 0) {
    writer.writeString(
      3,
      f
    );
  }
  f = message.getDestChainId();
  if (f.length > 0) {
    writer.writeString(
      4,
      f
    );
  }
  f = message.getRequestSender();
  if (f.length > 0) {
    writer.writeString(
      5,
      f
    );
  }
  f = message.getExecData_asU8();
  if (f.length > 0) {
    writer.writeBytes(
      6,
      f
    );
  }
  f = message.getExecStatus();
  if (f) {
    writer.writeBool(
      7,
      f
    );
  }
  f = message.getBlockHeight();
  if (f !== 0) {
    writer.writeUint64(
      8,
      f
    );
  }
  f = message.getGatewayContractAddress();
  if (f.length > 0) {
    writer.writeString(
      9,
      f
    );
  }
};


/**
 * optional uint64 request_identifier = 1;
 * @return {number}
 */
proto.routerprotocol.routerchain.crosschain.AckReceivePayload.prototype.getRequestIdentifier = function() {
  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};


/**
 * @param {number} value
 * @return {!proto.routerprotocol.routerchain.crosschain.AckReceivePayload} returns this
 */
proto.routerprotocol.routerchain.crosschain.AckReceivePayload.prototype.setRequestIdentifier = function(value) {
  return jspb.Message.setProto3IntField(this, 1, value);
};


/**
 * optional uint64 ack_request_identifier = 2;
 * @return {number}
 */
proto.routerprotocol.routerchain.crosschain.AckReceivePayload.prototype.getAckRequestIdentifier = function() {
  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
};


/**
 * @param {number} value
 * @return {!proto.routerprotocol.routerchain.crosschain.AckReceivePayload} returns this
 */
proto.routerprotocol.routerchain.crosschain.AckReceivePayload.prototype.setAckRequestIdentifier = function(value) {
  return jspb.Message.setProto3IntField(this, 2, value);
};


/**
 * optional string src_chain_id = 3;
 * @return {string}
 */
proto.routerprotocol.routerchain.crosschain.AckReceivePayload.prototype.getSrcChainId = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};


/**
 * @param {string} value
 * @return {!proto.routerprotocol.routerchain.crosschain.AckReceivePayload} returns this
 */
proto.routerprotocol.routerchain.crosschain.AckReceivePayload.prototype.setSrcChainId = function(value) {
  return jspb.Message.setProto3StringField(this, 3, value);
};


/**
 * optional string dest_chain_id = 4;
 * @return {string}
 */
proto.routerprotocol.routerchain.crosschain.AckReceivePayload.prototype.getDestChainId = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
};


/**
 * @param {string} value
 * @return {!proto.routerprotocol.routerchain.crosschain.AckReceivePayload} returns this
 */
proto.routerprotocol.routerchain.crosschain.AckReceivePayload.prototype.setDestChainId = function(value) {
  return jspb.Message.setProto3StringField(this, 4, value);
};


/**
 * optional string request_sender = 5;
 * @return {string}
 */
proto.routerprotocol.routerchain.crosschain.AckReceivePayload.prototype.getRequestSender = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
};


/**
 * @param {string} value
 * @return {!proto.routerprotocol.routerchain.crosschain.AckReceivePayload} returns this
 */
proto.routerprotocol.routerchain.crosschain.AckReceivePayload.prototype.setRequestSender = function(value) {
  return jspb.Message.setProto3StringField(this, 5, value);
};


/**
 * optional bytes exec_data = 6;
 * @return {!(string|Uint8Array)}
 */
proto.routerprotocol.routerchain.crosschain.AckReceivePayload.prototype.getExecData = function() {
  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
};


/**
 * optional bytes exec_data = 6;
 * This is a type-conversion wrapper around `getExecData()`
 * @return {string}
 */
proto.routerprotocol.routerchain.crosschain.AckReceivePayload.prototype.getExecData_asB64 = function() {
  return /** @type {string} */ (jspb.Message.bytesAsB64(
      this.getExecData()));
};


/**
 * optional bytes exec_data = 6;
 * Note that Uint8Array is not supported on all browsers.
 * @see http://caniuse.com/Uint8Array
 * This is a type-conversion wrapper around `getExecData()`
 * @return {!Uint8Array}
 */
proto.routerprotocol.routerchain.crosschain.AckReceivePayload.prototype.getExecData_asU8 = function() {
  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
      this.getExecData()));
};


/**
 * @param {!(string|Uint8Array)} value
 * @return {!proto.routerprotocol.routerchain.crosschain.AckReceivePayload} returns this
 */
proto.routerprotocol.routerchain.crosschain.AckReceivePayload.prototype.setExecData = function(value) {
  return jspb.Message.setProto3BytesField(this, 6, value);
};


/**
 * optional bool exec_status = 7;
 * @return {boolean}
 */
proto.routerprotocol.routerchain.crosschain.AckReceivePayload.prototype.getExecStatus = function() {
  return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 7, false));
};


/**
 * @param {boolean} value
 * @return {!proto.routerprotocol.routerchain.crosschain.AckReceivePayload} returns this
 */
proto.routerprotocol.routerchain.crosschain.AckReceivePayload.prototype.setExecStatus = function(value) {
  return jspb.Message.setProto3BooleanField(this, 7, value);
};


/**
 * optional uint64 block_height = 8;
 * @return {number}
 */
proto.routerprotocol.routerchain.crosschain.AckReceivePayload.prototype.getBlockHeight = function() {
  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0));
};


/**
 * @param {number} value
 * @return {!proto.routerprotocol.routerchain.crosschain.AckReceivePayload} returns this
 */
proto.routerprotocol.routerchain.crosschain.AckReceivePayload.prototype.setBlockHeight = function(value) {
  return jspb.Message.setProto3IntField(this, 8, value);
};


/**
 * optional string gateway_contract_address = 9;
 * @return {string}
 */
proto.routerprotocol.routerchain.crosschain.AckReceivePayload.prototype.getGatewayContractAddress = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, ""));
};


/**
 * @param {string} value
 * @return {!proto.routerprotocol.routerchain.crosschain.AckReceivePayload} returns this
 */
proto.routerprotocol.routerchain.crosschain.AckReceivePayload.prototype.setGatewayContractAddress = function(value) {
  return jspb.Message.setProto3StringField(this, 9, 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.routerprotocol.routerchain.crosschain.AckReceiptPayload.prototype.toObject = function(opt_includeInstance) {
  return proto.routerprotocol.routerchain.crosschain.AckReceiptPayload.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.routerprotocol.routerchain.crosschain.AckReceiptPayload} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.routerprotocol.routerchain.crosschain.AckReceiptPayload.toObject = function(includeInstance, msg) {
  var f, obj = {
    ackReceiptIdentifier: jspb.Message.getFieldWithDefault(msg, 1, 0),
    ackRequestIdentifier: jspb.Message.getFieldWithDefault(msg, 2, 0),
    requestIdentifier: jspb.Message.getFieldWithDefault(msg, 3, 0),
    ackReceiptSrcChainId: jspb.Message.getFieldWithDefault(msg, 4, ""),
    ackSrcChainId: jspb.Message.getFieldWithDefault(msg, 5, ""),
    ackExecData: msg.getAckExecData_asB64(),
    ackExecStatus: jspb.Message.getBooleanFieldWithDefault(msg, 7, false),
    blockHeight: jspb.Message.getFieldWithDefault(msg, 8, 0),
    gatewayContractAddress: jspb.Message.getFieldWithDefault(msg, 9, "")
  };

  if (includeInstance) {
    obj.$jspbMessageInstance = msg;
  }
  return obj;
};
}


/**
 * Deserializes binary data (in protobuf wire format).
 * @param {jspb.ByteSource} bytes The bytes to deserialize.
 * @return {!proto.routerprotocol.routerchain.crosschain.AckReceiptPayload}
 */
proto.routerprotocol.routerchain.crosschain.AckReceiptPayload.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.routerprotocol.routerchain.crosschain.AckReceiptPayload;
  return proto.routerprotocol.routerchain.crosschain.AckReceiptPayload.deserializeBinaryFromReader(msg, reader);
};


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.routerprotocol.routerchain.crosschain.AckReceiptPayload} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.routerprotocol.routerchain.crosschain.AckReceiptPayload}
 */
proto.routerprotocol.routerchain.crosschain.AckReceiptPayload.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.setAckReceiptIdentifier(value);
      break;
    case 2:
      var value = /** @type {number} */ (reader.readUint64());
      msg.setAckRequestIdentifier(value);
      break;
    case 3:
      var value = /** @type {number} */ (reader.readUint64());
      msg.setRequestIdentifier(value);
      break;
    case 4:
      var value = /** @type {string} */ (reader.readString());
      msg.setAckReceiptSrcChainId(value);
      break;
    case 5:
      var value = /** @type {string} */ (reader.readString());
      msg.setAckSrcChainId(value);
      break;
    case 6:
      var value = /** @type {!Uint8Array} */ (reader.readBytes());
      msg.setAckExecData(value);
      break;
    case 7:
      var value = /** @type {boolean} */ (reader.readBool());
      msg.setAckExecStatus(value);
      break;
    case 8:
      var value = /** @type {number} */ (reader.readUint64());
      msg.setBlockHeight(value);
      break;
    case 9:
      var value = /** @type {string} */ (reader.readString());
      msg.setGatewayContractAddress(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


/**
 * Serializes the message to binary data (in protobuf wire format).
 * @return {!Uint8Array}
 */
proto.routerprotocol.routerchain.crosschain.AckReceiptPayload.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  proto.routerprotocol.routerchain.crosschain.AckReceiptPayload.serializeBinaryToWriter(this, writer);
  return writer.getResultBuffer();
};


/**
 * Serializes the given message to binary data (in protobuf wire
 * format), writing to the given BinaryWriter.
 * @param {!proto.routerprotocol.routerchain.crosschain.AckReceiptPayload} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.routerprotocol.routerchain.crosschain.AckReceiptPayload.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getAckReceiptIdentifier();
  if (f !== 0) {
    writer.writeUint64(
      1,
      f
    );
  }
  f = message.getAckRequestIdentifier();
  if (f !== 0) {
    writer.writeUint64(
      2,
      f
    );
  }
  f = message.getRequestIdentifier();
  if (f !== 0) {
    writer.writeUint64(
      3,
      f
    );
  }
  f = message.getAckReceiptSrcChainId();
  if (f.length > 0) {
    writer.writeString(
      4,
      f
    );
  }
  f = message.getAckSrcChainId();
  if (f.length > 0) {
    writer.writeString(
      5,
      f
    );
  }
  f = message.getAckExecData_asU8();
  if (f.length > 0) {
    writer.writeBytes(
      6,
      f
    );
  }
  f = message.getAckExecStatus();
  if (f) {
    writer.writeBool(
      7,
      f
    );
  }
  f = message.getBlockHeight();
  if (f !== 0) {
    writer.writeUint64(
      8,
      f
    );
  }
  f = message.getGatewayContractAddress();
  if (f.length > 0) {
    writer.writeString(
      9,
      f
    );
  }
};


/**
 * optional uint64 ack_receipt_identifier = 1;
 * @return {number}
 */
proto.routerprotocol.routerchain.crosschain.AckReceiptPayload.prototype.getAckReceiptIdentifier = function() {
  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};


/**
 * @param {number} value
 * @return {!proto.routerprotocol.routerchain.crosschain.AckReceiptPayload} returns this
 */
proto.routerprotocol.routerchain.crosschain.AckReceiptPayload.prototype.setAckReceiptIdentifier = function(value) {
  return jspb.Message.setProto3IntField(this, 1, value);
};


/**
 * optional uint64 ack_request_identifier = 2;
 * @return {number}
 */
proto.routerprotocol.routerchain.crosschain.AckReceiptPayload.prototype.getAckRequestIdentifier = function() {
  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
};


/**
 * @param {number} value
 * @return {!proto.routerprotocol.routerchain.crosschain.AckReceiptPayload} returns this
 */
proto.routerprotocol.routerchain.crosschain.AckReceiptPayload.prototype.setAckRequestIdentifier = function(value) {
  return jspb.Message.setProto3IntField(this, 2, value);
};


/**
 * optional uint64 request_identifier = 3;
 * @return {number}
 */
proto.routerprotocol.routerchain.crosschain.AckReceiptPayload.prototype.getRequestIdentifier = function() {
  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
};


/**
 * @param {number} value
 * @return {!proto.routerprotocol.routerchain.crosschain.AckReceiptPayload} returns this
 */
proto.routerprotocol.routerchain.crosschain.AckReceiptPayload.prototype.setRequestIdentifier = function(value) {
  return jspb.Message.setProto3IntField(this, 3, value);
};


/**
 * optional string ack_receipt_src_chain_id = 4;
 * @return {string}
 */
proto.routerprotocol.routerchain.crosschain.AckReceiptPayload.prototype.getAckReceiptSrcChainId = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
};


/**
 * @param {string} value
 * @return {!proto.routerprotocol.routerchain.crosschain.AckReceiptPayload} returns this
 */
proto.routerprotocol.routerchain.crosschain.AckReceiptPayload.prototype.setAckReceiptSrcChainId = function(value) {
  return jspb.Message.setProto3StringField(this, 4, value);
};


/**
 * optional string ack_src_chain_id = 5;
 * @return {string}
 */
proto.routerprotocol.routerchain.crosschain.AckReceiptPayload.prototype.getAckSrcChainId = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
};


/**
 * @param {string} value
 * @return {!proto.routerprotocol.routerchain.crosschain.AckReceiptPayload} returns this
 */
proto.routerprotocol.routerchain.crosschain.AckReceiptPayload.prototype.setAckSrcChainId = function(value) {
  return jspb.Message.setProto3StringField(this, 5, value);
};


/**
 * optional bytes ack_exec_data = 6;
 * @return {!(string|Uint8Array)}
 */
proto.routerprotocol.routerchain.crosschain.AckReceiptPayload.prototype.getAckExecData = function() {
  return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
};


/**
 * optional bytes ack_exec_data = 6;
 * This is a type-conversion wrapper around `getAckExecData()`
 * @return {string}
 */
proto.routerprotocol.routerchain.crosschain.AckReceiptPayload.prototype.getAckExecData_asB64 = function() {
  return /** @type {string} */ (jspb.Message.bytesAsB64(
      this.getAckExecData()));
};


/**
 * optional bytes ack_exec_data = 6;
 * Note that Uint8Array is not supported on all browsers.
 * @see http://caniuse.com/Uint8Array
 * This is a type-conversion wrapper around `getAckExecData()`
 * @return {!Uint8Array}
 */
proto.routerprotocol.routerchain.crosschain.AckReceiptPayload.prototype.getAckExecData_asU8 = function() {
  return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
      this.getAckExecData()));
};


/**
 * @param {!(string|Uint8Array)} value
 * @return {!proto.routerprotocol.routerchain.crosschain.AckReceiptPayload} returns this
 */
proto.routerprotocol.routerchain.crosschain.AckReceiptPayload.prototype.setAckExecData = function(value) {
  return jspb.Message.setProto3BytesField(this, 6, value);
};


/**
 * optional bool ack_exec_status = 7;
 * @return {boolean}
 */
proto.routerprotocol.routerchain.crosschain.AckReceiptPayload.prototype.getAckExecStatus = function() {
  return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 7, false));
};


/**
 * @param {boolean} value
 * @return {!proto.routerprotocol.routerchain.crosschain.AckReceiptPayload} returns this
 */
proto.routerprotocol.routerchain.crosschain.AckReceiptPayload.prototype.setAckExecStatus = function(value) {
  return jspb.Message.setProto3BooleanField(this, 7, value);
};


/**
 * optional uint64 block_height = 8;
 * @return {number}
 */
proto.routerprotocol.routerchain.crosschain.AckReceiptPayload.prototype.getBlockHeight = function() {
  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0));
};


/**
 * @param {number} value
 * @return {!proto.routerprotocol.routerchain.crosschain.AckReceiptPayload} returns this
 */
proto.routerprotocol.routerchain.crosschain.AckReceiptPayload.prototype.setBlockHeight = function(value) {
  return jspb.Message.setProto3IntField(this, 8, value);
};


/**
 * optional string gateway_contract_address = 9;
 * @return {string}
 */
proto.routerprotocol.routerchain.crosschain.AckReceiptPayload.prototype.getGatewayContractAddress = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, ""));
};


/**
 * @param {string} value
 * @return {!proto.routerprotocol.routerchain.crosschain.AckReceiptPayload} returns this
 */
proto.routerprotocol.routerchain.crosschain.AckReceiptPayload.prototype.setGatewayContractAddress = function(value) {
  return jspb.Message.setProto3StringField(this, 9, value);
};



/**
 * Oneof group definitions for this message. Each group defines the field
 * numbers belonging to that group. When of these fields' value is set, all
 * other fields in the group are cleared. During deserialization, if multiple
 * fields are encountered for a group, only the last value seen will be kept.
 * @private {!Array<!Array<number>>}
 * @const
 */
proto.routerprotocol.routerchain.crosschain.IBCAckReceivePayload.oneofGroups_ = [[1,2]];

/**
 * @enum {number}
 */
proto.routerprotocol.routerchain.crosschain.IBCAckReceivePayload.ReceiveCase = {
  RECEIVE_NOT_SET: 0,
  ACK_RECEIVE_PAYLOAD: 1,
  ACK_RECEIPT_PAYLOAD: 2
};

/**
 * @return {proto.routerprotocol.routerchain.crosschain.IBCAckReceivePayload.ReceiveCase}
 */
proto.routerprotocol.routerchain.crosschain.IBCAckReceivePayload.prototype.getReceiveCase = function() {
  return /** @type {proto.routerprotocol.routerchain.crosschain.IBCAckReceivePayload.ReceiveCase} */(jspb.Message.computeOneofCase(this, proto.routerprotocol.routerchain.crosschain.IBCAckReceivePayload.oneofGroups_[0]));
};



if (jspb.Message.GENERATE_TO_OBJECT) {
/**
 * Creates an object representation of this proto.
 * Field names that are reserved in JavaScript and will be renamed to pb_name.
 * Optional fields that are not set will be set to undefined.
 * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
 * For the list of reserved names please see:
 *     net/proto2/compiler/js/internal/generator.cc#kKeyword.
 * @param {boolean=} opt_includeInstance Deprecated. whether to include the
 *     JSPB instance for transitional soy proto support:
 *     http://goto/soy-param-migration
 * @return {!Object}
 */
proto.routerprotocol.routerchain.crosschain.IBCAckReceivePayload.prototype.toObject = function(opt_includeInstance) {
  return proto.routerprotocol.routerchain.crosschain.IBCAckReceivePayload.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.routerprotocol.routerchain.crosschain.IBCAckReceivePayload} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.routerprotocol.routerchain.crosschain.IBCAckReceivePayload.toObject = function(includeInstance, msg) {
  var f, obj = {
    ackReceivePayload: (f = msg.getAckReceivePayload()) && proto.routerprotocol.routerchain.crosschain.AckReceivePayload.toObject(includeInstance, f),
    ackReceiptPayload: (f = msg.getAckReceiptPayload()) && proto.routerprotocol.routerchain.crosschain.AckReceiptPayload.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.routerprotocol.routerchain.crosschain.IBCAckReceivePayload}
 */
proto.routerprotocol.routerchain.crosschain.IBCAckReceivePayload.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.routerprotocol.routerchain.crosschain.IBCAckReceivePayload;
  return proto.routerprotocol.routerchain.crosschain.IBCAckReceivePayload.deserializeBinaryFromReader(msg, reader);
};


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.routerprotocol.routerchain.crosschain.IBCAckReceivePayload} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.routerprotocol.routerchain.crosschain.IBCAckReceivePayload}
 */
proto.routerprotocol.routerchain.crosschain.IBCAckReceivePayload.deserializeBinaryFromReader = function(msg, reader) {
  while (reader.nextField()) {
    if (reader.isEndGroup()) {
      break;
    }
    var field = reader.getFieldNumber();
    switch (field) {
    case 1:
      var value = new proto.routerprotocol.routerchain.crosschain.AckReceivePayload;
      reader.readMessage(value,proto.routerprotocol.routerchain.crosschain.AckReceivePayload.deserializeBinaryFromReader);
      msg.setAckReceivePayload(value);
      break;
    case 2:
      var value = new proto.routerprotocol.routerchain.crosschain.AckReceiptPayload;
      reader.readMessage(value,proto.routerprotocol.routerchain.crosschain.AckReceiptPayload.deserializeBinaryFromReader);
      msg.setAckReceiptPayload(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


/**
 * Serializes the message to binary data (in protobuf wire format).
 * @return {!Uint8Array}
 */
proto.routerprotocol.routerchain.crosschain.IBCAckReceivePayload.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  proto.routerprotocol.routerchain.crosschain.IBCAckReceivePayload.serializeBinaryToWriter(this, writer);
  return writer.getResultBuffer();
};


/**
 * Serializes the given message to binary data (in protobuf wire
 * format), writing to the given BinaryWriter.
 * @param {!proto.routerprotocol.routerchain.crosschain.IBCAckReceivePayload} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.routerprotocol.routerchain.crosschain.IBCAckReceivePayload.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getAckReceivePayload();
  if (f != null) {
    writer.writeMessage(
      1,
      f,
      proto.routerprotocol.routerchain.crosschain.AckReceivePayload.serializeBinaryToWriter
    );
  }
  f = message.getAckReceiptPayload();
  if (f != null) {
    writer.writeMessage(
      2,
      f,
      proto.routerprotocol.routerchain.crosschain.AckReceiptPayload.serializeBinaryToWriter
    );
  }
};


/**
 * optional AckReceivePayload ack_receive_payload = 1;
 * @return {?proto.routerprotocol.routerchain.crosschain.AckReceivePayload}
 */
proto.routerprotocol.routerchain.crosschain.IBCAckReceivePayload.prototype.getAckReceivePayload = function() {
  return /** @type{?proto.routerprotocol.routerchain.crosschain.AckReceivePayload} */ (
    jspb.Message.getWrapperField(this, proto.routerprotocol.routerchain.crosschain.AckReceivePayload, 1));
};


/**
 * @param {?proto.routerprotocol.routerchain.crosschain.AckReceivePayload|undefined} value
 * @return {!proto.routerprotocol.routerchain.crosschain.IBCAckReceivePayload} returns this
*/
proto.routerprotocol.routerchain.crosschain.IBCAckReceivePayload.prototype.setAckReceivePayload = function(value) {
  return jspb.Message.setOneofWrapperField(this, 1, proto.routerprotocol.routerchain.crosschain.IBCAckReceivePayload.oneofGroups_[0], value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.routerprotocol.routerchain.crosschain.IBCAckReceivePayload} returns this
 */
proto.routerprotocol.routerchain.crosschain.IBCAckReceivePayload.prototype.clearAckReceivePayload = function() {
  return this.setAckReceivePayload(undefined);
};


/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.routerprotocol.routerchain.crosschain.IBCAckReceivePayload.prototype.hasAckReceivePayload = function() {
  return jspb.Message.getField(this, 1) != null;
};


/**
 * optional AckReceiptPayload ack_receipt_payload = 2;
 * @return {?proto.routerprotocol.routerchain.crosschain.AckReceiptPayload}
 */
proto.routerprotocol.routerchain.crosschain.IBCAckReceivePayload.prototype.getAckReceiptPayload = function() {
  return /** @type{?proto.routerprotocol.routerchain.crosschain.AckReceiptPayload} */ (
    jspb.Message.getWrapperField(this, proto.routerprotocol.routerchain.crosschain.AckReceiptPayload, 2));
};


/**
 * @param {?proto.routerprotocol.routerchain.crosschain.AckReceiptPayload|undefined} value
 * @return {!proto.routerprotocol.routerchain.crosschain.IBCAckReceivePayload} returns this
*/
proto.routerprotocol.routerchain.crosschain.IBCAckReceivePayload.prototype.setAckReceiptPayload = function(value) {
  return jspb.Message.setOneofWrapperField(this, 2, proto.routerprotocol.routerchain.crosschain.IBCAckReceivePayload.oneofGroups_[0], value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.routerprotocol.routerchain.crosschain.IBCAckReceivePayload} returns this
 */
proto.routerprotocol.routerchain.crosschain.IBCAckReceivePayload.prototype.clearAckReceiptPayload = function() {
  return this.setAckReceiptPayload(undefined);
};


/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.routerprotocol.routerchain.crosschain.IBCAckReceivePayload.prototype.hasAckReceiptPayload = function() {
  return jspb.Message.getField(this, 2) != null;
};



/**
 * Oneof group definitions for this message. Each group defines the field
 * numbers belonging to that group. When of these fields' value is set, all
 * other fields in the group are cleared. During deserialization, if multiple
 * fields are encountered for a group, only the last value seen will be kept.
 * @private {!Array<!Array<number>>}
 * @const
 */
proto.routerprotocol.routerchain.crosschain.IBCReceivePayload.oneofGroups_ = [[1,2]];

/**
 * @enum {number}
 */
proto.routerprotocol.routerchain.crosschain.IBCReceivePayload.ReceiveCase = {
  RECEIVE_NOT_SET: 0,
  RECEIVE_PAYLOAD: 1,
  RECEIVE_METADATA: 2
};

/**
 * @return {proto.routerprotocol.routerchain.crosschain.IBCReceivePayload.ReceiveCase}
 */
proto.routerprotocol.routerchain.crosschain.IBCReceivePayload.prototype.getReceiveCase = function() {
  return /** @type {proto.routerprotocol.routerchain.crosschain.IBCReceivePayload.ReceiveCase} */(jspb.Message.computeOneofCase(this, proto.routerprotocol.routerchain.crosschain.IBCReceivePayload.oneofGroups_[0]));
};



if (jspb.Message.GENERATE_TO_OBJECT) {
/**
 * Creates an object representation of this proto.
 * Field names that are reserved in JavaScript and will be renamed to pb_name.
 * Optional fields that are not set will be set to undefined.
 * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
 * For the list of reserved names please see:
 *     net/proto2/compiler/js/internal/generator.cc#kKeyword.
 * @param {boolean=} opt_includeInstance Deprecated. whether to include the
 *     JSPB instance for transitional soy proto support:
 *     http://goto/soy-param-migration
 * @return {!Object}
 */
proto.routerprotocol.routerchain.crosschain.IBCReceivePayload.prototype.toObject = function(opt_includeInstance) {
  return proto.routerprotocol.routerchain.crosschain.IBCReceivePayload.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.routerprotocol.routerchain.crosschain.IBCReceivePayload} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.routerprotocol.routerchain.crosschain.IBCReceivePayload.toObject = function(includeInstance, msg) {
  var f, obj = {
    receivePayload: (f = msg.getReceivePayload()) && proto.routerprotocol.routerchain.crosschain.ReceivePayload.toObject(includeInstance, f),
    receiveMetadata: (f = msg.getReceiveMetadata()) && proto.routerprotocol.routerchain.crosschain.ReceiveMetadata.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.routerprotocol.routerchain.crosschain.IBCReceivePayload}
 */
proto.routerprotocol.routerchain.crosschain.IBCReceivePayload.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.routerprotocol.routerchain.crosschain.IBCReceivePayload;
  return proto.routerprotocol.routerchain.crosschain.IBCReceivePayload.deserializeBinaryFromReader(msg, reader);
};


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.routerprotocol.routerchain.crosschain.IBCReceivePayload} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.routerprotocol.routerchain.crosschain.IBCReceivePayload}
 */
proto.routerprotocol.routerchain.crosschain.IBCReceivePayload.deserializeBinaryFromReader = function(msg, reader) {
  while (reader.nextField()) {
    if (reader.isEndGroup()) {
      break;
    }
    var field = reader.getFieldNumber();
    switch (field) {
    case 1:
      var value = new proto.routerprotocol.routerchain.crosschain.ReceivePayload;
      reader.readMessage(value,proto.routerprotocol.routerchain.crosschain.ReceivePayload.deserializeBinaryFromReader);
      msg.setReceivePayload(value);
      break;
    case 2:
      var value = new proto.routerprotocol.routerchain.crosschain.ReceiveMetadata;
      reader.readMessage(value,proto.routerprotocol.routerchain.crosschain.ReceiveMetadata.deserializeBinaryFromReader);
      msg.setReceiveMetadata(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


/**
 * Serializes the message to binary data (in protobuf wire format).
 * @return {!Uint8Array}
 */
proto.routerprotocol.routerchain.crosschain.IBCReceivePayload.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  proto.routerprotocol.routerchain.crosschain.IBCReceivePayload.serializeBinaryToWriter(this, writer);
  return writer.getResultBuffer();
};


/**
 * Serializes the given message to binary data (in protobuf wire
 * format), writing to the given BinaryWriter.
 * @param {!proto.routerprotocol.routerchain.crosschain.IBCReceivePayload} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.routerprotocol.routerchain.crosschain.IBCReceivePayload.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getReceivePayload();
  if (f != null) {
    writer.writeMessage(
      1,
      f,
      proto.routerprotocol.routerchain.crosschain.ReceivePayload.serializeBinaryToWriter
    );
  }
  f = message.getReceiveMetadata();
  if (f != null) {
    writer.writeMessage(
      2,
      f,
      proto.routerprotocol.routerchain.crosschain.ReceiveMetadata.serializeBinaryToWriter
    );
  }
};


/**
 * optional ReceivePayload receive_payload = 1;
 * @return {?proto.routerprotocol.routerchain.crosschain.ReceivePayload}
 */
proto.routerprotocol.routerchain.crosschain.IBCReceivePayload.prototype.getReceivePayload = function() {
  return /** @type{?proto.routerprotocol.routerchain.crosschain.ReceivePayload} */ (
    jspb.Message.getWrapperField(this, proto.routerprotocol.routerchain.crosschain.ReceivePayload, 1));
};


/**
 * @param {?proto.routerprotocol.routerchain.crosschain.ReceivePayload|undefined} value
 * @return {!proto.routerprotocol.routerchain.crosschain.IBCReceivePayload} returns this
*/
proto.routerprotocol.routerchain.crosschain.IBCReceivePayload.prototype.setReceivePayload = function(value) {
  return jspb.Message.setOneofWrapperField(this, 1, proto.routerprotocol.routerchain.crosschain.IBCReceivePayload.oneofGroups_[0], value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.routerprotocol.routerchain.crosschain.IBCReceivePayload} returns this
 */
proto.routerprotocol.routerchain.crosschain.IBCReceivePayload.prototype.clearReceivePayload = function() {
  return this.setReceivePayload(undefined);
};


/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.routerprotocol.routerchain.crosschain.IBCReceivePayload.prototype.hasReceivePayload = function() {
  return jspb.Message.getField(this, 1) != null;
};


/**
 * optional ReceiveMetadata receive_metadata = 2;
 * @return {?proto.routerprotocol.routerchain.crosschain.ReceiveMetadata}
 */
proto.routerprotocol.routerchain.crosschain.IBCReceivePayload.prototype.getReceiveMetadata = function() {
  return /** @type{?proto.routerprotocol.routerchain.crosschain.ReceiveMetadata} */ (
    jspb.Message.getWrapperField(this, proto.routerprotocol.routerchain.crosschain.ReceiveMetadata, 2));
};


/**
 * @param {?proto.routerprotocol.routerchain.crosschain.ReceiveMetadata|undefined} value
 * @return {!proto.routerprotocol.routerchain.crosschain.IBCReceivePayload} returns this
*/
proto.routerprotocol.routerchain.crosschain.IBCReceivePayload.prototype.setReceiveMetadata = function(value) {
  return jspb.Message.setOneofWrapperField(this, 2, proto.routerprotocol.routerchain.crosschain.IBCReceivePayload.oneofGroups_[0], value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.routerprotocol.routerchain.crosschain.IBCReceivePayload} returns this
 */
proto.routerprotocol.routerchain.crosschain.IBCReceivePayload.prototype.clearReceiveMetadata = function() {
  return this.setReceiveMetadata(undefined);
};


/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.routerprotocol.routerchain.crosschain.IBCReceivePayload.prototype.hasReceiveMetadata = function() {
  return jspb.Message.getField(this, 2) != null;
};


goog.object.extend(exports, proto.routerprotocol.routerchain.crosschain);