import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
import * as _m0 from "protobufjs/minimal";
import { MsgDeposit, MsgDepositResponse, MsgWithdraw, MsgWithdrawResponse, MsgInstantSpotMarketLaunch, MsgInstantSpotMarketLaunchResponse, MsgInstantPerpetualMarketLaunch, MsgInstantPerpetualMarketLaunchResponse, MsgInstantExpiryFuturesMarketLaunch, MsgInstantExpiryFuturesMarketLaunchResponse, MsgCreateSpotLimitOrder, MsgCreateSpotLimitOrderResponse, MsgBatchCreateSpotLimitOrders, MsgBatchCreateSpotLimitOrdersResponse, MsgCreateSpotMarketOrder, MsgCreateSpotMarketOrderResponse, MsgCancelSpotOrder, MsgCancelSpotOrderResponse, MsgBatchCancelSpotOrders, MsgBatchCancelSpotOrdersResponse, MsgBatchUpdateOrders, MsgBatchUpdateOrdersResponse, MsgExec, MsgExecResponse, MsgCreateDerivativeLimitOrder, MsgCreateDerivativeLimitOrderResponse, MsgBatchCreateDerivativeLimitOrders, MsgBatchCreateDerivativeLimitOrdersResponse, MsgCreateDerivativeMarketOrder, MsgCreateDerivativeMarketOrderResponse, MsgCancelDerivativeOrder, MsgCancelDerivativeOrderResponse, MsgBatchCancelDerivativeOrders, MsgBatchCancelDerivativeOrdersResponse, MsgInstantBinaryOptionsMarketLaunch, MsgInstantBinaryOptionsMarketLaunchResponse, MsgCreateBinaryOptionsLimitOrder, MsgCreateBinaryOptionsLimitOrderResponse, MsgCreateBinaryOptionsMarketOrder, MsgCreateBinaryOptionsMarketOrderResponse, MsgCancelBinaryOptionsOrder, MsgCancelBinaryOptionsOrderResponse, MsgBatchCancelBinaryOptionsOrders, MsgBatchCancelBinaryOptionsOrdersResponse, MsgSubaccountTransfer, MsgSubaccountTransferResponse, MsgExternalTransfer, MsgExternalTransferResponse, MsgLiquidatePosition, MsgLiquidatePositionResponse, MsgIncreasePositionMargin, MsgIncreasePositionMarginResponse, MsgRewardsOptOut, MsgRewardsOptOutResponse, MsgAdminUpdateBinaryOptionsMarket, MsgAdminUpdateBinaryOptionsMarketResponse } from "./tx";
/** Msg defines the staking Msg service. */

export class MsgClientImpl {
  constructor(rpc) {
    _defineProperty(this, "rpc", void 0);
    this.rpc = rpc;
    this.deposit = this.deposit.bind(this);
    this.withdraw = this.withdraw.bind(this);
    this.instantSpotMarketLaunch = this.instantSpotMarketLaunch.bind(this);
    this.instantPerpetualMarketLaunch = this.instantPerpetualMarketLaunch.bind(this);
    this.instantExpiryFuturesMarketLaunch = this.instantExpiryFuturesMarketLaunch.bind(this);
    this.createSpotLimitOrder = this.createSpotLimitOrder.bind(this);
    this.batchCreateSpotLimitOrders = this.batchCreateSpotLimitOrders.bind(this);
    this.createSpotMarketOrder = this.createSpotMarketOrder.bind(this);
    this.cancelSpotOrder = this.cancelSpotOrder.bind(this);
    this.batchCancelSpotOrders = this.batchCancelSpotOrders.bind(this);
    this.batchUpdateOrders = this.batchUpdateOrders.bind(this);
    this.exec = this.exec.bind(this);
    this.createDerivativeLimitOrder = this.createDerivativeLimitOrder.bind(this);
    this.batchCreateDerivativeLimitOrders = this.batchCreateDerivativeLimitOrders.bind(this);
    this.createDerivativeMarketOrder = this.createDerivativeMarketOrder.bind(this);
    this.cancelDerivativeOrder = this.cancelDerivativeOrder.bind(this);
    this.batchCancelDerivativeOrders = this.batchCancelDerivativeOrders.bind(this);
    this.instantBinaryOptionsMarketLaunch = this.instantBinaryOptionsMarketLaunch.bind(this);
    this.createBinaryOptionsLimitOrder = this.createBinaryOptionsLimitOrder.bind(this);
    this.createBinaryOptionsMarketOrder = this.createBinaryOptionsMarketOrder.bind(this);
    this.cancelBinaryOptionsOrder = this.cancelBinaryOptionsOrder.bind(this);
    this.batchCancelBinaryOptionsOrders = this.batchCancelBinaryOptionsOrders.bind(this);
    this.subaccountTransfer = this.subaccountTransfer.bind(this);
    this.externalTransfer = this.externalTransfer.bind(this);
    this.liquidatePosition = this.liquidatePosition.bind(this);
    this.increasePositionMargin = this.increasePositionMargin.bind(this);
    this.rewardsOptOut = this.rewardsOptOut.bind(this);
    this.adminUpdateBinaryOptionsMarket = this.adminUpdateBinaryOptionsMarket.bind(this);
  }
  deposit(request) {
    const data = MsgDeposit.encode(request).finish();
    const promise = this.rpc.request("injective.exchange.v1beta1.Msg", "Deposit", data);
    return promise.then(data => MsgDepositResponse.decode(new _m0.Reader(data)));
  }
  withdraw(request) {
    const data = MsgWithdraw.encode(request).finish();
    const promise = this.rpc.request("injective.exchange.v1beta1.Msg", "Withdraw", data);
    return promise.then(data => MsgWithdrawResponse.decode(new _m0.Reader(data)));
  }
  instantSpotMarketLaunch(request) {
    const data = MsgInstantSpotMarketLaunch.encode(request).finish();
    const promise = this.rpc.request("injective.exchange.v1beta1.Msg", "InstantSpotMarketLaunch", data);
    return promise.then(data => MsgInstantSpotMarketLaunchResponse.decode(new _m0.Reader(data)));
  }
  instantPerpetualMarketLaunch(request) {
    const data = MsgInstantPerpetualMarketLaunch.encode(request).finish();
    const promise = this.rpc.request("injective.exchange.v1beta1.Msg", "InstantPerpetualMarketLaunch", data);
    return promise.then(data => MsgInstantPerpetualMarketLaunchResponse.decode(new _m0.Reader(data)));
  }
  instantExpiryFuturesMarketLaunch(request) {
    const data = MsgInstantExpiryFuturesMarketLaunch.encode(request).finish();
    const promise = this.rpc.request("injective.exchange.v1beta1.Msg", "InstantExpiryFuturesMarketLaunch", data);
    return promise.then(data => MsgInstantExpiryFuturesMarketLaunchResponse.decode(new _m0.Reader(data)));
  }
  createSpotLimitOrder(request) {
    const data = MsgCreateSpotLimitOrder.encode(request).finish();
    const promise = this.rpc.request("injective.exchange.v1beta1.Msg", "CreateSpotLimitOrder", data);
    return promise.then(data => MsgCreateSpotLimitOrderResponse.decode(new _m0.Reader(data)));
  }
  batchCreateSpotLimitOrders(request) {
    const data = MsgBatchCreateSpotLimitOrders.encode(request).finish();
    const promise = this.rpc.request("injective.exchange.v1beta1.Msg", "BatchCreateSpotLimitOrders", data);
    return promise.then(data => MsgBatchCreateSpotLimitOrdersResponse.decode(new _m0.Reader(data)));
  }
  createSpotMarketOrder(request) {
    const data = MsgCreateSpotMarketOrder.encode(request).finish();
    const promise = this.rpc.request("injective.exchange.v1beta1.Msg", "CreateSpotMarketOrder", data);
    return promise.then(data => MsgCreateSpotMarketOrderResponse.decode(new _m0.Reader(data)));
  }
  cancelSpotOrder(request) {
    const data = MsgCancelSpotOrder.encode(request).finish();
    const promise = this.rpc.request("injective.exchange.v1beta1.Msg", "CancelSpotOrder", data);
    return promise.then(data => MsgCancelSpotOrderResponse.decode(new _m0.Reader(data)));
  }
  batchCancelSpotOrders(request) {
    const data = MsgBatchCancelSpotOrders.encode(request).finish();
    const promise = this.rpc.request("injective.exchange.v1beta1.Msg", "BatchCancelSpotOrders", data);
    return promise.then(data => MsgBatchCancelSpotOrdersResponse.decode(new _m0.Reader(data)));
  }
  batchUpdateOrders(request) {
    const data = MsgBatchUpdateOrders.encode(request).finish();
    const promise = this.rpc.request("injective.exchange.v1beta1.Msg", "BatchUpdateOrders", data);
    return promise.then(data => MsgBatchUpdateOrdersResponse.decode(new _m0.Reader(data)));
  }
  exec(request) {
    const data = MsgExec.encode(request).finish();
    const promise = this.rpc.request("injective.exchange.v1beta1.Msg", "Exec", data);
    return promise.then(data => MsgExecResponse.decode(new _m0.Reader(data)));
  }
  createDerivativeLimitOrder(request) {
    const data = MsgCreateDerivativeLimitOrder.encode(request).finish();
    const promise = this.rpc.request("injective.exchange.v1beta1.Msg", "CreateDerivativeLimitOrder", data);
    return promise.then(data => MsgCreateDerivativeLimitOrderResponse.decode(new _m0.Reader(data)));
  }
  batchCreateDerivativeLimitOrders(request) {
    const data = MsgBatchCreateDerivativeLimitOrders.encode(request).finish();
    const promise = this.rpc.request("injective.exchange.v1beta1.Msg", "BatchCreateDerivativeLimitOrders", data);
    return promise.then(data => MsgBatchCreateDerivativeLimitOrdersResponse.decode(new _m0.Reader(data)));
  }
  createDerivativeMarketOrder(request) {
    const data = MsgCreateDerivativeMarketOrder.encode(request).finish();
    const promise = this.rpc.request("injective.exchange.v1beta1.Msg", "CreateDerivativeMarketOrder", data);
    return promise.then(data => MsgCreateDerivativeMarketOrderResponse.decode(new _m0.Reader(data)));
  }
  cancelDerivativeOrder(request) {
    const data = MsgCancelDerivativeOrder.encode(request).finish();
    const promise = this.rpc.request("injective.exchange.v1beta1.Msg", "CancelDerivativeOrder", data);
    return promise.then(data => MsgCancelDerivativeOrderResponse.decode(new _m0.Reader(data)));
  }
  batchCancelDerivativeOrders(request) {
    const data = MsgBatchCancelDerivativeOrders.encode(request).finish();
    const promise = this.rpc.request("injective.exchange.v1beta1.Msg", "BatchCancelDerivativeOrders", data);
    return promise.then(data => MsgBatchCancelDerivativeOrdersResponse.decode(new _m0.Reader(data)));
  }
  instantBinaryOptionsMarketLaunch(request) {
    const data = MsgInstantBinaryOptionsMarketLaunch.encode(request).finish();
    const promise = this.rpc.request("injective.exchange.v1beta1.Msg", "InstantBinaryOptionsMarketLaunch", data);
    return promise.then(data => MsgInstantBinaryOptionsMarketLaunchResponse.decode(new _m0.Reader(data)));
  }
  createBinaryOptionsLimitOrder(request) {
    const data = MsgCreateBinaryOptionsLimitOrder.encode(request).finish();
    const promise = this.rpc.request("injective.exchange.v1beta1.Msg", "CreateBinaryOptionsLimitOrder", data);
    return promise.then(data => MsgCreateBinaryOptionsLimitOrderResponse.decode(new _m0.Reader(data)));
  }
  createBinaryOptionsMarketOrder(request) {
    const data = MsgCreateBinaryOptionsMarketOrder.encode(request).finish();
    const promise = this.rpc.request("injective.exchange.v1beta1.Msg", "CreateBinaryOptionsMarketOrder", data);
    return promise.then(data => MsgCreateBinaryOptionsMarketOrderResponse.decode(new _m0.Reader(data)));
  }
  cancelBinaryOptionsOrder(request) {
    const data = MsgCancelBinaryOptionsOrder.encode(request).finish();
    const promise = this.rpc.request("injective.exchange.v1beta1.Msg", "CancelBinaryOptionsOrder", data);
    return promise.then(data => MsgCancelBinaryOptionsOrderResponse.decode(new _m0.Reader(data)));
  }
  batchCancelBinaryOptionsOrders(request) {
    const data = MsgBatchCancelBinaryOptionsOrders.encode(request).finish();
    const promise = this.rpc.request("injective.exchange.v1beta1.Msg", "BatchCancelBinaryOptionsOrders", data);
    return promise.then(data => MsgBatchCancelBinaryOptionsOrdersResponse.decode(new _m0.Reader(data)));
  }
  subaccountTransfer(request) {
    const data = MsgSubaccountTransfer.encode(request).finish();
    const promise = this.rpc.request("injective.exchange.v1beta1.Msg", "SubaccountTransfer", data);
    return promise.then(data => MsgSubaccountTransferResponse.decode(new _m0.Reader(data)));
  }
  externalTransfer(request) {
    const data = MsgExternalTransfer.encode(request).finish();
    const promise = this.rpc.request("injective.exchange.v1beta1.Msg", "ExternalTransfer", data);
    return promise.then(data => MsgExternalTransferResponse.decode(new _m0.Reader(data)));
  }
  liquidatePosition(request) {
    const data = MsgLiquidatePosition.encode(request).finish();
    const promise = this.rpc.request("injective.exchange.v1beta1.Msg", "LiquidatePosition", data);
    return promise.then(data => MsgLiquidatePositionResponse.decode(new _m0.Reader(data)));
  }
  increasePositionMargin(request) {
    const data = MsgIncreasePositionMargin.encode(request).finish();
    const promise = this.rpc.request("injective.exchange.v1beta1.Msg", "IncreasePositionMargin", data);
    return promise.then(data => MsgIncreasePositionMarginResponse.decode(new _m0.Reader(data)));
  }
  rewardsOptOut(request) {
    const data = MsgRewardsOptOut.encode(request).finish();
    const promise = this.rpc.request("injective.exchange.v1beta1.Msg", "RewardsOptOut", data);
    return promise.then(data => MsgRewardsOptOutResponse.decode(new _m0.Reader(data)));
  }
  adminUpdateBinaryOptionsMarket(request) {
    const data = MsgAdminUpdateBinaryOptionsMarket.encode(request).finish();
    const promise = this.rpc.request("injective.exchange.v1beta1.Msg", "AdminUpdateBinaryOptionsMarket", data);
    return promise.then(data => MsgAdminUpdateBinaryOptionsMarketResponse.decode(new _m0.Reader(data)));
  }
}