import { Fee, PacketFee } from "./fee";
import { PacketId } from "../../../core/channel/v1/channel";
import { BinaryReader, BinaryWriter } from "../../../../binary";
import { GlobalDecoderRegistry } from "../../../../registry";
function createBaseMsgRegisterPayee() {
    return {
        portId: "",
        channelId: "",
        relayer: "",
        payee: ""
    };
}
export const MsgRegisterPayee = {
    typeUrl: "/ibc.applications.fee.v1.MsgRegisterPayee",
    aminoType: "cosmos-sdk/MsgRegisterPayee",
    is(o) {
        return o && (o.$typeUrl === MsgRegisterPayee.typeUrl || typeof o.portId === "string" && typeof o.channelId === "string" && typeof o.relayer === "string" && typeof o.payee === "string");
    },
    isAmino(o) {
        return o && (o.$typeUrl === MsgRegisterPayee.typeUrl || typeof o.port_id === "string" && typeof o.channel_id === "string" && typeof o.relayer === "string" && typeof o.payee === "string");
    },
    encode(message, writer = BinaryWriter.create()) {
        if (message.portId !== "") {
            writer.uint32(10).string(message.portId);
        }
        if (message.channelId !== "") {
            writer.uint32(18).string(message.channelId);
        }
        if (message.relayer !== "") {
            writer.uint32(26).string(message.relayer);
        }
        if (message.payee !== "") {
            writer.uint32(34).string(message.payee);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseMsgRegisterPayee();
        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.relayer = reader.string();
                    break;
                case 4:
                    message.payee = reader.string();
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
            }
        }
        return message;
    },
    fromPartial(object) {
        const message = createBaseMsgRegisterPayee();
        message.portId = object.portId ?? "";
        message.channelId = object.channelId ?? "";
        message.relayer = object.relayer ?? "";
        message.payee = object.payee ?? "";
        return message;
    },
    fromAmino(object) {
        const message = createBaseMsgRegisterPayee();
        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.relayer !== undefined && object.relayer !== null) {
            message.relayer = object.relayer;
        }
        if (object.payee !== undefined && object.payee !== null) {
            message.payee = object.payee;
        }
        return message;
    },
    toAmino(message) {
        const obj = {};
        obj.port_id = message.portId === "" ? undefined : message.portId;
        obj.channel_id = message.channelId === "" ? undefined : message.channelId;
        obj.relayer = message.relayer === "" ? undefined : message.relayer;
        obj.payee = message.payee === "" ? undefined : message.payee;
        return obj;
    },
    fromAminoMsg(object) {
        return MsgRegisterPayee.fromAmino(object.value);
    },
    toAminoMsg(message) {
        return {
            type: "cosmos-sdk/MsgRegisterPayee",
            value: MsgRegisterPayee.toAmino(message)
        };
    },
    fromProtoMsg(message) {
        return MsgRegisterPayee.decode(message.value);
    },
    toProto(message) {
        return MsgRegisterPayee.encode(message).finish();
    },
    toProtoMsg(message) {
        return {
            typeUrl: "/ibc.applications.fee.v1.MsgRegisterPayee",
            value: MsgRegisterPayee.encode(message).finish()
        };
    }
};
GlobalDecoderRegistry.register(MsgRegisterPayee.typeUrl, MsgRegisterPayee);
GlobalDecoderRegistry.registerAminoProtoMapping(MsgRegisterPayee.aminoType, MsgRegisterPayee.typeUrl);
function createBaseMsgRegisterPayeeResponse() {
    return {};
}
export const MsgRegisterPayeeResponse = {
    typeUrl: "/ibc.applications.fee.v1.MsgRegisterPayeeResponse",
    aminoType: "cosmos-sdk/MsgRegisterPayeeResponse",
    is(o) {
        return o && o.$typeUrl === MsgRegisterPayeeResponse.typeUrl;
    },
    isAmino(o) {
        return o && o.$typeUrl === MsgRegisterPayeeResponse.typeUrl;
    },
    encode(_, writer = BinaryWriter.create()) {
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseMsgRegisterPayeeResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                default:
                    reader.skipType(tag & 7);
                    break;
            }
        }
        return message;
    },
    fromPartial(_) {
        const message = createBaseMsgRegisterPayeeResponse();
        return message;
    },
    fromAmino(_) {
        const message = createBaseMsgRegisterPayeeResponse();
        return message;
    },
    toAmino(_) {
        const obj = {};
        return obj;
    },
    fromAminoMsg(object) {
        return MsgRegisterPayeeResponse.fromAmino(object.value);
    },
    toAminoMsg(message) {
        return {
            type: "cosmos-sdk/MsgRegisterPayeeResponse",
            value: MsgRegisterPayeeResponse.toAmino(message)
        };
    },
    fromProtoMsg(message) {
        return MsgRegisterPayeeResponse.decode(message.value);
    },
    toProto(message) {
        return MsgRegisterPayeeResponse.encode(message).finish();
    },
    toProtoMsg(message) {
        return {
            typeUrl: "/ibc.applications.fee.v1.MsgRegisterPayeeResponse",
            value: MsgRegisterPayeeResponse.encode(message).finish()
        };
    }
};
GlobalDecoderRegistry.register(MsgRegisterPayeeResponse.typeUrl, MsgRegisterPayeeResponse);
GlobalDecoderRegistry.registerAminoProtoMapping(MsgRegisterPayeeResponse.aminoType, MsgRegisterPayeeResponse.typeUrl);
function createBaseMsgRegisterCounterpartyPayee() {
    return {
        portId: "",
        channelId: "",
        relayer: "",
        counterpartyPayee: ""
    };
}
export const MsgRegisterCounterpartyPayee = {
    typeUrl: "/ibc.applications.fee.v1.MsgRegisterCounterpartyPayee",
    aminoType: "cosmos-sdk/MsgRegisterCounterpartyPayee",
    is(o) {
        return o && (o.$typeUrl === MsgRegisterCounterpartyPayee.typeUrl || typeof o.portId === "string" && typeof o.channelId === "string" && typeof o.relayer === "string" && typeof o.counterpartyPayee === "string");
    },
    isAmino(o) {
        return o && (o.$typeUrl === MsgRegisterCounterpartyPayee.typeUrl || typeof o.port_id === "string" && typeof o.channel_id === "string" && typeof o.relayer === "string" && typeof o.counterparty_payee === "string");
    },
    encode(message, writer = BinaryWriter.create()) {
        if (message.portId !== "") {
            writer.uint32(10).string(message.portId);
        }
        if (message.channelId !== "") {
            writer.uint32(18).string(message.channelId);
        }
        if (message.relayer !== "") {
            writer.uint32(26).string(message.relayer);
        }
        if (message.counterpartyPayee !== "") {
            writer.uint32(34).string(message.counterpartyPayee);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseMsgRegisterCounterpartyPayee();
        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.relayer = reader.string();
                    break;
                case 4:
                    message.counterpartyPayee = reader.string();
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
            }
        }
        return message;
    },
    fromPartial(object) {
        const message = createBaseMsgRegisterCounterpartyPayee();
        message.portId = object.portId ?? "";
        message.channelId = object.channelId ?? "";
        message.relayer = object.relayer ?? "";
        message.counterpartyPayee = object.counterpartyPayee ?? "";
        return message;
    },
    fromAmino(object) {
        const message = createBaseMsgRegisterCounterpartyPayee();
        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.relayer !== undefined && object.relayer !== null) {
            message.relayer = object.relayer;
        }
        if (object.counterparty_payee !== undefined && object.counterparty_payee !== null) {
            message.counterpartyPayee = object.counterparty_payee;
        }
        return message;
    },
    toAmino(message) {
        const obj = {};
        obj.port_id = message.portId === "" ? undefined : message.portId;
        obj.channel_id = message.channelId === "" ? undefined : message.channelId;
        obj.relayer = message.relayer === "" ? undefined : message.relayer;
        obj.counterparty_payee = message.counterpartyPayee === "" ? undefined : message.counterpartyPayee;
        return obj;
    },
    fromAminoMsg(object) {
        return MsgRegisterCounterpartyPayee.fromAmino(object.value);
    },
    toAminoMsg(message) {
        return {
            type: "cosmos-sdk/MsgRegisterCounterpartyPayee",
            value: MsgRegisterCounterpartyPayee.toAmino(message)
        };
    },
    fromProtoMsg(message) {
        return MsgRegisterCounterpartyPayee.decode(message.value);
    },
    toProto(message) {
        return MsgRegisterCounterpartyPayee.encode(message).finish();
    },
    toProtoMsg(message) {
        return {
            typeUrl: "/ibc.applications.fee.v1.MsgRegisterCounterpartyPayee",
            value: MsgRegisterCounterpartyPayee.encode(message).finish()
        };
    }
};
GlobalDecoderRegistry.register(MsgRegisterCounterpartyPayee.typeUrl, MsgRegisterCounterpartyPayee);
GlobalDecoderRegistry.registerAminoProtoMapping(MsgRegisterCounterpartyPayee.aminoType, MsgRegisterCounterpartyPayee.typeUrl);
function createBaseMsgRegisterCounterpartyPayeeResponse() {
    return {};
}
export const MsgRegisterCounterpartyPayeeResponse = {
    typeUrl: "/ibc.applications.fee.v1.MsgRegisterCounterpartyPayeeResponse",
    aminoType: "cosmos-sdk/MsgRegisterCounterpartyPayeeResponse",
    is(o) {
        return o && o.$typeUrl === MsgRegisterCounterpartyPayeeResponse.typeUrl;
    },
    isAmino(o) {
        return o && o.$typeUrl === MsgRegisterCounterpartyPayeeResponse.typeUrl;
    },
    encode(_, writer = BinaryWriter.create()) {
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseMsgRegisterCounterpartyPayeeResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                default:
                    reader.skipType(tag & 7);
                    break;
            }
        }
        return message;
    },
    fromPartial(_) {
        const message = createBaseMsgRegisterCounterpartyPayeeResponse();
        return message;
    },
    fromAmino(_) {
        const message = createBaseMsgRegisterCounterpartyPayeeResponse();
        return message;
    },
    toAmino(_) {
        const obj = {};
        return obj;
    },
    fromAminoMsg(object) {
        return MsgRegisterCounterpartyPayeeResponse.fromAmino(object.value);
    },
    toAminoMsg(message) {
        return {
            type: "cosmos-sdk/MsgRegisterCounterpartyPayeeResponse",
            value: MsgRegisterCounterpartyPayeeResponse.toAmino(message)
        };
    },
    fromProtoMsg(message) {
        return MsgRegisterCounterpartyPayeeResponse.decode(message.value);
    },
    toProto(message) {
        return MsgRegisterCounterpartyPayeeResponse.encode(message).finish();
    },
    toProtoMsg(message) {
        return {
            typeUrl: "/ibc.applications.fee.v1.MsgRegisterCounterpartyPayeeResponse",
            value: MsgRegisterCounterpartyPayeeResponse.encode(message).finish()
        };
    }
};
GlobalDecoderRegistry.register(MsgRegisterCounterpartyPayeeResponse.typeUrl, MsgRegisterCounterpartyPayeeResponse);
GlobalDecoderRegistry.registerAminoProtoMapping(MsgRegisterCounterpartyPayeeResponse.aminoType, MsgRegisterCounterpartyPayeeResponse.typeUrl);
function createBaseMsgPayPacketFee() {
    return {
        fee: Fee.fromPartial({}),
        sourcePortId: "",
        sourceChannelId: "",
        signer: "",
        relayers: []
    };
}
export const MsgPayPacketFee = {
    typeUrl: "/ibc.applications.fee.v1.MsgPayPacketFee",
    aminoType: "cosmos-sdk/MsgPayPacketFee",
    is(o) {
        return o && (o.$typeUrl === MsgPayPacketFee.typeUrl || Fee.is(o.fee) && typeof o.sourcePortId === "string" && typeof o.sourceChannelId === "string" && typeof o.signer === "string" && Array.isArray(o.relayers) && (!o.relayers.length || typeof o.relayers[0] === "string"));
    },
    isAmino(o) {
        return o && (o.$typeUrl === MsgPayPacketFee.typeUrl || Fee.isAmino(o.fee) && typeof o.source_port_id === "string" && typeof o.source_channel_id === "string" && typeof o.signer === "string" && Array.isArray(o.relayers) && (!o.relayers.length || typeof o.relayers[0] === "string"));
    },
    encode(message, writer = BinaryWriter.create()) {
        if (message.fee !== undefined) {
            Fee.encode(message.fee, writer.uint32(10).fork()).ldelim();
        }
        if (message.sourcePortId !== "") {
            writer.uint32(18).string(message.sourcePortId);
        }
        if (message.sourceChannelId !== "") {
            writer.uint32(26).string(message.sourceChannelId);
        }
        if (message.signer !== "") {
            writer.uint32(34).string(message.signer);
        }
        for (const v of message.relayers) {
            writer.uint32(42).string(v);
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseMsgPayPacketFee();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1:
                    message.fee = Fee.decode(reader, reader.uint32());
                    break;
                case 2:
                    message.sourcePortId = reader.string();
                    break;
                case 3:
                    message.sourceChannelId = reader.string();
                    break;
                case 4:
                    message.signer = reader.string();
                    break;
                case 5:
                    message.relayers.push(reader.string());
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
            }
        }
        return message;
    },
    fromPartial(object) {
        const message = createBaseMsgPayPacketFee();
        message.fee = object.fee !== undefined && object.fee !== null ? Fee.fromPartial(object.fee) : undefined;
        message.sourcePortId = object.sourcePortId ?? "";
        message.sourceChannelId = object.sourceChannelId ?? "";
        message.signer = object.signer ?? "";
        message.relayers = object.relayers?.map(e => e) || [];
        return message;
    },
    fromAmino(object) {
        const message = createBaseMsgPayPacketFee();
        if (object.fee !== undefined && object.fee !== null) {
            message.fee = Fee.fromAmino(object.fee);
        }
        if (object.source_port_id !== undefined && object.source_port_id !== null) {
            message.sourcePortId = object.source_port_id;
        }
        if (object.source_channel_id !== undefined && object.source_channel_id !== null) {
            message.sourceChannelId = object.source_channel_id;
        }
        if (object.signer !== undefined && object.signer !== null) {
            message.signer = object.signer;
        }
        message.relayers = object.relayers?.map(e => e) || [];
        return message;
    },
    toAmino(message) {
        const obj = {};
        obj.fee = message.fee ? Fee.toAmino(message.fee) : Fee.toAmino(Fee.fromPartial({}));
        obj.source_port_id = message.sourcePortId === "" ? undefined : message.sourcePortId;
        obj.source_channel_id = message.sourceChannelId === "" ? undefined : message.sourceChannelId;
        obj.signer = message.signer === "" ? undefined : message.signer;
        if (message.relayers) {
            obj.relayers = message.relayers.map(e => e);
        }
        else {
            obj.relayers = message.relayers;
        }
        return obj;
    },
    fromAminoMsg(object) {
        return MsgPayPacketFee.fromAmino(object.value);
    },
    toAminoMsg(message) {
        return {
            type: "cosmos-sdk/MsgPayPacketFee",
            value: MsgPayPacketFee.toAmino(message)
        };
    },
    fromProtoMsg(message) {
        return MsgPayPacketFee.decode(message.value);
    },
    toProto(message) {
        return MsgPayPacketFee.encode(message).finish();
    },
    toProtoMsg(message) {
        return {
            typeUrl: "/ibc.applications.fee.v1.MsgPayPacketFee",
            value: MsgPayPacketFee.encode(message).finish()
        };
    }
};
GlobalDecoderRegistry.register(MsgPayPacketFee.typeUrl, MsgPayPacketFee);
GlobalDecoderRegistry.registerAminoProtoMapping(MsgPayPacketFee.aminoType, MsgPayPacketFee.typeUrl);
function createBaseMsgPayPacketFeeResponse() {
    return {};
}
export const MsgPayPacketFeeResponse = {
    typeUrl: "/ibc.applications.fee.v1.MsgPayPacketFeeResponse",
    aminoType: "cosmos-sdk/MsgPayPacketFeeResponse",
    is(o) {
        return o && o.$typeUrl === MsgPayPacketFeeResponse.typeUrl;
    },
    isAmino(o) {
        return o && o.$typeUrl === MsgPayPacketFeeResponse.typeUrl;
    },
    encode(_, writer = BinaryWriter.create()) {
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseMsgPayPacketFeeResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                default:
                    reader.skipType(tag & 7);
                    break;
            }
        }
        return message;
    },
    fromPartial(_) {
        const message = createBaseMsgPayPacketFeeResponse();
        return message;
    },
    fromAmino(_) {
        const message = createBaseMsgPayPacketFeeResponse();
        return message;
    },
    toAmino(_) {
        const obj = {};
        return obj;
    },
    fromAminoMsg(object) {
        return MsgPayPacketFeeResponse.fromAmino(object.value);
    },
    toAminoMsg(message) {
        return {
            type: "cosmos-sdk/MsgPayPacketFeeResponse",
            value: MsgPayPacketFeeResponse.toAmino(message)
        };
    },
    fromProtoMsg(message) {
        return MsgPayPacketFeeResponse.decode(message.value);
    },
    toProto(message) {
        return MsgPayPacketFeeResponse.encode(message).finish();
    },
    toProtoMsg(message) {
        return {
            typeUrl: "/ibc.applications.fee.v1.MsgPayPacketFeeResponse",
            value: MsgPayPacketFeeResponse.encode(message).finish()
        };
    }
};
GlobalDecoderRegistry.register(MsgPayPacketFeeResponse.typeUrl, MsgPayPacketFeeResponse);
GlobalDecoderRegistry.registerAminoProtoMapping(MsgPayPacketFeeResponse.aminoType, MsgPayPacketFeeResponse.typeUrl);
function createBaseMsgPayPacketFeeAsync() {
    return {
        packetId: PacketId.fromPartial({}),
        packetFee: PacketFee.fromPartial({})
    };
}
export const MsgPayPacketFeeAsync = {
    typeUrl: "/ibc.applications.fee.v1.MsgPayPacketFeeAsync",
    aminoType: "cosmos-sdk/MsgPayPacketFeeAsync",
    is(o) {
        return o && (o.$typeUrl === MsgPayPacketFeeAsync.typeUrl || PacketId.is(o.packetId) && PacketFee.is(o.packetFee));
    },
    isAmino(o) {
        return o && (o.$typeUrl === MsgPayPacketFeeAsync.typeUrl || PacketId.isAmino(o.packet_id) && PacketFee.isAmino(o.packet_fee));
    },
    encode(message, writer = BinaryWriter.create()) {
        if (message.packetId !== undefined) {
            PacketId.encode(message.packetId, writer.uint32(10).fork()).ldelim();
        }
        if (message.packetFee !== undefined) {
            PacketFee.encode(message.packetFee, writer.uint32(18).fork()).ldelim();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseMsgPayPacketFeeAsync();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1:
                    message.packetId = PacketId.decode(reader, reader.uint32());
                    break;
                case 2:
                    message.packetFee = PacketFee.decode(reader, reader.uint32());
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
            }
        }
        return message;
    },
    fromPartial(object) {
        const message = createBaseMsgPayPacketFeeAsync();
        message.packetId = object.packetId !== undefined && object.packetId !== null ? PacketId.fromPartial(object.packetId) : undefined;
        message.packetFee = object.packetFee !== undefined && object.packetFee !== null ? PacketFee.fromPartial(object.packetFee) : undefined;
        return message;
    },
    fromAmino(object) {
        const message = createBaseMsgPayPacketFeeAsync();
        if (object.packet_id !== undefined && object.packet_id !== null) {
            message.packetId = PacketId.fromAmino(object.packet_id);
        }
        if (object.packet_fee !== undefined && object.packet_fee !== null) {
            message.packetFee = PacketFee.fromAmino(object.packet_fee);
        }
        return message;
    },
    toAmino(message) {
        const obj = {};
        obj.packet_id = message.packetId ? PacketId.toAmino(message.packetId) : PacketId.toAmino(PacketId.fromPartial({}));
        obj.packet_fee = message.packetFee ? PacketFee.toAmino(message.packetFee) : PacketFee.toAmino(PacketFee.fromPartial({}));
        return obj;
    },
    fromAminoMsg(object) {
        return MsgPayPacketFeeAsync.fromAmino(object.value);
    },
    toAminoMsg(message) {
        return {
            type: "cosmos-sdk/MsgPayPacketFeeAsync",
            value: MsgPayPacketFeeAsync.toAmino(message)
        };
    },
    fromProtoMsg(message) {
        return MsgPayPacketFeeAsync.decode(message.value);
    },
    toProto(message) {
        return MsgPayPacketFeeAsync.encode(message).finish();
    },
    toProtoMsg(message) {
        return {
            typeUrl: "/ibc.applications.fee.v1.MsgPayPacketFeeAsync",
            value: MsgPayPacketFeeAsync.encode(message).finish()
        };
    }
};
GlobalDecoderRegistry.register(MsgPayPacketFeeAsync.typeUrl, MsgPayPacketFeeAsync);
GlobalDecoderRegistry.registerAminoProtoMapping(MsgPayPacketFeeAsync.aminoType, MsgPayPacketFeeAsync.typeUrl);
function createBaseMsgPayPacketFeeAsyncResponse() {
    return {};
}
export const MsgPayPacketFeeAsyncResponse = {
    typeUrl: "/ibc.applications.fee.v1.MsgPayPacketFeeAsyncResponse",
    aminoType: "cosmos-sdk/MsgPayPacketFeeAsyncResponse",
    is(o) {
        return o && o.$typeUrl === MsgPayPacketFeeAsyncResponse.typeUrl;
    },
    isAmino(o) {
        return o && o.$typeUrl === MsgPayPacketFeeAsyncResponse.typeUrl;
    },
    encode(_, writer = BinaryWriter.create()) {
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
        let end = length === undefined ? reader.len : reader.pos + length;
        const message = createBaseMsgPayPacketFeeAsyncResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                default:
                    reader.skipType(tag & 7);
                    break;
            }
        }
        return message;
    },
    fromPartial(_) {
        const message = createBaseMsgPayPacketFeeAsyncResponse();
        return message;
    },
    fromAmino(_) {
        const message = createBaseMsgPayPacketFeeAsyncResponse();
        return message;
    },
    toAmino(_) {
        const obj = {};
        return obj;
    },
    fromAminoMsg(object) {
        return MsgPayPacketFeeAsyncResponse.fromAmino(object.value);
    },
    toAminoMsg(message) {
        return {
            type: "cosmos-sdk/MsgPayPacketFeeAsyncResponse",
            value: MsgPayPacketFeeAsyncResponse.toAmino(message)
        };
    },
    fromProtoMsg(message) {
        return MsgPayPacketFeeAsyncResponse.decode(message.value);
    },
    toProto(message) {
        return MsgPayPacketFeeAsyncResponse.encode(message).finish();
    },
    toProtoMsg(message) {
        return {
            typeUrl: "/ibc.applications.fee.v1.MsgPayPacketFeeAsyncResponse",
            value: MsgPayPacketFeeAsyncResponse.encode(message).finish()
        };
    }
};
GlobalDecoderRegistry.register(MsgPayPacketFeeAsyncResponse.typeUrl, MsgPayPacketFeeAsyncResponse);
GlobalDecoderRegistry.registerAminoProtoMapping(MsgPayPacketFeeAsyncResponse.aminoType, MsgPayPacketFeeAsyncResponse.typeUrl);
