juno-network 0.1.11 → 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.
- package/main/codegen/JunoSwap.client.js +1 -1
- package/main/codegen/cosmos/bank/v1beta1/query.lcd.js +44 -26
- package/main/codegen/cosmos/base/query/v1beta1/pagination.js +190 -0
- package/main/codegen/cosmos/base/v1beta1/coin.js +268 -0
- package/main/codegen/cosmos/bundle.js +4 -4
- 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/bundle.js +4 -4
- 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/bundle.js +25 -15
- package/main/codegen/ibc/client.js +32 -12
- package/main/codegen/ibc/core/channel/v1/query.lcd.js +40 -32
- package/main/codegen/ibc/core/client/v1/client.js +585 -0
- package/main/codegen/ibc/core/client/v1/genesis.js +367 -0
- package/main/codegen/ibc/core/client/v1/query.js +1047 -0
- package/main/codegen/ibc/core/client/v1/query.lcd.js +381 -0
- package/main/codegen/ibc/core/client/v1/query.rpc.query.js +125 -0
- package/main/codegen/ibc/core/client/v1/tx.amino.js +149 -0
- package/main/codegen/ibc/core/client/v1/tx.js +538 -0
- package/main/codegen/ibc/core/client/v1/tx.registry.js +160 -0
- package/main/codegen/ibc/core/client/v1/tx.rpc.msg.js +81 -0
- package/main/codegen/ibc/lcd.js +21 -6
- package/main/codegen/ibc/rpc.query.js +19 -6
- package/main/codegen/ibc/rpc.tx.js +19 -6
- package/main/codegen/juno/bundle.js +6 -6
- 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/base/query/v1beta1/pagination.js +189 -0
- package/module/codegen/cosmos/base/v1beta1/coin.js +268 -0
- package/module/codegen/cosmos/bundle.js +4 -4
- 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/bundle.js +4 -4
- 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/bundle.js +20 -15
- package/module/codegen/ibc/client.js +18 -2
- package/module/codegen/ibc/core/channel/v1/query.lcd.js +19 -16
- package/module/codegen/ibc/core/client/v1/client.js +549 -0
- package/module/codegen/ibc/core/client/v1/genesis.js +287 -0
- package/module/codegen/ibc/core/client/v1/query.js +1029 -0
- package/module/codegen/ibc/core/client/v1/query.lcd.js +128 -0
- package/module/codegen/ibc/core/client/v1/query.rpc.query.js +69 -0
- package/module/codegen/ibc/core/client/v1/tx.amino.js +150 -0
- package/module/codegen/ibc/core/client/v1/tx.js +544 -0
- package/module/codegen/ibc/core/client/v1/tx.registry.js +159 -0
- package/module/codegen/ibc/core/client/v1/tx.rpc.msg.js +41 -0
- package/module/codegen/ibc/lcd.js +5 -0
- package/module/codegen/ibc/rpc.query.js +3 -0
- package/module/codegen/ibc/rpc.tx.js +3 -0
- package/module/codegen/index.js +1 -1
- package/module/codegen/juno/bundle.js +6 -6
- package/module/codegen/juno/mint/query.lcd.js +3 -3
- package/package.json +15 -14
- package/types/codegen/JunoSwap.client.d.ts +1 -1
- package/types/codegen/JunoSwap.react-query.d.ts +11 -11
- package/types/codegen/JunoSwap.types.d.ts +1 -1
- package/types/codegen/contracts.d.ts +5 -5
- package/types/codegen/cosmos/bank/v1beta1/query.lcd.d.ts +3 -3
- package/types/codegen/cosmos/base/query/v1beta1/pagination.d.ts +79 -0
- package/types/codegen/cosmos/base/v1beta1/coin.d.ts +58 -0
- package/types/codegen/cosmos/bundle.d.ts +758 -153
- package/types/codegen/cosmos/client.d.ts +6 -2
- package/types/codegen/cosmos/distribution/v1beta1/query.lcd.d.ts +2 -2
- package/types/codegen/cosmos/staking/v1beta1/query.lcd.d.ts +2 -2
- package/types/codegen/cosmwasm/bundle.d.ts +87 -18
- package/types/codegen/cosmwasm/client.d.ts +8 -2
- package/types/codegen/cosmwasm/wasm/v1/query.lcd.d.ts +2 -2
- package/types/codegen/ibc/applications/transfer/v1/query.lcd.d.ts +2 -2
- package/types/codegen/ibc/bundle.d.ts +878 -64
- package/types/codegen/ibc/client.d.ts +8 -2
- package/types/codegen/ibc/core/channel/v1/query.lcd.d.ts +1 -1
- package/types/codegen/ibc/core/client/v1/client.d.ts +143 -0
- package/types/codegen/ibc/core/client/v1/genesis.d.ts +56 -0
- package/types/codegen/ibc/core/client/v1/query.d.ts +263 -0
- package/types/codegen/ibc/core/client/v1/query.lcd.d.ts +15 -0
- package/types/codegen/ibc/core/client/v1/query.rpc.query.d.ts +25 -0
- package/types/codegen/ibc/core/client/v1/tx.amino.d.ts +77 -0
- package/types/codegen/ibc/core/client/v1/tx.d.ts +131 -0
- package/types/codegen/ibc/core/client/v1/tx.registry.d.ts +96 -0
- package/types/codegen/ibc/core/client/v1/tx.rpc.msg.d.ts +17 -0
- package/types/codegen/ibc/lcd.d.ts +3 -0
- package/types/codegen/ibc/rpc.query.d.ts +3 -0
- package/types/codegen/ibc/rpc.tx.d.ts +3 -0
- package/types/codegen/index.d.ts +1 -1
- package/types/codegen/juno/bundle.d.ts +6 -6
- package/types/codegen/juno/mint/query.lcd.d.ts +3 -3
@@ -0,0 +1,81 @@
|
|
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.MsgClientImpl = 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 _tx = require("./tx");
|
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 MsgClientImpl = /*#__PURE__*/function () {
|
27
|
+
function MsgClientImpl(rpc) {
|
28
|
+
(0, _classCallCheck2["default"])(this, MsgClientImpl);
|
29
|
+
(0, _defineProperty2["default"])(this, "rpc", void 0);
|
30
|
+
this.rpc = rpc;
|
31
|
+
this.createClient = this.createClient.bind(this);
|
32
|
+
this.updateClient = this.updateClient.bind(this);
|
33
|
+
this.upgradeClient = this.upgradeClient.bind(this);
|
34
|
+
this.submitMisbehaviour = this.submitMisbehaviour.bind(this);
|
35
|
+
}
|
36
|
+
|
37
|
+
(0, _createClass2["default"])(MsgClientImpl, [{
|
38
|
+
key: "createClient",
|
39
|
+
value: function createClient(request) {
|
40
|
+
var data = _tx.MsgCreateClient.encode(request).finish();
|
41
|
+
|
42
|
+
var promise = this.rpc.request("ibc.core.client.v1.Msg", "CreateClient", data);
|
43
|
+
return promise.then(function (data) {
|
44
|
+
return _tx.MsgCreateClientResponse.decode(new _m0.Reader(data));
|
45
|
+
});
|
46
|
+
}
|
47
|
+
}, {
|
48
|
+
key: "updateClient",
|
49
|
+
value: function updateClient(request) {
|
50
|
+
var data = _tx.MsgUpdateClient.encode(request).finish();
|
51
|
+
|
52
|
+
var promise = this.rpc.request("ibc.core.client.v1.Msg", "UpdateClient", data);
|
53
|
+
return promise.then(function (data) {
|
54
|
+
return _tx.MsgUpdateClientResponse.decode(new _m0.Reader(data));
|
55
|
+
});
|
56
|
+
}
|
57
|
+
}, {
|
58
|
+
key: "upgradeClient",
|
59
|
+
value: function upgradeClient(request) {
|
60
|
+
var data = _tx.MsgUpgradeClient.encode(request).finish();
|
61
|
+
|
62
|
+
var promise = this.rpc.request("ibc.core.client.v1.Msg", "UpgradeClient", data);
|
63
|
+
return promise.then(function (data) {
|
64
|
+
return _tx.MsgUpgradeClientResponse.decode(new _m0.Reader(data));
|
65
|
+
});
|
66
|
+
}
|
67
|
+
}, {
|
68
|
+
key: "submitMisbehaviour",
|
69
|
+
value: function submitMisbehaviour(request) {
|
70
|
+
var data = _tx.MsgSubmitMisbehaviour.encode(request).finish();
|
71
|
+
|
72
|
+
var promise = this.rpc.request("ibc.core.client.v1.Msg", "SubmitMisbehaviour", data);
|
73
|
+
return promise.then(function (data) {
|
74
|
+
return _tx.MsgSubmitMisbehaviourResponse.decode(new _m0.Reader(data));
|
75
|
+
});
|
76
|
+
}
|
77
|
+
}]);
|
78
|
+
return MsgClientImpl;
|
79
|
+
}();
|
80
|
+
|
81
|
+
exports.MsgClientImpl = MsgClientImpl;
|
package/main/codegen/ibc/lcd.js
CHANGED
@@ -145,19 +145,34 @@ var createLCDClient = /*#__PURE__*/function () {
|
|
145
145
|
_context.t32 = {
|
146
146
|
v1: _context.t31
|
147
147
|
};
|
148
|
-
_context.
|
149
|
-
|
150
|
-
|
148
|
+
_context.next = 52;
|
149
|
+
return Promise.resolve().then(function () {
|
150
|
+
return _interopRequireWildcard(require("./core/client/v1/query.lcd"));
|
151
|
+
});
|
152
|
+
|
153
|
+
case 52:
|
154
|
+
_context.t33 = _context.sent.LCDQueryClient;
|
151
155
|
_context.t34 = {
|
156
|
+
restEndpoint: restEndpoint
|
157
|
+
};
|
158
|
+
_context.t35 = new _context.t33(_context.t34);
|
159
|
+
_context.t36 = {
|
160
|
+
v1: _context.t35
|
161
|
+
};
|
162
|
+
_context.t37 = {
|
163
|
+
channel: _context.t32,
|
164
|
+
client: _context.t36
|
165
|
+
};
|
166
|
+
_context.t38 = {
|
152
167
|
applications: _context.t28,
|
153
|
-
core: _context.
|
168
|
+
core: _context.t37
|
154
169
|
};
|
155
170
|
return _context.abrupt("return", {
|
156
171
|
cosmos: _context.t23,
|
157
|
-
ibc: _context.
|
172
|
+
ibc: _context.t38
|
158
173
|
});
|
159
174
|
|
160
|
-
case
|
175
|
+
case 59:
|
161
176
|
case "end":
|
162
177
|
return _context.stop();
|
163
178
|
}
|
@@ -129,19 +129,32 @@ var createRPCQueryClient = /*#__PURE__*/function () {
|
|
129
129
|
_context.t32 = {
|
130
130
|
v1: _context.t31
|
131
131
|
};
|
132
|
-
_context.
|
133
|
-
|
132
|
+
_context.next = 52;
|
133
|
+
return Promise.resolve().then(function () {
|
134
|
+
return _interopRequireWildcard(require("./core/client/v1/query.rpc.query"));
|
135
|
+
});
|
136
|
+
|
137
|
+
case 52:
|
138
|
+
_context.t33 = _context.sent.QueryClientImpl;
|
139
|
+
_context.t34 = rpc;
|
140
|
+
_context.t35 = new _context.t33(_context.t34);
|
141
|
+
_context.t36 = {
|
142
|
+
v1: _context.t35
|
143
|
+
};
|
144
|
+
_context.t37 = {
|
145
|
+
channel: _context.t32,
|
146
|
+
client: _context.t36
|
134
147
|
};
|
135
|
-
_context.
|
148
|
+
_context.t38 = {
|
136
149
|
applications: _context.t28,
|
137
|
-
core: _context.
|
150
|
+
core: _context.t37
|
138
151
|
};
|
139
152
|
return _context.abrupt("return", {
|
140
153
|
cosmos: _context.t23,
|
141
|
-
ibc: _context.
|
154
|
+
ibc: _context.t38
|
142
155
|
});
|
143
156
|
|
144
|
-
case
|
157
|
+
case 59:
|
145
158
|
case "end":
|
146
159
|
return _context.stop();
|
147
160
|
}
|
@@ -129,19 +129,32 @@ var createRPCMsgClient = /*#__PURE__*/function () {
|
|
129
129
|
_context.t32 = {
|
130
130
|
v1: _context.t31
|
131
131
|
};
|
132
|
-
_context.
|
133
|
-
|
132
|
+
_context.next = 52;
|
133
|
+
return Promise.resolve().then(function () {
|
134
|
+
return _interopRequireWildcard(require("./core/client/v1/tx.rpc.msg"));
|
135
|
+
});
|
136
|
+
|
137
|
+
case 52:
|
138
|
+
_context.t33 = _context.sent.MsgClientImpl;
|
139
|
+
_context.t34 = rpc;
|
140
|
+
_context.t35 = new _context.t33(_context.t34);
|
141
|
+
_context.t36 = {
|
142
|
+
v1: _context.t35
|
143
|
+
};
|
144
|
+
_context.t37 = {
|
145
|
+
channel: _context.t32,
|
146
|
+
client: _context.t36
|
134
147
|
};
|
135
|
-
_context.
|
148
|
+
_context.t38 = {
|
136
149
|
applications: _context.t28,
|
137
|
-
core: _context.
|
150
|
+
core: _context.t37
|
138
151
|
};
|
139
152
|
return _context.abrupt("return", {
|
140
153
|
cosmos: _context.t23,
|
141
|
-
ibc: _context.
|
154
|
+
ibc: _context.t38
|
142
155
|
});
|
143
156
|
|
144
|
-
case
|
157
|
+
case 59:
|
145
158
|
case "end":
|
146
159
|
return _context.stop();
|
147
160
|
}
|
@@ -17,13 +17,13 @@ var _136 = _interopRequireWildcard(require("./mint/mint"));
|
|
17
17
|
|
18
18
|
var _137 = _interopRequireWildcard(require("./mint/query"));
|
19
19
|
|
20
|
-
var
|
20
|
+
var _200 = _interopRequireWildcard(require("./mint/query.lcd"));
|
21
21
|
|
22
|
-
var
|
22
|
+
var _201 = _interopRequireWildcard(require("./mint/query.rpc.query"));
|
23
23
|
|
24
|
-
var
|
24
|
+
var _211 = _interopRequireWildcard(require("./lcd"));
|
25
25
|
|
26
|
-
var
|
26
|
+
var _212 = _interopRequireWildcard(require("./rpc.query"));
|
27
27
|
|
28
28
|
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); }
|
29
29
|
|
@@ -37,7 +37,7 @@ var juno;
|
|
37
37
|
exports.juno = juno;
|
38
38
|
|
39
39
|
(function (_juno) {
|
40
|
-
var mint = _juno.mint = _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, _135), _136), _137),
|
40
|
+
var mint = _juno.mint = _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, _135), _136), _137), _200), _201);
|
41
41
|
|
42
|
-
var ClientFactory = _juno.ClientFactory = _objectSpread(_objectSpread({},
|
42
|
+
var ClientFactory = _juno.ClientFactory = _objectSpread(_objectSpread({}, _211), _212);
|
43
43
|
})(juno || (exports.juno = juno = {}));
|
@@ -45,20 +45,24 @@ var LCDQueryClient = /*#__PURE__*/function (_LCDClient) {
|
|
45
45
|
(0, _createClass2["default"])(LCDQueryClient, [{
|
46
46
|
key: "params",
|
47
47
|
value: function () {
|
48
|
-
var _params2 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(
|
49
|
-
var
|
48
|
+
var _params2 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() {
|
49
|
+
var _params,
|
50
|
+
endpoint,
|
51
|
+
_args = arguments;
|
52
|
+
|
50
53
|
return _regenerator["default"].wrap(function _callee$(_context) {
|
51
54
|
while (1) {
|
52
55
|
switch (_context.prev = _context.next) {
|
53
56
|
case 0:
|
57
|
+
_params = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
|
54
58
|
endpoint = "cosmos/mint/v1beta1/params";
|
55
|
-
_context.next =
|
59
|
+
_context.next = 4;
|
56
60
|
return this.request(endpoint);
|
57
61
|
|
58
|
-
case
|
62
|
+
case 4:
|
59
63
|
return _context.abrupt("return", _context.sent);
|
60
64
|
|
61
|
-
case
|
65
|
+
case 5:
|
62
66
|
case "end":
|
63
67
|
return _context.stop();
|
64
68
|
}
|
@@ -66,7 +70,7 @@ var LCDQueryClient = /*#__PURE__*/function (_LCDClient) {
|
|
66
70
|
}, _callee, this);
|
67
71
|
}));
|
68
72
|
|
69
|
-
function params(
|
73
|
+
function params() {
|
70
74
|
return _params2.apply(this, arguments);
|
71
75
|
}
|
72
76
|
|
@@ -77,20 +81,24 @@ var LCDQueryClient = /*#__PURE__*/function (_LCDClient) {
|
|
77
81
|
}, {
|
78
82
|
key: "inflation",
|
79
83
|
value: function () {
|
80
|
-
var _inflation = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2(
|
81
|
-
var
|
84
|
+
var _inflation = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2() {
|
85
|
+
var _params,
|
86
|
+
endpoint,
|
87
|
+
_args2 = arguments;
|
88
|
+
|
82
89
|
return _regenerator["default"].wrap(function _callee2$(_context2) {
|
83
90
|
while (1) {
|
84
91
|
switch (_context2.prev = _context2.next) {
|
85
92
|
case 0:
|
93
|
+
_params = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {};
|
86
94
|
endpoint = "cosmos/mint/v1beta1/inflation";
|
87
|
-
_context2.next =
|
95
|
+
_context2.next = 4;
|
88
96
|
return this.request(endpoint);
|
89
97
|
|
90
|
-
case
|
98
|
+
case 4:
|
91
99
|
return _context2.abrupt("return", _context2.sent);
|
92
100
|
|
93
|
-
case
|
101
|
+
case 5:
|
94
102
|
case "end":
|
95
103
|
return _context2.stop();
|
96
104
|
}
|
@@ -98,7 +106,7 @@ var LCDQueryClient = /*#__PURE__*/function (_LCDClient) {
|
|
98
106
|
}, _callee2, this);
|
99
107
|
}));
|
100
108
|
|
101
|
-
function inflation(
|
109
|
+
function inflation() {
|
102
110
|
return _inflation.apply(this, arguments);
|
103
111
|
}
|
104
112
|
|
@@ -109,20 +117,24 @@ var LCDQueryClient = /*#__PURE__*/function (_LCDClient) {
|
|
109
117
|
}, {
|
110
118
|
key: "annualProvisions",
|
111
119
|
value: function () {
|
112
|
-
var _annualProvisions = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3(
|
113
|
-
var
|
120
|
+
var _annualProvisions = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3() {
|
121
|
+
var _params,
|
122
|
+
endpoint,
|
123
|
+
_args3 = arguments;
|
124
|
+
|
114
125
|
return _regenerator["default"].wrap(function _callee3$(_context3) {
|
115
126
|
while (1) {
|
116
127
|
switch (_context3.prev = _context3.next) {
|
117
128
|
case 0:
|
129
|
+
_params = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {};
|
118
130
|
endpoint = "cosmos/mint/v1beta1/annual_provisions";
|
119
|
-
_context3.next =
|
131
|
+
_context3.next = 4;
|
120
132
|
return this.request(endpoint);
|
121
133
|
|
122
|
-
case
|
134
|
+
case 4:
|
123
135
|
return _context3.abrupt("return", _context3.sent);
|
124
136
|
|
125
|
-
case
|
137
|
+
case 5:
|
126
138
|
case "end":
|
127
139
|
return _context3.stop();
|
128
140
|
}
|
@@ -130,7 +142,7 @@ var LCDQueryClient = /*#__PURE__*/function (_LCDClient) {
|
|
130
142
|
}, _callee3, this);
|
131
143
|
}));
|
132
144
|
|
133
|
-
function annualProvisions(
|
145
|
+
function annualProvisions() {
|
134
146
|
return _annualProvisions.apply(this, arguments);
|
135
147
|
}
|
136
148
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
2
2
|
|
3
3
|
/**
|
4
|
-
* This file was automatically generated by @cosmwasm/ts-codegen@0.
|
4
|
+
* This file was automatically generated by @cosmwasm/ts-codegen@0.13.0.
|
5
5
|
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
|
6
6
|
* and run the @cosmwasm/ts-codegen generate command to regenerate this file.
|
7
7
|
*/
|
@@ -5,7 +5,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
5
5
|
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) { _defineProperty(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; }
|
6
6
|
|
7
7
|
/**
|
8
|
-
* This file was automatically generated by @cosmwasm/ts-codegen@0.
|
8
|
+
* This file was automatically generated by @cosmwasm/ts-codegen@0.13.0.
|
9
9
|
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
|
10
10
|
* and run the @cosmwasm/ts-codegen generate command to regenerate this file.
|
11
11
|
*/
|
@@ -5,7 +5,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
5
5
|
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) { _defineProperty(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; }
|
6
6
|
|
7
7
|
/**
|
8
|
-
* This file was automatically generated by @cosmwasm/ts-codegen@0.
|
8
|
+
* This file was automatically generated by @cosmwasm/ts-codegen@0.13.0.
|
9
9
|
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
|
10
10
|
* and run the @cosmwasm/ts-codegen generate command to regenerate this file.
|
11
11
|
*/
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import { LCDClient } from "@osmonauts/lcd";
|
2
|
+
import { setPaginationParams } from "@osmonauts/helpers";
|
2
3
|
export class LCDQueryClient extends LCDClient {
|
3
4
|
constructor({
|
4
5
|
restEndpoint
|
@@ -31,7 +32,7 @@ export class LCDQueryClient extends LCDClient {
|
|
31
32
|
};
|
32
33
|
|
33
34
|
if (typeof (params === null || params === void 0 ? void 0 : params.pagination) !== "undefined") {
|
34
|
-
options
|
35
|
+
setPaginationParams(options, params.pagination);
|
35
36
|
}
|
36
37
|
|
37
38
|
const endpoint = `cosmos/bank/v1beta1/balances/${params.address}`;
|
@@ -47,7 +48,7 @@ export class LCDQueryClient extends LCDClient {
|
|
47
48
|
};
|
48
49
|
|
49
50
|
if (typeof (params === null || params === void 0 ? void 0 : params.pagination) !== "undefined") {
|
50
|
-
options
|
51
|
+
setPaginationParams(options, params.pagination);
|
51
52
|
}
|
52
53
|
|
53
54
|
const endpoint = `cosmos/bank/v1beta1/spendable_balances/${params.address}`;
|
@@ -56,13 +57,15 @@ export class LCDQueryClient extends LCDClient {
|
|
56
57
|
/* TotalSupply queries the total supply of all coins. */
|
57
58
|
|
58
59
|
|
59
|
-
async totalSupply(params
|
60
|
+
async totalSupply(params = {
|
61
|
+
pagination: undefined
|
62
|
+
}) {
|
60
63
|
const options = {
|
61
64
|
params: {}
|
62
65
|
};
|
63
66
|
|
64
67
|
if (typeof (params === null || params === void 0 ? void 0 : params.pagination) !== "undefined") {
|
65
|
-
options
|
68
|
+
setPaginationParams(options, params.pagination);
|
66
69
|
}
|
67
70
|
|
68
71
|
const endpoint = `cosmos/bank/v1beta1/supply`;
|
@@ -86,7 +89,7 @@ export class LCDQueryClient extends LCDClient {
|
|
86
89
|
/* Params queries the parameters of x/bank module. */
|
87
90
|
|
88
91
|
|
89
|
-
async params(
|
92
|
+
async params(_params = {}) {
|
90
93
|
const endpoint = `cosmos/bank/v1beta1/params`;
|
91
94
|
return await this.request(endpoint);
|
92
95
|
}
|
@@ -101,13 +104,15 @@ export class LCDQueryClient extends LCDClient {
|
|
101
104
|
denominations. */
|
102
105
|
|
103
106
|
|
104
|
-
async denomsMetadata(params
|
107
|
+
async denomsMetadata(params = {
|
108
|
+
pagination: undefined
|
109
|
+
}) {
|
105
110
|
const options = {
|
106
111
|
params: {}
|
107
112
|
};
|
108
113
|
|
109
114
|
if (typeof (params === null || params === void 0 ? void 0 : params.pagination) !== "undefined") {
|
110
|
-
options
|
115
|
+
setPaginationParams(options, params.pagination);
|
111
116
|
}
|
112
117
|
|
113
118
|
const endpoint = `cosmos/bank/v1beta1/denoms_metadata`;
|
@@ -123,7 +128,7 @@ export class LCDQueryClient extends LCDClient {
|
|
123
128
|
};
|
124
129
|
|
125
130
|
if (typeof (params === null || params === void 0 ? void 0 : params.pagination) !== "undefined") {
|
126
|
-
options
|
131
|
+
setPaginationParams(options, params.pagination);
|
127
132
|
}
|
128
133
|
|
129
134
|
const endpoint = `cosmos/bank/v1beta1/denom_owners/${params.denom}`;
|
@@ -0,0 +1,189 @@
|
|
1
|
+
import * as _m0 from "protobufjs/minimal";
|
2
|
+
import { Long, isSet, bytesFromBase64, base64FromBytes } from "@osmonauts/helpers";
|
3
|
+
/**
|
4
|
+
* PageRequest is to be embedded in gRPC request messages for efficient
|
5
|
+
* pagination. Ex:
|
6
|
+
*
|
7
|
+
* message SomeRequest {
|
8
|
+
* Foo some_parameter = 1;
|
9
|
+
* PageRequest pagination = 2;
|
10
|
+
* }
|
11
|
+
*/
|
12
|
+
|
13
|
+
function createBasePageRequest() {
|
14
|
+
return {
|
15
|
+
key: new Uint8Array(),
|
16
|
+
offset: Long.UZERO,
|
17
|
+
limit: Long.UZERO,
|
18
|
+
countTotal: false,
|
19
|
+
reverse: false
|
20
|
+
};
|
21
|
+
}
|
22
|
+
|
23
|
+
export const PageRequest = {
|
24
|
+
encode(message, writer = _m0.Writer.create()) {
|
25
|
+
if (message.key.length !== 0) {
|
26
|
+
writer.uint32(10).bytes(message.key);
|
27
|
+
}
|
28
|
+
|
29
|
+
if (!message.offset.isZero()) {
|
30
|
+
writer.uint32(16).uint64(message.offset);
|
31
|
+
}
|
32
|
+
|
33
|
+
if (!message.limit.isZero()) {
|
34
|
+
writer.uint32(24).uint64(message.limit);
|
35
|
+
}
|
36
|
+
|
37
|
+
if (message.countTotal === true) {
|
38
|
+
writer.uint32(32).bool(message.countTotal);
|
39
|
+
}
|
40
|
+
|
41
|
+
if (message.reverse === true) {
|
42
|
+
writer.uint32(40).bool(message.reverse);
|
43
|
+
}
|
44
|
+
|
45
|
+
return writer;
|
46
|
+
},
|
47
|
+
|
48
|
+
decode(input, length) {
|
49
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
50
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
51
|
+
const message = createBasePageRequest();
|
52
|
+
|
53
|
+
while (reader.pos < end) {
|
54
|
+
const tag = reader.uint32();
|
55
|
+
|
56
|
+
switch (tag >>> 3) {
|
57
|
+
case 1:
|
58
|
+
message.key = reader.bytes();
|
59
|
+
break;
|
60
|
+
|
61
|
+
case 2:
|
62
|
+
message.offset = reader.uint64();
|
63
|
+
break;
|
64
|
+
|
65
|
+
case 3:
|
66
|
+
message.limit = reader.uint64();
|
67
|
+
break;
|
68
|
+
|
69
|
+
case 4:
|
70
|
+
message.countTotal = reader.bool();
|
71
|
+
break;
|
72
|
+
|
73
|
+
case 5:
|
74
|
+
message.reverse = reader.bool();
|
75
|
+
break;
|
76
|
+
|
77
|
+
default:
|
78
|
+
reader.skipType(tag & 7);
|
79
|
+
break;
|
80
|
+
}
|
81
|
+
}
|
82
|
+
|
83
|
+
return message;
|
84
|
+
},
|
85
|
+
|
86
|
+
fromJSON(object) {
|
87
|
+
return {
|
88
|
+
key: isSet(object.key) ? bytesFromBase64(object.key) : new Uint8Array(),
|
89
|
+
offset: isSet(object.offset) ? Long.fromString(object.offset) : Long.UZERO,
|
90
|
+
limit: isSet(object.limit) ? Long.fromString(object.limit) : Long.UZERO,
|
91
|
+
countTotal: isSet(object.countTotal) ? Boolean(object.countTotal) : false,
|
92
|
+
reverse: isSet(object.reverse) ? Boolean(object.reverse) : false
|
93
|
+
};
|
94
|
+
},
|
95
|
+
|
96
|
+
toJSON(message) {
|
97
|
+
const obj = {};
|
98
|
+
message.key !== undefined && (obj.key = base64FromBytes(message.key !== undefined ? message.key : new Uint8Array()));
|
99
|
+
message.offset !== undefined && (obj.offset = (message.offset || Long.UZERO).toString());
|
100
|
+
message.limit !== undefined && (obj.limit = (message.limit || Long.UZERO).toString());
|
101
|
+
message.countTotal !== undefined && (obj.countTotal = message.countTotal);
|
102
|
+
message.reverse !== undefined && (obj.reverse = message.reverse);
|
103
|
+
return obj;
|
104
|
+
},
|
105
|
+
|
106
|
+
fromPartial(object) {
|
107
|
+
var _object$key, _object$countTotal, _object$reverse;
|
108
|
+
|
109
|
+
const message = createBasePageRequest();
|
110
|
+
message.key = (_object$key = object.key) !== null && _object$key !== void 0 ? _object$key : new Uint8Array();
|
111
|
+
message.offset = object.offset !== undefined && object.offset !== null ? Long.fromValue(object.offset) : Long.UZERO;
|
112
|
+
message.limit = object.limit !== undefined && object.limit !== null ? Long.fromValue(object.limit) : Long.UZERO;
|
113
|
+
message.countTotal = (_object$countTotal = object.countTotal) !== null && _object$countTotal !== void 0 ? _object$countTotal : false;
|
114
|
+
message.reverse = (_object$reverse = object.reverse) !== null && _object$reverse !== void 0 ? _object$reverse : false;
|
115
|
+
return message;
|
116
|
+
}
|
117
|
+
|
118
|
+
};
|
119
|
+
|
120
|
+
function createBasePageResponse() {
|
121
|
+
return {
|
122
|
+
nextKey: new Uint8Array(),
|
123
|
+
total: Long.UZERO
|
124
|
+
};
|
125
|
+
}
|
126
|
+
|
127
|
+
export const PageResponse = {
|
128
|
+
encode(message, writer = _m0.Writer.create()) {
|
129
|
+
if (message.nextKey.length !== 0) {
|
130
|
+
writer.uint32(10).bytes(message.nextKey);
|
131
|
+
}
|
132
|
+
|
133
|
+
if (!message.total.isZero()) {
|
134
|
+
writer.uint32(16).uint64(message.total);
|
135
|
+
}
|
136
|
+
|
137
|
+
return writer;
|
138
|
+
},
|
139
|
+
|
140
|
+
decode(input, length) {
|
141
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
142
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
143
|
+
const message = createBasePageResponse();
|
144
|
+
|
145
|
+
while (reader.pos < end) {
|
146
|
+
const tag = reader.uint32();
|
147
|
+
|
148
|
+
switch (tag >>> 3) {
|
149
|
+
case 1:
|
150
|
+
message.nextKey = reader.bytes();
|
151
|
+
break;
|
152
|
+
|
153
|
+
case 2:
|
154
|
+
message.total = reader.uint64();
|
155
|
+
break;
|
156
|
+
|
157
|
+
default:
|
158
|
+
reader.skipType(tag & 7);
|
159
|
+
break;
|
160
|
+
}
|
161
|
+
}
|
162
|
+
|
163
|
+
return message;
|
164
|
+
},
|
165
|
+
|
166
|
+
fromJSON(object) {
|
167
|
+
return {
|
168
|
+
nextKey: isSet(object.nextKey) ? bytesFromBase64(object.nextKey) : new Uint8Array(),
|
169
|
+
total: isSet(object.total) ? Long.fromString(object.total) : Long.UZERO
|
170
|
+
};
|
171
|
+
},
|
172
|
+
|
173
|
+
toJSON(message) {
|
174
|
+
const obj = {};
|
175
|
+
message.nextKey !== undefined && (obj.nextKey = base64FromBytes(message.nextKey !== undefined ? message.nextKey : new Uint8Array()));
|
176
|
+
message.total !== undefined && (obj.total = (message.total || Long.UZERO).toString());
|
177
|
+
return obj;
|
178
|
+
},
|
179
|
+
|
180
|
+
fromPartial(object) {
|
181
|
+
var _object$nextKey;
|
182
|
+
|
183
|
+
const message = createBasePageResponse();
|
184
|
+
message.nextKey = (_object$nextKey = object.nextKey) !== null && _object$nextKey !== void 0 ? _object$nextKey : new Uint8Array();
|
185
|
+
message.total = object.total !== undefined && object.total !== null ? Long.fromValue(object.total) : Long.UZERO;
|
186
|
+
return message;
|
187
|
+
}
|
188
|
+
|
189
|
+
};
|