"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.depositToMegavault = this.depositToMegavault.bind(this);
        this.withdrawFromMegavault = this.withdrawFromMegavault.bind(this);
        this.updateDefaultQuotingParams = this.updateDefaultQuotingParams.bind(this);
        this.updateOperatorParams = this.updateOperatorParams.bind(this);
        this.setVaultParams = this.setVaultParams.bind(this);
        this.unlockShares = this.unlockShares.bind(this);
        this.allocateToVault = this.allocateToVault.bind(this);
        this.retrieveFromVault = this.retrieveFromVault.bind(this);
    }
    depositToMegavault(request) {
        const data = tx_1.MsgDepositToMegavault.encode(request).finish();
        const promise = this.rpc.request("ritbit.vault.Msg", "DepositToMegavault", data);
        return promise.then(data => tx_1.MsgDepositToMegavaultResponse.decode(new _m0.Reader(data)));
    }
    withdrawFromMegavault(request) {
        const data = tx_1.MsgWithdrawFromMegavault.encode(request).finish();
        const promise = this.rpc.request("ritbit.vault.Msg", "WithdrawFromMegavault", data);
        return promise.then(data => tx_1.MsgWithdrawFromMegavaultResponse.decode(new _m0.Reader(data)));
    }
    updateDefaultQuotingParams(request) {
        const data = tx_1.MsgUpdateDefaultQuotingParams.encode(request).finish();
        const promise = this.rpc.request("ritbit.vault.Msg", "UpdateDefaultQuotingParams", data);
        return promise.then(data => tx_1.MsgUpdateDefaultQuotingParamsResponse.decode(new _m0.Reader(data)));
    }
    updateOperatorParams(request) {
        const data = tx_1.MsgUpdateOperatorParams.encode(request).finish();
        const promise = this.rpc.request("ritbit.vault.Msg", "UpdateOperatorParams", data);
        return promise.then(data => tx_1.MsgUpdateOperatorParamsResponse.decode(new _m0.Reader(data)));
    }
    setVaultParams(request) {
        const data = tx_1.MsgSetVaultParams.encode(request).finish();
        const promise = this.rpc.request("ritbit.vault.Msg", "SetVaultParams", data);
        return promise.then(data => tx_1.MsgSetVaultParamsResponse.decode(new _m0.Reader(data)));
    }
    unlockShares(request) {
        const data = tx_1.MsgUnlockShares.encode(request).finish();
        const promise = this.rpc.request("ritbit.vault.Msg", "UnlockShares", data);
        return promise.then(data => tx_1.MsgUnlockSharesResponse.decode(new _m0.Reader(data)));
    }
    allocateToVault(request) {
        const data = tx_1.MsgAllocateToVault.encode(request).finish();
        const promise = this.rpc.request("ritbit.vault.Msg", "AllocateToVault", data);
        return promise.then(data => tx_1.MsgAllocateToVaultResponse.decode(new _m0.Reader(data)));
    }
    retrieveFromVault(request) {
        const data = tx_1.MsgRetrieveFromVault.encode(request).finish();
        const promise = this.rpc.request("ritbit.vault.Msg", "RetrieveFromVault", data);
        return promise.then(data => tx_1.MsgRetrieveFromVaultResponse.decode(new _m0.Reader(data)));
    }
}
exports.MsgClientImpl = MsgClientImpl;
//# sourceMappingURL=data:application/json;base64, 