import { Channel, ChannelAmino, ChannelSDKType, Packet, PacketAmino, PacketSDKType } from "./channel"; import { Height, HeightAmino, HeightSDKType } from "../../client/v1/client"; import { BinaryReader, BinaryWriter } from "../../../../binary"; import { bytesFromBase64, base64FromBytes } from "../../../../helpers"; /** * MsgChannelOpenInit defines an sdk.Msg to initialize a channel handshake. It * is called by a relayer on Chain A. */ export interface MsgChannelOpenInit { portId: string; channel: Channel; signer: string; } export interface MsgChannelOpenInitProtoMsg { typeUrl: "/ibc.core.channel.v1.MsgChannelOpenInit"; value: Uint8Array; } /** * MsgChannelOpenInit defines an sdk.Msg to initialize a channel handshake. It * is called by a relayer on Chain A. */ export interface MsgChannelOpenInitAmino { port_id?: string; channel?: ChannelAmino; signer?: string; } export interface MsgChannelOpenInitAminoMsg { type: "cosmos-sdk/MsgChannelOpenInit"; value: MsgChannelOpenInitAmino; } /** * MsgChannelOpenInit defines an sdk.Msg to initialize a channel handshake. It * is called by a relayer on Chain A. */ export interface MsgChannelOpenInitSDKType { port_id: string; channel: ChannelSDKType; signer: string; } /** MsgChannelOpenInitResponse defines the Msg/ChannelOpenInit response type. */ export interface MsgChannelOpenInitResponse {} export interface MsgChannelOpenInitResponseProtoMsg { typeUrl: "/ibc.core.channel.v1.MsgChannelOpenInitResponse"; value: Uint8Array; } /** MsgChannelOpenInitResponse defines the Msg/ChannelOpenInit response type. */ export interface MsgChannelOpenInitResponseAmino {} export interface MsgChannelOpenInitResponseAminoMsg { type: "cosmos-sdk/MsgChannelOpenInitResponse"; value: MsgChannelOpenInitResponseAmino; } /** MsgChannelOpenInitResponse defines the Msg/ChannelOpenInit response type. */ export interface MsgChannelOpenInitResponseSDKType {} /** * MsgChannelOpenInit defines a msg sent by a Relayer to try to open a channel * on Chain B. */ export interface MsgChannelOpenTry { portId: string; /** * in the case of crossing hello's, when both chains call OpenInit, we need * the channel identifier of the previous channel in state INIT */ previousChannelId: string; channel: Channel; counterpartyVersion: string; proofInit: Uint8Array; proofHeight: Height; signer: string; } export interface MsgChannelOpenTryProtoMsg { typeUrl: "/ibc.core.channel.v1.MsgChannelOpenTry"; value: Uint8Array; } /** * MsgChannelOpenInit defines a msg sent by a Relayer to try to open a channel * on Chain B. */ export interface MsgChannelOpenTryAmino { port_id?: string; /** * in the case of crossing hello's, when both chains call OpenInit, we need * the channel identifier of the previous channel in state INIT */ previous_channel_id?: string; channel?: ChannelAmino; counterparty_version?: string; proof_init?: string; proof_height?: HeightAmino; signer?: string; } export interface MsgChannelOpenTryAminoMsg { type: "cosmos-sdk/MsgChannelOpenTry"; value: MsgChannelOpenTryAmino; } /** * MsgChannelOpenInit defines a msg sent by a Relayer to try to open a channel * on Chain B. */ export interface MsgChannelOpenTrySDKType { port_id: string; previous_channel_id: string; channel: ChannelSDKType; counterparty_version: string; proof_init: Uint8Array; proof_height: HeightSDKType; signer: string; } /** MsgChannelOpenTryResponse defines the Msg/ChannelOpenTry response type. */ export interface MsgChannelOpenTryResponse {} export interface MsgChannelOpenTryResponseProtoMsg { typeUrl: "/ibc.core.channel.v1.MsgChannelOpenTryResponse"; value: Uint8Array; } /** MsgChannelOpenTryResponse defines the Msg/ChannelOpenTry response type. */ export interface MsgChannelOpenTryResponseAmino {} export interface MsgChannelOpenTryResponseAminoMsg { type: "cosmos-sdk/MsgChannelOpenTryResponse"; value: MsgChannelOpenTryResponseAmino; } /** MsgChannelOpenTryResponse defines the Msg/ChannelOpenTry response type. */ export interface MsgChannelOpenTryResponseSDKType {} /** * MsgChannelOpenAck defines a msg sent by a Relayer to Chain A to acknowledge * the change of channel state to TRYOPEN on Chain B. */ export interface MsgChannelOpenAck { portId: string; channelId: string; counterpartyChannelId: string; counterpartyVersion: string; proofTry: Uint8Array; proofHeight: Height; signer: string; } export interface MsgChannelOpenAckProtoMsg { typeUrl: "/ibc.core.channel.v1.MsgChannelOpenAck"; value: Uint8Array; } /** * MsgChannelOpenAck defines a msg sent by a Relayer to Chain A to acknowledge * the change of channel state to TRYOPEN on Chain B. */ export interface MsgChannelOpenAckAmino { port_id?: string; channel_id?: string; counterparty_channel_id?: string; counterparty_version?: string; proof_try?: string; proof_height?: HeightAmino; signer?: string; } export interface MsgChannelOpenAckAminoMsg { type: "cosmos-sdk/MsgChannelOpenAck"; value: MsgChannelOpenAckAmino; } /** * MsgChannelOpenAck defines a msg sent by a Relayer to Chain A to acknowledge * the change of channel state to TRYOPEN on Chain B. */ export interface MsgChannelOpenAckSDKType { port_id: string; channel_id: string; counterparty_channel_id: string; counterparty_version: string; proof_try: Uint8Array; proof_height: HeightSDKType; signer: string; } /** MsgChannelOpenAckResponse defines the Msg/ChannelOpenAck response type. */ export interface MsgChannelOpenAckResponse {} export interface MsgChannelOpenAckResponseProtoMsg { typeUrl: "/ibc.core.channel.v1.MsgChannelOpenAckResponse"; value: Uint8Array; } /** MsgChannelOpenAckResponse defines the Msg/ChannelOpenAck response type. */ export interface MsgChannelOpenAckResponseAmino {} export interface MsgChannelOpenAckResponseAminoMsg { type: "cosmos-sdk/MsgChannelOpenAckResponse"; value: MsgChannelOpenAckResponseAmino; } /** MsgChannelOpenAckResponse defines the Msg/ChannelOpenAck response type. */ export interface MsgChannelOpenAckResponseSDKType {} /** * MsgChannelOpenConfirm defines a msg sent by a Relayer to Chain B to * acknowledge the change of channel state to OPEN on Chain A. */ export interface MsgChannelOpenConfirm { portId: string; channelId: string; proofAck: Uint8Array; proofHeight: Height; signer: string; } export interface MsgChannelOpenConfirmProtoMsg { typeUrl: "/ibc.core.channel.v1.MsgChannelOpenConfirm"; value: Uint8Array; } /** * MsgChannelOpenConfirm defines a msg sent by a Relayer to Chain B to * acknowledge the change of channel state to OPEN on Chain A. */ export interface MsgChannelOpenConfirmAmino { port_id?: string; channel_id?: string; proof_ack?: string; proof_height?: HeightAmino; signer?: string; } export interface MsgChannelOpenConfirmAminoMsg { type: "cosmos-sdk/MsgChannelOpenConfirm"; value: MsgChannelOpenConfirmAmino; } /** * MsgChannelOpenConfirm defines a msg sent by a Relayer to Chain B to * acknowledge the change of channel state to OPEN on Chain A. */ export interface MsgChannelOpenConfirmSDKType { port_id: string; channel_id: string; proof_ack: Uint8Array; proof_height: HeightSDKType; signer: string; } /** * MsgChannelOpenConfirmResponse defines the Msg/ChannelOpenConfirm response * type. */ export interface MsgChannelOpenConfirmResponse {} export interface MsgChannelOpenConfirmResponseProtoMsg { typeUrl: "/ibc.core.channel.v1.MsgChannelOpenConfirmResponse"; value: Uint8Array; } /** * MsgChannelOpenConfirmResponse defines the Msg/ChannelOpenConfirm response * type. */ export interface MsgChannelOpenConfirmResponseAmino {} export interface MsgChannelOpenConfirmResponseAminoMsg { type: "cosmos-sdk/MsgChannelOpenConfirmResponse"; value: MsgChannelOpenConfirmResponseAmino; } /** * MsgChannelOpenConfirmResponse defines the Msg/ChannelOpenConfirm response * type. */ export interface MsgChannelOpenConfirmResponseSDKType {} /** * MsgChannelCloseInit defines a msg sent by a Relayer to Chain A * to close a channel with Chain B. */ export interface MsgChannelCloseInit { portId: string; channelId: string; signer: string; } export interface MsgChannelCloseInitProtoMsg { typeUrl: "/ibc.core.channel.v1.MsgChannelCloseInit"; value: Uint8Array; } /** * MsgChannelCloseInit defines a msg sent by a Relayer to Chain A * to close a channel with Chain B. */ export interface MsgChannelCloseInitAmino { port_id?: string; channel_id?: string; signer?: string; } export interface MsgChannelCloseInitAminoMsg { type: "cosmos-sdk/MsgChannelCloseInit"; value: MsgChannelCloseInitAmino; } /** * MsgChannelCloseInit defines a msg sent by a Relayer to Chain A * to close a channel with Chain B. */ export interface MsgChannelCloseInitSDKType { port_id: string; channel_id: string; signer: string; } /** MsgChannelCloseInitResponse defines the Msg/ChannelCloseInit response type. */ export interface MsgChannelCloseInitResponse {} export interface MsgChannelCloseInitResponseProtoMsg { typeUrl: "/ibc.core.channel.v1.MsgChannelCloseInitResponse"; value: Uint8Array; } /** MsgChannelCloseInitResponse defines the Msg/ChannelCloseInit response type. */ export interface MsgChannelCloseInitResponseAmino {} export interface MsgChannelCloseInitResponseAminoMsg { type: "cosmos-sdk/MsgChannelCloseInitResponse"; value: MsgChannelCloseInitResponseAmino; } /** MsgChannelCloseInitResponse defines the Msg/ChannelCloseInit response type. */ export interface MsgChannelCloseInitResponseSDKType {} /** * MsgChannelCloseConfirm defines a msg sent by a Relayer to Chain B * to acknowledge the change of channel state to CLOSED on Chain A. */ export interface MsgChannelCloseConfirm { portId: string; channelId: string; proofInit: Uint8Array; proofHeight: Height; signer: string; } export interface MsgChannelCloseConfirmProtoMsg { typeUrl: "/ibc.core.channel.v1.MsgChannelCloseConfirm"; value: Uint8Array; } /** * MsgChannelCloseConfirm defines a msg sent by a Relayer to Chain B * to acknowledge the change of channel state to CLOSED on Chain A. */ export interface MsgChannelCloseConfirmAmino { port_id?: string; channel_id?: string; proof_init?: string; proof_height?: HeightAmino; signer?: string; } export interface MsgChannelCloseConfirmAminoMsg { type: "cosmos-sdk/MsgChannelCloseConfirm"; value: MsgChannelCloseConfirmAmino; } /** * MsgChannelCloseConfirm defines a msg sent by a Relayer to Chain B * to acknowledge the change of channel state to CLOSED on Chain A. */ export interface MsgChannelCloseConfirmSDKType { port_id: string; channel_id: string; proof_init: Uint8Array; proof_height: HeightSDKType; signer: string; } /** * MsgChannelCloseConfirmResponse defines the Msg/ChannelCloseConfirm response * type. */ export interface MsgChannelCloseConfirmResponse {} export interface MsgChannelCloseConfirmResponseProtoMsg { typeUrl: "/ibc.core.channel.v1.MsgChannelCloseConfirmResponse"; value: Uint8Array; } /** * MsgChannelCloseConfirmResponse defines the Msg/ChannelCloseConfirm response * type. */ export interface MsgChannelCloseConfirmResponseAmino {} export interface MsgChannelCloseConfirmResponseAminoMsg { type: "cosmos-sdk/MsgChannelCloseConfirmResponse"; value: MsgChannelCloseConfirmResponseAmino; } /** * MsgChannelCloseConfirmResponse defines the Msg/ChannelCloseConfirm response * type. */ export interface MsgChannelCloseConfirmResponseSDKType {} /** MsgRecvPacket receives incoming IBC packet */ export interface MsgRecvPacket { packet: Packet; proofCommitment: Uint8Array; proofHeight: Height; signer: string; } export interface MsgRecvPacketProtoMsg { typeUrl: "/ibc.core.channel.v1.MsgRecvPacket"; value: Uint8Array; } /** MsgRecvPacket receives incoming IBC packet */ export interface MsgRecvPacketAmino { packet?: PacketAmino; proof_commitment?: string; proof_height?: HeightAmino; signer?: string; } export interface MsgRecvPacketAminoMsg { type: "cosmos-sdk/MsgRecvPacket"; value: MsgRecvPacketAmino; } /** MsgRecvPacket receives incoming IBC packet */ export interface MsgRecvPacketSDKType { packet: PacketSDKType; proof_commitment: Uint8Array; proof_height: HeightSDKType; signer: string; } /** MsgRecvPacketResponse defines the Msg/RecvPacket response type. */ export interface MsgRecvPacketResponse {} export interface MsgRecvPacketResponseProtoMsg { typeUrl: "/ibc.core.channel.v1.MsgRecvPacketResponse"; value: Uint8Array; } /** MsgRecvPacketResponse defines the Msg/RecvPacket response type. */ export interface MsgRecvPacketResponseAmino {} export interface MsgRecvPacketResponseAminoMsg { type: "cosmos-sdk/MsgRecvPacketResponse"; value: MsgRecvPacketResponseAmino; } /** MsgRecvPacketResponse defines the Msg/RecvPacket response type. */ export interface MsgRecvPacketResponseSDKType {} /** MsgTimeout receives timed-out packet */ export interface MsgTimeout { packet: Packet; proofUnreceived: Uint8Array; proofHeight: Height; nextSequenceRecv: bigint; signer: string; } export interface MsgTimeoutProtoMsg { typeUrl: "/ibc.core.channel.v1.MsgTimeout"; value: Uint8Array; } /** MsgTimeout receives timed-out packet */ export interface MsgTimeoutAmino { packet?: PacketAmino; proof_unreceived?: string; proof_height?: HeightAmino; next_sequence_recv?: string; signer?: string; } export interface MsgTimeoutAminoMsg { type: "cosmos-sdk/MsgTimeout"; value: MsgTimeoutAmino; } /** MsgTimeout receives timed-out packet */ export interface MsgTimeoutSDKType { packet: PacketSDKType; proof_unreceived: Uint8Array; proof_height: HeightSDKType; next_sequence_recv: bigint; signer: string; } /** MsgTimeoutResponse defines the Msg/Timeout response type. */ export interface MsgTimeoutResponse {} export interface MsgTimeoutResponseProtoMsg { typeUrl: "/ibc.core.channel.v1.MsgTimeoutResponse"; value: Uint8Array; } /** MsgTimeoutResponse defines the Msg/Timeout response type. */ export interface MsgTimeoutResponseAmino {} export interface MsgTimeoutResponseAminoMsg { type: "cosmos-sdk/MsgTimeoutResponse"; value: MsgTimeoutResponseAmino; } /** MsgTimeoutResponse defines the Msg/Timeout response type. */ export interface MsgTimeoutResponseSDKType {} /** MsgTimeoutOnClose timed-out packet upon counterparty channel closure. */ export interface MsgTimeoutOnClose { packet: Packet; proofUnreceived: Uint8Array; proofClose: Uint8Array; proofHeight: Height; nextSequenceRecv: bigint; signer: string; } export interface MsgTimeoutOnCloseProtoMsg { typeUrl: "/ibc.core.channel.v1.MsgTimeoutOnClose"; value: Uint8Array; } /** MsgTimeoutOnClose timed-out packet upon counterparty channel closure. */ export interface MsgTimeoutOnCloseAmino { packet?: PacketAmino; proof_unreceived?: string; proof_close?: string; proof_height?: HeightAmino; next_sequence_recv?: string; signer?: string; } export interface MsgTimeoutOnCloseAminoMsg { type: "cosmos-sdk/MsgTimeoutOnClose"; value: MsgTimeoutOnCloseAmino; } /** MsgTimeoutOnClose timed-out packet upon counterparty channel closure. */ export interface MsgTimeoutOnCloseSDKType { packet: PacketSDKType; proof_unreceived: Uint8Array; proof_close: Uint8Array; proof_height: HeightSDKType; next_sequence_recv: bigint; signer: string; } /** MsgTimeoutOnCloseResponse defines the Msg/TimeoutOnClose response type. */ export interface MsgTimeoutOnCloseResponse {} export interface MsgTimeoutOnCloseResponseProtoMsg { typeUrl: "/ibc.core.channel.v1.MsgTimeoutOnCloseResponse"; value: Uint8Array; } /** MsgTimeoutOnCloseResponse defines the Msg/TimeoutOnClose response type. */ export interface MsgTimeoutOnCloseResponseAmino {} export interface MsgTimeoutOnCloseResponseAminoMsg { type: "cosmos-sdk/MsgTimeoutOnCloseResponse"; value: MsgTimeoutOnCloseResponseAmino; } /** MsgTimeoutOnCloseResponse defines the Msg/TimeoutOnClose response type. */ export interface MsgTimeoutOnCloseResponseSDKType {} /** MsgAcknowledgement receives incoming IBC acknowledgement */ export interface MsgAcknowledgement { packet: Packet; acknowledgement: Uint8Array; proofAcked: Uint8Array; proofHeight: Height; signer: string; } export interface MsgAcknowledgementProtoMsg { typeUrl: "/ibc.core.channel.v1.MsgAcknowledgement"; value: Uint8Array; } /** MsgAcknowledgement receives incoming IBC acknowledgement */ export interface MsgAcknowledgementAmino { packet?: PacketAmino; acknowledgement?: string; proof_acked?: string; proof_height?: HeightAmino; signer?: string; } export interface MsgAcknowledgementAminoMsg { type: "cosmos-sdk/MsgAcknowledgement"; value: MsgAcknowledgementAmino; } /** MsgAcknowledgement receives incoming IBC acknowledgement */ export interface MsgAcknowledgementSDKType { packet: PacketSDKType; acknowledgement: Uint8Array; proof_acked: Uint8Array; proof_height: HeightSDKType; signer: string; } /** MsgAcknowledgementResponse defines the Msg/Acknowledgement response type. */ export interface MsgAcknowledgementResponse {} export interface MsgAcknowledgementResponseProtoMsg { typeUrl: "/ibc.core.channel.v1.MsgAcknowledgementResponse"; value: Uint8Array; } /** MsgAcknowledgementResponse defines the Msg/Acknowledgement response type. */ export interface MsgAcknowledgementResponseAmino {} export interface MsgAcknowledgementResponseAminoMsg { type: "cosmos-sdk/MsgAcknowledgementResponse"; value: MsgAcknowledgementResponseAmino; } /** MsgAcknowledgementResponse defines the Msg/Acknowledgement response type. */ export interface MsgAcknowledgementResponseSDKType {} function createBaseMsgChannelOpenInit(): MsgChannelOpenInit { return { portId: "", channel: Channel.fromPartial({}), signer: "" }; } export const MsgChannelOpenInit = { typeUrl: "/ibc.core.channel.v1.MsgChannelOpenInit", encode(message: MsgChannelOpenInit, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.portId !== "") { writer.uint32(10).string(message.portId); } if (message.channel !== undefined) { Channel.encode(message.channel, writer.uint32(18).fork()).ldelim(); } if (message.signer !== "") { writer.uint32(26).string(message.signer); } return writer; }, decode(input: BinaryReader | Uint8Array, length?: number): MsgChannelOpenInit { const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgChannelOpenInit(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: message.portId = reader.string(); break; case 2: message.channel = Channel.decode(reader, reader.uint32()); break; case 3: message.signer = reader.string(); break; default: reader.skipType(tag & 7); break; } } return message; }, fromPartial(object: Partial): MsgChannelOpenInit { const message = createBaseMsgChannelOpenInit(); message.portId = object.portId ?? ""; message.channel = object.channel !== undefined && object.channel !== null ? Channel.fromPartial(object.channel) : undefined; message.signer = object.signer ?? ""; return message; }, fromAmino(object: MsgChannelOpenInitAmino): MsgChannelOpenInit { const message = createBaseMsgChannelOpenInit(); if (object.port_id !== undefined && object.port_id !== null) { message.portId = object.port_id; } if (object.channel !== undefined && object.channel !== null) { message.channel = Channel.fromAmino(object.channel); } if (object.signer !== undefined && object.signer !== null) { message.signer = object.signer; } return message; }, toAmino(message: MsgChannelOpenInit): MsgChannelOpenInitAmino { const obj: any = {}; obj.port_id = message.portId; obj.channel = message.channel ? Channel.toAmino(message.channel) : undefined; obj.signer = message.signer; return obj; }, fromAminoMsg(object: MsgChannelOpenInitAminoMsg): MsgChannelOpenInit { return MsgChannelOpenInit.fromAmino(object.value); }, toAminoMsg(message: MsgChannelOpenInit): MsgChannelOpenInitAminoMsg { return { type: "cosmos-sdk/MsgChannelOpenInit", value: MsgChannelOpenInit.toAmino(message) }; }, fromProtoMsg(message: MsgChannelOpenInitProtoMsg): MsgChannelOpenInit { return MsgChannelOpenInit.decode(message.value); }, toProto(message: MsgChannelOpenInit): Uint8Array { return MsgChannelOpenInit.encode(message).finish(); }, toProtoMsg(message: MsgChannelOpenInit): MsgChannelOpenInitProtoMsg { return { typeUrl: "/ibc.core.channel.v1.MsgChannelOpenInit", value: MsgChannelOpenInit.encode(message).finish() }; } }; function createBaseMsgChannelOpenInitResponse(): MsgChannelOpenInitResponse { return {}; } export const MsgChannelOpenInitResponse = { typeUrl: "/ibc.core.channel.v1.MsgChannelOpenInitResponse", encode(_: MsgChannelOpenInitResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { return writer; }, decode(input: BinaryReader | Uint8Array, length?: number): MsgChannelOpenInitResponse { const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgChannelOpenInitResponse(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } return message; }, fromPartial(_: Partial): MsgChannelOpenInitResponse { const message = createBaseMsgChannelOpenInitResponse(); return message; }, fromAmino(_: MsgChannelOpenInitResponseAmino): MsgChannelOpenInitResponse { const message = createBaseMsgChannelOpenInitResponse(); return message; }, toAmino(_: MsgChannelOpenInitResponse): MsgChannelOpenInitResponseAmino { const obj: any = {}; return obj; }, fromAminoMsg(object: MsgChannelOpenInitResponseAminoMsg): MsgChannelOpenInitResponse { return MsgChannelOpenInitResponse.fromAmino(object.value); }, toAminoMsg(message: MsgChannelOpenInitResponse): MsgChannelOpenInitResponseAminoMsg { return { type: "cosmos-sdk/MsgChannelOpenInitResponse", value: MsgChannelOpenInitResponse.toAmino(message) }; }, fromProtoMsg(message: MsgChannelOpenInitResponseProtoMsg): MsgChannelOpenInitResponse { return MsgChannelOpenInitResponse.decode(message.value); }, toProto(message: MsgChannelOpenInitResponse): Uint8Array { return MsgChannelOpenInitResponse.encode(message).finish(); }, toProtoMsg(message: MsgChannelOpenInitResponse): MsgChannelOpenInitResponseProtoMsg { return { typeUrl: "/ibc.core.channel.v1.MsgChannelOpenInitResponse", value: MsgChannelOpenInitResponse.encode(message).finish() }; } }; function createBaseMsgChannelOpenTry(): MsgChannelOpenTry { return { portId: "", previousChannelId: "", channel: Channel.fromPartial({}), counterpartyVersion: "", proofInit: new Uint8Array(), proofHeight: Height.fromPartial({}), signer: "" }; } export const MsgChannelOpenTry = { typeUrl: "/ibc.core.channel.v1.MsgChannelOpenTry", encode(message: MsgChannelOpenTry, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.portId !== "") { writer.uint32(10).string(message.portId); } if (message.previousChannelId !== "") { writer.uint32(18).string(message.previousChannelId); } if (message.channel !== undefined) { Channel.encode(message.channel, writer.uint32(26).fork()).ldelim(); } if (message.counterpartyVersion !== "") { writer.uint32(34).string(message.counterpartyVersion); } if (message.proofInit.length !== 0) { writer.uint32(42).bytes(message.proofInit); } if (message.proofHeight !== undefined) { Height.encode(message.proofHeight, writer.uint32(50).fork()).ldelim(); } if (message.signer !== "") { writer.uint32(58).string(message.signer); } return writer; }, decode(input: BinaryReader | Uint8Array, length?: number): MsgChannelOpenTry { const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgChannelOpenTry(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: message.portId = reader.string(); break; case 2: message.previousChannelId = reader.string(); break; case 3: message.channel = Channel.decode(reader, reader.uint32()); break; case 4: message.counterpartyVersion = reader.string(); break; case 5: message.proofInit = reader.bytes(); break; case 6: message.proofHeight = Height.decode(reader, reader.uint32()); break; case 7: message.signer = reader.string(); break; default: reader.skipType(tag & 7); break; } } return message; }, fromPartial(object: Partial): MsgChannelOpenTry { const message = createBaseMsgChannelOpenTry(); message.portId = object.portId ?? ""; message.previousChannelId = object.previousChannelId ?? ""; message.channel = object.channel !== undefined && object.channel !== null ? Channel.fromPartial(object.channel) : undefined; message.counterpartyVersion = object.counterpartyVersion ?? ""; message.proofInit = object.proofInit ?? new Uint8Array(); message.proofHeight = object.proofHeight !== undefined && object.proofHeight !== null ? Height.fromPartial(object.proofHeight) : undefined; message.signer = object.signer ?? ""; return message; }, fromAmino(object: MsgChannelOpenTryAmino): MsgChannelOpenTry { const message = createBaseMsgChannelOpenTry(); if (object.port_id !== undefined && object.port_id !== null) { message.portId = object.port_id; } if (object.previous_channel_id !== undefined && object.previous_channel_id !== null) { message.previousChannelId = object.previous_channel_id; } if (object.channel !== undefined && object.channel !== null) { message.channel = Channel.fromAmino(object.channel); } if (object.counterparty_version !== undefined && object.counterparty_version !== null) { message.counterpartyVersion = object.counterparty_version; } if (object.proof_init !== undefined && object.proof_init !== null) { message.proofInit = bytesFromBase64(object.proof_init); } if (object.proof_height !== undefined && object.proof_height !== null) { message.proofHeight = Height.fromAmino(object.proof_height); } if (object.signer !== undefined && object.signer !== null) { message.signer = object.signer; } return message; }, toAmino(message: MsgChannelOpenTry): MsgChannelOpenTryAmino { const obj: any = {}; obj.port_id = message.portId; obj.previous_channel_id = message.previousChannelId; obj.channel = message.channel ? Channel.toAmino(message.channel) : undefined; obj.counterparty_version = message.counterpartyVersion; obj.proof_init = message.proofInit ? base64FromBytes(message.proofInit) : undefined; obj.proof_height = message.proofHeight ? Height.toAmino(message.proofHeight) : {}; obj.signer = message.signer; return obj; }, fromAminoMsg(object: MsgChannelOpenTryAminoMsg): MsgChannelOpenTry { return MsgChannelOpenTry.fromAmino(object.value); }, toAminoMsg(message: MsgChannelOpenTry): MsgChannelOpenTryAminoMsg { return { type: "cosmos-sdk/MsgChannelOpenTry", value: MsgChannelOpenTry.toAmino(message) }; }, fromProtoMsg(message: MsgChannelOpenTryProtoMsg): MsgChannelOpenTry { return MsgChannelOpenTry.decode(message.value); }, toProto(message: MsgChannelOpenTry): Uint8Array { return MsgChannelOpenTry.encode(message).finish(); }, toProtoMsg(message: MsgChannelOpenTry): MsgChannelOpenTryProtoMsg { return { typeUrl: "/ibc.core.channel.v1.MsgChannelOpenTry", value: MsgChannelOpenTry.encode(message).finish() }; } }; function createBaseMsgChannelOpenTryResponse(): MsgChannelOpenTryResponse { return {}; } export const MsgChannelOpenTryResponse = { typeUrl: "/ibc.core.channel.v1.MsgChannelOpenTryResponse", encode(_: MsgChannelOpenTryResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { return writer; }, decode(input: BinaryReader | Uint8Array, length?: number): MsgChannelOpenTryResponse { const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgChannelOpenTryResponse(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } return message; }, fromPartial(_: Partial): MsgChannelOpenTryResponse { const message = createBaseMsgChannelOpenTryResponse(); return message; }, fromAmino(_: MsgChannelOpenTryResponseAmino): MsgChannelOpenTryResponse { const message = createBaseMsgChannelOpenTryResponse(); return message; }, toAmino(_: MsgChannelOpenTryResponse): MsgChannelOpenTryResponseAmino { const obj: any = {}; return obj; }, fromAminoMsg(object: MsgChannelOpenTryResponseAminoMsg): MsgChannelOpenTryResponse { return MsgChannelOpenTryResponse.fromAmino(object.value); }, toAminoMsg(message: MsgChannelOpenTryResponse): MsgChannelOpenTryResponseAminoMsg { return { type: "cosmos-sdk/MsgChannelOpenTryResponse", value: MsgChannelOpenTryResponse.toAmino(message) }; }, fromProtoMsg(message: MsgChannelOpenTryResponseProtoMsg): MsgChannelOpenTryResponse { return MsgChannelOpenTryResponse.decode(message.value); }, toProto(message: MsgChannelOpenTryResponse): Uint8Array { return MsgChannelOpenTryResponse.encode(message).finish(); }, toProtoMsg(message: MsgChannelOpenTryResponse): MsgChannelOpenTryResponseProtoMsg { return { typeUrl: "/ibc.core.channel.v1.MsgChannelOpenTryResponse", value: MsgChannelOpenTryResponse.encode(message).finish() }; } }; function createBaseMsgChannelOpenAck(): MsgChannelOpenAck { return { portId: "", channelId: "", counterpartyChannelId: "", counterpartyVersion: "", proofTry: new Uint8Array(), proofHeight: Height.fromPartial({}), signer: "" }; } export const MsgChannelOpenAck = { typeUrl: "/ibc.core.channel.v1.MsgChannelOpenAck", encode(message: MsgChannelOpenAck, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.portId !== "") { writer.uint32(10).string(message.portId); } if (message.channelId !== "") { writer.uint32(18).string(message.channelId); } if (message.counterpartyChannelId !== "") { writer.uint32(26).string(message.counterpartyChannelId); } if (message.counterpartyVersion !== "") { writer.uint32(34).string(message.counterpartyVersion); } if (message.proofTry.length !== 0) { writer.uint32(42).bytes(message.proofTry); } if (message.proofHeight !== undefined) { Height.encode(message.proofHeight, writer.uint32(50).fork()).ldelim(); } if (message.signer !== "") { writer.uint32(58).string(message.signer); } return writer; }, decode(input: BinaryReader | Uint8Array, length?: number): MsgChannelOpenAck { const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgChannelOpenAck(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: message.portId = reader.string(); break; case 2: message.channelId = reader.string(); break; case 3: message.counterpartyChannelId = reader.string(); break; case 4: message.counterpartyVersion = reader.string(); break; case 5: message.proofTry = reader.bytes(); break; case 6: message.proofHeight = Height.decode(reader, reader.uint32()); break; case 7: message.signer = reader.string(); break; default: reader.skipType(tag & 7); break; } } return message; }, fromPartial(object: Partial): MsgChannelOpenAck { const message = createBaseMsgChannelOpenAck(); message.portId = object.portId ?? ""; message.channelId = object.channelId ?? ""; message.counterpartyChannelId = object.counterpartyChannelId ?? ""; message.counterpartyVersion = object.counterpartyVersion ?? ""; message.proofTry = object.proofTry ?? new Uint8Array(); message.proofHeight = object.proofHeight !== undefined && object.proofHeight !== null ? Height.fromPartial(object.proofHeight) : undefined; message.signer = object.signer ?? ""; return message; }, fromAmino(object: MsgChannelOpenAckAmino): MsgChannelOpenAck { const message = createBaseMsgChannelOpenAck(); if (object.port_id !== undefined && object.port_id !== null) { message.portId = object.port_id; } if (object.channel_id !== undefined && object.channel_id !== null) { message.channelId = object.channel_id; } if (object.counterparty_channel_id !== undefined && object.counterparty_channel_id !== null) { message.counterpartyChannelId = object.counterparty_channel_id; } if (object.counterparty_version !== undefined && object.counterparty_version !== null) { message.counterpartyVersion = object.counterparty_version; } if (object.proof_try !== undefined && object.proof_try !== null) { message.proofTry = bytesFromBase64(object.proof_try); } if (object.proof_height !== undefined && object.proof_height !== null) { message.proofHeight = Height.fromAmino(object.proof_height); } if (object.signer !== undefined && object.signer !== null) { message.signer = object.signer; } return message; }, toAmino(message: MsgChannelOpenAck): MsgChannelOpenAckAmino { const obj: any = {}; obj.port_id = message.portId; obj.channel_id = message.channelId; obj.counterparty_channel_id = message.counterpartyChannelId; obj.counterparty_version = message.counterpartyVersion; obj.proof_try = message.proofTry ? base64FromBytes(message.proofTry) : undefined; obj.proof_height = message.proofHeight ? Height.toAmino(message.proofHeight) : {}; obj.signer = message.signer; return obj; }, fromAminoMsg(object: MsgChannelOpenAckAminoMsg): MsgChannelOpenAck { return MsgChannelOpenAck.fromAmino(object.value); }, toAminoMsg(message: MsgChannelOpenAck): MsgChannelOpenAckAminoMsg { return { type: "cosmos-sdk/MsgChannelOpenAck", value: MsgChannelOpenAck.toAmino(message) }; }, fromProtoMsg(message: MsgChannelOpenAckProtoMsg): MsgChannelOpenAck { return MsgChannelOpenAck.decode(message.value); }, toProto(message: MsgChannelOpenAck): Uint8Array { return MsgChannelOpenAck.encode(message).finish(); }, toProtoMsg(message: MsgChannelOpenAck): MsgChannelOpenAckProtoMsg { return { typeUrl: "/ibc.core.channel.v1.MsgChannelOpenAck", value: MsgChannelOpenAck.encode(message).finish() }; } }; function createBaseMsgChannelOpenAckResponse(): MsgChannelOpenAckResponse { return {}; } export const MsgChannelOpenAckResponse = { typeUrl: "/ibc.core.channel.v1.MsgChannelOpenAckResponse", encode(_: MsgChannelOpenAckResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { return writer; }, decode(input: BinaryReader | Uint8Array, length?: number): MsgChannelOpenAckResponse { const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgChannelOpenAckResponse(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } return message; }, fromPartial(_: Partial): MsgChannelOpenAckResponse { const message = createBaseMsgChannelOpenAckResponse(); return message; }, fromAmino(_: MsgChannelOpenAckResponseAmino): MsgChannelOpenAckResponse { const message = createBaseMsgChannelOpenAckResponse(); return message; }, toAmino(_: MsgChannelOpenAckResponse): MsgChannelOpenAckResponseAmino { const obj: any = {}; return obj; }, fromAminoMsg(object: MsgChannelOpenAckResponseAminoMsg): MsgChannelOpenAckResponse { return MsgChannelOpenAckResponse.fromAmino(object.value); }, toAminoMsg(message: MsgChannelOpenAckResponse): MsgChannelOpenAckResponseAminoMsg { return { type: "cosmos-sdk/MsgChannelOpenAckResponse", value: MsgChannelOpenAckResponse.toAmino(message) }; }, fromProtoMsg(message: MsgChannelOpenAckResponseProtoMsg): MsgChannelOpenAckResponse { return MsgChannelOpenAckResponse.decode(message.value); }, toProto(message: MsgChannelOpenAckResponse): Uint8Array { return MsgChannelOpenAckResponse.encode(message).finish(); }, toProtoMsg(message: MsgChannelOpenAckResponse): MsgChannelOpenAckResponseProtoMsg { return { typeUrl: "/ibc.core.channel.v1.MsgChannelOpenAckResponse", value: MsgChannelOpenAckResponse.encode(message).finish() }; } }; function createBaseMsgChannelOpenConfirm(): MsgChannelOpenConfirm { return { portId: "", channelId: "", proofAck: new Uint8Array(), proofHeight: Height.fromPartial({}), signer: "" }; } export const MsgChannelOpenConfirm = { typeUrl: "/ibc.core.channel.v1.MsgChannelOpenConfirm", encode(message: MsgChannelOpenConfirm, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.portId !== "") { writer.uint32(10).string(message.portId); } if (message.channelId !== "") { writer.uint32(18).string(message.channelId); } if (message.proofAck.length !== 0) { writer.uint32(26).bytes(message.proofAck); } if (message.proofHeight !== undefined) { Height.encode(message.proofHeight, writer.uint32(34).fork()).ldelim(); } if (message.signer !== "") { writer.uint32(42).string(message.signer); } return writer; }, decode(input: BinaryReader | Uint8Array, length?: number): MsgChannelOpenConfirm { const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgChannelOpenConfirm(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: message.portId = reader.string(); break; case 2: message.channelId = reader.string(); break; case 3: message.proofAck = reader.bytes(); break; case 4: message.proofHeight = Height.decode(reader, reader.uint32()); break; case 5: message.signer = reader.string(); break; default: reader.skipType(tag & 7); break; } } return message; }, fromPartial(object: Partial): MsgChannelOpenConfirm { const message = createBaseMsgChannelOpenConfirm(); message.portId = object.portId ?? ""; message.channelId = object.channelId ?? ""; message.proofAck = object.proofAck ?? new Uint8Array(); message.proofHeight = object.proofHeight !== undefined && object.proofHeight !== null ? Height.fromPartial(object.proofHeight) : undefined; message.signer = object.signer ?? ""; return message; }, fromAmino(object: MsgChannelOpenConfirmAmino): MsgChannelOpenConfirm { const message = createBaseMsgChannelOpenConfirm(); if (object.port_id !== undefined && object.port_id !== null) { message.portId = object.port_id; } if (object.channel_id !== undefined && object.channel_id !== null) { message.channelId = object.channel_id; } if (object.proof_ack !== undefined && object.proof_ack !== null) { message.proofAck = bytesFromBase64(object.proof_ack); } if (object.proof_height !== undefined && object.proof_height !== null) { message.proofHeight = Height.fromAmino(object.proof_height); } if (object.signer !== undefined && object.signer !== null) { message.signer = object.signer; } return message; }, toAmino(message: MsgChannelOpenConfirm): MsgChannelOpenConfirmAmino { const obj: any = {}; obj.port_id = message.portId; obj.channel_id = message.channelId; obj.proof_ack = message.proofAck ? base64FromBytes(message.proofAck) : undefined; obj.proof_height = message.proofHeight ? Height.toAmino(message.proofHeight) : {}; obj.signer = message.signer; return obj; }, fromAminoMsg(object: MsgChannelOpenConfirmAminoMsg): MsgChannelOpenConfirm { return MsgChannelOpenConfirm.fromAmino(object.value); }, toAminoMsg(message: MsgChannelOpenConfirm): MsgChannelOpenConfirmAminoMsg { return { type: "cosmos-sdk/MsgChannelOpenConfirm", value: MsgChannelOpenConfirm.toAmino(message) }; }, fromProtoMsg(message: MsgChannelOpenConfirmProtoMsg): MsgChannelOpenConfirm { return MsgChannelOpenConfirm.decode(message.value); }, toProto(message: MsgChannelOpenConfirm): Uint8Array { return MsgChannelOpenConfirm.encode(message).finish(); }, toProtoMsg(message: MsgChannelOpenConfirm): MsgChannelOpenConfirmProtoMsg { return { typeUrl: "/ibc.core.channel.v1.MsgChannelOpenConfirm", value: MsgChannelOpenConfirm.encode(message).finish() }; } }; function createBaseMsgChannelOpenConfirmResponse(): MsgChannelOpenConfirmResponse { return {}; } export const MsgChannelOpenConfirmResponse = { typeUrl: "/ibc.core.channel.v1.MsgChannelOpenConfirmResponse", encode(_: MsgChannelOpenConfirmResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { return writer; }, decode(input: BinaryReader | Uint8Array, length?: number): MsgChannelOpenConfirmResponse { const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgChannelOpenConfirmResponse(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } return message; }, fromPartial(_: Partial): MsgChannelOpenConfirmResponse { const message = createBaseMsgChannelOpenConfirmResponse(); return message; }, fromAmino(_: MsgChannelOpenConfirmResponseAmino): MsgChannelOpenConfirmResponse { const message = createBaseMsgChannelOpenConfirmResponse(); return message; }, toAmino(_: MsgChannelOpenConfirmResponse): MsgChannelOpenConfirmResponseAmino { const obj: any = {}; return obj; }, fromAminoMsg(object: MsgChannelOpenConfirmResponseAminoMsg): MsgChannelOpenConfirmResponse { return MsgChannelOpenConfirmResponse.fromAmino(object.value); }, toAminoMsg(message: MsgChannelOpenConfirmResponse): MsgChannelOpenConfirmResponseAminoMsg { return { type: "cosmos-sdk/MsgChannelOpenConfirmResponse", value: MsgChannelOpenConfirmResponse.toAmino(message) }; }, fromProtoMsg(message: MsgChannelOpenConfirmResponseProtoMsg): MsgChannelOpenConfirmResponse { return MsgChannelOpenConfirmResponse.decode(message.value); }, toProto(message: MsgChannelOpenConfirmResponse): Uint8Array { return MsgChannelOpenConfirmResponse.encode(message).finish(); }, toProtoMsg(message: MsgChannelOpenConfirmResponse): MsgChannelOpenConfirmResponseProtoMsg { return { typeUrl: "/ibc.core.channel.v1.MsgChannelOpenConfirmResponse", value: MsgChannelOpenConfirmResponse.encode(message).finish() }; } }; function createBaseMsgChannelCloseInit(): MsgChannelCloseInit { return { portId: "", channelId: "", signer: "" }; } export const MsgChannelCloseInit = { typeUrl: "/ibc.core.channel.v1.MsgChannelCloseInit", encode(message: MsgChannelCloseInit, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.portId !== "") { writer.uint32(10).string(message.portId); } if (message.channelId !== "") { writer.uint32(18).string(message.channelId); } if (message.signer !== "") { writer.uint32(26).string(message.signer); } return writer; }, decode(input: BinaryReader | Uint8Array, length?: number): MsgChannelCloseInit { const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgChannelCloseInit(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: message.portId = reader.string(); break; case 2: message.channelId = reader.string(); break; case 3: message.signer = reader.string(); break; default: reader.skipType(tag & 7); break; } } return message; }, fromPartial(object: Partial): MsgChannelCloseInit { const message = createBaseMsgChannelCloseInit(); message.portId = object.portId ?? ""; message.channelId = object.channelId ?? ""; message.signer = object.signer ?? ""; return message; }, fromAmino(object: MsgChannelCloseInitAmino): MsgChannelCloseInit { const message = createBaseMsgChannelCloseInit(); if (object.port_id !== undefined && object.port_id !== null) { message.portId = object.port_id; } if (object.channel_id !== undefined && object.channel_id !== null) { message.channelId = object.channel_id; } if (object.signer !== undefined && object.signer !== null) { message.signer = object.signer; } return message; }, toAmino(message: MsgChannelCloseInit): MsgChannelCloseInitAmino { const obj: any = {}; obj.port_id = message.portId; obj.channel_id = message.channelId; obj.signer = message.signer; return obj; }, fromAminoMsg(object: MsgChannelCloseInitAminoMsg): MsgChannelCloseInit { return MsgChannelCloseInit.fromAmino(object.value); }, toAminoMsg(message: MsgChannelCloseInit): MsgChannelCloseInitAminoMsg { return { type: "cosmos-sdk/MsgChannelCloseInit", value: MsgChannelCloseInit.toAmino(message) }; }, fromProtoMsg(message: MsgChannelCloseInitProtoMsg): MsgChannelCloseInit { return MsgChannelCloseInit.decode(message.value); }, toProto(message: MsgChannelCloseInit): Uint8Array { return MsgChannelCloseInit.encode(message).finish(); }, toProtoMsg(message: MsgChannelCloseInit): MsgChannelCloseInitProtoMsg { return { typeUrl: "/ibc.core.channel.v1.MsgChannelCloseInit", value: MsgChannelCloseInit.encode(message).finish() }; } }; function createBaseMsgChannelCloseInitResponse(): MsgChannelCloseInitResponse { return {}; } export const MsgChannelCloseInitResponse = { typeUrl: "/ibc.core.channel.v1.MsgChannelCloseInitResponse", encode(_: MsgChannelCloseInitResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { return writer; }, decode(input: BinaryReader | Uint8Array, length?: number): MsgChannelCloseInitResponse { const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgChannelCloseInitResponse(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } return message; }, fromPartial(_: Partial): MsgChannelCloseInitResponse { const message = createBaseMsgChannelCloseInitResponse(); return message; }, fromAmino(_: MsgChannelCloseInitResponseAmino): MsgChannelCloseInitResponse { const message = createBaseMsgChannelCloseInitResponse(); return message; }, toAmino(_: MsgChannelCloseInitResponse): MsgChannelCloseInitResponseAmino { const obj: any = {}; return obj; }, fromAminoMsg(object: MsgChannelCloseInitResponseAminoMsg): MsgChannelCloseInitResponse { return MsgChannelCloseInitResponse.fromAmino(object.value); }, toAminoMsg(message: MsgChannelCloseInitResponse): MsgChannelCloseInitResponseAminoMsg { return { type: "cosmos-sdk/MsgChannelCloseInitResponse", value: MsgChannelCloseInitResponse.toAmino(message) }; }, fromProtoMsg(message: MsgChannelCloseInitResponseProtoMsg): MsgChannelCloseInitResponse { return MsgChannelCloseInitResponse.decode(message.value); }, toProto(message: MsgChannelCloseInitResponse): Uint8Array { return MsgChannelCloseInitResponse.encode(message).finish(); }, toProtoMsg(message: MsgChannelCloseInitResponse): MsgChannelCloseInitResponseProtoMsg { return { typeUrl: "/ibc.core.channel.v1.MsgChannelCloseInitResponse", value: MsgChannelCloseInitResponse.encode(message).finish() }; } }; function createBaseMsgChannelCloseConfirm(): MsgChannelCloseConfirm { return { portId: "", channelId: "", proofInit: new Uint8Array(), proofHeight: Height.fromPartial({}), signer: "" }; } export const MsgChannelCloseConfirm = { typeUrl: "/ibc.core.channel.v1.MsgChannelCloseConfirm", encode(message: MsgChannelCloseConfirm, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.portId !== "") { writer.uint32(10).string(message.portId); } if (message.channelId !== "") { writer.uint32(18).string(message.channelId); } if (message.proofInit.length !== 0) { writer.uint32(26).bytes(message.proofInit); } if (message.proofHeight !== undefined) { Height.encode(message.proofHeight, writer.uint32(34).fork()).ldelim(); } if (message.signer !== "") { writer.uint32(42).string(message.signer); } return writer; }, decode(input: BinaryReader | Uint8Array, length?: number): MsgChannelCloseConfirm { const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgChannelCloseConfirm(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: message.portId = reader.string(); break; case 2: message.channelId = reader.string(); break; case 3: message.proofInit = reader.bytes(); break; case 4: message.proofHeight = Height.decode(reader, reader.uint32()); break; case 5: message.signer = reader.string(); break; default: reader.skipType(tag & 7); break; } } return message; }, fromPartial(object: Partial): MsgChannelCloseConfirm { const message = createBaseMsgChannelCloseConfirm(); message.portId = object.portId ?? ""; message.channelId = object.channelId ?? ""; message.proofInit = object.proofInit ?? new Uint8Array(); message.proofHeight = object.proofHeight !== undefined && object.proofHeight !== null ? Height.fromPartial(object.proofHeight) : undefined; message.signer = object.signer ?? ""; return message; }, fromAmino(object: MsgChannelCloseConfirmAmino): MsgChannelCloseConfirm { const message = createBaseMsgChannelCloseConfirm(); if (object.port_id !== undefined && object.port_id !== null) { message.portId = object.port_id; } if (object.channel_id !== undefined && object.channel_id !== null) { message.channelId = object.channel_id; } if (object.proof_init !== undefined && object.proof_init !== null) { message.proofInit = bytesFromBase64(object.proof_init); } if (object.proof_height !== undefined && object.proof_height !== null) { message.proofHeight = Height.fromAmino(object.proof_height); } if (object.signer !== undefined && object.signer !== null) { message.signer = object.signer; } return message; }, toAmino(message: MsgChannelCloseConfirm): MsgChannelCloseConfirmAmino { const obj: any = {}; obj.port_id = message.portId; obj.channel_id = message.channelId; obj.proof_init = message.proofInit ? base64FromBytes(message.proofInit) : undefined; obj.proof_height = message.proofHeight ? Height.toAmino(message.proofHeight) : {}; obj.signer = message.signer; return obj; }, fromAminoMsg(object: MsgChannelCloseConfirmAminoMsg): MsgChannelCloseConfirm { return MsgChannelCloseConfirm.fromAmino(object.value); }, toAminoMsg(message: MsgChannelCloseConfirm): MsgChannelCloseConfirmAminoMsg { return { type: "cosmos-sdk/MsgChannelCloseConfirm", value: MsgChannelCloseConfirm.toAmino(message) }; }, fromProtoMsg(message: MsgChannelCloseConfirmProtoMsg): MsgChannelCloseConfirm { return MsgChannelCloseConfirm.decode(message.value); }, toProto(message: MsgChannelCloseConfirm): Uint8Array { return MsgChannelCloseConfirm.encode(message).finish(); }, toProtoMsg(message: MsgChannelCloseConfirm): MsgChannelCloseConfirmProtoMsg { return { typeUrl: "/ibc.core.channel.v1.MsgChannelCloseConfirm", value: MsgChannelCloseConfirm.encode(message).finish() }; } }; function createBaseMsgChannelCloseConfirmResponse(): MsgChannelCloseConfirmResponse { return {}; } export const MsgChannelCloseConfirmResponse = { typeUrl: "/ibc.core.channel.v1.MsgChannelCloseConfirmResponse", encode(_: MsgChannelCloseConfirmResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { return writer; }, decode(input: BinaryReader | Uint8Array, length?: number): MsgChannelCloseConfirmResponse { const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgChannelCloseConfirmResponse(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } return message; }, fromPartial(_: Partial): MsgChannelCloseConfirmResponse { const message = createBaseMsgChannelCloseConfirmResponse(); return message; }, fromAmino(_: MsgChannelCloseConfirmResponseAmino): MsgChannelCloseConfirmResponse { const message = createBaseMsgChannelCloseConfirmResponse(); return message; }, toAmino(_: MsgChannelCloseConfirmResponse): MsgChannelCloseConfirmResponseAmino { const obj: any = {}; return obj; }, fromAminoMsg(object: MsgChannelCloseConfirmResponseAminoMsg): MsgChannelCloseConfirmResponse { return MsgChannelCloseConfirmResponse.fromAmino(object.value); }, toAminoMsg(message: MsgChannelCloseConfirmResponse): MsgChannelCloseConfirmResponseAminoMsg { return { type: "cosmos-sdk/MsgChannelCloseConfirmResponse", value: MsgChannelCloseConfirmResponse.toAmino(message) }; }, fromProtoMsg(message: MsgChannelCloseConfirmResponseProtoMsg): MsgChannelCloseConfirmResponse { return MsgChannelCloseConfirmResponse.decode(message.value); }, toProto(message: MsgChannelCloseConfirmResponse): Uint8Array { return MsgChannelCloseConfirmResponse.encode(message).finish(); }, toProtoMsg(message: MsgChannelCloseConfirmResponse): MsgChannelCloseConfirmResponseProtoMsg { return { typeUrl: "/ibc.core.channel.v1.MsgChannelCloseConfirmResponse", value: MsgChannelCloseConfirmResponse.encode(message).finish() }; } }; function createBaseMsgRecvPacket(): MsgRecvPacket { return { packet: Packet.fromPartial({}), proofCommitment: new Uint8Array(), proofHeight: Height.fromPartial({}), signer: "" }; } export const MsgRecvPacket = { typeUrl: "/ibc.core.channel.v1.MsgRecvPacket", encode(message: MsgRecvPacket, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.packet !== undefined) { Packet.encode(message.packet, writer.uint32(10).fork()).ldelim(); } if (message.proofCommitment.length !== 0) { writer.uint32(18).bytes(message.proofCommitment); } if (message.proofHeight !== undefined) { Height.encode(message.proofHeight, writer.uint32(26).fork()).ldelim(); } if (message.signer !== "") { writer.uint32(34).string(message.signer); } return writer; }, decode(input: BinaryReader | Uint8Array, length?: number): MsgRecvPacket { const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgRecvPacket(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: message.packet = Packet.decode(reader, reader.uint32()); break; case 2: message.proofCommitment = reader.bytes(); break; case 3: message.proofHeight = Height.decode(reader, reader.uint32()); break; case 4: message.signer = reader.string(); break; default: reader.skipType(tag & 7); break; } } return message; }, fromPartial(object: Partial): MsgRecvPacket { const message = createBaseMsgRecvPacket(); message.packet = object.packet !== undefined && object.packet !== null ? Packet.fromPartial(object.packet) : undefined; message.proofCommitment = object.proofCommitment ?? new Uint8Array(); message.proofHeight = object.proofHeight !== undefined && object.proofHeight !== null ? Height.fromPartial(object.proofHeight) : undefined; message.signer = object.signer ?? ""; return message; }, fromAmino(object: MsgRecvPacketAmino): MsgRecvPacket { const message = createBaseMsgRecvPacket(); if (object.packet !== undefined && object.packet !== null) { message.packet = Packet.fromAmino(object.packet); } if (object.proof_commitment !== undefined && object.proof_commitment !== null) { message.proofCommitment = bytesFromBase64(object.proof_commitment); } if (object.proof_height !== undefined && object.proof_height !== null) { message.proofHeight = Height.fromAmino(object.proof_height); } if (object.signer !== undefined && object.signer !== null) { message.signer = object.signer; } return message; }, toAmino(message: MsgRecvPacket): MsgRecvPacketAmino { const obj: any = {}; obj.packet = message.packet ? Packet.toAmino(message.packet) : undefined; obj.proof_commitment = message.proofCommitment ? base64FromBytes(message.proofCommitment) : undefined; obj.proof_height = message.proofHeight ? Height.toAmino(message.proofHeight) : {}; obj.signer = message.signer; return obj; }, fromAminoMsg(object: MsgRecvPacketAminoMsg): MsgRecvPacket { return MsgRecvPacket.fromAmino(object.value); }, toAminoMsg(message: MsgRecvPacket): MsgRecvPacketAminoMsg { return { type: "cosmos-sdk/MsgRecvPacket", value: MsgRecvPacket.toAmino(message) }; }, fromProtoMsg(message: MsgRecvPacketProtoMsg): MsgRecvPacket { return MsgRecvPacket.decode(message.value); }, toProto(message: MsgRecvPacket): Uint8Array { return MsgRecvPacket.encode(message).finish(); }, toProtoMsg(message: MsgRecvPacket): MsgRecvPacketProtoMsg { return { typeUrl: "/ibc.core.channel.v1.MsgRecvPacket", value: MsgRecvPacket.encode(message).finish() }; } }; function createBaseMsgRecvPacketResponse(): MsgRecvPacketResponse { return {}; } export const MsgRecvPacketResponse = { typeUrl: "/ibc.core.channel.v1.MsgRecvPacketResponse", encode(_: MsgRecvPacketResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { return writer; }, decode(input: BinaryReader | Uint8Array, length?: number): MsgRecvPacketResponse { const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgRecvPacketResponse(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } return message; }, fromPartial(_: Partial): MsgRecvPacketResponse { const message = createBaseMsgRecvPacketResponse(); return message; }, fromAmino(_: MsgRecvPacketResponseAmino): MsgRecvPacketResponse { const message = createBaseMsgRecvPacketResponse(); return message; }, toAmino(_: MsgRecvPacketResponse): MsgRecvPacketResponseAmino { const obj: any = {}; return obj; }, fromAminoMsg(object: MsgRecvPacketResponseAminoMsg): MsgRecvPacketResponse { return MsgRecvPacketResponse.fromAmino(object.value); }, toAminoMsg(message: MsgRecvPacketResponse): MsgRecvPacketResponseAminoMsg { return { type: "cosmos-sdk/MsgRecvPacketResponse", value: MsgRecvPacketResponse.toAmino(message) }; }, fromProtoMsg(message: MsgRecvPacketResponseProtoMsg): MsgRecvPacketResponse { return MsgRecvPacketResponse.decode(message.value); }, toProto(message: MsgRecvPacketResponse): Uint8Array { return MsgRecvPacketResponse.encode(message).finish(); }, toProtoMsg(message: MsgRecvPacketResponse): MsgRecvPacketResponseProtoMsg { return { typeUrl: "/ibc.core.channel.v1.MsgRecvPacketResponse", value: MsgRecvPacketResponse.encode(message).finish() }; } }; function createBaseMsgTimeout(): MsgTimeout { return { packet: Packet.fromPartial({}), proofUnreceived: new Uint8Array(), proofHeight: Height.fromPartial({}), nextSequenceRecv: BigInt(0), signer: "" }; } export const MsgTimeout = { typeUrl: "/ibc.core.channel.v1.MsgTimeout", encode(message: MsgTimeout, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.packet !== undefined) { Packet.encode(message.packet, writer.uint32(10).fork()).ldelim(); } if (message.proofUnreceived.length !== 0) { writer.uint32(18).bytes(message.proofUnreceived); } if (message.proofHeight !== undefined) { Height.encode(message.proofHeight, writer.uint32(26).fork()).ldelim(); } if (message.nextSequenceRecv !== BigInt(0)) { writer.uint32(32).uint64(message.nextSequenceRecv); } if (message.signer !== "") { writer.uint32(42).string(message.signer); } return writer; }, decode(input: BinaryReader | Uint8Array, length?: number): MsgTimeout { const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgTimeout(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: message.packet = Packet.decode(reader, reader.uint32()); break; case 2: message.proofUnreceived = reader.bytes(); break; case 3: message.proofHeight = Height.decode(reader, reader.uint32()); break; case 4: message.nextSequenceRecv = reader.uint64(); break; case 5: message.signer = reader.string(); break; default: reader.skipType(tag & 7); break; } } return message; }, fromPartial(object: Partial): MsgTimeout { const message = createBaseMsgTimeout(); message.packet = object.packet !== undefined && object.packet !== null ? Packet.fromPartial(object.packet) : undefined; message.proofUnreceived = object.proofUnreceived ?? new Uint8Array(); message.proofHeight = object.proofHeight !== undefined && object.proofHeight !== null ? Height.fromPartial(object.proofHeight) : undefined; message.nextSequenceRecv = object.nextSequenceRecv !== undefined && object.nextSequenceRecv !== null ? BigInt(object.nextSequenceRecv.toString()) : BigInt(0); message.signer = object.signer ?? ""; return message; }, fromAmino(object: MsgTimeoutAmino): MsgTimeout { const message = createBaseMsgTimeout(); if (object.packet !== undefined && object.packet !== null) { message.packet = Packet.fromAmino(object.packet); } if (object.proof_unreceived !== undefined && object.proof_unreceived !== null) { message.proofUnreceived = bytesFromBase64(object.proof_unreceived); } if (object.proof_height !== undefined && object.proof_height !== null) { message.proofHeight = Height.fromAmino(object.proof_height); } if (object.next_sequence_recv !== undefined && object.next_sequence_recv !== null) { message.nextSequenceRecv = BigInt(object.next_sequence_recv); } if (object.signer !== undefined && object.signer !== null) { message.signer = object.signer; } return message; }, toAmino(message: MsgTimeout): MsgTimeoutAmino { const obj: any = {}; obj.packet = message.packet ? Packet.toAmino(message.packet) : undefined; obj.proof_unreceived = message.proofUnreceived ? base64FromBytes(message.proofUnreceived) : undefined; obj.proof_height = message.proofHeight ? Height.toAmino(message.proofHeight) : {}; obj.next_sequence_recv = message.nextSequenceRecv ? message.nextSequenceRecv.toString() : undefined; obj.signer = message.signer; return obj; }, fromAminoMsg(object: MsgTimeoutAminoMsg): MsgTimeout { return MsgTimeout.fromAmino(object.value); }, toAminoMsg(message: MsgTimeout): MsgTimeoutAminoMsg { return { type: "cosmos-sdk/MsgTimeout", value: MsgTimeout.toAmino(message) }; }, fromProtoMsg(message: MsgTimeoutProtoMsg): MsgTimeout { return MsgTimeout.decode(message.value); }, toProto(message: MsgTimeout): Uint8Array { return MsgTimeout.encode(message).finish(); }, toProtoMsg(message: MsgTimeout): MsgTimeoutProtoMsg { return { typeUrl: "/ibc.core.channel.v1.MsgTimeout", value: MsgTimeout.encode(message).finish() }; } }; function createBaseMsgTimeoutResponse(): MsgTimeoutResponse { return {}; } export const MsgTimeoutResponse = { typeUrl: "/ibc.core.channel.v1.MsgTimeoutResponse", encode(_: MsgTimeoutResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { return writer; }, decode(input: BinaryReader | Uint8Array, length?: number): MsgTimeoutResponse { const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgTimeoutResponse(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } return message; }, fromPartial(_: Partial): MsgTimeoutResponse { const message = createBaseMsgTimeoutResponse(); return message; }, fromAmino(_: MsgTimeoutResponseAmino): MsgTimeoutResponse { const message = createBaseMsgTimeoutResponse(); return message; }, toAmino(_: MsgTimeoutResponse): MsgTimeoutResponseAmino { const obj: any = {}; return obj; }, fromAminoMsg(object: MsgTimeoutResponseAminoMsg): MsgTimeoutResponse { return MsgTimeoutResponse.fromAmino(object.value); }, toAminoMsg(message: MsgTimeoutResponse): MsgTimeoutResponseAminoMsg { return { type: "cosmos-sdk/MsgTimeoutResponse", value: MsgTimeoutResponse.toAmino(message) }; }, fromProtoMsg(message: MsgTimeoutResponseProtoMsg): MsgTimeoutResponse { return MsgTimeoutResponse.decode(message.value); }, toProto(message: MsgTimeoutResponse): Uint8Array { return MsgTimeoutResponse.encode(message).finish(); }, toProtoMsg(message: MsgTimeoutResponse): MsgTimeoutResponseProtoMsg { return { typeUrl: "/ibc.core.channel.v1.MsgTimeoutResponse", value: MsgTimeoutResponse.encode(message).finish() }; } }; function createBaseMsgTimeoutOnClose(): MsgTimeoutOnClose { return { packet: Packet.fromPartial({}), proofUnreceived: new Uint8Array(), proofClose: new Uint8Array(), proofHeight: Height.fromPartial({}), nextSequenceRecv: BigInt(0), signer: "" }; } export const MsgTimeoutOnClose = { typeUrl: "/ibc.core.channel.v1.MsgTimeoutOnClose", encode(message: MsgTimeoutOnClose, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.packet !== undefined) { Packet.encode(message.packet, writer.uint32(10).fork()).ldelim(); } if (message.proofUnreceived.length !== 0) { writer.uint32(18).bytes(message.proofUnreceived); } if (message.proofClose.length !== 0) { writer.uint32(26).bytes(message.proofClose); } if (message.proofHeight !== undefined) { Height.encode(message.proofHeight, writer.uint32(34).fork()).ldelim(); } if (message.nextSequenceRecv !== BigInt(0)) { writer.uint32(40).uint64(message.nextSequenceRecv); } if (message.signer !== "") { writer.uint32(50).string(message.signer); } return writer; }, decode(input: BinaryReader | Uint8Array, length?: number): MsgTimeoutOnClose { const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgTimeoutOnClose(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: message.packet = Packet.decode(reader, reader.uint32()); break; case 2: message.proofUnreceived = reader.bytes(); break; case 3: message.proofClose = reader.bytes(); break; case 4: message.proofHeight = Height.decode(reader, reader.uint32()); break; case 5: message.nextSequenceRecv = reader.uint64(); break; case 6: message.signer = reader.string(); break; default: reader.skipType(tag & 7); break; } } return message; }, fromPartial(object: Partial): MsgTimeoutOnClose { const message = createBaseMsgTimeoutOnClose(); message.packet = object.packet !== undefined && object.packet !== null ? Packet.fromPartial(object.packet) : undefined; message.proofUnreceived = object.proofUnreceived ?? new Uint8Array(); message.proofClose = object.proofClose ?? new Uint8Array(); message.proofHeight = object.proofHeight !== undefined && object.proofHeight !== null ? Height.fromPartial(object.proofHeight) : undefined; message.nextSequenceRecv = object.nextSequenceRecv !== undefined && object.nextSequenceRecv !== null ? BigInt(object.nextSequenceRecv.toString()) : BigInt(0); message.signer = object.signer ?? ""; return message; }, fromAmino(object: MsgTimeoutOnCloseAmino): MsgTimeoutOnClose { const message = createBaseMsgTimeoutOnClose(); if (object.packet !== undefined && object.packet !== null) { message.packet = Packet.fromAmino(object.packet); } if (object.proof_unreceived !== undefined && object.proof_unreceived !== null) { message.proofUnreceived = bytesFromBase64(object.proof_unreceived); } if (object.proof_close !== undefined && object.proof_close !== null) { message.proofClose = bytesFromBase64(object.proof_close); } if (object.proof_height !== undefined && object.proof_height !== null) { message.proofHeight = Height.fromAmino(object.proof_height); } if (object.next_sequence_recv !== undefined && object.next_sequence_recv !== null) { message.nextSequenceRecv = BigInt(object.next_sequence_recv); } if (object.signer !== undefined && object.signer !== null) { message.signer = object.signer; } return message; }, toAmino(message: MsgTimeoutOnClose): MsgTimeoutOnCloseAmino { const obj: any = {}; obj.packet = message.packet ? Packet.toAmino(message.packet) : undefined; obj.proof_unreceived = message.proofUnreceived ? base64FromBytes(message.proofUnreceived) : undefined; obj.proof_close = message.proofClose ? base64FromBytes(message.proofClose) : undefined; obj.proof_height = message.proofHeight ? Height.toAmino(message.proofHeight) : {}; obj.next_sequence_recv = message.nextSequenceRecv ? message.nextSequenceRecv.toString() : undefined; obj.signer = message.signer; return obj; }, fromAminoMsg(object: MsgTimeoutOnCloseAminoMsg): MsgTimeoutOnClose { return MsgTimeoutOnClose.fromAmino(object.value); }, toAminoMsg(message: MsgTimeoutOnClose): MsgTimeoutOnCloseAminoMsg { return { type: "cosmos-sdk/MsgTimeoutOnClose", value: MsgTimeoutOnClose.toAmino(message) }; }, fromProtoMsg(message: MsgTimeoutOnCloseProtoMsg): MsgTimeoutOnClose { return MsgTimeoutOnClose.decode(message.value); }, toProto(message: MsgTimeoutOnClose): Uint8Array { return MsgTimeoutOnClose.encode(message).finish(); }, toProtoMsg(message: MsgTimeoutOnClose): MsgTimeoutOnCloseProtoMsg { return { typeUrl: "/ibc.core.channel.v1.MsgTimeoutOnClose", value: MsgTimeoutOnClose.encode(message).finish() }; } }; function createBaseMsgTimeoutOnCloseResponse(): MsgTimeoutOnCloseResponse { return {}; } export const MsgTimeoutOnCloseResponse = { typeUrl: "/ibc.core.channel.v1.MsgTimeoutOnCloseResponse", encode(_: MsgTimeoutOnCloseResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { return writer; }, decode(input: BinaryReader | Uint8Array, length?: number): MsgTimeoutOnCloseResponse { const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgTimeoutOnCloseResponse(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } return message; }, fromPartial(_: Partial): MsgTimeoutOnCloseResponse { const message = createBaseMsgTimeoutOnCloseResponse(); return message; }, fromAmino(_: MsgTimeoutOnCloseResponseAmino): MsgTimeoutOnCloseResponse { const message = createBaseMsgTimeoutOnCloseResponse(); return message; }, toAmino(_: MsgTimeoutOnCloseResponse): MsgTimeoutOnCloseResponseAmino { const obj: any = {}; return obj; }, fromAminoMsg(object: MsgTimeoutOnCloseResponseAminoMsg): MsgTimeoutOnCloseResponse { return MsgTimeoutOnCloseResponse.fromAmino(object.value); }, toAminoMsg(message: MsgTimeoutOnCloseResponse): MsgTimeoutOnCloseResponseAminoMsg { return { type: "cosmos-sdk/MsgTimeoutOnCloseResponse", value: MsgTimeoutOnCloseResponse.toAmino(message) }; }, fromProtoMsg(message: MsgTimeoutOnCloseResponseProtoMsg): MsgTimeoutOnCloseResponse { return MsgTimeoutOnCloseResponse.decode(message.value); }, toProto(message: MsgTimeoutOnCloseResponse): Uint8Array { return MsgTimeoutOnCloseResponse.encode(message).finish(); }, toProtoMsg(message: MsgTimeoutOnCloseResponse): MsgTimeoutOnCloseResponseProtoMsg { return { typeUrl: "/ibc.core.channel.v1.MsgTimeoutOnCloseResponse", value: MsgTimeoutOnCloseResponse.encode(message).finish() }; } }; function createBaseMsgAcknowledgement(): MsgAcknowledgement { return { packet: Packet.fromPartial({}), acknowledgement: new Uint8Array(), proofAcked: new Uint8Array(), proofHeight: Height.fromPartial({}), signer: "" }; } export const MsgAcknowledgement = { typeUrl: "/ibc.core.channel.v1.MsgAcknowledgement", encode(message: MsgAcknowledgement, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { if (message.packet !== undefined) { Packet.encode(message.packet, writer.uint32(10).fork()).ldelim(); } if (message.acknowledgement.length !== 0) { writer.uint32(18).bytes(message.acknowledgement); } if (message.proofAcked.length !== 0) { writer.uint32(26).bytes(message.proofAcked); } if (message.proofHeight !== undefined) { Height.encode(message.proofHeight, writer.uint32(34).fork()).ldelim(); } if (message.signer !== "") { writer.uint32(42).string(message.signer); } return writer; }, decode(input: BinaryReader | Uint8Array, length?: number): MsgAcknowledgement { const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgAcknowledgement(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: message.packet = Packet.decode(reader, reader.uint32()); break; case 2: message.acknowledgement = reader.bytes(); break; case 3: message.proofAcked = reader.bytes(); break; case 4: message.proofHeight = Height.decode(reader, reader.uint32()); break; case 5: message.signer = reader.string(); break; default: reader.skipType(tag & 7); break; } } return message; }, fromPartial(object: Partial): MsgAcknowledgement { const message = createBaseMsgAcknowledgement(); message.packet = object.packet !== undefined && object.packet !== null ? Packet.fromPartial(object.packet) : undefined; message.acknowledgement = object.acknowledgement ?? new Uint8Array(); message.proofAcked = object.proofAcked ?? new Uint8Array(); message.proofHeight = object.proofHeight !== undefined && object.proofHeight !== null ? Height.fromPartial(object.proofHeight) : undefined; message.signer = object.signer ?? ""; return message; }, fromAmino(object: MsgAcknowledgementAmino): MsgAcknowledgement { const message = createBaseMsgAcknowledgement(); if (object.packet !== undefined && object.packet !== null) { message.packet = Packet.fromAmino(object.packet); } if (object.acknowledgement !== undefined && object.acknowledgement !== null) { message.acknowledgement = bytesFromBase64(object.acknowledgement); } if (object.proof_acked !== undefined && object.proof_acked !== null) { message.proofAcked = bytesFromBase64(object.proof_acked); } if (object.proof_height !== undefined && object.proof_height !== null) { message.proofHeight = Height.fromAmino(object.proof_height); } if (object.signer !== undefined && object.signer !== null) { message.signer = object.signer; } return message; }, toAmino(message: MsgAcknowledgement): MsgAcknowledgementAmino { const obj: any = {}; obj.packet = message.packet ? Packet.toAmino(message.packet) : undefined; obj.acknowledgement = message.acknowledgement ? base64FromBytes(message.acknowledgement) : undefined; obj.proof_acked = message.proofAcked ? base64FromBytes(message.proofAcked) : undefined; obj.proof_height = message.proofHeight ? Height.toAmino(message.proofHeight) : {}; obj.signer = message.signer; return obj; }, fromAminoMsg(object: MsgAcknowledgementAminoMsg): MsgAcknowledgement { return MsgAcknowledgement.fromAmino(object.value); }, toAminoMsg(message: MsgAcknowledgement): MsgAcknowledgementAminoMsg { return { type: "cosmos-sdk/MsgAcknowledgement", value: MsgAcknowledgement.toAmino(message) }; }, fromProtoMsg(message: MsgAcknowledgementProtoMsg): MsgAcknowledgement { return MsgAcknowledgement.decode(message.value); }, toProto(message: MsgAcknowledgement): Uint8Array { return MsgAcknowledgement.encode(message).finish(); }, toProtoMsg(message: MsgAcknowledgement): MsgAcknowledgementProtoMsg { return { typeUrl: "/ibc.core.channel.v1.MsgAcknowledgement", value: MsgAcknowledgement.encode(message).finish() }; } }; function createBaseMsgAcknowledgementResponse(): MsgAcknowledgementResponse { return {}; } export const MsgAcknowledgementResponse = { typeUrl: "/ibc.core.channel.v1.MsgAcknowledgementResponse", encode(_: MsgAcknowledgementResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter { return writer; }, decode(input: BinaryReader | Uint8Array, length?: number): MsgAcknowledgementResponse { const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgAcknowledgementResponse(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { default: reader.skipType(tag & 7); break; } } return message; }, fromPartial(_: Partial): MsgAcknowledgementResponse { const message = createBaseMsgAcknowledgementResponse(); return message; }, fromAmino(_: MsgAcknowledgementResponseAmino): MsgAcknowledgementResponse { const message = createBaseMsgAcknowledgementResponse(); return message; }, toAmino(_: MsgAcknowledgementResponse): MsgAcknowledgementResponseAmino { const obj: any = {}; return obj; }, fromAminoMsg(object: MsgAcknowledgementResponseAminoMsg): MsgAcknowledgementResponse { return MsgAcknowledgementResponse.fromAmino(object.value); }, toAminoMsg(message: MsgAcknowledgementResponse): MsgAcknowledgementResponseAminoMsg { return { type: "cosmos-sdk/MsgAcknowledgementResponse", value: MsgAcknowledgementResponse.toAmino(message) }; }, fromProtoMsg(message: MsgAcknowledgementResponseProtoMsg): MsgAcknowledgementResponse { return MsgAcknowledgementResponse.decode(message.value); }, toProto(message: MsgAcknowledgementResponse): Uint8Array { return MsgAcknowledgementResponse.encode(message).finish(); }, toProtoMsg(message: MsgAcknowledgementResponse): MsgAcknowledgementResponseProtoMsg { return { typeUrl: "/ibc.core.channel.v1.MsgAcknowledgementResponse", value: MsgAcknowledgementResponse.encode(message).finish() }; } };