"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
var _typeof = require("@babel/runtime/helpers/typeof");
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.createRPCQueryClient = void 0;
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
var _tendermintRpc = require("@cosmjs/tendermint-rpc");
var _stargate = require("@cosmjs/stargate");
function _regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, "Generator"), _regeneratorDefine2(u, n, function () { return this; }), _regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (_regenerator = function _regenerator() { return { w: i, m: f }; })(); }
function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); } r ? i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); }, _regeneratorDefine2(e, r, n, t); }
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t50 in e) "default" !== _t50 && {}.hasOwnProperty.call(e, _t50) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t50)) && (i.get || i.set) ? o(f, _t50, i) : f[_t50] = e[_t50]); return f; })(e, t); } //@ts-nocheck
var createRPCQueryClient = exports.createRPCQueryClient = /*#__PURE__*/function () {
  var _ref2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator().m(function _callee(_ref) {
    var rpcEndpoint, tmClient, client, _t, _t2, _t3, _t4, _t5, _t6, _t7, _t8, _t9, _t0, _t1, _t10, _t11, _t12, _t13, _t14, _t15, _t16, _t17, _t18, _t19, _t20, _t21, _t22, _t23, _t24, _t25, _t26, _t27, _t28, _t29, _t30, _t31, _t32, _t33, _t34, _t35, _t36, _t37, _t38, _t39, _t40, _t41, _t42, _t43, _t44, _t45, _t46, _t47, _t48, _t49;
    return _regenerator().w(function (_context) {
      while (1) switch (_context.n) {
        case 0:
          rpcEndpoint = _ref.rpcEndpoint;
          _context.n = 1;
          return _tendermintRpc.Tendermint34Client.connect(rpcEndpoint);
        case 1:
          tmClient = _context.v;
          client = new _stargate.QueryClient(tmClient);
          _context.n = 2;
          return Promise.resolve().then(function () {
            return _interopRequireWildcard(require("../cosmos/app/v1alpha1/query.rpc.Query"));
          });
        case 2:
          _t = _context.v.createRpcQueryExtension(client);
          _t2 = {
            v1alpha1: _t
          };
          _context.n = 3;
          return Promise.resolve().then(function () {
            return _interopRequireWildcard(require("../cosmos/auth/v1beta1/query.rpc.Query"));
          });
        case 3:
          _t3 = _context.v.createRpcQueryExtension(client);
          _t4 = {
            v1beta1: _t3
          };
          _context.n = 4;
          return Promise.resolve().then(function () {
            return _interopRequireWildcard(require("../cosmos/authz/v1beta1/query.rpc.Query"));
          });
        case 4:
          _t5 = _context.v.createRpcQueryExtension(client);
          _t6 = {
            v1beta1: _t5
          };
          _context.n = 5;
          return Promise.resolve().then(function () {
            return _interopRequireWildcard(require("../cosmos/autocli/v1/query.rpc.Query"));
          });
        case 5:
          _t7 = _context.v.createRpcQueryExtension(client);
          _t8 = {
            v1: _t7
          };
          _context.n = 6;
          return Promise.resolve().then(function () {
            return _interopRequireWildcard(require("../cosmos/bank/v1beta1/query.rpc.Query"));
          });
        case 6:
          _t9 = _context.v.createRpcQueryExtension(client);
          _t0 = {
            v1beta1: _t9
          };
          _context.n = 7;
          return Promise.resolve().then(function () {
            return _interopRequireWildcard(require("../cosmos/base/node/v1beta1/query.rpc.Service"));
          });
        case 7:
          _t1 = _context.v.createRpcQueryExtension(client);
          _t10 = {
            v1beta1: _t1
          };
          _context.n = 8;
          return Promise.resolve().then(function () {
            return _interopRequireWildcard(require("../cosmos/base/tendermint/v1beta1/query.rpc.Service"));
          });
        case 8:
          _t11 = _context.v.createRpcQueryExtension(client);
          _t12 = {
            v1beta1: _t11
          };
          _t13 = {
            node: _t10,
            tendermint: _t12
          };
          _context.n = 9;
          return Promise.resolve().then(function () {
            return _interopRequireWildcard(require("../cosmos/circuit/v1/query.rpc.Query"));
          });
        case 9:
          _t14 = _context.v.createRpcQueryExtension(client);
          _t15 = {
            v1: _t14
          };
          _context.n = 10;
          return Promise.resolve().then(function () {
            return _interopRequireWildcard(require("../cosmos/consensus/v1/query.rpc.Query"));
          });
        case 10:
          _t16 = _context.v.createRpcQueryExtension(client);
          _t17 = {
            v1: _t16
          };
          _context.n = 11;
          return Promise.resolve().then(function () {
            return _interopRequireWildcard(require("../cosmos/distribution/v1beta1/query.rpc.Query"));
          });
        case 11:
          _t18 = _context.v.createRpcQueryExtension(client);
          _t19 = {
            v1beta1: _t18
          };
          _context.n = 12;
          return Promise.resolve().then(function () {
            return _interopRequireWildcard(require("../cosmos/evidence/v1beta1/query.rpc.Query"));
          });
        case 12:
          _t20 = _context.v.createRpcQueryExtension(client);
          _t21 = {
            v1beta1: _t20
          };
          _context.n = 13;
          return Promise.resolve().then(function () {
            return _interopRequireWildcard(require("../cosmos/feegrant/v1beta1/query.rpc.Query"));
          });
        case 13:
          _t22 = _context.v.createRpcQueryExtension(client);
          _t23 = {
            v1beta1: _t22
          };
          _context.n = 14;
          return Promise.resolve().then(function () {
            return _interopRequireWildcard(require("../cosmos/gov/v1/query.rpc.Query"));
          });
        case 14:
          _t24 = _context.v.createRpcQueryExtension(client);
          _context.n = 15;
          return Promise.resolve().then(function () {
            return _interopRequireWildcard(require("../cosmos/gov/v1beta1/query.rpc.Query"));
          });
        case 15:
          _t25 = _context.v.createRpcQueryExtension(client);
          _t26 = {
            v1: _t24,
            v1beta1: _t25
          };
          _context.n = 16;
          return Promise.resolve().then(function () {
            return _interopRequireWildcard(require("../cosmos/group/v1/query.rpc.Query"));
          });
        case 16:
          _t27 = _context.v.createRpcQueryExtension(client);
          _t28 = {
            v1: _t27
          };
          _context.n = 17;
          return Promise.resolve().then(function () {
            return _interopRequireWildcard(require("../cosmos/mint/v1beta1/query.rpc.Query"));
          });
        case 17:
          _t29 = _context.v.createRpcQueryExtension(client);
          _t30 = {
            v1beta1: _t29
          };
          _context.n = 18;
          return Promise.resolve().then(function () {
            return _interopRequireWildcard(require("../cosmos/nft/v1beta1/query.rpc.Query"));
          });
        case 18:
          _t31 = _context.v.createRpcQueryExtension(client);
          _t32 = {
            v1beta1: _t31
          };
          _context.n = 19;
          return Promise.resolve().then(function () {
            return _interopRequireWildcard(require("../cosmos/orm/query/v1alpha1/query.rpc.Query"));
          });
        case 19:
          _t33 = _context.v.createRpcQueryExtension(client);
          _t34 = {
            v1alpha1: _t33
          };
          _t35 = {
            query: _t34
          };
          _context.n = 20;
          return Promise.resolve().then(function () {
            return _interopRequireWildcard(require("../cosmos/params/v1beta1/query.rpc.Query"));
          });
        case 20:
          _t36 = _context.v.createRpcQueryExtension(client);
          _t37 = {
            v1beta1: _t36
          };
          _context.n = 21;
          return Promise.resolve().then(function () {
            return _interopRequireWildcard(require("../cosmos/slashing/v1beta1/query.rpc.Query"));
          });
        case 21:
          _t38 = _context.v.createRpcQueryExtension(client);
          _t39 = {
            v1beta1: _t38
          };
          _context.n = 22;
          return Promise.resolve().then(function () {
            return _interopRequireWildcard(require("../cosmos/staking/v1beta1/query.rpc.Query"));
          });
        case 22:
          _t40 = _context.v.createRpcQueryExtension(client);
          _t41 = {
            v1beta1: _t40
          };
          _context.n = 23;
          return Promise.resolve().then(function () {
            return _interopRequireWildcard(require("../cosmos/tx/v1beta1/service.rpc.Service"));
          });
        case 23:
          _t42 = _context.v.createRpcQueryExtension(client);
          _t43 = {
            v1beta1: _t42
          };
          _context.n = 24;
          return Promise.resolve().then(function () {
            return _interopRequireWildcard(require("../cosmos/upgrade/v1beta1/query.rpc.Query"));
          });
        case 24:
          _t44 = _context.v.createRpcQueryExtension(client);
          _t45 = {
            v1beta1: _t44
          };
          _t46 = {
            app: _t2,
            auth: _t4,
            authz: _t6,
            autocli: _t8,
            bank: _t0,
            base: _t13,
            circuit: _t15,
            consensus: _t17,
            distribution: _t19,
            evidence: _t21,
            feegrant: _t23,
            gov: _t26,
            group: _t28,
            mint: _t30,
            nft: _t32,
            orm: _t35,
            params: _t37,
            slashing: _t39,
            staking: _t41,
            tx: _t43,
            upgrade: _t45
          };
          _context.n = 25;
          return Promise.resolve().then(function () {
            return _interopRequireWildcard(require("./wasm/v1/query.rpc.Query"));
          });
        case 25:
          _t47 = _context.v.createRpcQueryExtension(client);
          _t48 = {
            v1: _t47
          };
          _t49 = {
            wasm: _t48
          };
          return _context.a(2, {
            cosmos: _t46,
            cosmwasm: _t49
          });
      }
    }, _callee);
  }));
  return function createRPCQueryClient(_x) {
    return _ref2.apply(this, arguments);
  };
}();