"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ConfigResponse = exports.ConfigRequest = void 0;
const binary_1 = require("../../../../binary");
const registry_1 = require("../../../../registry");
function createBaseConfigRequest() {
    return {};
}
exports.ConfigRequest = {
    typeUrl: "/cosmos.base.node.v2.ConfigRequest",
    aminoType: "cosmos-sdk/ConfigRequest",
    is(o) {
        return o && o.$typeUrl === exports.ConfigRequest.typeUrl;
    },
    isAmino(o) {
        return o && o.$typeUrl === exports.ConfigRequest.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 = createBaseConfigRequest();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                default:
                    reader.skipType(tag & 7);
                    break;
            }
        }
        return message;
    },
    fromPartial(_) {
        const message = createBaseConfigRequest();
        return message;
    },
    fromAmino(_) {
        const message = createBaseConfigRequest();
        return message;
    },
    toAmino(_) {
        const obj = {};
        return obj;
    },
    fromAminoMsg(object) {
        return exports.ConfigRequest.fromAmino(object.value);
    },
    toAminoMsg(message) {
        return {
            type: "cosmos-sdk/ConfigRequest",
            value: exports.ConfigRequest.toAmino(message)
        };
    },
    fromProtoMsg(message) {
        return exports.ConfigRequest.decode(message.value);
    },
    toProto(message) {
        return exports.ConfigRequest.encode(message).finish();
    },
    toProtoMsg(message) {
        return {
            typeUrl: "/cosmos.base.node.v2.ConfigRequest",
            value: exports.ConfigRequest.encode(message).finish()
        };
    }
};
registry_1.GlobalDecoderRegistry.register(exports.ConfigRequest.typeUrl, exports.ConfigRequest);
registry_1.GlobalDecoderRegistry.registerAminoProtoMapping(exports.ConfigRequest.aminoType, exports.ConfigRequest.typeUrl);
function createBaseConfigResponse() {
    return {
        minimumGasPrice: ""
    };
}
exports.ConfigResponse = {
    typeUrl: "/cosmos.base.node.v2.ConfigResponse",
    aminoType: "cosmos-sdk/ConfigResponse",
    is(o) {
        return o && (o.$typeUrl === exports.ConfigResponse.typeUrl || typeof o.minimumGasPrice === "string");
    },
    isAmino(o) {
        return o && (o.$typeUrl === exports.ConfigResponse.typeUrl || typeof o.minimum_gas_price === "string");
    },
    encode(message, writer = binary_1.BinaryWriter.create()) {
        if (message.minimumGasPrice !== "") {
            writer.uint32(10).string(message.minimumGasPrice);
        }
        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 = createBaseConfigResponse();
        while (reader.pos < end) {
            const tag = reader.uint32();
            switch (tag >>> 3) {
                case 1:
                    message.minimumGasPrice = reader.string();
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
            }
        }
        return message;
    },
    fromPartial(object) {
        const message = createBaseConfigResponse();
        message.minimumGasPrice = object.minimumGasPrice ?? "";
        return message;
    },
    fromAmino(object) {
        const message = createBaseConfigResponse();
        if (object.minimum_gas_price !== undefined && object.minimum_gas_price !== null) {
            message.minimumGasPrice = object.minimum_gas_price;
        }
        return message;
    },
    toAmino(message) {
        const obj = {};
        obj.minimum_gas_price = message.minimumGasPrice === "" ? undefined : message.minimumGasPrice;
        return obj;
    },
    fromAminoMsg(object) {
        return exports.ConfigResponse.fromAmino(object.value);
    },
    toAminoMsg(message) {
        return {
            type: "cosmos-sdk/ConfigResponse",
            value: exports.ConfigResponse.toAmino(message)
        };
    },
    fromProtoMsg(message) {
        return exports.ConfigResponse.decode(message.value);
    },
    toProto(message) {
        return exports.ConfigResponse.encode(message).finish();
    },
    toProtoMsg(message) {
        return {
            typeUrl: "/cosmos.base.node.v2.ConfigResponse",
            value: exports.ConfigResponse.encode(message).finish()
        };
    }
};
registry_1.GlobalDecoderRegistry.register(exports.ConfigResponse.typeUrl, exports.ConfigResponse);
registry_1.GlobalDecoderRegistry.registerAminoProtoMapping(exports.ConfigResponse.aminoType, exports.ConfigResponse.typeUrl);
