"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
    var ownKeys = function(o) {
        ownKeys = Object.getOwnPropertyNames || function (o) {
            var ar = [];
            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
            return ar;
        };
        return ownKeys(o);
    };
    return function (mod) {
        if (mod && mod.__esModule) return mod;
        var result = {};
        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
        __setModuleDefault(result, mod);
        return result;
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.createRpcQueryExtension = exports.QueryClientImpl = void 0;
const _m0 = __importStar(require("protobufjs/minimal"));
const stargate_1 = require("@cosmjs/stargate");
const query_1 = require("./query");
class QueryClientImpl {
    constructor(rpc) {
        this.rpc = rpc;
        this.perpetualFeeParams = this.perpetualFeeParams.bind(this);
        this.userFeeTier = this.userFeeTier.bind(this);
        this.perMarketFeeDiscountParams = this.perMarketFeeDiscountParams.bind(this);
        this.allMarketFeeDiscountParams = this.allMarketFeeDiscountParams.bind(this);
        this.stakingTiers = this.stakingTiers.bind(this);
        this.userStakingTier = this.userStakingTier.bind(this);
    }
    perpetualFeeParams(request = {}) {
        const data = query_1.QueryPerpetualFeeParamsRequest.encode(request).finish();
        const promise = this.rpc.request("ritbit.feetiers.Query", "PerpetualFeeParams", data);
        return promise.then(data => query_1.QueryPerpetualFeeParamsResponse.decode(new _m0.Reader(data)));
    }
    userFeeTier(request) {
        const data = query_1.QueryUserFeeTierRequest.encode(request).finish();
        const promise = this.rpc.request("ritbit.feetiers.Query", "UserFeeTier", data);
        return promise.then(data => query_1.QueryUserFeeTierResponse.decode(new _m0.Reader(data)));
    }
    perMarketFeeDiscountParams(request) {
        const data = query_1.QueryPerMarketFeeDiscountParamsRequest.encode(request).finish();
        const promise = this.rpc.request("ritbit.feetiers.Query", "PerMarketFeeDiscountParams", data);
        return promise.then(data => query_1.QueryPerMarketFeeDiscountParamsResponse.decode(new _m0.Reader(data)));
    }
    allMarketFeeDiscountParams(request = {}) {
        const data = query_1.QueryAllMarketFeeDiscountParamsRequest.encode(request).finish();
        const promise = this.rpc.request("ritbit.feetiers.Query", "AllMarketFeeDiscountParams", data);
        return promise.then(data => query_1.QueryAllMarketFeeDiscountParamsResponse.decode(new _m0.Reader(data)));
    }
    stakingTiers(request = {}) {
        const data = query_1.QueryStakingTiersRequest.encode(request).finish();
        const promise = this.rpc.request("ritbit.feetiers.Query", "StakingTiers", data);
        return promise.then(data => query_1.QueryStakingTiersResponse.decode(new _m0.Reader(data)));
    }
    userStakingTier(request) {
        const data = query_1.QueryUserStakingTierRequest.encode(request).finish();
        const promise = this.rpc.request("ritbit.feetiers.Query", "UserStakingTier", data);
        return promise.then(data => query_1.QueryUserStakingTierResponse.decode(new _m0.Reader(data)));
    }
}
exports.QueryClientImpl = QueryClientImpl;
const createRpcQueryExtension = (base) => {
    const rpc = (0, stargate_1.createProtobufRpcClient)(base);
    const queryService = new QueryClientImpl(rpc);
    return {
        perpetualFeeParams(request) {
            return queryService.perpetualFeeParams(request);
        },
        userFeeTier(request) {
            return queryService.userFeeTier(request);
        },
        perMarketFeeDiscountParams(request) {
            return queryService.perMarketFeeDiscountParams(request);
        },
        allMarketFeeDiscountParams(request) {
            return queryService.allMarketFeeDiscountParams(request);
        },
        stakingTiers(request) {
            return queryService.stakingTiers(request);
        },
        userStakingTier(request) {
            return queryService.userStakingTier(request);
        }
    };
};
exports.createRpcQueryExtension = createRpcQueryExtension;
//# sourceMappingURL=data:application/json;base64, 