"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getAuthority = exports.getModuleVersions = exports.getUpgradedConsensusState = exports.getAppliedPlan = exports.getCurrentPlan = void 0;
const helper_func_types_1 = require("../../../helper-func-types");
const query_1 = require("./query");
/**
 * CurrentPlan queries the current upgrade plan.
 * @name getCurrentPlan
 * @package cosmos.upgrade.v1beta1
 * @see proto service: cosmos.upgrade.v1beta1.CurrentPlan
 */
exports.getCurrentPlan = (0, helper_func_types_1.buildQuery)({
    encode: query_1.QueryCurrentPlanRequest.encode,
    decode: query_1.QueryCurrentPlanResponse.decode,
    service: "cosmos.upgrade.v1beta1.Query",
    method: "CurrentPlan",
    deps: [query_1.QueryCurrentPlanRequest, query_1.QueryCurrentPlanResponse]
});
/**
 * AppliedPlan queries a previously applied upgrade plan by its name.
 * @name getAppliedPlan
 * @package cosmos.upgrade.v1beta1
 * @see proto service: cosmos.upgrade.v1beta1.AppliedPlan
 */
exports.getAppliedPlan = (0, helper_func_types_1.buildQuery)({
    encode: query_1.QueryAppliedPlanRequest.encode,
    decode: query_1.QueryAppliedPlanResponse.decode,
    service: "cosmos.upgrade.v1beta1.Query",
    method: "AppliedPlan",
    deps: [query_1.QueryAppliedPlanRequest, query_1.QueryAppliedPlanResponse]
});
/**
 * UpgradedConsensusState queries the consensus state that will serve
 * as a trusted kernel for the next version of this chain. It will only be
 * stored at the last height of this chain.
 * UpgradedConsensusState RPC not supported with legacy querier
 * This rpc is deprecated now that IBC has its own replacement
 * (https://github.com/cosmos/ibc-go/blob/2c880a22e9f9cc75f62b527ca94aa75ce1106001/proto/ibc/core/client/v1/query.proto#L54)
 * @name getUpgradedConsensusState
 * @package cosmos.upgrade.v1beta1
 * @see proto service: cosmos.upgrade.v1beta1.UpgradedConsensusState
 * @deprecated
 */
exports.getUpgradedConsensusState = (0, helper_func_types_1.buildQuery)({
    encode: query_1.QueryUpgradedConsensusStateRequest.encode,
    decode: query_1.QueryUpgradedConsensusStateResponse.decode,
    service: "cosmos.upgrade.v1beta1.Query",
    method: "UpgradedConsensusState",
    deps: [query_1.QueryUpgradedConsensusStateRequest, query_1.QueryUpgradedConsensusStateResponse]
});
/**
 * ModuleVersions queries the list of module versions from state.
 * @name getModuleVersions
 * @package cosmos.upgrade.v1beta1
 * @see proto service: cosmos.upgrade.v1beta1.ModuleVersions
 */
exports.getModuleVersions = (0, helper_func_types_1.buildQuery)({
    encode: query_1.QueryModuleVersionsRequest.encode,
    decode: query_1.QueryModuleVersionsResponse.decode,
    service: "cosmos.upgrade.v1beta1.Query",
    method: "ModuleVersions",
    deps: [query_1.QueryModuleVersionsRequest, query_1.QueryModuleVersionsResponse]
});
/**
 * Returns the account with authority to conduct upgrades
 * @name getAuthority
 * @package cosmos.upgrade.v1beta1
 * @see proto service: cosmos.upgrade.v1beta1.Authority
 */
exports.getAuthority = (0, helper_func_types_1.buildQuery)({
    encode: query_1.QueryAuthorityRequest.encode,
    decode: query_1.QueryAuthorityResponse.decode,
    service: "cosmos.upgrade.v1beta1.Query",
    method: "Authority",
    deps: [query_1.QueryAuthorityRequest, query_1.QueryAuthorityResponse]
});
