export class LCDQueryClient {
    constructor({ requestClient }) {
        this.req = requestClient;
        this.currentPlan = this.currentPlan.bind(this);
        this.appliedPlan = this.appliedPlan.bind(this);
        this.upgradedConsensusState = this.upgradedConsensusState.bind(this);
        this.moduleVersions = this.moduleVersions.bind(this);
        this.authority = this.authority.bind(this);
    }
    /* CurrentPlan queries the current upgrade plan. */
    async currentPlan(_params = {}) {
        const endpoint = `cosmos/upgrade/v1beta1/current_plan`;
        return await this.req.get(endpoint);
    }
    /* AppliedPlan queries a previously applied upgrade plan by its name. */
    async appliedPlan(params) {
        const endpoint = `cosmos/upgrade/v1beta1/applied_plan/${params.name}`;
        return await this.req.get(endpoint);
    }
    /* 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) */
    async upgradedConsensusState(params) {
        const endpoint = `cosmos/upgrade/v1beta1/upgraded_consensus_state/${params.lastHeight}`;
        return await this.req.get(endpoint);
    }
    /* ModuleVersions queries the list of module versions from state.
    
     Since: cosmos-sdk 0.43 */
    async moduleVersions(params) {
        const options = {
            params: {}
        };
        if (typeof (params === null || params === void 0 ? void 0 : params.moduleName) !== "undefined") {
            options.params.module_name = params.moduleName;
        }
        const endpoint = `cosmos/upgrade/v1beta1/module_versions`;
        return await this.req.get(endpoint, options);
    }
    /* Returns the account with authority to conduct upgrades
    
     Since: cosmos-sdk 0.46 */
    async authority(_params = {}) {
        const endpoint = `cosmos/upgrade/v1beta1/authority`;
        return await this.req.get(endpoint);
    }
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicXVlcnkubGNkLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4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