juno-network 0.2.0 → 0.2.1
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.
- package/main/codegen/JunoSwap.client.js +1 -1
- package/main/codegen/cosmos/bank/v1beta1/query.lcd.js +44 -26
- package/main/codegen/cosmos/client.js +20 -9
- package/main/codegen/cosmos/distribution/v1beta1/query.lcd.js +37 -27
- package/main/codegen/cosmos/gov/v1/query.lcd.js +12 -10
- package/main/codegen/cosmos/gov/v1beta1/query.lcd.js +12 -10
- package/main/codegen/cosmos/group/v1/query.lcd.js +17 -15
- package/main/codegen/cosmos/staking/v1beta1/query.lcd.js +39 -29
- package/main/codegen/cosmwasm/client.js +28 -12
- package/main/codegen/cosmwasm/wasm/v1/query.lcd.js +35 -21
- package/main/codegen/ibc/applications/transfer/v1/query.lcd.js +25 -13
- package/main/codegen/ibc/client.js +28 -12
- package/main/codegen/ibc/core/channel/v1/query.lcd.js +40 -32
- package/main/codegen/juno/mint/query.lcd.js +30 -18
- package/module/codegen/JunoSwap.client.js +1 -1
- package/module/codegen/JunoSwap.react-query.js +1 -1
- package/module/codegen/contracts.js +1 -1
- package/module/codegen/cosmos/bank/v1beta1/query.lcd.js +13 -8
- package/module/codegen/cosmos/client.js +12 -2
- package/module/codegen/cosmos/distribution/v1beta1/query.lcd.js +11 -10
- package/module/codegen/cosmos/gov/v1/query.lcd.js +11 -10
- package/module/codegen/cosmos/gov/v1beta1/query.lcd.js +11 -10
- package/module/codegen/cosmos/group/v1/query.lcd.js +16 -15
- package/module/codegen/cosmos/staking/v1beta1/query.lcd.js +20 -19
- package/module/codegen/cosmwasm/client.js +16 -2
- package/module/codegen/cosmwasm/wasm/v1/query.lcd.js +16 -11
- package/module/codegen/ibc/applications/transfer/v1/query.lcd.js +6 -3
- package/module/codegen/ibc/client.js +16 -2
- package/module/codegen/ibc/core/channel/v1/query.lcd.js +19 -16
- package/module/codegen/index.js +1 -1
- package/module/codegen/juno/mint/query.lcd.js +3 -3
- package/package.json +14 -14
@@ -30,7 +30,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
30
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
31
|
|
32
32
|
/**
|
33
|
-
* This file was automatically generated by @cosmwasm/ts-codegen@0.
|
33
|
+
* This file was automatically generated by @cosmwasm/ts-codegen@0.13.0.
|
34
34
|
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
|
35
35
|
* and run the @cosmwasm/ts-codegen generate command to regenerate this file.
|
36
36
|
*/
|
@@ -23,6 +23,8 @@ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/ge
|
|
23
23
|
|
24
24
|
var _lcd = require("@osmonauts/lcd");
|
25
25
|
|
26
|
+
var _helpers = require("@osmonauts/helpers");
|
27
|
+
|
26
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); }; }
|
27
29
|
|
28
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; } }
|
@@ -96,7 +98,7 @@ var LCDQueryClient = /*#__PURE__*/function (_LCDClient) {
|
|
96
98
|
};
|
97
99
|
|
98
100
|
if (typeof (params === null || params === void 0 ? void 0 : params.pagination) !== "undefined") {
|
99
|
-
options
|
101
|
+
(0, _helpers.setPaginationParams)(options, params.pagination);
|
100
102
|
}
|
101
103
|
|
102
104
|
endpoint = "cosmos/bank/v1beta1/balances/".concat(params.address);
|
@@ -137,7 +139,7 @@ var LCDQueryClient = /*#__PURE__*/function (_LCDClient) {
|
|
137
139
|
};
|
138
140
|
|
139
141
|
if (typeof (params === null || params === void 0 ? void 0 : params.pagination) !== "undefined") {
|
140
|
-
options
|
142
|
+
(0, _helpers.setPaginationParams)(options, params.pagination);
|
141
143
|
}
|
142
144
|
|
143
145
|
endpoint = "cosmos/bank/v1beta1/spendable_balances/".concat(params.address);
|
@@ -166,28 +168,34 @@ var LCDQueryClient = /*#__PURE__*/function (_LCDClient) {
|
|
166
168
|
}, {
|
167
169
|
key: "totalSupply",
|
168
170
|
value: function () {
|
169
|
-
var _totalSupply = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4(
|
170
|
-
var
|
171
|
+
var _totalSupply = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4() {
|
172
|
+
var params,
|
173
|
+
options,
|
174
|
+
endpoint,
|
175
|
+
_args4 = arguments;
|
171
176
|
return _regenerator["default"].wrap(function _callee4$(_context4) {
|
172
177
|
while (1) {
|
173
178
|
switch (_context4.prev = _context4.next) {
|
174
179
|
case 0:
|
180
|
+
params = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : {
|
181
|
+
pagination: undefined
|
182
|
+
};
|
175
183
|
options = {
|
176
184
|
params: {}
|
177
185
|
};
|
178
186
|
|
179
187
|
if (typeof (params === null || params === void 0 ? void 0 : params.pagination) !== "undefined") {
|
180
|
-
options
|
188
|
+
(0, _helpers.setPaginationParams)(options, params.pagination);
|
181
189
|
}
|
182
190
|
|
183
191
|
endpoint = "cosmos/bank/v1beta1/supply";
|
184
|
-
_context4.next =
|
192
|
+
_context4.next = 6;
|
185
193
|
return this.request(endpoint, options);
|
186
194
|
|
187
|
-
case
|
195
|
+
case 6:
|
188
196
|
return _context4.abrupt("return", _context4.sent);
|
189
197
|
|
190
|
-
case
|
198
|
+
case 7:
|
191
199
|
case "end":
|
192
200
|
return _context4.stop();
|
193
201
|
}
|
@@ -195,7 +203,7 @@ var LCDQueryClient = /*#__PURE__*/function (_LCDClient) {
|
|
195
203
|
}, _callee4, this);
|
196
204
|
}));
|
197
205
|
|
198
|
-
function totalSupply(
|
206
|
+
function totalSupply() {
|
199
207
|
return _totalSupply.apply(this, arguments);
|
200
208
|
}
|
201
209
|
|
@@ -235,7 +243,7 @@ var LCDQueryClient = /*#__PURE__*/function (_LCDClient) {
|
|
235
243
|
}, _callee5, this);
|
236
244
|
}));
|
237
245
|
|
238
|
-
function supplyOf(
|
246
|
+
function supplyOf(_x4) {
|
239
247
|
return _supplyOf.apply(this, arguments);
|
240
248
|
}
|
241
249
|
|
@@ -246,20 +254,24 @@ var LCDQueryClient = /*#__PURE__*/function (_LCDClient) {
|
|
246
254
|
}, {
|
247
255
|
key: "params",
|
248
256
|
value: function () {
|
249
|
-
var _params2 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee6(
|
250
|
-
var
|
257
|
+
var _params2 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee6() {
|
258
|
+
var _params,
|
259
|
+
endpoint,
|
260
|
+
_args6 = arguments;
|
261
|
+
|
251
262
|
return _regenerator["default"].wrap(function _callee6$(_context6) {
|
252
263
|
while (1) {
|
253
264
|
switch (_context6.prev = _context6.next) {
|
254
265
|
case 0:
|
266
|
+
_params = _args6.length > 0 && _args6[0] !== undefined ? _args6[0] : {};
|
255
267
|
endpoint = "cosmos/bank/v1beta1/params";
|
256
|
-
_context6.next =
|
268
|
+
_context6.next = 4;
|
257
269
|
return this.request(endpoint);
|
258
270
|
|
259
|
-
case
|
271
|
+
case 4:
|
260
272
|
return _context6.abrupt("return", _context6.sent);
|
261
273
|
|
262
|
-
case
|
274
|
+
case 5:
|
263
275
|
case "end":
|
264
276
|
return _context6.stop();
|
265
277
|
}
|
@@ -267,7 +279,7 @@ var LCDQueryClient = /*#__PURE__*/function (_LCDClient) {
|
|
267
279
|
}, _callee6, this);
|
268
280
|
}));
|
269
281
|
|
270
|
-
function params(
|
282
|
+
function params() {
|
271
283
|
return _params2.apply(this, arguments);
|
272
284
|
}
|
273
285
|
|
@@ -299,7 +311,7 @@ var LCDQueryClient = /*#__PURE__*/function (_LCDClient) {
|
|
299
311
|
}, _callee7, this);
|
300
312
|
}));
|
301
313
|
|
302
|
-
function denomMetadata(
|
314
|
+
function denomMetadata(_x5) {
|
303
315
|
return _denomMetadata.apply(this, arguments);
|
304
316
|
}
|
305
317
|
|
@@ -311,28 +323,34 @@ var LCDQueryClient = /*#__PURE__*/function (_LCDClient) {
|
|
311
323
|
}, {
|
312
324
|
key: "denomsMetadata",
|
313
325
|
value: function () {
|
314
|
-
var _denomsMetadata = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee8(
|
315
|
-
var
|
326
|
+
var _denomsMetadata = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee8() {
|
327
|
+
var params,
|
328
|
+
options,
|
329
|
+
endpoint,
|
330
|
+
_args8 = arguments;
|
316
331
|
return _regenerator["default"].wrap(function _callee8$(_context8) {
|
317
332
|
while (1) {
|
318
333
|
switch (_context8.prev = _context8.next) {
|
319
334
|
case 0:
|
335
|
+
params = _args8.length > 0 && _args8[0] !== undefined ? _args8[0] : {
|
336
|
+
pagination: undefined
|
337
|
+
};
|
320
338
|
options = {
|
321
339
|
params: {}
|
322
340
|
};
|
323
341
|
|
324
342
|
if (typeof (params === null || params === void 0 ? void 0 : params.pagination) !== "undefined") {
|
325
|
-
options
|
343
|
+
(0, _helpers.setPaginationParams)(options, params.pagination);
|
326
344
|
}
|
327
345
|
|
328
346
|
endpoint = "cosmos/bank/v1beta1/denoms_metadata";
|
329
|
-
_context8.next =
|
347
|
+
_context8.next = 6;
|
330
348
|
return this.request(endpoint, options);
|
331
349
|
|
332
|
-
case
|
350
|
+
case 6:
|
333
351
|
return _context8.abrupt("return", _context8.sent);
|
334
352
|
|
335
|
-
case
|
353
|
+
case 7:
|
336
354
|
case "end":
|
337
355
|
return _context8.stop();
|
338
356
|
}
|
@@ -340,7 +358,7 @@ var LCDQueryClient = /*#__PURE__*/function (_LCDClient) {
|
|
340
358
|
}, _callee8, this);
|
341
359
|
}));
|
342
360
|
|
343
|
-
function denomsMetadata(
|
361
|
+
function denomsMetadata() {
|
344
362
|
return _denomsMetadata.apply(this, arguments);
|
345
363
|
}
|
346
364
|
|
@@ -363,7 +381,7 @@ var LCDQueryClient = /*#__PURE__*/function (_LCDClient) {
|
|
363
381
|
};
|
364
382
|
|
365
383
|
if (typeof (params === null || params === void 0 ? void 0 : params.pagination) !== "undefined") {
|
366
|
-
options
|
384
|
+
(0, _helpers.setPaginationParams)(options, params.pagination);
|
367
385
|
}
|
368
386
|
|
369
387
|
endpoint = "cosmos/bank/v1beta1/denom_owners/".concat(params.denom);
|
@@ -381,7 +399,7 @@ var LCDQueryClient = /*#__PURE__*/function (_LCDClient) {
|
|
381
399
|
}, _callee9, this);
|
382
400
|
}));
|
383
401
|
|
384
|
-
function denomOwners(
|
402
|
+
function denomOwners(_x6) {
|
385
403
|
return _denomOwners.apply(this, arguments);
|
386
404
|
}
|
387
405
|
|
@@ -7,16 +7,16 @@ var _typeof = require("@babel/runtime/helpers/typeof");
|
|
7
7
|
Object.defineProperty(exports, "__esModule", {
|
8
8
|
value: true
|
9
9
|
});
|
10
|
-
exports.getSigningCosmosClient = void 0;
|
10
|
+
exports.getSigningCosmosClientOptions = exports.getSigningCosmosClient = void 0;
|
11
11
|
|
12
12
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
13
13
|
|
14
|
+
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
15
|
+
|
14
16
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
15
17
|
|
16
18
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
17
19
|
|
18
|
-
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
19
|
-
|
20
20
|
var _protoSigning = require("@cosmjs/proto-signing");
|
21
21
|
|
22
22
|
var _stargate = require("@cosmjs/stargate");
|
@@ -53,27 +53,38 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
53
53
|
|
54
54
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
55
55
|
|
56
|
+
var getSigningCosmosClientOptions = function getSigningCosmosClientOptions() {
|
57
|
+
var registry = new _protoSigning.Registry([].concat((0, _toConsumableArray2["default"])(cosmosBankV1beta1TxRegistry.registry), (0, _toConsumableArray2["default"])(cosmosDistributionV1beta1TxRegistry.registry), (0, _toConsumableArray2["default"])(cosmosGovV1TxRegistry.registry), (0, _toConsumableArray2["default"])(cosmosGovV1beta1TxRegistry.registry), (0, _toConsumableArray2["default"])(cosmosGroupV1TxRegistry.registry), (0, _toConsumableArray2["default"])(cosmosStakingV1beta1TxRegistry.registry)));
|
58
|
+
var aminoTypes = new _stargate.AminoTypes(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, cosmosBankV1beta1TxAmino.AminoConverter), cosmosDistributionV1beta1TxAmino.AminoConverter), cosmosGovV1TxAmino.AminoConverter), cosmosGovV1beta1TxAmino.AminoConverter), cosmosGroupV1TxAmino.AminoConverter), cosmosStakingV1beta1TxAmino.AminoConverter));
|
59
|
+
return {
|
60
|
+
registry: registry,
|
61
|
+
aminoTypes: aminoTypes
|
62
|
+
};
|
63
|
+
};
|
64
|
+
|
65
|
+
exports.getSigningCosmosClientOptions = getSigningCosmosClientOptions;
|
66
|
+
|
56
67
|
var getSigningCosmosClient = /*#__PURE__*/function () {
|
57
68
|
var _ref2 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(_ref) {
|
58
|
-
var rpcEndpoint, signer, registry, aminoTypes, client;
|
69
|
+
var rpcEndpoint, signer, _getSigningCosmosClie, registry, aminoTypes, client;
|
70
|
+
|
59
71
|
return _regenerator["default"].wrap(function _callee$(_context) {
|
60
72
|
while (1) {
|
61
73
|
switch (_context.prev = _context.next) {
|
62
74
|
case 0:
|
63
75
|
rpcEndpoint = _ref.rpcEndpoint, signer = _ref.signer;
|
64
|
-
|
65
|
-
|
66
|
-
_context.next = 5;
|
76
|
+
_getSigningCosmosClie = getSigningCosmosClientOptions(), registry = _getSigningCosmosClie.registry, aminoTypes = _getSigningCosmosClie.aminoTypes;
|
77
|
+
_context.next = 4;
|
67
78
|
return _stargate.SigningStargateClient.connectWithSigner(rpcEndpoint, signer, {
|
68
79
|
registry: registry,
|
69
80
|
aminoTypes: aminoTypes
|
70
81
|
});
|
71
82
|
|
72
|
-
case
|
83
|
+
case 4:
|
73
84
|
client = _context.sent;
|
74
85
|
return _context.abrupt("return", client);
|
75
86
|
|
76
|
-
case
|
87
|
+
case 6:
|
77
88
|
case "end":
|
78
89
|
return _context.stop();
|
79
90
|
}
|
@@ -23,6 +23,8 @@ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/ge
|
|
23
23
|
|
24
24
|
var _lcd = require("@osmonauts/lcd");
|
25
25
|
|
26
|
+
var _helpers = require("@osmonauts/helpers");
|
27
|
+
|
26
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); }; }
|
27
29
|
|
28
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; } }
|
@@ -45,20 +47,24 @@ var LCDQueryClient = /*#__PURE__*/function (_LCDClient) {
|
|
45
47
|
(0, _createClass2["default"])(LCDQueryClient, [{
|
46
48
|
key: "params",
|
47
49
|
value: function () {
|
48
|
-
var _params2 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(
|
49
|
-
var
|
50
|
+
var _params2 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() {
|
51
|
+
var _params,
|
52
|
+
endpoint,
|
53
|
+
_args = arguments;
|
54
|
+
|
50
55
|
return _regenerator["default"].wrap(function _callee$(_context) {
|
51
56
|
while (1) {
|
52
57
|
switch (_context.prev = _context.next) {
|
53
58
|
case 0:
|
59
|
+
_params = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
|
54
60
|
endpoint = "cosmos/distribution/v1beta1/params";
|
55
|
-
_context.next =
|
61
|
+
_context.next = 4;
|
56
62
|
return this.request(endpoint);
|
57
63
|
|
58
|
-
case
|
64
|
+
case 4:
|
59
65
|
return _context.abrupt("return", _context.sent);
|
60
66
|
|
61
|
-
case
|
67
|
+
case 5:
|
62
68
|
case "end":
|
63
69
|
return _context.stop();
|
64
70
|
}
|
@@ -66,7 +72,7 @@ var LCDQueryClient = /*#__PURE__*/function (_LCDClient) {
|
|
66
72
|
}, _callee, this);
|
67
73
|
}));
|
68
74
|
|
69
|
-
function params(
|
75
|
+
function params() {
|
70
76
|
return _params2.apply(this, arguments);
|
71
77
|
}
|
72
78
|
|
@@ -91,7 +97,7 @@ var LCDQueryClient = /*#__PURE__*/function (_LCDClient) {
|
|
91
97
|
options.params.validator_address = params.validatorAddress;
|
92
98
|
}
|
93
99
|
|
94
|
-
endpoint = "cosmos/distribution/v1beta1/validators/".concat(params.
|
100
|
+
endpoint = "cosmos/distribution/v1beta1/validators/".concat(params.validatorAddress, "/outstanding_rewards");
|
95
101
|
_context2.next = 5;
|
96
102
|
return this.request(endpoint, options);
|
97
103
|
|
@@ -106,7 +112,7 @@ var LCDQueryClient = /*#__PURE__*/function (_LCDClient) {
|
|
106
112
|
}, _callee2, this);
|
107
113
|
}));
|
108
114
|
|
109
|
-
function validatorOutstandingRewards(
|
115
|
+
function validatorOutstandingRewards(_x) {
|
110
116
|
return _validatorOutstandingRewards.apply(this, arguments);
|
111
117
|
}
|
112
118
|
|
@@ -131,7 +137,7 @@ var LCDQueryClient = /*#__PURE__*/function (_LCDClient) {
|
|
131
137
|
options.params.validator_address = params.validatorAddress;
|
132
138
|
}
|
133
139
|
|
134
|
-
endpoint = "cosmos/distribution/v1beta1/validators/".concat(params.
|
140
|
+
endpoint = "cosmos/distribution/v1beta1/validators/".concat(params.validatorAddress, "/commission");
|
135
141
|
_context3.next = 5;
|
136
142
|
return this.request(endpoint, options);
|
137
143
|
|
@@ -146,7 +152,7 @@ var LCDQueryClient = /*#__PURE__*/function (_LCDClient) {
|
|
146
152
|
}, _callee3, this);
|
147
153
|
}));
|
148
154
|
|
149
|
-
function validatorCommission(
|
155
|
+
function validatorCommission(_x2) {
|
150
156
|
return _validatorCommission.apply(this, arguments);
|
151
157
|
}
|
152
158
|
|
@@ -180,10 +186,10 @@ var LCDQueryClient = /*#__PURE__*/function (_LCDClient) {
|
|
180
186
|
}
|
181
187
|
|
182
188
|
if (typeof (params === null || params === void 0 ? void 0 : params.pagination) !== "undefined") {
|
183
|
-
options
|
189
|
+
(0, _helpers.setPaginationParams)(options, params.pagination);
|
184
190
|
}
|
185
191
|
|
186
|
-
endpoint = "cosmos/distribution/v1beta1/validators/".concat(params.
|
192
|
+
endpoint = "cosmos/distribution/v1beta1/validators/".concat(params.validatorAddress, "/slashes");
|
187
193
|
_context4.next = 8;
|
188
194
|
return this.request(endpoint, options);
|
189
195
|
|
@@ -198,7 +204,7 @@ var LCDQueryClient = /*#__PURE__*/function (_LCDClient) {
|
|
198
204
|
}, _callee4, this);
|
199
205
|
}));
|
200
206
|
|
201
|
-
function validatorSlashes(
|
207
|
+
function validatorSlashes(_x3) {
|
202
208
|
return _validatorSlashes.apply(this, arguments);
|
203
209
|
}
|
204
210
|
|
@@ -227,7 +233,7 @@ var LCDQueryClient = /*#__PURE__*/function (_LCDClient) {
|
|
227
233
|
options.params.validator_address = params.validatorAddress;
|
228
234
|
}
|
229
235
|
|
230
|
-
endpoint = "cosmos/distribution/v1beta1/delegators/".concat(params.
|
236
|
+
endpoint = "cosmos/distribution/v1beta1/delegators/".concat(params.delegatorAddress, "rewards/").concat(params.validatorAddress);
|
231
237
|
_context5.next = 6;
|
232
238
|
return this.request(endpoint, options);
|
233
239
|
|
@@ -242,7 +248,7 @@ var LCDQueryClient = /*#__PURE__*/function (_LCDClient) {
|
|
242
248
|
}, _callee5, this);
|
243
249
|
}));
|
244
250
|
|
245
|
-
function delegationRewards(
|
251
|
+
function delegationRewards(_x4) {
|
246
252
|
return _delegationRewards.apply(this, arguments);
|
247
253
|
}
|
248
254
|
|
@@ -268,7 +274,7 @@ var LCDQueryClient = /*#__PURE__*/function (_LCDClient) {
|
|
268
274
|
options.params.delegator_address = params.delegatorAddress;
|
269
275
|
}
|
270
276
|
|
271
|
-
endpoint = "cosmos/distribution/v1beta1/delegators/".concat(params.
|
277
|
+
endpoint = "cosmos/distribution/v1beta1/delegators/".concat(params.delegatorAddress, "/rewards");
|
272
278
|
_context6.next = 5;
|
273
279
|
return this.request(endpoint, options);
|
274
280
|
|
@@ -283,7 +289,7 @@ var LCDQueryClient = /*#__PURE__*/function (_LCDClient) {
|
|
283
289
|
}, _callee6, this);
|
284
290
|
}));
|
285
291
|
|
286
|
-
function delegationTotalRewards(
|
292
|
+
function delegationTotalRewards(_x5) {
|
287
293
|
return _delegationTotalRewards.apply(this, arguments);
|
288
294
|
}
|
289
295
|
|
@@ -308,7 +314,7 @@ var LCDQueryClient = /*#__PURE__*/function (_LCDClient) {
|
|
308
314
|
options.params.delegator_address = params.delegatorAddress;
|
309
315
|
}
|
310
316
|
|
311
|
-
endpoint = "cosmos/distribution/v1beta1/delegators/".concat(params.
|
317
|
+
endpoint = "cosmos/distribution/v1beta1/delegators/".concat(params.delegatorAddress, "/validators");
|
312
318
|
_context7.next = 5;
|
313
319
|
return this.request(endpoint, options);
|
314
320
|
|
@@ -323,7 +329,7 @@ var LCDQueryClient = /*#__PURE__*/function (_LCDClient) {
|
|
323
329
|
}, _callee7, this);
|
324
330
|
}));
|
325
331
|
|
326
|
-
function delegatorValidators(
|
332
|
+
function delegatorValidators(_x6) {
|
327
333
|
return _delegatorValidators.apply(this, arguments);
|
328
334
|
}
|
329
335
|
|
@@ -348,7 +354,7 @@ var LCDQueryClient = /*#__PURE__*/function (_LCDClient) {
|
|
348
354
|
options.params.delegator_address = params.delegatorAddress;
|
349
355
|
}
|
350
356
|
|
351
|
-
endpoint = "cosmos/distribution/v1beta1/delegators/".concat(params.
|
357
|
+
endpoint = "cosmos/distribution/v1beta1/delegators/".concat(params.delegatorAddress, "/withdraw_address");
|
352
358
|
_context8.next = 5;
|
353
359
|
return this.request(endpoint, options);
|
354
360
|
|
@@ -363,7 +369,7 @@ var LCDQueryClient = /*#__PURE__*/function (_LCDClient) {
|
|
363
369
|
}, _callee8, this);
|
364
370
|
}));
|
365
371
|
|
366
|
-
function delegatorWithdrawAddress(
|
372
|
+
function delegatorWithdrawAddress(_x7) {
|
367
373
|
return _delegatorWithdrawAddress.apply(this, arguments);
|
368
374
|
}
|
369
375
|
|
@@ -374,20 +380,24 @@ var LCDQueryClient = /*#__PURE__*/function (_LCDClient) {
|
|
374
380
|
}, {
|
375
381
|
key: "communityPool",
|
376
382
|
value: function () {
|
377
|
-
var _communityPool = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee9(
|
378
|
-
var
|
383
|
+
var _communityPool = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee9() {
|
384
|
+
var _params,
|
385
|
+
endpoint,
|
386
|
+
_args9 = arguments;
|
387
|
+
|
379
388
|
return _regenerator["default"].wrap(function _callee9$(_context9) {
|
380
389
|
while (1) {
|
381
390
|
switch (_context9.prev = _context9.next) {
|
382
391
|
case 0:
|
392
|
+
_params = _args9.length > 0 && _args9[0] !== undefined ? _args9[0] : {};
|
383
393
|
endpoint = "cosmos/distribution/v1beta1/community_pool";
|
384
|
-
_context9.next =
|
394
|
+
_context9.next = 4;
|
385
395
|
return this.request(endpoint);
|
386
396
|
|
387
|
-
case
|
397
|
+
case 4:
|
388
398
|
return _context9.abrupt("return", _context9.sent);
|
389
399
|
|
390
|
-
case
|
400
|
+
case 5:
|
391
401
|
case "end":
|
392
402
|
return _context9.stop();
|
393
403
|
}
|
@@ -395,7 +405,7 @@ var LCDQueryClient = /*#__PURE__*/function (_LCDClient) {
|
|
395
405
|
}, _callee9, this);
|
396
406
|
}));
|
397
407
|
|
398
|
-
function communityPool(
|
408
|
+
function communityPool() {
|
399
409
|
return _communityPool.apply(this, arguments);
|
400
410
|
}
|
401
411
|
|
@@ -23,6 +23,8 @@ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/ge
|
|
23
23
|
|
24
24
|
var _lcd = require("@osmonauts/lcd");
|
25
25
|
|
26
|
+
var _helpers = require("@osmonauts/helpers");
|
27
|
+
|
26
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); }; }
|
27
29
|
|
28
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; } }
|
@@ -59,7 +61,7 @@ var LCDQueryClient = /*#__PURE__*/function (_LCDClient) {
|
|
59
61
|
options.params.proposal_id = params.proposalId;
|
60
62
|
}
|
61
63
|
|
62
|
-
endpoint = "cosmos/gov/v1/proposals/".concat(params.
|
64
|
+
endpoint = "cosmos/gov/v1/proposals/".concat(params.proposalId);
|
63
65
|
_context.next = 5;
|
64
66
|
return this.request(endpoint, options);
|
65
67
|
|
@@ -108,7 +110,7 @@ var LCDQueryClient = /*#__PURE__*/function (_LCDClient) {
|
|
108
110
|
}
|
109
111
|
|
110
112
|
if (typeof (params === null || params === void 0 ? void 0 : params.pagination) !== "undefined") {
|
111
|
-
options
|
113
|
+
(0, _helpers.setPaginationParams)(options, params.pagination);
|
112
114
|
}
|
113
115
|
|
114
116
|
endpoint = "cosmos/gov/v1/proposals";
|
@@ -151,7 +153,7 @@ var LCDQueryClient = /*#__PURE__*/function (_LCDClient) {
|
|
151
153
|
options.params.proposal_id = params.proposalId;
|
152
154
|
}
|
153
155
|
|
154
|
-
endpoint = "cosmos/gov/v1/proposals/".concat(params.
|
156
|
+
endpoint = "cosmos/gov/v1/proposals/".concat(params.proposalId, "votes/").concat(params.voter);
|
155
157
|
_context3.next = 5;
|
156
158
|
return this.request(endpoint, options);
|
157
159
|
|
@@ -192,10 +194,10 @@ var LCDQueryClient = /*#__PURE__*/function (_LCDClient) {
|
|
192
194
|
}
|
193
195
|
|
194
196
|
if (typeof (params === null || params === void 0 ? void 0 : params.pagination) !== "undefined") {
|
195
|
-
options
|
197
|
+
(0, _helpers.setPaginationParams)(options, params.pagination);
|
196
198
|
}
|
197
199
|
|
198
|
-
endpoint = "cosmos/gov/v1/proposals/".concat(params.
|
200
|
+
endpoint = "cosmos/gov/v1/proposals/".concat(params.proposalId, "/votes");
|
199
201
|
_context4.next = 6;
|
200
202
|
return this.request(endpoint, options);
|
201
203
|
|
@@ -235,7 +237,7 @@ var LCDQueryClient = /*#__PURE__*/function (_LCDClient) {
|
|
235
237
|
options.params.params_type = _params.paramsType;
|
236
238
|
}
|
237
239
|
|
238
|
-
endpoint = "cosmos/gov/v1/params/".concat(_params.
|
240
|
+
endpoint = "cosmos/gov/v1/params/".concat(_params.paramsType);
|
239
241
|
_context5.next = 5;
|
240
242
|
return this.request(endpoint, options);
|
241
243
|
|
@@ -275,7 +277,7 @@ var LCDQueryClient = /*#__PURE__*/function (_LCDClient) {
|
|
275
277
|
options.params.proposal_id = params.proposalId;
|
276
278
|
}
|
277
279
|
|
278
|
-
endpoint = "cosmos/gov/v1/proposals/".concat(params.
|
280
|
+
endpoint = "cosmos/gov/v1/proposals/".concat(params.proposalId, "deposits/").concat(params.depositor);
|
279
281
|
_context6.next = 5;
|
280
282
|
return this.request(endpoint, options);
|
281
283
|
|
@@ -316,10 +318,10 @@ var LCDQueryClient = /*#__PURE__*/function (_LCDClient) {
|
|
316
318
|
}
|
317
319
|
|
318
320
|
if (typeof (params === null || params === void 0 ? void 0 : params.pagination) !== "undefined") {
|
319
|
-
options
|
321
|
+
(0, _helpers.setPaginationParams)(options, params.pagination);
|
320
322
|
}
|
321
323
|
|
322
|
-
endpoint = "cosmos/gov/v1/proposals/".concat(params.
|
324
|
+
endpoint = "cosmos/gov/v1/proposals/".concat(params.proposalId, "/deposits");
|
323
325
|
_context7.next = 6;
|
324
326
|
return this.request(endpoint, options);
|
325
327
|
|
@@ -359,7 +361,7 @@ var LCDQueryClient = /*#__PURE__*/function (_LCDClient) {
|
|
359
361
|
options.params.proposal_id = params.proposalId;
|
360
362
|
}
|
361
363
|
|
362
|
-
endpoint = "cosmos/gov/v1/proposals/".concat(params.
|
364
|
+
endpoint = "cosmos/gov/v1/proposals/".concat(params.proposalId, "/tally");
|
363
365
|
_context8.next = 5;
|
364
366
|
return this.request(endpoint, options);
|
365
367
|
|