juno-network 0.2.1 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/main/codegen/cosmos/base/query/v1beta1/pagination.js +190 -0
  2. package/main/codegen/cosmos/base/v1beta1/coin.js +268 -0
  3. package/main/codegen/cosmos/bundle.js +4 -4
  4. package/main/codegen/cosmwasm/bundle.js +4 -4
  5. package/main/codegen/ibc/bundle.js +25 -15
  6. package/main/codegen/ibc/client.js +6 -2
  7. package/main/codegen/ibc/core/client/v1/client.js +585 -0
  8. package/main/codegen/ibc/core/client/v1/genesis.js +367 -0
  9. package/main/codegen/ibc/core/client/v1/query.js +1047 -0
  10. package/main/codegen/ibc/core/client/v1/query.lcd.js +381 -0
  11. package/main/codegen/ibc/core/client/v1/query.rpc.query.js +125 -0
  12. package/main/codegen/ibc/core/client/v1/tx.amino.js +149 -0
  13. package/main/codegen/ibc/core/client/v1/tx.js +538 -0
  14. package/main/codegen/ibc/core/client/v1/tx.registry.js +160 -0
  15. package/main/codegen/ibc/core/client/v1/tx.rpc.msg.js +81 -0
  16. package/main/codegen/ibc/lcd.js +21 -6
  17. package/main/codegen/ibc/rpc.query.js +19 -6
  18. package/main/codegen/ibc/rpc.tx.js +19 -6
  19. package/main/codegen/juno/bundle.js +6 -6
  20. package/module/codegen/cosmos/base/query/v1beta1/pagination.js +189 -0
  21. package/module/codegen/cosmos/base/v1beta1/coin.js +268 -0
  22. package/module/codegen/cosmos/bundle.js +4 -4
  23. package/module/codegen/cosmwasm/bundle.js +4 -4
  24. package/module/codegen/ibc/bundle.js +20 -15
  25. package/module/codegen/ibc/client.js +4 -2
  26. package/module/codegen/ibc/core/client/v1/client.js +549 -0
  27. package/module/codegen/ibc/core/client/v1/genesis.js +287 -0
  28. package/module/codegen/ibc/core/client/v1/query.js +1029 -0
  29. package/module/codegen/ibc/core/client/v1/query.lcd.js +128 -0
  30. package/module/codegen/ibc/core/client/v1/query.rpc.query.js +69 -0
  31. package/module/codegen/ibc/core/client/v1/tx.amino.js +150 -0
  32. package/module/codegen/ibc/core/client/v1/tx.js +544 -0
  33. package/module/codegen/ibc/core/client/v1/tx.registry.js +159 -0
  34. package/module/codegen/ibc/core/client/v1/tx.rpc.msg.js +41 -0
  35. package/module/codegen/ibc/lcd.js +5 -0
  36. package/module/codegen/ibc/rpc.query.js +3 -0
  37. package/module/codegen/ibc/rpc.tx.js +3 -0
  38. package/module/codegen/juno/bundle.js +6 -6
  39. package/package.json +3 -2
  40. package/types/codegen/JunoSwap.client.d.ts +1 -1
  41. package/types/codegen/JunoSwap.react-query.d.ts +11 -11
  42. package/types/codegen/JunoSwap.types.d.ts +1 -1
  43. package/types/codegen/contracts.d.ts +5 -5
  44. package/types/codegen/cosmos/bank/v1beta1/query.lcd.d.ts +3 -3
  45. package/types/codegen/cosmos/base/query/v1beta1/pagination.d.ts +79 -0
  46. package/types/codegen/cosmos/base/v1beta1/coin.d.ts +58 -0
  47. package/types/codegen/cosmos/bundle.d.ts +758 -153
  48. package/types/codegen/cosmos/client.d.ts +6 -2
  49. package/types/codegen/cosmos/distribution/v1beta1/query.lcd.d.ts +2 -2
  50. package/types/codegen/cosmos/staking/v1beta1/query.lcd.d.ts +2 -2
  51. package/types/codegen/cosmwasm/bundle.d.ts +87 -18
  52. package/types/codegen/cosmwasm/client.d.ts +8 -2
  53. package/types/codegen/cosmwasm/wasm/v1/query.lcd.d.ts +2 -2
  54. package/types/codegen/ibc/applications/transfer/v1/query.lcd.d.ts +2 -2
  55. package/types/codegen/ibc/bundle.d.ts +878 -64
  56. package/types/codegen/ibc/client.d.ts +8 -2
  57. package/types/codegen/ibc/core/channel/v1/query.lcd.d.ts +1 -1
  58. package/types/codegen/ibc/core/client/v1/client.d.ts +143 -0
  59. package/types/codegen/ibc/core/client/v1/genesis.d.ts +56 -0
  60. package/types/codegen/ibc/core/client/v1/query.d.ts +263 -0
  61. package/types/codegen/ibc/core/client/v1/query.lcd.d.ts +15 -0
  62. package/types/codegen/ibc/core/client/v1/query.rpc.query.d.ts +25 -0
  63. package/types/codegen/ibc/core/client/v1/tx.amino.d.ts +77 -0
  64. package/types/codegen/ibc/core/client/v1/tx.d.ts +131 -0
  65. package/types/codegen/ibc/core/client/v1/tx.registry.d.ts +96 -0
  66. package/types/codegen/ibc/core/client/v1/tx.rpc.msg.d.ts +17 -0
  67. package/types/codegen/ibc/lcd.d.ts +3 -0
  68. package/types/codegen/ibc/rpc.query.d.ts +3 -0
  69. package/types/codegen/ibc/rpc.tx.d.ts +3 -0
  70. package/types/codegen/index.d.ts +1 -1
  71. package/types/codegen/juno/bundle.d.ts +6 -6
  72. package/types/codegen/juno/mint/query.lcd.d.ts +3 -3
@@ -0,0 +1,381 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.LCDQueryClient = void 0;
9
+
10
+ var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
11
+
12
+ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
13
+
14
+ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
15
+
16
+ var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
17
+
18
+ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
19
+
20
+ var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
21
+
22
+ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
23
+
24
+ var _lcd = require("@osmonauts/lcd");
25
+
26
+ var _helpers = require("@osmonauts/helpers");
27
+
28
+ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
29
+
30
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
31
+
32
+ var LCDQueryClient = /*#__PURE__*/function (_LCDClient) {
33
+ (0, _inherits2["default"])(LCDQueryClient, _LCDClient);
34
+
35
+ var _super = _createSuper(LCDQueryClient);
36
+
37
+ function LCDQueryClient(_ref) {
38
+ var restEndpoint = _ref.restEndpoint;
39
+ (0, _classCallCheck2["default"])(this, LCDQueryClient);
40
+ return _super.call(this, {
41
+ restEndpoint: restEndpoint
42
+ });
43
+ }
44
+ /* ClientState queries an IBC light client. */
45
+
46
+
47
+ (0, _createClass2["default"])(LCDQueryClient, [{
48
+ key: "clientState",
49
+ value: function () {
50
+ var _clientState = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(params) {
51
+ var options, endpoint;
52
+ return _regenerator["default"].wrap(function _callee$(_context) {
53
+ while (1) {
54
+ switch (_context.prev = _context.next) {
55
+ case 0:
56
+ options = {
57
+ params: {}
58
+ };
59
+
60
+ if (typeof (params === null || params === void 0 ? void 0 : params.clientId) !== "undefined") {
61
+ options.params.client_id = params.clientId;
62
+ }
63
+
64
+ endpoint = "ibc/core/client/v1/client_states/".concat(params.clientId);
65
+ _context.next = 5;
66
+ return this.request(endpoint, options);
67
+
68
+ case 5:
69
+ return _context.abrupt("return", _context.sent);
70
+
71
+ case 6:
72
+ case "end":
73
+ return _context.stop();
74
+ }
75
+ }
76
+ }, _callee, this);
77
+ }));
78
+
79
+ function clientState(_x) {
80
+ return _clientState.apply(this, arguments);
81
+ }
82
+
83
+ return clientState;
84
+ }()
85
+ /* ClientStates queries all the IBC light clients of a chain. */
86
+
87
+ }, {
88
+ key: "clientStates",
89
+ value: function () {
90
+ var _clientStates = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2() {
91
+ var params,
92
+ options,
93
+ endpoint,
94
+ _args2 = arguments;
95
+ return _regenerator["default"].wrap(function _callee2$(_context2) {
96
+ while (1) {
97
+ switch (_context2.prev = _context2.next) {
98
+ case 0:
99
+ params = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {
100
+ pagination: undefined
101
+ };
102
+ options = {
103
+ params: {}
104
+ };
105
+
106
+ if (typeof (params === null || params === void 0 ? void 0 : params.pagination) !== "undefined") {
107
+ (0, _helpers.setPaginationParams)(options, params.pagination);
108
+ }
109
+
110
+ endpoint = "ibc/core/client/v1/client_states";
111
+ _context2.next = 6;
112
+ return this.request(endpoint, options);
113
+
114
+ case 6:
115
+ return _context2.abrupt("return", _context2.sent);
116
+
117
+ case 7:
118
+ case "end":
119
+ return _context2.stop();
120
+ }
121
+ }
122
+ }, _callee2, this);
123
+ }));
124
+
125
+ function clientStates() {
126
+ return _clientStates.apply(this, arguments);
127
+ }
128
+
129
+ return clientStates;
130
+ }()
131
+ /* ConsensusState queries a consensus state associated with a client state at
132
+ a given height. */
133
+
134
+ }, {
135
+ key: "consensusState",
136
+ value: function () {
137
+ var _consensusState = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3(params) {
138
+ var options, endpoint;
139
+ return _regenerator["default"].wrap(function _callee3$(_context3) {
140
+ while (1) {
141
+ switch (_context3.prev = _context3.next) {
142
+ case 0:
143
+ options = {
144
+ params: {}
145
+ };
146
+
147
+ if (typeof (params === null || params === void 0 ? void 0 : params.clientId) !== "undefined") {
148
+ options.params.client_id = params.clientId;
149
+ }
150
+
151
+ if (typeof (params === null || params === void 0 ? void 0 : params.revisionNumber) !== "undefined") {
152
+ options.params.revision_number = params.revisionNumber;
153
+ }
154
+
155
+ if (typeof (params === null || params === void 0 ? void 0 : params.revisionHeight) !== "undefined") {
156
+ options.params.revision_height = params.revisionHeight;
157
+ }
158
+
159
+ if (typeof (params === null || params === void 0 ? void 0 : params.latestHeight) !== "undefined") {
160
+ options.params.latest_height = params.latestHeight;
161
+ }
162
+
163
+ endpoint = "ibc/core/client/v1/consensus_states/".concat(params.clientId, "/revision/").concat(params.revisionNumber, "height/").concat(params.revisionHeight);
164
+ _context3.next = 8;
165
+ return this.request(endpoint, options);
166
+
167
+ case 8:
168
+ return _context3.abrupt("return", _context3.sent);
169
+
170
+ case 9:
171
+ case "end":
172
+ return _context3.stop();
173
+ }
174
+ }
175
+ }, _callee3, this);
176
+ }));
177
+
178
+ function consensusState(_x2) {
179
+ return _consensusState.apply(this, arguments);
180
+ }
181
+
182
+ return consensusState;
183
+ }()
184
+ /* ConsensusStates queries all the consensus state associated with a given
185
+ client. */
186
+
187
+ }, {
188
+ key: "consensusStates",
189
+ value: function () {
190
+ var _consensusStates = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4(params) {
191
+ var options, endpoint;
192
+ return _regenerator["default"].wrap(function _callee4$(_context4) {
193
+ while (1) {
194
+ switch (_context4.prev = _context4.next) {
195
+ case 0:
196
+ options = {
197
+ params: {}
198
+ };
199
+
200
+ if (typeof (params === null || params === void 0 ? void 0 : params.clientId) !== "undefined") {
201
+ options.params.client_id = params.clientId;
202
+ }
203
+
204
+ if (typeof (params === null || params === void 0 ? void 0 : params.pagination) !== "undefined") {
205
+ (0, _helpers.setPaginationParams)(options, params.pagination);
206
+ }
207
+
208
+ endpoint = "ibc/core/client/v1/consensus_states/".concat(params.clientId);
209
+ _context4.next = 6;
210
+ return this.request(endpoint, options);
211
+
212
+ case 6:
213
+ return _context4.abrupt("return", _context4.sent);
214
+
215
+ case 7:
216
+ case "end":
217
+ return _context4.stop();
218
+ }
219
+ }
220
+ }, _callee4, this);
221
+ }));
222
+
223
+ function consensusStates(_x3) {
224
+ return _consensusStates.apply(this, arguments);
225
+ }
226
+
227
+ return consensusStates;
228
+ }()
229
+ /* Status queries the status of an IBC client. */
230
+
231
+ }, {
232
+ key: "clientStatus",
233
+ value: function () {
234
+ var _clientStatus = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee5(params) {
235
+ var options, endpoint;
236
+ return _regenerator["default"].wrap(function _callee5$(_context5) {
237
+ while (1) {
238
+ switch (_context5.prev = _context5.next) {
239
+ case 0:
240
+ options = {
241
+ params: {}
242
+ };
243
+
244
+ if (typeof (params === null || params === void 0 ? void 0 : params.clientId) !== "undefined") {
245
+ options.params.client_id = params.clientId;
246
+ }
247
+
248
+ endpoint = "ibc/core/client/v1/client_status/".concat(params.clientId);
249
+ _context5.next = 5;
250
+ return this.request(endpoint, options);
251
+
252
+ case 5:
253
+ return _context5.abrupt("return", _context5.sent);
254
+
255
+ case 6:
256
+ case "end":
257
+ return _context5.stop();
258
+ }
259
+ }
260
+ }, _callee5, this);
261
+ }));
262
+
263
+ function clientStatus(_x4) {
264
+ return _clientStatus.apply(this, arguments);
265
+ }
266
+
267
+ return clientStatus;
268
+ }()
269
+ /* ClientParams queries all parameters of the ibc client. */
270
+
271
+ }, {
272
+ key: "clientParams",
273
+ value: function () {
274
+ var _clientParams = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee6() {
275
+ var _params,
276
+ endpoint,
277
+ _args6 = arguments;
278
+
279
+ return _regenerator["default"].wrap(function _callee6$(_context6) {
280
+ while (1) {
281
+ switch (_context6.prev = _context6.next) {
282
+ case 0:
283
+ _params = _args6.length > 0 && _args6[0] !== undefined ? _args6[0] : {};
284
+ endpoint = "ibc/client/v1/params";
285
+ _context6.next = 4;
286
+ return this.request(endpoint);
287
+
288
+ case 4:
289
+ return _context6.abrupt("return", _context6.sent);
290
+
291
+ case 5:
292
+ case "end":
293
+ return _context6.stop();
294
+ }
295
+ }
296
+ }, _callee6, this);
297
+ }));
298
+
299
+ function clientParams() {
300
+ return _clientParams.apply(this, arguments);
301
+ }
302
+
303
+ return clientParams;
304
+ }()
305
+ /* UpgradedClientState queries an Upgraded IBC light client. */
306
+
307
+ }, {
308
+ key: "upgradedClientState",
309
+ value: function () {
310
+ var _upgradedClientState = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee7() {
311
+ var _params,
312
+ endpoint,
313
+ _args7 = arguments;
314
+
315
+ return _regenerator["default"].wrap(function _callee7$(_context7) {
316
+ while (1) {
317
+ switch (_context7.prev = _context7.next) {
318
+ case 0:
319
+ _params = _args7.length > 0 && _args7[0] !== undefined ? _args7[0] : {};
320
+ endpoint = "ibc/core/client/v1/upgraded_client_states";
321
+ _context7.next = 4;
322
+ return this.request(endpoint);
323
+
324
+ case 4:
325
+ return _context7.abrupt("return", _context7.sent);
326
+
327
+ case 5:
328
+ case "end":
329
+ return _context7.stop();
330
+ }
331
+ }
332
+ }, _callee7, this);
333
+ }));
334
+
335
+ function upgradedClientState() {
336
+ return _upgradedClientState.apply(this, arguments);
337
+ }
338
+
339
+ return upgradedClientState;
340
+ }()
341
+ /* UpgradedConsensusState queries an Upgraded IBC consensus state. */
342
+
343
+ }, {
344
+ key: "upgradedConsensusState",
345
+ value: function () {
346
+ var _upgradedConsensusState = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee8() {
347
+ var _params,
348
+ endpoint,
349
+ _args8 = arguments;
350
+
351
+ return _regenerator["default"].wrap(function _callee8$(_context8) {
352
+ while (1) {
353
+ switch (_context8.prev = _context8.next) {
354
+ case 0:
355
+ _params = _args8.length > 0 && _args8[0] !== undefined ? _args8[0] : {};
356
+ endpoint = "ibc/core/client/v1/upgraded_consensus_states";
357
+ _context8.next = 4;
358
+ return this.request(endpoint);
359
+
360
+ case 4:
361
+ return _context8.abrupt("return", _context8.sent);
362
+
363
+ case 5:
364
+ case "end":
365
+ return _context8.stop();
366
+ }
367
+ }
368
+ }, _callee8, this);
369
+ }));
370
+
371
+ function upgradedConsensusState() {
372
+ return _upgradedConsensusState.apply(this, arguments);
373
+ }
374
+
375
+ return upgradedConsensusState;
376
+ }()
377
+ }]);
378
+ return LCDQueryClient;
379
+ }(_lcd.LCDClient);
380
+
381
+ exports.LCDQueryClient = LCDQueryClient;
@@ -0,0 +1,125 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ var _typeof = require("@babel/runtime/helpers/typeof");
6
+
7
+ Object.defineProperty(exports, "__esModule", {
8
+ value: true
9
+ });
10
+ exports.QueryClientImpl = void 0;
11
+
12
+ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
13
+
14
+ var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
15
+
16
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
17
+
18
+ var _m0 = _interopRequireWildcard(require("protobufjs/minimal"));
19
+
20
+ var _query = require("./query");
21
+
22
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
23
+
24
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
25
+
26
+ var QueryClientImpl = /*#__PURE__*/function () {
27
+ function QueryClientImpl(rpc) {
28
+ (0, _classCallCheck2["default"])(this, QueryClientImpl);
29
+ (0, _defineProperty2["default"])(this, "rpc", void 0);
30
+ this.rpc = rpc;
31
+ this.clientState = this.clientState.bind(this);
32
+ this.clientStates = this.clientStates.bind(this);
33
+ this.consensusState = this.consensusState.bind(this);
34
+ this.consensusStates = this.consensusStates.bind(this);
35
+ this.clientStatus = this.clientStatus.bind(this);
36
+ this.clientParams = this.clientParams.bind(this);
37
+ this.upgradedClientState = this.upgradedClientState.bind(this);
38
+ this.upgradedConsensusState = this.upgradedConsensusState.bind(this);
39
+ }
40
+
41
+ (0, _createClass2["default"])(QueryClientImpl, [{
42
+ key: "clientState",
43
+ value: function clientState(request) {
44
+ var data = _query.QueryClientStateRequest.encode(request).finish();
45
+
46
+ var promise = this.rpc.request("ibc.core.client.v1.Query", "ClientState", data);
47
+ return promise.then(function (data) {
48
+ return _query.QueryClientStateResponse.decode(new _m0.Reader(data));
49
+ });
50
+ }
51
+ }, {
52
+ key: "clientStates",
53
+ value: function clientStates(request) {
54
+ var data = _query.QueryClientStatesRequest.encode(request).finish();
55
+
56
+ var promise = this.rpc.request("ibc.core.client.v1.Query", "ClientStates", data);
57
+ return promise.then(function (data) {
58
+ return _query.QueryClientStatesResponse.decode(new _m0.Reader(data));
59
+ });
60
+ }
61
+ }, {
62
+ key: "consensusState",
63
+ value: function consensusState(request) {
64
+ var data = _query.QueryConsensusStateRequest.encode(request).finish();
65
+
66
+ var promise = this.rpc.request("ibc.core.client.v1.Query", "ConsensusState", data);
67
+ return promise.then(function (data) {
68
+ return _query.QueryConsensusStateResponse.decode(new _m0.Reader(data));
69
+ });
70
+ }
71
+ }, {
72
+ key: "consensusStates",
73
+ value: function consensusStates(request) {
74
+ var data = _query.QueryConsensusStatesRequest.encode(request).finish();
75
+
76
+ var promise = this.rpc.request("ibc.core.client.v1.Query", "ConsensusStates", data);
77
+ return promise.then(function (data) {
78
+ return _query.QueryConsensusStatesResponse.decode(new _m0.Reader(data));
79
+ });
80
+ }
81
+ }, {
82
+ key: "clientStatus",
83
+ value: function clientStatus(request) {
84
+ var data = _query.QueryClientStatusRequest.encode(request).finish();
85
+
86
+ var promise = this.rpc.request("ibc.core.client.v1.Query", "ClientStatus", data);
87
+ return promise.then(function (data) {
88
+ return _query.QueryClientStatusResponse.decode(new _m0.Reader(data));
89
+ });
90
+ }
91
+ }, {
92
+ key: "clientParams",
93
+ value: function clientParams(request) {
94
+ var data = _query.QueryClientParamsRequest.encode(request).finish();
95
+
96
+ var promise = this.rpc.request("ibc.core.client.v1.Query", "ClientParams", data);
97
+ return promise.then(function (data) {
98
+ return _query.QueryClientParamsResponse.decode(new _m0.Reader(data));
99
+ });
100
+ }
101
+ }, {
102
+ key: "upgradedClientState",
103
+ value: function upgradedClientState(request) {
104
+ var data = _query.QueryUpgradedClientStateRequest.encode(request).finish();
105
+
106
+ var promise = this.rpc.request("ibc.core.client.v1.Query", "UpgradedClientState", data);
107
+ return promise.then(function (data) {
108
+ return _query.QueryUpgradedClientStateResponse.decode(new _m0.Reader(data));
109
+ });
110
+ }
111
+ }, {
112
+ key: "upgradedConsensusState",
113
+ value: function upgradedConsensusState(request) {
114
+ var data = _query.QueryUpgradedConsensusStateRequest.encode(request).finish();
115
+
116
+ var promise = this.rpc.request("ibc.core.client.v1.Query", "UpgradedConsensusState", data);
117
+ return promise.then(function (data) {
118
+ return _query.QueryUpgradedConsensusStateResponse.decode(new _m0.Reader(data));
119
+ });
120
+ }
121
+ }]);
122
+ return QueryClientImpl;
123
+ }();
124
+
125
+ exports.QueryClientImpl = QueryClientImpl;
@@ -0,0 +1,149 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.AminoConverter = void 0;
7
+ var AminoConverter = {
8
+ "/ibc.core.client.v1.MsgCreateClient": {
9
+ aminoType: "cosmos-sdk/MsgCreateClient",
10
+ toAmino: function toAmino(_ref) {
11
+ var clientState = _ref.clientState,
12
+ consensusState = _ref.consensusState,
13
+ signer = _ref.signer;
14
+ return {
15
+ client_state: {
16
+ type_url: clientState.typeUrl,
17
+ value: clientState.value
18
+ },
19
+ consensus_state: {
20
+ type_url: consensusState.typeUrl,
21
+ value: consensusState.value
22
+ },
23
+ signer: signer
24
+ };
25
+ },
26
+ fromAmino: function fromAmino(_ref2) {
27
+ var client_state = _ref2.client_state,
28
+ consensus_state = _ref2.consensus_state,
29
+ signer = _ref2.signer;
30
+ return {
31
+ clientState: {
32
+ typeUrl: client_state.type_url,
33
+ value: client_state.value
34
+ },
35
+ consensusState: {
36
+ typeUrl: consensus_state.type_url,
37
+ value: consensus_state.value
38
+ },
39
+ signer: signer
40
+ };
41
+ }
42
+ },
43
+ "/ibc.core.client.v1.MsgUpdateClient": {
44
+ aminoType: "cosmos-sdk/MsgUpdateClient",
45
+ toAmino: function toAmino(_ref3) {
46
+ var clientId = _ref3.clientId,
47
+ header = _ref3.header,
48
+ signer = _ref3.signer;
49
+ return {
50
+ client_id: clientId,
51
+ header: {
52
+ type_url: header.typeUrl,
53
+ value: header.value
54
+ },
55
+ signer: signer
56
+ };
57
+ },
58
+ fromAmino: function fromAmino(_ref4) {
59
+ var client_id = _ref4.client_id,
60
+ header = _ref4.header,
61
+ signer = _ref4.signer;
62
+ return {
63
+ clientId: client_id,
64
+ header: {
65
+ typeUrl: header.type_url,
66
+ value: header.value
67
+ },
68
+ signer: signer
69
+ };
70
+ }
71
+ },
72
+ "/ibc.core.client.v1.MsgUpgradeClient": {
73
+ aminoType: "cosmos-sdk/MsgUpgradeClient",
74
+ toAmino: function toAmino(_ref5) {
75
+ var clientId = _ref5.clientId,
76
+ clientState = _ref5.clientState,
77
+ consensusState = _ref5.consensusState,
78
+ proofUpgradeClient = _ref5.proofUpgradeClient,
79
+ proofUpgradeConsensusState = _ref5.proofUpgradeConsensusState,
80
+ signer = _ref5.signer;
81
+ return {
82
+ client_id: clientId,
83
+ client_state: {
84
+ type_url: clientState.typeUrl,
85
+ value: clientState.value
86
+ },
87
+ consensus_state: {
88
+ type_url: consensusState.typeUrl,
89
+ value: consensusState.value
90
+ },
91
+ proof_upgrade_client: proofUpgradeClient,
92
+ proof_upgrade_consensus_state: proofUpgradeConsensusState,
93
+ signer: signer
94
+ };
95
+ },
96
+ fromAmino: function fromAmino(_ref6) {
97
+ var client_id = _ref6.client_id,
98
+ client_state = _ref6.client_state,
99
+ consensus_state = _ref6.consensus_state,
100
+ proof_upgrade_client = _ref6.proof_upgrade_client,
101
+ proof_upgrade_consensus_state = _ref6.proof_upgrade_consensus_state,
102
+ signer = _ref6.signer;
103
+ return {
104
+ clientId: client_id,
105
+ clientState: {
106
+ typeUrl: client_state.type_url,
107
+ value: client_state.value
108
+ },
109
+ consensusState: {
110
+ typeUrl: consensus_state.type_url,
111
+ value: consensus_state.value
112
+ },
113
+ proofUpgradeClient: proof_upgrade_client,
114
+ proofUpgradeConsensusState: proof_upgrade_consensus_state,
115
+ signer: signer
116
+ };
117
+ }
118
+ },
119
+ "/ibc.core.client.v1.MsgSubmitMisbehaviour": {
120
+ aminoType: "cosmos-sdk/MsgSubmitMisbehaviour",
121
+ toAmino: function toAmino(_ref7) {
122
+ var clientId = _ref7.clientId,
123
+ misbehaviour = _ref7.misbehaviour,
124
+ signer = _ref7.signer;
125
+ return {
126
+ client_id: clientId,
127
+ misbehaviour: {
128
+ type_url: misbehaviour.typeUrl,
129
+ value: misbehaviour.value
130
+ },
131
+ signer: signer
132
+ };
133
+ },
134
+ fromAmino: function fromAmino(_ref8) {
135
+ var client_id = _ref8.client_id,
136
+ misbehaviour = _ref8.misbehaviour,
137
+ signer = _ref8.signer;
138
+ return {
139
+ clientId: client_id,
140
+ misbehaviour: {
141
+ typeUrl: misbehaviour.type_url,
142
+ value: misbehaviour.value
143
+ },
144
+ signer: signer
145
+ };
146
+ }
147
+ }
148
+ };
149
+ exports.AminoConverter = AminoConverter;