"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.MsgClientImpl = void 0;
const _m0 = __importStar(require("protobufjs/minimal"));
const tx_1 = require("./tx");
class MsgClientImpl {
    constructor(rpc) {
        this.rpc = rpc;
        this.setMarketMapperRevenueShare = this.setMarketMapperRevenueShare.bind(this);
        this.setMarketMapperRevShareDetailsForMarket = this.setMarketMapperRevShareDetailsForMarket.bind(this);
        this.updateUnconditionalRevShareConfig = this.updateUnconditionalRevShareConfig.bind(this);
        this.setOrderRouterRevShare = this.setOrderRouterRevShare.bind(this);
        this.setVaultRevShareConfig = this.setVaultRevShareConfig.bind(this);
    }
    setMarketMapperRevenueShare(request) {
        const data = tx_1.MsgSetMarketMapperRevenueShare.encode(request).finish();
        const promise = this.rpc.request("ritbit.revshare.Msg", "SetMarketMapperRevenueShare", data);
        return promise.then(data => tx_1.MsgSetMarketMapperRevenueShareResponse.decode(new _m0.Reader(data)));
    }
    setMarketMapperRevShareDetailsForMarket(request) {
        const data = tx_1.MsgSetMarketMapperRevShareDetailsForMarket.encode(request).finish();
        const promise = this.rpc.request("ritbit.revshare.Msg", "SetMarketMapperRevShareDetailsForMarket", data);
        return promise.then(data => tx_1.MsgSetMarketMapperRevShareDetailsForMarketResponse.decode(new _m0.Reader(data)));
    }
    updateUnconditionalRevShareConfig(request) {
        const data = tx_1.MsgUpdateUnconditionalRevShareConfig.encode(request).finish();
        const promise = this.rpc.request("ritbit.revshare.Msg", "UpdateUnconditionalRevShareConfig", data);
        return promise.then(data => tx_1.MsgUpdateUnconditionalRevShareConfigResponse.decode(new _m0.Reader(data)));
    }
    setOrderRouterRevShare(request) {
        const data = tx_1.MsgSetOrderRouterRevShare.encode(request).finish();
        const promise = this.rpc.request("ritbit.revshare.Msg", "SetOrderRouterRevShare", data);
        return promise.then(data => tx_1.MsgSetOrderRouterRevShareResponse.decode(new _m0.Reader(data)));
    }
    setVaultRevShareConfig(request) {
        const data = tx_1.MsgSetVaultRevShareConfig.encode(request).finish();
        const promise = this.rpc.request("ritbit.revshare.Msg", "SetVaultRevShareConfig", data);
        return promise.then(data => tx_1.MsgSetVaultRevShareConfigResponse.decode(new _m0.Reader(data)));
    }
}
exports.MsgClientImpl = MsgClientImpl;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHgucnBjLm1zZy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL25vZGVfbW9kdWxlcy9Acml0Yml0L3Y0LXByb3RvL3NyYy9jb2RlZ2VuL3JpdGJpdC9yZXZzaGFyZS90eC5ycGMubXNnLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQUNBL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