"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.AminoConverter = void 0;
var _oracle = require("../../oracle/v1beta1/oracle");
var _exchange = require("./exchange");
var _helpers = require("../../../helpers");
var AminoConverter = {
  "/injective.exchange.v1beta1.MsgDeposit": {
    aminoType: "/injective.exchange.v1beta1.MsgDeposit",
    toAmino: function toAmino(_ref) {
      var sender = _ref.sender,
        subaccountId = _ref.subaccountId,
        amount = _ref.amount;
      return {
        sender: sender,
        subaccount_id: subaccountId,
        amount: {
          denom: amount.denom,
          amount: _helpers.Long.fromValue(amount.amount).toString()
        }
      };
    },
    fromAmino: function fromAmino(_ref2) {
      var sender = _ref2.sender,
        subaccount_id = _ref2.subaccount_id,
        amount = _ref2.amount;
      return {
        sender: sender,
        subaccountId: subaccount_id,
        amount: {
          denom: amount.denom,
          amount: amount.amount
        }
      };
    }
  },
  "/injective.exchange.v1beta1.MsgWithdraw": {
    aminoType: "/injective.exchange.v1beta1.MsgWithdraw",
    toAmino: function toAmino(_ref3) {
      var sender = _ref3.sender,
        subaccountId = _ref3.subaccountId,
        amount = _ref3.amount;
      return {
        sender: sender,
        subaccount_id: subaccountId,
        amount: {
          denom: amount.denom,
          amount: _helpers.Long.fromValue(amount.amount).toString()
        }
      };
    },
    fromAmino: function fromAmino(_ref4) {
      var sender = _ref4.sender,
        subaccount_id = _ref4.subaccount_id,
        amount = _ref4.amount;
      return {
        sender: sender,
        subaccountId: subaccount_id,
        amount: {
          denom: amount.denom,
          amount: amount.amount
        }
      };
    }
  },
  "/injective.exchange.v1beta1.MsgInstantSpotMarketLaunch": {
    aminoType: "/injective.exchange.v1beta1.MsgInstantSpotMarketLaunch",
    toAmino: function toAmino(_ref5) {
      var sender = _ref5.sender,
        ticker = _ref5.ticker,
        baseDenom = _ref5.baseDenom,
        quoteDenom = _ref5.quoteDenom,
        minPriceTickSize = _ref5.minPriceTickSize,
        minQuantityTickSize = _ref5.minQuantityTickSize;
      return {
        sender: sender,
        ticker: ticker,
        base_denom: baseDenom,
        quote_denom: quoteDenom,
        min_price_tick_size: minPriceTickSize,
        min_quantity_tick_size: minQuantityTickSize
      };
    },
    fromAmino: function fromAmino(_ref6) {
      var sender = _ref6.sender,
        ticker = _ref6.ticker,
        base_denom = _ref6.base_denom,
        quote_denom = _ref6.quote_denom,
        min_price_tick_size = _ref6.min_price_tick_size,
        min_quantity_tick_size = _ref6.min_quantity_tick_size;
      return {
        sender: sender,
        ticker: ticker,
        baseDenom: base_denom,
        quoteDenom: quote_denom,
        minPriceTickSize: min_price_tick_size,
        minQuantityTickSize: min_quantity_tick_size
      };
    }
  },
  "/injective.exchange.v1beta1.MsgInstantPerpetualMarketLaunch": {
    aminoType: "/injective.exchange.v1beta1.MsgInstantPerpetualMarketLaunch",
    toAmino: function toAmino(_ref7) {
      var sender = _ref7.sender,
        ticker = _ref7.ticker,
        quoteDenom = _ref7.quoteDenom,
        oracleBase = _ref7.oracleBase,
        oracleQuote = _ref7.oracleQuote,
        oracleScaleFactor = _ref7.oracleScaleFactor,
        oracleType = _ref7.oracleType,
        makerFeeRate = _ref7.makerFeeRate,
        takerFeeRate = _ref7.takerFeeRate,
        initialMarginRatio = _ref7.initialMarginRatio,
        maintenanceMarginRatio = _ref7.maintenanceMarginRatio,
        minPriceTickSize = _ref7.minPriceTickSize,
        minQuantityTickSize = _ref7.minQuantityTickSize;
      return {
        sender: sender,
        ticker: ticker,
        quote_denom: quoteDenom,
        oracle_base: oracleBase,
        oracle_quote: oracleQuote,
        oracle_scale_factor: oracleScaleFactor,
        oracle_type: oracleType,
        maker_fee_rate: makerFeeRate,
        taker_fee_rate: takerFeeRate,
        initial_margin_ratio: initialMarginRatio,
        maintenance_margin_ratio: maintenanceMarginRatio,
        min_price_tick_size: minPriceTickSize,
        min_quantity_tick_size: minQuantityTickSize
      };
    },
    fromAmino: function fromAmino(_ref8) {
      var sender = _ref8.sender,
        ticker = _ref8.ticker,
        quote_denom = _ref8.quote_denom,
        oracle_base = _ref8.oracle_base,
        oracle_quote = _ref8.oracle_quote,
        oracle_scale_factor = _ref8.oracle_scale_factor,
        oracle_type = _ref8.oracle_type,
        maker_fee_rate = _ref8.maker_fee_rate,
        taker_fee_rate = _ref8.taker_fee_rate,
        initial_margin_ratio = _ref8.initial_margin_ratio,
        maintenance_margin_ratio = _ref8.maintenance_margin_ratio,
        min_price_tick_size = _ref8.min_price_tick_size,
        min_quantity_tick_size = _ref8.min_quantity_tick_size;
      return {
        sender: sender,
        ticker: ticker,
        quoteDenom: quote_denom,
        oracleBase: oracle_base,
        oracleQuote: oracle_quote,
        oracleScaleFactor: oracle_scale_factor,
        oracleType: (0, _oracle.oracleTypeFromJSON)(oracle_type),
        makerFeeRate: maker_fee_rate,
        takerFeeRate: taker_fee_rate,
        initialMarginRatio: initial_margin_ratio,
        maintenanceMarginRatio: maintenance_margin_ratio,
        minPriceTickSize: min_price_tick_size,
        minQuantityTickSize: min_quantity_tick_size
      };
    }
  },
  "/injective.exchange.v1beta1.MsgInstantExpiryFuturesMarketLaunch": {
    aminoType: "/injective.exchange.v1beta1.MsgInstantExpiryFuturesMarketLaunch",
    toAmino: function toAmino(_ref9) {
      var sender = _ref9.sender,
        ticker = _ref9.ticker,
        quoteDenom = _ref9.quoteDenom,
        oracleBase = _ref9.oracleBase,
        oracleQuote = _ref9.oracleQuote,
        oracleType = _ref9.oracleType,
        oracleScaleFactor = _ref9.oracleScaleFactor,
        expiry = _ref9.expiry,
        makerFeeRate = _ref9.makerFeeRate,
        takerFeeRate = _ref9.takerFeeRate,
        initialMarginRatio = _ref9.initialMarginRatio,
        maintenanceMarginRatio = _ref9.maintenanceMarginRatio,
        minPriceTickSize = _ref9.minPriceTickSize,
        minQuantityTickSize = _ref9.minQuantityTickSize;
      return {
        sender: sender,
        ticker: ticker,
        quote_denom: quoteDenom,
        oracle_base: oracleBase,
        oracle_quote: oracleQuote,
        oracle_type: oracleType,
        oracle_scale_factor: oracleScaleFactor,
        expiry: expiry.toString(),
        maker_fee_rate: makerFeeRate,
        taker_fee_rate: takerFeeRate,
        initial_margin_ratio: initialMarginRatio,
        maintenance_margin_ratio: maintenanceMarginRatio,
        min_price_tick_size: minPriceTickSize,
        min_quantity_tick_size: minQuantityTickSize
      };
    },
    fromAmino: function fromAmino(_ref10) {
      var sender = _ref10.sender,
        ticker = _ref10.ticker,
        quote_denom = _ref10.quote_denom,
        oracle_base = _ref10.oracle_base,
        oracle_quote = _ref10.oracle_quote,
        oracle_type = _ref10.oracle_type,
        oracle_scale_factor = _ref10.oracle_scale_factor,
        expiry = _ref10.expiry,
        maker_fee_rate = _ref10.maker_fee_rate,
        taker_fee_rate = _ref10.taker_fee_rate,
        initial_margin_ratio = _ref10.initial_margin_ratio,
        maintenance_margin_ratio = _ref10.maintenance_margin_ratio,
        min_price_tick_size = _ref10.min_price_tick_size,
        min_quantity_tick_size = _ref10.min_quantity_tick_size;
      return {
        sender: sender,
        ticker: ticker,
        quoteDenom: quote_denom,
        oracleBase: oracle_base,
        oracleQuote: oracle_quote,
        oracleType: (0, _oracle.oracleTypeFromJSON)(oracle_type),
        oracleScaleFactor: oracle_scale_factor,
        expiry: _helpers.Long.fromString(expiry),
        makerFeeRate: maker_fee_rate,
        takerFeeRate: taker_fee_rate,
        initialMarginRatio: initial_margin_ratio,
        maintenanceMarginRatio: maintenance_margin_ratio,
        minPriceTickSize: min_price_tick_size,
        minQuantityTickSize: min_quantity_tick_size
      };
    }
  },
  "/injective.exchange.v1beta1.MsgCreateSpotLimitOrder": {
    aminoType: "/injective.exchange.v1beta1.MsgCreateSpotLimitOrder",
    toAmino: function toAmino(_ref11) {
      var sender = _ref11.sender,
        order = _ref11.order;
      return {
        sender: sender,
        order: {
          market_id: order.marketId,
          order_info: {
            subaccount_id: order.orderInfo.subaccountId,
            fee_recipient: order.orderInfo.feeRecipient,
            price: order.orderInfo.price,
            quantity: order.orderInfo.quantity
          },
          order_type: order.orderType,
          trigger_price: order.triggerPrice
        }
      };
    },
    fromAmino: function fromAmino(_ref12) {
      var sender = _ref12.sender,
        order = _ref12.order;
      return {
        sender: sender,
        order: {
          marketId: order.market_id,
          orderInfo: {
            subaccountId: order.order_info.subaccount_id,
            feeRecipient: order.order_info.fee_recipient,
            price: order.order_info.price,
            quantity: order.order_info.quantity
          },
          orderType: (0, _exchange.orderTypeFromJSON)(order.order_type),
          triggerPrice: order.trigger_price
        }
      };
    }
  },
  "/injective.exchange.v1beta1.MsgBatchCreateSpotLimitOrders": {
    aminoType: "/injective.exchange.v1beta1.MsgBatchCreateSpotLimitOrders",
    toAmino: function toAmino(_ref13) {
      var sender = _ref13.sender,
        orders = _ref13.orders;
      return {
        sender: sender,
        orders: orders.map(function (el0) {
          return {
            market_id: el0.marketId,
            order_info: {
              subaccount_id: el0.orderInfo.subaccountId,
              fee_recipient: el0.orderInfo.feeRecipient,
              price: el0.orderInfo.price,
              quantity: el0.orderInfo.quantity
            },
            order_type: el0.orderType,
            trigger_price: el0.triggerPrice
          };
        })
      };
    },
    fromAmino: function fromAmino(_ref14) {
      var sender = _ref14.sender,
        orders = _ref14.orders;
      return {
        sender: sender,
        orders: orders.map(function (el0) {
          return {
            marketId: el0.market_id,
            orderInfo: {
              subaccountId: el0.order_info.subaccount_id,
              feeRecipient: el0.order_info.fee_recipient,
              price: el0.order_info.price,
              quantity: el0.order_info.quantity
            },
            orderType: (0, _exchange.orderTypeFromJSON)(el0.order_type),
            triggerPrice: el0.trigger_price
          };
        })
      };
    }
  },
  "/injective.exchange.v1beta1.MsgCreateSpotMarketOrder": {
    aminoType: "/injective.exchange.v1beta1.MsgCreateSpotMarketOrder",
    toAmino: function toAmino(_ref15) {
      var sender = _ref15.sender,
        order = _ref15.order;
      return {
        sender: sender,
        order: {
          market_id: order.marketId,
          order_info: {
            subaccount_id: order.orderInfo.subaccountId,
            fee_recipient: order.orderInfo.feeRecipient,
            price: order.orderInfo.price,
            quantity: order.orderInfo.quantity
          },
          order_type: order.orderType,
          trigger_price: order.triggerPrice
        }
      };
    },
    fromAmino: function fromAmino(_ref16) {
      var sender = _ref16.sender,
        order = _ref16.order;
      return {
        sender: sender,
        order: {
          marketId: order.market_id,
          orderInfo: {
            subaccountId: order.order_info.subaccount_id,
            feeRecipient: order.order_info.fee_recipient,
            price: order.order_info.price,
            quantity: order.order_info.quantity
          },
          orderType: (0, _exchange.orderTypeFromJSON)(order.order_type),
          triggerPrice: order.trigger_price
        }
      };
    }
  },
  "/injective.exchange.v1beta1.MsgCancelSpotOrder": {
    aminoType: "/injective.exchange.v1beta1.MsgCancelSpotOrder",
    toAmino: function toAmino(_ref17) {
      var sender = _ref17.sender,
        marketId = _ref17.marketId,
        subaccountId = _ref17.subaccountId,
        orderHash = _ref17.orderHash;
      return {
        sender: sender,
        market_id: marketId,
        subaccount_id: subaccountId,
        order_hash: orderHash
      };
    },
    fromAmino: function fromAmino(_ref18) {
      var sender = _ref18.sender,
        market_id = _ref18.market_id,
        subaccount_id = _ref18.subaccount_id,
        order_hash = _ref18.order_hash;
      return {
        sender: sender,
        marketId: market_id,
        subaccountId: subaccount_id,
        orderHash: order_hash
      };
    }
  },
  "/injective.exchange.v1beta1.MsgBatchCancelSpotOrders": {
    aminoType: "/injective.exchange.v1beta1.MsgBatchCancelSpotOrders",
    toAmino: function toAmino(_ref19) {
      var sender = _ref19.sender,
        data = _ref19.data;
      return {
        sender: sender,
        data: data.map(function (el0) {
          return {
            market_id: el0.marketId,
            subaccount_id: el0.subaccountId,
            order_hash: el0.orderHash,
            order_mask: el0.orderMask
          };
        })
      };
    },
    fromAmino: function fromAmino(_ref20) {
      var sender = _ref20.sender,
        data = _ref20.data;
      return {
        sender: sender,
        data: data.map(function (el0) {
          return {
            marketId: el0.market_id,
            subaccountId: el0.subaccount_id,
            orderHash: el0.order_hash,
            orderMask: el0.order_mask
          };
        })
      };
    }
  },
  "/injective.exchange.v1beta1.MsgBatchUpdateOrders": {
    aminoType: "/injective.exchange.v1beta1.MsgBatchUpdateOrders",
    toAmino: function toAmino(_ref21) {
      var sender = _ref21.sender,
        subaccountId = _ref21.subaccountId,
        spotMarketIdsToCancelAll = _ref21.spotMarketIdsToCancelAll,
        derivativeMarketIdsToCancelAll = _ref21.derivativeMarketIdsToCancelAll,
        spotOrdersToCancel = _ref21.spotOrdersToCancel,
        derivativeOrdersToCancel = _ref21.derivativeOrdersToCancel,
        spotOrdersToCreate = _ref21.spotOrdersToCreate,
        derivativeOrdersToCreate = _ref21.derivativeOrdersToCreate,
        binaryOptionsOrdersToCancel = _ref21.binaryOptionsOrdersToCancel,
        binaryOptionsMarketIdsToCancelAll = _ref21.binaryOptionsMarketIdsToCancelAll,
        binaryOptionsOrdersToCreate = _ref21.binaryOptionsOrdersToCreate;
      return {
        sender: sender,
        subaccount_id: subaccountId,
        spot_market_ids_to_cancel_all: spotMarketIdsToCancelAll,
        derivative_market_ids_to_cancel_all: derivativeMarketIdsToCancelAll,
        spot_orders_to_cancel: spotOrdersToCancel.map(function (el0) {
          return {
            market_id: el0.marketId,
            subaccount_id: el0.subaccountId,
            order_hash: el0.orderHash,
            order_mask: el0.orderMask
          };
        }),
        derivative_orders_to_cancel: derivativeOrdersToCancel.map(function (el0) {
          return {
            market_id: el0.marketId,
            subaccount_id: el0.subaccountId,
            order_hash: el0.orderHash,
            order_mask: el0.orderMask
          };
        }),
        spot_orders_to_create: spotOrdersToCreate.map(function (el0) {
          return {
            market_id: el0.marketId,
            order_info: {
              subaccount_id: el0.orderInfo.subaccountId,
              fee_recipient: el0.orderInfo.feeRecipient,
              price: el0.orderInfo.price,
              quantity: el0.orderInfo.quantity
            },
            order_type: el0.orderType,
            trigger_price: el0.triggerPrice
          };
        }),
        derivative_orders_to_create: derivativeOrdersToCreate.map(function (el0) {
          return {
            market_id: el0.marketId,
            order_info: {
              subaccount_id: el0.orderInfo.subaccountId,
              fee_recipient: el0.orderInfo.feeRecipient,
              price: el0.orderInfo.price,
              quantity: el0.orderInfo.quantity
            },
            order_type: el0.orderType,
            margin: el0.margin,
            trigger_price: el0.triggerPrice
          };
        }),
        binary_options_orders_to_cancel: binaryOptionsOrdersToCancel.map(function (el0) {
          return {
            market_id: el0.marketId,
            subaccount_id: el0.subaccountId,
            order_hash: el0.orderHash,
            order_mask: el0.orderMask
          };
        }),
        binary_options_market_ids_to_cancel_all: binaryOptionsMarketIdsToCancelAll,
        binary_options_orders_to_create: binaryOptionsOrdersToCreate.map(function (el0) {
          return {
            market_id: el0.marketId,
            order_info: {
              subaccount_id: el0.orderInfo.subaccountId,
              fee_recipient: el0.orderInfo.feeRecipient,
              price: el0.orderInfo.price,
              quantity: el0.orderInfo.quantity
            },
            order_type: el0.orderType,
            margin: el0.margin,
            trigger_price: el0.triggerPrice
          };
        })
      };
    },
    fromAmino: function fromAmino(_ref22) {
      var sender = _ref22.sender,
        subaccount_id = _ref22.subaccount_id,
        spot_market_ids_to_cancel_all = _ref22.spot_market_ids_to_cancel_all,
        derivative_market_ids_to_cancel_all = _ref22.derivative_market_ids_to_cancel_all,
        spot_orders_to_cancel = _ref22.spot_orders_to_cancel,
        derivative_orders_to_cancel = _ref22.derivative_orders_to_cancel,
        spot_orders_to_create = _ref22.spot_orders_to_create,
        derivative_orders_to_create = _ref22.derivative_orders_to_create,
        binary_options_orders_to_cancel = _ref22.binary_options_orders_to_cancel,
        binary_options_market_ids_to_cancel_all = _ref22.binary_options_market_ids_to_cancel_all,
        binary_options_orders_to_create = _ref22.binary_options_orders_to_create;
      return {
        sender: sender,
        subaccountId: subaccount_id,
        spotMarketIdsToCancelAll: spot_market_ids_to_cancel_all,
        derivativeMarketIdsToCancelAll: derivative_market_ids_to_cancel_all,
        spotOrdersToCancel: spot_orders_to_cancel.map(function (el0) {
          return {
            marketId: el0.market_id,
            subaccountId: el0.subaccount_id,
            orderHash: el0.order_hash,
            orderMask: el0.order_mask
          };
        }),
        derivativeOrdersToCancel: derivative_orders_to_cancel.map(function (el0) {
          return {
            marketId: el0.market_id,
            subaccountId: el0.subaccount_id,
            orderHash: el0.order_hash,
            orderMask: el0.order_mask
          };
        }),
        spotOrdersToCreate: spot_orders_to_create.map(function (el0) {
          return {
            marketId: el0.market_id,
            orderInfo: {
              subaccountId: el0.order_info.subaccount_id,
              feeRecipient: el0.order_info.fee_recipient,
              price: el0.order_info.price,
              quantity: el0.order_info.quantity
            },
            orderType: (0, _exchange.orderTypeFromJSON)(el0.order_type),
            triggerPrice: el0.trigger_price
          };
        }),
        derivativeOrdersToCreate: derivative_orders_to_create.map(function (el0) {
          return {
            marketId: el0.market_id,
            orderInfo: {
              subaccountId: el0.order_info.subaccount_id,
              feeRecipient: el0.order_info.fee_recipient,
              price: el0.order_info.price,
              quantity: el0.order_info.quantity
            },
            orderType: (0, _exchange.orderTypeFromJSON)(el0.order_type),
            margin: el0.margin,
            triggerPrice: el0.trigger_price
          };
        }),
        binaryOptionsOrdersToCancel: binary_options_orders_to_cancel.map(function (el0) {
          return {
            marketId: el0.market_id,
            subaccountId: el0.subaccount_id,
            orderHash: el0.order_hash,
            orderMask: el0.order_mask
          };
        }),
        binaryOptionsMarketIdsToCancelAll: binary_options_market_ids_to_cancel_all,
        binaryOptionsOrdersToCreate: binary_options_orders_to_create.map(function (el0) {
          return {
            marketId: el0.market_id,
            orderInfo: {
              subaccountId: el0.order_info.subaccount_id,
              feeRecipient: el0.order_info.fee_recipient,
              price: el0.order_info.price,
              quantity: el0.order_info.quantity
            },
            orderType: (0, _exchange.orderTypeFromJSON)(el0.order_type),
            margin: el0.margin,
            triggerPrice: el0.trigger_price
          };
        })
      };
    }
  },
  "/injective.exchange.v1beta1.MsgExec": {
    aminoType: "/injective.exchange.v1beta1.MsgExec",
    toAmino: function toAmino(_ref23) {
      var sender = _ref23.sender,
        bankFunds = _ref23.bankFunds,
        depositsSubaccountId = _ref23.depositsSubaccountId,
        depositFunds = _ref23.depositFunds,
        contractAddress = _ref23.contractAddress,
        data = _ref23.data;
      return {
        sender: sender,
        bank_funds: bankFunds.map(function (el0) {
          return {
            denom: el0.denom,
            amount: el0.amount
          };
        }),
        deposits_subaccount_id: depositsSubaccountId,
        deposit_funds: depositFunds.map(function (el0) {
          return {
            denom: el0.denom,
            amount: el0.amount
          };
        }),
        contract_address: contractAddress,
        data: data
      };
    },
    fromAmino: function fromAmino(_ref24) {
      var sender = _ref24.sender,
        bank_funds = _ref24.bank_funds,
        deposits_subaccount_id = _ref24.deposits_subaccount_id,
        deposit_funds = _ref24.deposit_funds,
        contract_address = _ref24.contract_address,
        data = _ref24.data;
      return {
        sender: sender,
        bankFunds: bank_funds.map(function (el0) {
          return {
            denom: el0.denom,
            amount: el0.amount
          };
        }),
        depositsSubaccountId: deposits_subaccount_id,
        depositFunds: deposit_funds.map(function (el0) {
          return {
            denom: el0.denom,
            amount: el0.amount
          };
        }),
        contractAddress: contract_address,
        data: data
      };
    }
  },
  "/injective.exchange.v1beta1.MsgCreateDerivativeLimitOrder": {
    aminoType: "/injective.exchange.v1beta1.MsgCreateDerivativeLimitOrder",
    toAmino: function toAmino(_ref25) {
      var sender = _ref25.sender,
        order = _ref25.order;
      return {
        sender: sender,
        order: {
          market_id: order.marketId,
          order_info: {
            subaccount_id: order.orderInfo.subaccountId,
            fee_recipient: order.orderInfo.feeRecipient,
            price: order.orderInfo.price,
            quantity: order.orderInfo.quantity
          },
          order_type: order.orderType,
          margin: order.margin,
          trigger_price: order.triggerPrice
        }
      };
    },
    fromAmino: function fromAmino(_ref26) {
      var sender = _ref26.sender,
        order = _ref26.order;
      return {
        sender: sender,
        order: {
          marketId: order.market_id,
          orderInfo: {
            subaccountId: order.order_info.subaccount_id,
            feeRecipient: order.order_info.fee_recipient,
            price: order.order_info.price,
            quantity: order.order_info.quantity
          },
          orderType: (0, _exchange.orderTypeFromJSON)(order.order_type),
          margin: order.margin,
          triggerPrice: order.trigger_price
        }
      };
    }
  },
  "/injective.exchange.v1beta1.MsgBatchCreateDerivativeLimitOrders": {
    aminoType: "/injective.exchange.v1beta1.MsgBatchCreateDerivativeLimitOrders",
    toAmino: function toAmino(_ref27) {
      var sender = _ref27.sender,
        orders = _ref27.orders;
      return {
        sender: sender,
        orders: orders.map(function (el0) {
          return {
            market_id: el0.marketId,
            order_info: {
              subaccount_id: el0.orderInfo.subaccountId,
              fee_recipient: el0.orderInfo.feeRecipient,
              price: el0.orderInfo.price,
              quantity: el0.orderInfo.quantity
            },
            order_type: el0.orderType,
            margin: el0.margin,
            trigger_price: el0.triggerPrice
          };
        })
      };
    },
    fromAmino: function fromAmino(_ref28) {
      var sender = _ref28.sender,
        orders = _ref28.orders;
      return {
        sender: sender,
        orders: orders.map(function (el0) {
          return {
            marketId: el0.market_id,
            orderInfo: {
              subaccountId: el0.order_info.subaccount_id,
              feeRecipient: el0.order_info.fee_recipient,
              price: el0.order_info.price,
              quantity: el0.order_info.quantity
            },
            orderType: (0, _exchange.orderTypeFromJSON)(el0.order_type),
            margin: el0.margin,
            triggerPrice: el0.trigger_price
          };
        })
      };
    }
  },
  "/injective.exchange.v1beta1.MsgCreateDerivativeMarketOrder": {
    aminoType: "/injective.exchange.v1beta1.MsgCreateDerivativeMarketOrder",
    toAmino: function toAmino(_ref29) {
      var sender = _ref29.sender,
        order = _ref29.order;
      return {
        sender: sender,
        order: {
          market_id: order.marketId,
          order_info: {
            subaccount_id: order.orderInfo.subaccountId,
            fee_recipient: order.orderInfo.feeRecipient,
            price: order.orderInfo.price,
            quantity: order.orderInfo.quantity
          },
          order_type: order.orderType,
          margin: order.margin,
          trigger_price: order.triggerPrice
        }
      };
    },
    fromAmino: function fromAmino(_ref30) {
      var sender = _ref30.sender,
        order = _ref30.order;
      return {
        sender: sender,
        order: {
          marketId: order.market_id,
          orderInfo: {
            subaccountId: order.order_info.subaccount_id,
            feeRecipient: order.order_info.fee_recipient,
            price: order.order_info.price,
            quantity: order.order_info.quantity
          },
          orderType: (0, _exchange.orderTypeFromJSON)(order.order_type),
          margin: order.margin,
          triggerPrice: order.trigger_price
        }
      };
    }
  },
  "/injective.exchange.v1beta1.MsgCancelDerivativeOrder": {
    aminoType: "/injective.exchange.v1beta1.MsgCancelDerivativeOrder",
    toAmino: function toAmino(_ref31) {
      var sender = _ref31.sender,
        marketId = _ref31.marketId,
        subaccountId = _ref31.subaccountId,
        orderHash = _ref31.orderHash,
        orderMask = _ref31.orderMask;
      return {
        sender: sender,
        market_id: marketId,
        subaccount_id: subaccountId,
        order_hash: orderHash,
        order_mask: orderMask
      };
    },
    fromAmino: function fromAmino(_ref32) {
      var sender = _ref32.sender,
        market_id = _ref32.market_id,
        subaccount_id = _ref32.subaccount_id,
        order_hash = _ref32.order_hash,
        order_mask = _ref32.order_mask;
      return {
        sender: sender,
        marketId: market_id,
        subaccountId: subaccount_id,
        orderHash: order_hash,
        orderMask: order_mask
      };
    }
  },
  "/injective.exchange.v1beta1.MsgBatchCancelDerivativeOrders": {
    aminoType: "/injective.exchange.v1beta1.MsgBatchCancelDerivativeOrders",
    toAmino: function toAmino(_ref33) {
      var sender = _ref33.sender,
        data = _ref33.data;
      return {
        sender: sender,
        data: data.map(function (el0) {
          return {
            market_id: el0.marketId,
            subaccount_id: el0.subaccountId,
            order_hash: el0.orderHash,
            order_mask: el0.orderMask
          };
        })
      };
    },
    fromAmino: function fromAmino(_ref34) {
      var sender = _ref34.sender,
        data = _ref34.data;
      return {
        sender: sender,
        data: data.map(function (el0) {
          return {
            marketId: el0.market_id,
            subaccountId: el0.subaccount_id,
            orderHash: el0.order_hash,
            orderMask: el0.order_mask
          };
        })
      };
    }
  },
  "/injective.exchange.v1beta1.MsgInstantBinaryOptionsMarketLaunch": {
    aminoType: "/injective.exchange.v1beta1.MsgInstantBinaryOptionsMarketLaunch",
    toAmino: function toAmino(_ref35) {
      var sender = _ref35.sender,
        ticker = _ref35.ticker,
        oracleSymbol = _ref35.oracleSymbol,
        oracleProvider = _ref35.oracleProvider,
        oracleType = _ref35.oracleType,
        oracleScaleFactor = _ref35.oracleScaleFactor,
        makerFeeRate = _ref35.makerFeeRate,
        takerFeeRate = _ref35.takerFeeRate,
        expirationTimestamp = _ref35.expirationTimestamp,
        settlementTimestamp = _ref35.settlementTimestamp,
        admin = _ref35.admin,
        quoteDenom = _ref35.quoteDenom,
        minPriceTickSize = _ref35.minPriceTickSize,
        minQuantityTickSize = _ref35.minQuantityTickSize;
      return {
        sender: sender,
        ticker: ticker,
        oracle_symbol: oracleSymbol,
        oracle_provider: oracleProvider,
        oracle_type: oracleType,
        oracle_scale_factor: oracleScaleFactor,
        maker_fee_rate: makerFeeRate,
        taker_fee_rate: takerFeeRate,
        expiration_timestamp: expirationTimestamp.toString(),
        settlement_timestamp: settlementTimestamp.toString(),
        admin: admin,
        quote_denom: quoteDenom,
        min_price_tick_size: minPriceTickSize,
        min_quantity_tick_size: minQuantityTickSize
      };
    },
    fromAmino: function fromAmino(_ref36) {
      var sender = _ref36.sender,
        ticker = _ref36.ticker,
        oracle_symbol = _ref36.oracle_symbol,
        oracle_provider = _ref36.oracle_provider,
        oracle_type = _ref36.oracle_type,
        oracle_scale_factor = _ref36.oracle_scale_factor,
        maker_fee_rate = _ref36.maker_fee_rate,
        taker_fee_rate = _ref36.taker_fee_rate,
        expiration_timestamp = _ref36.expiration_timestamp,
        settlement_timestamp = _ref36.settlement_timestamp,
        admin = _ref36.admin,
        quote_denom = _ref36.quote_denom,
        min_price_tick_size = _ref36.min_price_tick_size,
        min_quantity_tick_size = _ref36.min_quantity_tick_size;
      return {
        sender: sender,
        ticker: ticker,
        oracleSymbol: oracle_symbol,
        oracleProvider: oracle_provider,
        oracleType: (0, _oracle.oracleTypeFromJSON)(oracle_type),
        oracleScaleFactor: oracle_scale_factor,
        makerFeeRate: maker_fee_rate,
        takerFeeRate: taker_fee_rate,
        expirationTimestamp: _helpers.Long.fromString(expiration_timestamp),
        settlementTimestamp: _helpers.Long.fromString(settlement_timestamp),
        admin: admin,
        quoteDenom: quote_denom,
        minPriceTickSize: min_price_tick_size,
        minQuantityTickSize: min_quantity_tick_size
      };
    }
  },
  "/injective.exchange.v1beta1.MsgCreateBinaryOptionsLimitOrder": {
    aminoType: "/injective.exchange.v1beta1.MsgCreateBinaryOptionsLimitOrder",
    toAmino: function toAmino(_ref37) {
      var sender = _ref37.sender,
        order = _ref37.order;
      return {
        sender: sender,
        order: {
          market_id: order.marketId,
          order_info: {
            subaccount_id: order.orderInfo.subaccountId,
            fee_recipient: order.orderInfo.feeRecipient,
            price: order.orderInfo.price,
            quantity: order.orderInfo.quantity
          },
          order_type: order.orderType,
          margin: order.margin,
          trigger_price: order.triggerPrice
        }
      };
    },
    fromAmino: function fromAmino(_ref38) {
      var sender = _ref38.sender,
        order = _ref38.order;
      return {
        sender: sender,
        order: {
          marketId: order.market_id,
          orderInfo: {
            subaccountId: order.order_info.subaccount_id,
            feeRecipient: order.order_info.fee_recipient,
            price: order.order_info.price,
            quantity: order.order_info.quantity
          },
          orderType: (0, _exchange.orderTypeFromJSON)(order.order_type),
          margin: order.margin,
          triggerPrice: order.trigger_price
        }
      };
    }
  },
  "/injective.exchange.v1beta1.MsgCreateBinaryOptionsMarketOrder": {
    aminoType: "/injective.exchange.v1beta1.MsgCreateBinaryOptionsMarketOrder",
    toAmino: function toAmino(_ref39) {
      var sender = _ref39.sender,
        order = _ref39.order;
      return {
        sender: sender,
        order: {
          market_id: order.marketId,
          order_info: {
            subaccount_id: order.orderInfo.subaccountId,
            fee_recipient: order.orderInfo.feeRecipient,
            price: order.orderInfo.price,
            quantity: order.orderInfo.quantity
          },
          order_type: order.orderType,
          margin: order.margin,
          trigger_price: order.triggerPrice
        }
      };
    },
    fromAmino: function fromAmino(_ref40) {
      var sender = _ref40.sender,
        order = _ref40.order;
      return {
        sender: sender,
        order: {
          marketId: order.market_id,
          orderInfo: {
            subaccountId: order.order_info.subaccount_id,
            feeRecipient: order.order_info.fee_recipient,
            price: order.order_info.price,
            quantity: order.order_info.quantity
          },
          orderType: (0, _exchange.orderTypeFromJSON)(order.order_type),
          margin: order.margin,
          triggerPrice: order.trigger_price
        }
      };
    }
  },
  "/injective.exchange.v1beta1.MsgCancelBinaryOptionsOrder": {
    aminoType: "/injective.exchange.v1beta1.MsgCancelBinaryOptionsOrder",
    toAmino: function toAmino(_ref41) {
      var sender = _ref41.sender,
        marketId = _ref41.marketId,
        subaccountId = _ref41.subaccountId,
        orderHash = _ref41.orderHash,
        orderMask = _ref41.orderMask;
      return {
        sender: sender,
        market_id: marketId,
        subaccount_id: subaccountId,
        order_hash: orderHash,
        order_mask: orderMask
      };
    },
    fromAmino: function fromAmino(_ref42) {
      var sender = _ref42.sender,
        market_id = _ref42.market_id,
        subaccount_id = _ref42.subaccount_id,
        order_hash = _ref42.order_hash,
        order_mask = _ref42.order_mask;
      return {
        sender: sender,
        marketId: market_id,
        subaccountId: subaccount_id,
        orderHash: order_hash,
        orderMask: order_mask
      };
    }
  },
  "/injective.exchange.v1beta1.MsgBatchCancelBinaryOptionsOrders": {
    aminoType: "/injective.exchange.v1beta1.MsgBatchCancelBinaryOptionsOrders",
    toAmino: function toAmino(_ref43) {
      var sender = _ref43.sender,
        data = _ref43.data;
      return {
        sender: sender,
        data: data.map(function (el0) {
          return {
            market_id: el0.marketId,
            subaccount_id: el0.subaccountId,
            order_hash: el0.orderHash,
            order_mask: el0.orderMask
          };
        })
      };
    },
    fromAmino: function fromAmino(_ref44) {
      var sender = _ref44.sender,
        data = _ref44.data;
      return {
        sender: sender,
        data: data.map(function (el0) {
          return {
            marketId: el0.market_id,
            subaccountId: el0.subaccount_id,
            orderHash: el0.order_hash,
            orderMask: el0.order_mask
          };
        })
      };
    }
  },
  "/injective.exchange.v1beta1.MsgSubaccountTransfer": {
    aminoType: "/injective.exchange.v1beta1.MsgSubaccountTransfer",
    toAmino: function toAmino(_ref45) {
      var sender = _ref45.sender,
        sourceSubaccountId = _ref45.sourceSubaccountId,
        destinationSubaccountId = _ref45.destinationSubaccountId,
        amount = _ref45.amount;
      return {
        sender: sender,
        source_subaccount_id: sourceSubaccountId,
        destination_subaccount_id: destinationSubaccountId,
        amount: {
          denom: amount.denom,
          amount: _helpers.Long.fromValue(amount.amount).toString()
        }
      };
    },
    fromAmino: function fromAmino(_ref46) {
      var sender = _ref46.sender,
        source_subaccount_id = _ref46.source_subaccount_id,
        destination_subaccount_id = _ref46.destination_subaccount_id,
        amount = _ref46.amount;
      return {
        sender: sender,
        sourceSubaccountId: source_subaccount_id,
        destinationSubaccountId: destination_subaccount_id,
        amount: {
          denom: amount.denom,
          amount: amount.amount
        }
      };
    }
  },
  "/injective.exchange.v1beta1.MsgExternalTransfer": {
    aminoType: "/injective.exchange.v1beta1.MsgExternalTransfer",
    toAmino: function toAmino(_ref47) {
      var sender = _ref47.sender,
        sourceSubaccountId = _ref47.sourceSubaccountId,
        destinationSubaccountId = _ref47.destinationSubaccountId,
        amount = _ref47.amount;
      return {
        sender: sender,
        source_subaccount_id: sourceSubaccountId,
        destination_subaccount_id: destinationSubaccountId,
        amount: {
          denom: amount.denom,
          amount: _helpers.Long.fromValue(amount.amount).toString()
        }
      };
    },
    fromAmino: function fromAmino(_ref48) {
      var sender = _ref48.sender,
        source_subaccount_id = _ref48.source_subaccount_id,
        destination_subaccount_id = _ref48.destination_subaccount_id,
        amount = _ref48.amount;
      return {
        sender: sender,
        sourceSubaccountId: source_subaccount_id,
        destinationSubaccountId: destination_subaccount_id,
        amount: {
          denom: amount.denom,
          amount: amount.amount
        }
      };
    }
  },
  "/injective.exchange.v1beta1.MsgLiquidatePosition": {
    aminoType: "/injective.exchange.v1beta1.MsgLiquidatePosition",
    toAmino: function toAmino(_ref49) {
      var sender = _ref49.sender,
        subaccountId = _ref49.subaccountId,
        marketId = _ref49.marketId,
        order = _ref49.order;
      return {
        sender: sender,
        subaccount_id: subaccountId,
        market_id: marketId,
        order: {
          market_id: order.marketId,
          order_info: {
            subaccount_id: order.orderInfo.subaccountId,
            fee_recipient: order.orderInfo.feeRecipient,
            price: order.orderInfo.price,
            quantity: order.orderInfo.quantity
          },
          order_type: order.orderType,
          margin: order.margin,
          trigger_price: order.triggerPrice
        }
      };
    },
    fromAmino: function fromAmino(_ref50) {
      var sender = _ref50.sender,
        subaccount_id = _ref50.subaccount_id,
        market_id = _ref50.market_id,
        order = _ref50.order;
      return {
        sender: sender,
        subaccountId: subaccount_id,
        marketId: market_id,
        order: {
          marketId: order.market_id,
          orderInfo: {
            subaccountId: order.order_info.subaccount_id,
            feeRecipient: order.order_info.fee_recipient,
            price: order.order_info.price,
            quantity: order.order_info.quantity
          },
          orderType: (0, _exchange.orderTypeFromJSON)(order.order_type),
          margin: order.margin,
          triggerPrice: order.trigger_price
        }
      };
    }
  },
  "/injective.exchange.v1beta1.MsgIncreasePositionMargin": {
    aminoType: "/injective.exchange.v1beta1.MsgIncreasePositionMargin",
    toAmino: function toAmino(_ref51) {
      var sender = _ref51.sender,
        sourceSubaccountId = _ref51.sourceSubaccountId,
        destinationSubaccountId = _ref51.destinationSubaccountId,
        marketId = _ref51.marketId,
        amount = _ref51.amount;
      return {
        sender: sender,
        source_subaccount_id: sourceSubaccountId,
        destination_subaccount_id: destinationSubaccountId,
        market_id: marketId,
        amount: amount
      };
    },
    fromAmino: function fromAmino(_ref52) {
      var sender = _ref52.sender,
        source_subaccount_id = _ref52.source_subaccount_id,
        destination_subaccount_id = _ref52.destination_subaccount_id,
        market_id = _ref52.market_id,
        amount = _ref52.amount;
      return {
        sender: sender,
        sourceSubaccountId: source_subaccount_id,
        destinationSubaccountId: destination_subaccount_id,
        marketId: market_id,
        amount: amount
      };
    }
  },
  "/injective.exchange.v1beta1.MsgRewardsOptOut": {
    aminoType: "/injective.exchange.v1beta1.MsgRewardsOptOut",
    toAmino: function toAmino(_ref53) {
      var sender = _ref53.sender;
      return {
        sender: sender
      };
    },
    fromAmino: function fromAmino(_ref54) {
      var sender = _ref54.sender;
      return {
        sender: sender
      };
    }
  },
  "/injective.exchange.v1beta1.MsgAdminUpdateBinaryOptionsMarket": {
    aminoType: "/injective.exchange.v1beta1.MsgAdminUpdateBinaryOptionsMarket",
    toAmino: function toAmino(_ref55) {
      var sender = _ref55.sender,
        marketId = _ref55.marketId,
        settlementPrice = _ref55.settlementPrice,
        expirationTimestamp = _ref55.expirationTimestamp,
        settlementTimestamp = _ref55.settlementTimestamp,
        status = _ref55.status;
      return {
        sender: sender,
        market_id: marketId,
        settlement_price: settlementPrice,
        expiration_timestamp: expirationTimestamp.toString(),
        settlement_timestamp: settlementTimestamp.toString(),
        status: status
      };
    },
    fromAmino: function fromAmino(_ref56) {
      var sender = _ref56.sender,
        market_id = _ref56.market_id,
        settlement_price = _ref56.settlement_price,
        expiration_timestamp = _ref56.expiration_timestamp,
        settlement_timestamp = _ref56.settlement_timestamp,
        status = _ref56.status;
      return {
        sender: sender,
        marketId: market_id,
        settlementPrice: settlement_price,
        expirationTimestamp: _helpers.Long.fromString(expiration_timestamp),
        settlementTimestamp: _helpers.Long.fromString(settlement_timestamp),
        status: (0, _exchange.marketStatusFromJSON)(status)
      };
    }
  }
};
exports.AminoConverter = AminoConverter;