"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.registry = exports.load = exports.MessageComposer = void 0;
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
var _tx = require("./tx");
var registry = [["/injective.insurance.v1beta1.MsgCreateInsuranceFund", _tx.MsgCreateInsuranceFund], ["/injective.insurance.v1beta1.MsgUnderwrite", _tx.MsgUnderwrite], ["/injective.insurance.v1beta1.MsgRequestRedemption", _tx.MsgRequestRedemption]];
exports.registry = registry;
var load = function load(protoRegistry) {
  registry.forEach(function (_ref) {
    var _ref2 = (0, _slicedToArray2["default"])(_ref, 2),
      typeUrl = _ref2[0],
      mod = _ref2[1];
    protoRegistry.register(typeUrl, mod);
  });
};
exports.load = load;
var MessageComposer = {
  encoded: {
    createInsuranceFund: function createInsuranceFund(value) {
      return {
        typeUrl: "/injective.insurance.v1beta1.MsgCreateInsuranceFund",
        value: _tx.MsgCreateInsuranceFund.encode(value).finish()
      };
    },
    underwrite: function underwrite(value) {
      return {
        typeUrl: "/injective.insurance.v1beta1.MsgUnderwrite",
        value: _tx.MsgUnderwrite.encode(value).finish()
      };
    },
    requestRedemption: function requestRedemption(value) {
      return {
        typeUrl: "/injective.insurance.v1beta1.MsgRequestRedemption",
        value: _tx.MsgRequestRedemption.encode(value).finish()
      };
    }
  },
  withTypeUrl: {
    createInsuranceFund: function createInsuranceFund(value) {
      return {
        typeUrl: "/injective.insurance.v1beta1.MsgCreateInsuranceFund",
        value: value
      };
    },
    underwrite: function underwrite(value) {
      return {
        typeUrl: "/injective.insurance.v1beta1.MsgUnderwrite",
        value: value
      };
    },
    requestRedemption: function requestRedemption(value) {
      return {
        typeUrl: "/injective.insurance.v1beta1.MsgRequestRedemption",
        value: value
      };
    }
  },
  fromPartial: {
    createInsuranceFund: function createInsuranceFund(value) {
      return {
        typeUrl: "/injective.insurance.v1beta1.MsgCreateInsuranceFund",
        value: _tx.MsgCreateInsuranceFund.fromPartial(value)
      };
    },
    underwrite: function underwrite(value) {
      return {
        typeUrl: "/injective.insurance.v1beta1.MsgUnderwrite",
        value: _tx.MsgUnderwrite.fromPartial(value)
      };
    },
    requestRedemption: function requestRedemption(value) {
      return {
        typeUrl: "/injective.insurance.v1beta1.MsgRequestRedemption",
        value: _tx.MsgRequestRedemption.fromPartial(value)
      };
    }
  }
};
exports.MessageComposer = MessageComposer;