"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.MsgPayPacketFeeAsyncResponse = exports.MsgPayPacketFeeAsync = exports.MsgPayPacketFeeResponse = exports.MsgPayPacketFee = exports.MsgRegisterCounterpartyPayeeResponse = exports.MsgRegisterCounterpartyPayee = exports.MsgRegisterPayeeResponse = exports.MsgRegisterPayee = void 0;
const fee_1 = require("./fee");
const channel_1 = require("../../../core/channel/v1/channel");
const binary_1 = require("../../../../binary");
const registry_1 = require("../../../../registry");
function createBaseMsgRegisterPayee() {
    return {
        portId: "",
        channelId: "",
        relayer: "",
        payee: ""
    };
}
exports.MsgRegisterPayee = {
    typeUrl: "/ibc.applications.fee.v1.MsgRegisterPayee",
    aminoType: "cosmos-sdk/MsgRegisterPayee",
    is(o) {
        return o && (o.$typeUrl === exports.MsgRegisterPayee.typeUrl || typeof o.portId === "string" && typeof o.channelId === "string" && typeof o.relayer === "string" && typeof o.payee === "string");
    },
    isAmino(o) {
        return o && (o.$typeUrl === exports.MsgRegisterPayee.typeUrl || typeof o.port_id === "string" && typeof o.channel_id === "string" && typeof o.relayer === "string" && typeof o.payee === "string");
    },
    encode(message, writer = binary_1.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 binary_1.BinaryReader ? input : new binary_1.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 exports.MsgRegisterPayee.fromAmino(object.value);
    },
    toAminoMsg(message) {
        return {
            type: "cosmos-sdk/MsgRegisterPayee",
            value: exports.MsgRegisterPayee.toAmino(message)
        };
    },
    fromProtoMsg(message) {
        return exports.MsgRegisterPayee.decode(message.value);
    },
    toProto(message) {
        return exports.MsgRegisterPayee.encode(message).finish();
    },
    toProtoMsg(message) {
        return {
            typeUrl: "/ibc.applications.fee.v1.MsgRegisterPayee",
            value: exports.MsgRegisterPayee.encode(message).finish()
        };
    }
};
registry_1.GlobalDecoderRegistry.register(exports.MsgRegisterPayee.typeUrl, exports.MsgRegisterPayee);
registry_1.GlobalDecoderRegistry.registerAminoProtoMapping(exports.MsgRegisterPayee.aminoType, exports.MsgRegisterPayee.typeUrl);
function createBaseMsgRegisterPayeeResponse() {
    return {};
}
exports.MsgRegisterPayeeResponse = {
    typeUrl: "/ibc.applications.fee.v1.MsgRegisterPayeeResponse",
    aminoType: "cosmos-sdk/MsgRegisterPayeeResponse",
    is(o) {
        return o && o.$typeUrl === exports.MsgRegisterPayeeResponse.typeUrl;
    },
    isAmino(o) {
        return o && o.$typeUrl === exports.MsgRegisterPayeeResponse.typeUrl;
    },
    encode(_, writer = binary_1.BinaryWriter.create()) {
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.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 exports.MsgRegisterPayeeResponse.fromAmino(object.value);
    },
    toAminoMsg(message) {
        return {
            type: "cosmos-sdk/MsgRegisterPayeeResponse",
            value: exports.MsgRegisterPayeeResponse.toAmino(message)
        };
    },
    fromProtoMsg(message) {
        return exports.MsgRegisterPayeeResponse.decode(message.value);
    },
    toProto(message) {
        return exports.MsgRegisterPayeeResponse.encode(message).finish();
    },
    toProtoMsg(message) {
        return {
            typeUrl: "/ibc.applications.fee.v1.MsgRegisterPayeeResponse",
            value: exports.MsgRegisterPayeeResponse.encode(message).finish()
        };
    }
};
registry_1.GlobalDecoderRegistry.register(exports.MsgRegisterPayeeResponse.typeUrl, exports.MsgRegisterPayeeResponse);
registry_1.GlobalDecoderRegistry.registerAminoProtoMapping(exports.MsgRegisterPayeeResponse.aminoType, exports.MsgRegisterPayeeResponse.typeUrl);
function createBaseMsgRegisterCounterpartyPayee() {
    return {
        portId: "",
        channelId: "",
        relayer: "",
        counterpartyPayee: ""
    };
}
exports.MsgRegisterCounterpartyPayee = {
    typeUrl: "/ibc.applications.fee.v1.MsgRegisterCounterpartyPayee",
    aminoType: "cosmos-sdk/MsgRegisterCounterpartyPayee",
    is(o) {
        return o && (o.$typeUrl === exports.MsgRegisterCounterpartyPayee.typeUrl || typeof o.portId === "string" && typeof o.channelId === "string" && typeof o.relayer === "string" && typeof o.counterpartyPayee === "string");
    },
    isAmino(o) {
        return o && (o.$typeUrl === exports.MsgRegisterCounterpartyPayee.typeUrl || typeof o.port_id === "string" && typeof o.channel_id === "string" && typeof o.relayer === "string" && typeof o.counterparty_payee === "string");
    },
    encode(message, writer = binary_1.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 binary_1.BinaryReader ? input : new binary_1.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 exports.MsgRegisterCounterpartyPayee.fromAmino(object.value);
    },
    toAminoMsg(message) {
        return {
            type: "cosmos-sdk/MsgRegisterCounterpartyPayee",
            value: exports.MsgRegisterCounterpartyPayee.toAmino(message)
        };
    },
    fromProtoMsg(message) {
        return exports.MsgRegisterCounterpartyPayee.decode(message.value);
    },
    toProto(message) {
        return exports.MsgRegisterCounterpartyPayee.encode(message).finish();
    },
    toProtoMsg(message) {
        return {
            typeUrl: "/ibc.applications.fee.v1.MsgRegisterCounterpartyPayee",
            value: exports.MsgRegisterCounterpartyPayee.encode(message).finish()
        };
    }
};
registry_1.GlobalDecoderRegistry.register(exports.MsgRegisterCounterpartyPayee.typeUrl, exports.MsgRegisterCounterpartyPayee);
registry_1.GlobalDecoderRegistry.registerAminoProtoMapping(exports.MsgRegisterCounterpartyPayee.aminoType, exports.MsgRegisterCounterpartyPayee.typeUrl);
function createBaseMsgRegisterCounterpartyPayeeResponse() {
    return {};
}
exports.MsgRegisterCounterpartyPayeeResponse = {
    typeUrl: "/ibc.applications.fee.v1.MsgRegisterCounterpartyPayeeResponse",
    aminoType: "cosmos-sdk/MsgRegisterCounterpartyPayeeResponse",
    is(o) {
        return o && o.$typeUrl === exports.MsgRegisterCounterpartyPayeeResponse.typeUrl;
    },
    isAmino(o) {
        return o && o.$typeUrl === exports.MsgRegisterCounterpartyPayeeResponse.typeUrl;
    },
    encode(_, writer = binary_1.BinaryWriter.create()) {
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.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 exports.MsgRegisterCounterpartyPayeeResponse.fromAmino(object.value);
    },
    toAminoMsg(message) {
        return {
            type: "cosmos-sdk/MsgRegisterCounterpartyPayeeResponse",
            value: exports.MsgRegisterCounterpartyPayeeResponse.toAmino(message)
        };
    },
    fromProtoMsg(message) {
        return exports.MsgRegisterCounterpartyPayeeResponse.decode(message.value);
    },
    toProto(message) {
        return exports.MsgRegisterCounterpartyPayeeResponse.encode(message).finish();
    },
    toProtoMsg(message) {
        return {
            typeUrl: "/ibc.applications.fee.v1.MsgRegisterCounterpartyPayeeResponse",
            value: exports.MsgRegisterCounterpartyPayeeResponse.encode(message).finish()
        };
    }
};
registry_1.GlobalDecoderRegistry.register(exports.MsgRegisterCounterpartyPayeeResponse.typeUrl, exports.MsgRegisterCounterpartyPayeeResponse);
registry_1.GlobalDecoderRegistry.registerAminoProtoMapping(exports.MsgRegisterCounterpartyPayeeResponse.aminoType, exports.MsgRegisterCounterpartyPayeeResponse.typeUrl);
function createBaseMsgPayPacketFee() {
    return {
        fee: fee_1.Fee.fromPartial({}),
        sourcePortId: "",
        sourceChannelId: "",
        signer: "",
        relayers: []
    };
}
exports.MsgPayPacketFee = {
    typeUrl: "/ibc.applications.fee.v1.MsgPayPacketFee",
    aminoType: "cosmos-sdk/MsgPayPacketFee",
    is(o) {
        return o && (o.$typeUrl === exports.MsgPayPacketFee.typeUrl || fee_1.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 === exports.MsgPayPacketFee.typeUrl || fee_1.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 = binary_1.BinaryWriter.create()) {
        if (message.fee !== undefined) {
            fee_1.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 binary_1.BinaryReader ? input : new binary_1.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_1.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_1.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_1.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_1.Fee.toAmino(message.fee) : fee_1.Fee.toAmino(fee_1.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 exports.MsgPayPacketFee.fromAmino(object.value);
    },
    toAminoMsg(message) {
        return {
            type: "cosmos-sdk/MsgPayPacketFee",
            value: exports.MsgPayPacketFee.toAmino(message)
        };
    },
    fromProtoMsg(message) {
        return exports.MsgPayPacketFee.decode(message.value);
    },
    toProto(message) {
        return exports.MsgPayPacketFee.encode(message).finish();
    },
    toProtoMsg(message) {
        return {
            typeUrl: "/ibc.applications.fee.v1.MsgPayPacketFee",
            value: exports.MsgPayPacketFee.encode(message).finish()
        };
    }
};
registry_1.GlobalDecoderRegistry.register(exports.MsgPayPacketFee.typeUrl, exports.MsgPayPacketFee);
registry_1.GlobalDecoderRegistry.registerAminoProtoMapping(exports.MsgPayPacketFee.aminoType, exports.MsgPayPacketFee.typeUrl);
function createBaseMsgPayPacketFeeResponse() {
    return {};
}
exports.MsgPayPacketFeeResponse = {
    typeUrl: "/ibc.applications.fee.v1.MsgPayPacketFeeResponse",
    aminoType: "cosmos-sdk/MsgPayPacketFeeResponse",
    is(o) {
        return o && o.$typeUrl === exports.MsgPayPacketFeeResponse.typeUrl;
    },
    isAmino(o) {
        return o && o.$typeUrl === exports.MsgPayPacketFeeResponse.typeUrl;
    },
    encode(_, writer = binary_1.BinaryWriter.create()) {
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.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 exports.MsgPayPacketFeeResponse.fromAmino(object.value);
    },
    toAminoMsg(message) {
        return {
            type: "cosmos-sdk/MsgPayPacketFeeResponse",
            value: exports.MsgPayPacketFeeResponse.toAmino(message)
        };
    },
    fromProtoMsg(message) {
        return exports.MsgPayPacketFeeResponse.decode(message.value);
    },
    toProto(message) {
        return exports.MsgPayPacketFeeResponse.encode(message).finish();
    },
    toProtoMsg(message) {
        return {
            typeUrl: "/ibc.applications.fee.v1.MsgPayPacketFeeResponse",
            value: exports.MsgPayPacketFeeResponse.encode(message).finish()
        };
    }
};
registry_1.GlobalDecoderRegistry.register(exports.MsgPayPacketFeeResponse.typeUrl, exports.MsgPayPacketFeeResponse);
registry_1.GlobalDecoderRegistry.registerAminoProtoMapping(exports.MsgPayPacketFeeResponse.aminoType, exports.MsgPayPacketFeeResponse.typeUrl);
function createBaseMsgPayPacketFeeAsync() {
    return {
        packetId: channel_1.PacketId.fromPartial({}),
        packetFee: fee_1.PacketFee.fromPartial({})
    };
}
exports.MsgPayPacketFeeAsync = {
    typeUrl: "/ibc.applications.fee.v1.MsgPayPacketFeeAsync",
    aminoType: "cosmos-sdk/MsgPayPacketFeeAsync",
    is(o) {
        return o && (o.$typeUrl === exports.MsgPayPacketFeeAsync.typeUrl || channel_1.PacketId.is(o.packetId) && fee_1.PacketFee.is(o.packetFee));
    },
    isAmino(o) {
        return o && (o.$typeUrl === exports.MsgPayPacketFeeAsync.typeUrl || channel_1.PacketId.isAmino(o.packet_id) && fee_1.PacketFee.isAmino(o.packet_fee));
    },
    encode(message, writer = binary_1.BinaryWriter.create()) {
        if (message.packetId !== undefined) {
            channel_1.PacketId.encode(message.packetId, writer.uint32(10).fork()).ldelim();
        }
        if (message.packetFee !== undefined) {
            fee_1.PacketFee.encode(message.packetFee, writer.uint32(18).fork()).ldelim();
        }
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.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 = channel_1.PacketId.decode(reader, reader.uint32());
                    break;
                case 2:
                    message.packetFee = fee_1.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 ? channel_1.PacketId.fromPartial(object.packetId) : undefined;
        message.packetFee = object.packetFee !== undefined && object.packetFee !== null ? fee_1.PacketFee.fromPartial(object.packetFee) : undefined;
        return message;
    },
    fromAmino(object) {
        const message = createBaseMsgPayPacketFeeAsync();
        if (object.packet_id !== undefined && object.packet_id !== null) {
            message.packetId = channel_1.PacketId.fromAmino(object.packet_id);
        }
        if (object.packet_fee !== undefined && object.packet_fee !== null) {
            message.packetFee = fee_1.PacketFee.fromAmino(object.packet_fee);
        }
        return message;
    },
    toAmino(message) {
        const obj = {};
        obj.packet_id = message.packetId ? channel_1.PacketId.toAmino(message.packetId) : channel_1.PacketId.toAmino(channel_1.PacketId.fromPartial({}));
        obj.packet_fee = message.packetFee ? fee_1.PacketFee.toAmino(message.packetFee) : fee_1.PacketFee.toAmino(fee_1.PacketFee.fromPartial({}));
        return obj;
    },
    fromAminoMsg(object) {
        return exports.MsgPayPacketFeeAsync.fromAmino(object.value);
    },
    toAminoMsg(message) {
        return {
            type: "cosmos-sdk/MsgPayPacketFeeAsync",
            value: exports.MsgPayPacketFeeAsync.toAmino(message)
        };
    },
    fromProtoMsg(message) {
        return exports.MsgPayPacketFeeAsync.decode(message.value);
    },
    toProto(message) {
        return exports.MsgPayPacketFeeAsync.encode(message).finish();
    },
    toProtoMsg(message) {
        return {
            typeUrl: "/ibc.applications.fee.v1.MsgPayPacketFeeAsync",
            value: exports.MsgPayPacketFeeAsync.encode(message).finish()
        };
    }
};
registry_1.GlobalDecoderRegistry.register(exports.MsgPayPacketFeeAsync.typeUrl, exports.MsgPayPacketFeeAsync);
registry_1.GlobalDecoderRegistry.registerAminoProtoMapping(exports.MsgPayPacketFeeAsync.aminoType, exports.MsgPayPacketFeeAsync.typeUrl);
function createBaseMsgPayPacketFeeAsyncResponse() {
    return {};
}
exports.MsgPayPacketFeeAsyncResponse = {
    typeUrl: "/ibc.applications.fee.v1.MsgPayPacketFeeAsyncResponse",
    aminoType: "cosmos-sdk/MsgPayPacketFeeAsyncResponse",
    is(o) {
        return o && o.$typeUrl === exports.MsgPayPacketFeeAsyncResponse.typeUrl;
    },
    isAmino(o) {
        return o && o.$typeUrl === exports.MsgPayPacketFeeAsyncResponse.typeUrl;
    },
    encode(_, writer = binary_1.BinaryWriter.create()) {
        return writer;
    },
    decode(input, length) {
        const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.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 exports.MsgPayPacketFeeAsyncResponse.fromAmino(object.value);
    },
    toAminoMsg(message) {
        return {
            type: "cosmos-sdk/MsgPayPacketFeeAsyncResponse",
            value: exports.MsgPayPacketFeeAsyncResponse.toAmino(message)
        };
    },
    fromProtoMsg(message) {
        return exports.MsgPayPacketFeeAsyncResponse.decode(message.value);
    },
    toProto(message) {
        return exports.MsgPayPacketFeeAsyncResponse.encode(message).finish();
    },
    toProtoMsg(message) {
        return {
            typeUrl: "/ibc.applications.fee.v1.MsgPayPacketFeeAsyncResponse",
            value: exports.MsgPayPacketFeeAsyncResponse.encode(message).finish()
        };
    }
};
registry_1.GlobalDecoderRegistry.register(exports.MsgPayPacketFeeAsyncResponse.typeUrl, exports.MsgPayPacketFeeAsyncResponse);
registry_1.GlobalDecoderRegistry.registerAminoProtoMapping(exports.MsgPayPacketFeeAsyncResponse.aminoType, exports.MsgPayPacketFeeAsyncResponse.typeUrl);
