"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.AminoConverter = void 0;
var _helpers = require("../../../helpers");
var AminoConverter = {
  "/injective.ocr.v1beta1.MsgCreateFeed": {
    aminoType: "/injective.ocr.v1beta1.MsgCreateFeed",
    toAmino: function toAmino(_ref) {
      var sender = _ref.sender,
        config = _ref.config;
      return {
        sender: sender,
        config: {
          signers: config.signers,
          transmitters: config.transmitters,
          f: config.f,
          onchain_config: config.onchainConfig,
          offchain_config_version: config.offchainConfigVersion.toString(),
          offchain_config: config.offchainConfig,
          module_params: {
            feed_id: config.moduleParams.feedId,
            min_answer: config.moduleParams.minAnswer,
            max_answer: config.moduleParams.maxAnswer,
            link_per_observation: config.moduleParams.linkPerObservation,
            link_per_transmission: config.moduleParams.linkPerTransmission,
            link_denom: config.moduleParams.linkDenom,
            unique_reports: config.moduleParams.uniqueReports,
            description: config.moduleParams.description,
            feed_admin: config.moduleParams.feedAdmin,
            billing_admin: config.moduleParams.billingAdmin
          }
        }
      };
    },
    fromAmino: function fromAmino(_ref2) {
      var sender = _ref2.sender,
        config = _ref2.config;
      return {
        sender: sender,
        config: {
          signers: config.signers,
          transmitters: config.transmitters,
          f: config.f,
          onchainConfig: config.onchain_config,
          offchainConfigVersion: _helpers.Long.fromString(config.offchain_config_version),
          offchainConfig: config.offchain_config,
          moduleParams: {
            feedId: config.module_params.feed_id,
            minAnswer: config.module_params.min_answer,
            maxAnswer: config.module_params.max_answer,
            linkPerObservation: config.module_params.link_per_observation,
            linkPerTransmission: config.module_params.link_per_transmission,
            linkDenom: config.module_params.link_denom,
            uniqueReports: config.module_params.unique_reports,
            description: config.module_params.description,
            feedAdmin: config.module_params.feed_admin,
            billingAdmin: config.module_params.billing_admin
          }
        }
      };
    }
  },
  "/injective.ocr.v1beta1.MsgUpdateFeed": {
    aminoType: "/injective.ocr.v1beta1.MsgUpdateFeed",
    toAmino: function toAmino(_ref3) {
      var sender = _ref3.sender,
        feedId = _ref3.feedId,
        signers = _ref3.signers,
        transmitters = _ref3.transmitters,
        linkPerObservation = _ref3.linkPerObservation,
        linkPerTransmission = _ref3.linkPerTransmission,
        linkDenom = _ref3.linkDenom,
        feedAdmin = _ref3.feedAdmin,
        billingAdmin = _ref3.billingAdmin;
      return {
        sender: sender,
        feed_id: feedId,
        signers: signers,
        transmitters: transmitters,
        link_per_observation: linkPerObservation,
        link_per_transmission: linkPerTransmission,
        link_denom: linkDenom,
        feed_admin: feedAdmin,
        billing_admin: billingAdmin
      };
    },
    fromAmino: function fromAmino(_ref4) {
      var sender = _ref4.sender,
        feed_id = _ref4.feed_id,
        signers = _ref4.signers,
        transmitters = _ref4.transmitters,
        link_per_observation = _ref4.link_per_observation,
        link_per_transmission = _ref4.link_per_transmission,
        link_denom = _ref4.link_denom,
        feed_admin = _ref4.feed_admin,
        billing_admin = _ref4.billing_admin;
      return {
        sender: sender,
        feedId: feed_id,
        signers: signers,
        transmitters: transmitters,
        linkPerObservation: link_per_observation,
        linkPerTransmission: link_per_transmission,
        linkDenom: link_denom,
        feedAdmin: feed_admin,
        billingAdmin: billing_admin
      };
    }
  },
  "/injective.ocr.v1beta1.MsgTransmit": {
    aminoType: "/injective.ocr.v1beta1.MsgTransmit",
    toAmino: function toAmino(_ref5) {
      var transmitter = _ref5.transmitter,
        configDigest = _ref5.configDigest,
        feedId = _ref5.feedId,
        epoch = _ref5.epoch,
        round = _ref5.round,
        extraHash = _ref5.extraHash,
        report = _ref5.report,
        signatures = _ref5.signatures;
      return {
        transmitter: transmitter,
        config_digest: configDigest,
        feed_id: feedId,
        epoch: epoch.toString(),
        round: round.toString(),
        extra_hash: extraHash,
        report: {
          observations_timestamp: report.observationsTimestamp.toString(),
          observers: report.observers,
          observations: report.observations
        },
        signatures: signatures
      };
    },
    fromAmino: function fromAmino(_ref6) {
      var transmitter = _ref6.transmitter,
        config_digest = _ref6.config_digest,
        feed_id = _ref6.feed_id,
        epoch = _ref6.epoch,
        round = _ref6.round,
        extra_hash = _ref6.extra_hash,
        report = _ref6.report,
        signatures = _ref6.signatures;
      return {
        transmitter: transmitter,
        configDigest: config_digest,
        feedId: feed_id,
        epoch: _helpers.Long.fromString(epoch),
        round: _helpers.Long.fromString(round),
        extraHash: extra_hash,
        report: {
          observationsTimestamp: _helpers.Long.fromString(report.observations_timestamp),
          observers: report.observers,
          observations: report.observations
        },
        signatures: signatures
      };
    }
  },
  "/injective.ocr.v1beta1.MsgFundFeedRewardPool": {
    aminoType: "/injective.ocr.v1beta1.MsgFundFeedRewardPool",
    toAmino: function toAmino(_ref7) {
      var sender = _ref7.sender,
        feedId = _ref7.feedId,
        amount = _ref7.amount;
      return {
        sender: sender,
        feed_id: feedId,
        amount: {
          denom: amount.denom,
          amount: _helpers.Long.fromValue(amount.amount).toString()
        }
      };
    },
    fromAmino: function fromAmino(_ref8) {
      var sender = _ref8.sender,
        feed_id = _ref8.feed_id,
        amount = _ref8.amount;
      return {
        sender: sender,
        feedId: feed_id,
        amount: {
          denom: amount.denom,
          amount: amount.amount
        }
      };
    }
  },
  "/injective.ocr.v1beta1.MsgWithdrawFeedRewardPool": {
    aminoType: "/injective.ocr.v1beta1.MsgWithdrawFeedRewardPool",
    toAmino: function toAmino(_ref9) {
      var sender = _ref9.sender,
        feedId = _ref9.feedId,
        amount = _ref9.amount;
      return {
        sender: sender,
        feed_id: feedId,
        amount: {
          denom: amount.denom,
          amount: _helpers.Long.fromValue(amount.amount).toString()
        }
      };
    },
    fromAmino: function fromAmino(_ref10) {
      var sender = _ref10.sender,
        feed_id = _ref10.feed_id,
        amount = _ref10.amount;
      return {
        sender: sender,
        feedId: feed_id,
        amount: {
          denom: amount.denom,
          amount: amount.amount
        }
      };
    }
  },
  "/injective.ocr.v1beta1.MsgSetPayees": {
    aminoType: "/injective.ocr.v1beta1.MsgSetPayees",
    toAmino: function toAmino(_ref11) {
      var sender = _ref11.sender,
        feedId = _ref11.feedId,
        transmitters = _ref11.transmitters,
        payees = _ref11.payees;
      return {
        sender: sender,
        feed_id: feedId,
        transmitters: transmitters,
        payees: payees
      };
    },
    fromAmino: function fromAmino(_ref12) {
      var sender = _ref12.sender,
        feed_id = _ref12.feed_id,
        transmitters = _ref12.transmitters,
        payees = _ref12.payees;
      return {
        sender: sender,
        feedId: feed_id,
        transmitters: transmitters,
        payees: payees
      };
    }
  },
  "/injective.ocr.v1beta1.MsgTransferPayeeship": {
    aminoType: "/injective.ocr.v1beta1.MsgTransferPayeeship",
    toAmino: function toAmino(_ref13) {
      var sender = _ref13.sender,
        transmitter = _ref13.transmitter,
        feedId = _ref13.feedId,
        proposed = _ref13.proposed;
      return {
        sender: sender,
        transmitter: transmitter,
        feed_id: feedId,
        proposed: proposed
      };
    },
    fromAmino: function fromAmino(_ref14) {
      var sender = _ref14.sender,
        transmitter = _ref14.transmitter,
        feed_id = _ref14.feed_id,
        proposed = _ref14.proposed;
      return {
        sender: sender,
        transmitter: transmitter,
        feedId: feed_id,
        proposed: proposed
      };
    }
  },
  "/injective.ocr.v1beta1.MsgAcceptPayeeship": {
    aminoType: "/injective.ocr.v1beta1.MsgAcceptPayeeship",
    toAmino: function toAmino(_ref15) {
      var payee = _ref15.payee,
        transmitter = _ref15.transmitter,
        feedId = _ref15.feedId;
      return {
        payee: payee,
        transmitter: transmitter,
        feed_id: feedId
      };
    },
    fromAmino: function fromAmino(_ref16) {
      var payee = _ref16.payee,
        transmitter = _ref16.transmitter,
        feed_id = _ref16.feed_id;
      return {
        payee: payee,
        transmitter: transmitter,
        feedId: feed_id
      };
    }
  }
};
exports.AminoConverter = AminoConverter;