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.
- 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/cosmwasm/bundle.js +4 -4
- package/main/codegen/ibc/bundle.js +25 -15
- package/main/codegen/ibc/client.js +6 -2
- 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/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/cosmwasm/bundle.js +4 -4
- package/module/codegen/ibc/bundle.js +20 -15
- package/module/codegen/ibc/client.js +4 -2
- 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/juno/bundle.js +6 -6
- package/package.json +3 -2
- 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 = {}));
|
@@ -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
|
+
};
|
@@ -0,0 +1,268 @@
|
|
1
|
+
import * as _m0 from "protobufjs/minimal";
|
2
|
+
import { isSet } from "@osmonauts/helpers";
|
3
|
+
/**
|
4
|
+
* Coin defines a token with a denomination and an amount.
|
5
|
+
*
|
6
|
+
* NOTE: The amount field is an Int which implements the custom method
|
7
|
+
* signatures required by gogoproto.
|
8
|
+
*/
|
9
|
+
|
10
|
+
function createBaseCoin() {
|
11
|
+
return {
|
12
|
+
denom: "",
|
13
|
+
amount: ""
|
14
|
+
};
|
15
|
+
}
|
16
|
+
|
17
|
+
export const Coin = {
|
18
|
+
encode(message, writer = _m0.Writer.create()) {
|
19
|
+
if (message.denom !== "") {
|
20
|
+
writer.uint32(10).string(message.denom);
|
21
|
+
}
|
22
|
+
|
23
|
+
if (message.amount !== "") {
|
24
|
+
writer.uint32(18).string(message.amount);
|
25
|
+
}
|
26
|
+
|
27
|
+
return writer;
|
28
|
+
},
|
29
|
+
|
30
|
+
decode(input, length) {
|
31
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
32
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
33
|
+
const message = createBaseCoin();
|
34
|
+
|
35
|
+
while (reader.pos < end) {
|
36
|
+
const tag = reader.uint32();
|
37
|
+
|
38
|
+
switch (tag >>> 3) {
|
39
|
+
case 1:
|
40
|
+
message.denom = reader.string();
|
41
|
+
break;
|
42
|
+
|
43
|
+
case 2:
|
44
|
+
message.amount = reader.string();
|
45
|
+
break;
|
46
|
+
|
47
|
+
default:
|
48
|
+
reader.skipType(tag & 7);
|
49
|
+
break;
|
50
|
+
}
|
51
|
+
}
|
52
|
+
|
53
|
+
return message;
|
54
|
+
},
|
55
|
+
|
56
|
+
fromJSON(object) {
|
57
|
+
return {
|
58
|
+
denom: isSet(object.denom) ? String(object.denom) : "",
|
59
|
+
amount: isSet(object.amount) ? String(object.amount) : ""
|
60
|
+
};
|
61
|
+
},
|
62
|
+
|
63
|
+
toJSON(message) {
|
64
|
+
const obj = {};
|
65
|
+
message.denom !== undefined && (obj.denom = message.denom);
|
66
|
+
message.amount !== undefined && (obj.amount = message.amount);
|
67
|
+
return obj;
|
68
|
+
},
|
69
|
+
|
70
|
+
fromPartial(object) {
|
71
|
+
var _object$denom, _object$amount;
|
72
|
+
|
73
|
+
const message = createBaseCoin();
|
74
|
+
message.denom = (_object$denom = object.denom) !== null && _object$denom !== void 0 ? _object$denom : "";
|
75
|
+
message.amount = (_object$amount = object.amount) !== null && _object$amount !== void 0 ? _object$amount : "";
|
76
|
+
return message;
|
77
|
+
}
|
78
|
+
|
79
|
+
};
|
80
|
+
|
81
|
+
function createBaseDecCoin() {
|
82
|
+
return {
|
83
|
+
denom: "",
|
84
|
+
amount: ""
|
85
|
+
};
|
86
|
+
}
|
87
|
+
|
88
|
+
export const DecCoin = {
|
89
|
+
encode(message, writer = _m0.Writer.create()) {
|
90
|
+
if (message.denom !== "") {
|
91
|
+
writer.uint32(10).string(message.denom);
|
92
|
+
}
|
93
|
+
|
94
|
+
if (message.amount !== "") {
|
95
|
+
writer.uint32(18).string(message.amount);
|
96
|
+
}
|
97
|
+
|
98
|
+
return writer;
|
99
|
+
},
|
100
|
+
|
101
|
+
decode(input, length) {
|
102
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
103
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
104
|
+
const message = createBaseDecCoin();
|
105
|
+
|
106
|
+
while (reader.pos < end) {
|
107
|
+
const tag = reader.uint32();
|
108
|
+
|
109
|
+
switch (tag >>> 3) {
|
110
|
+
case 1:
|
111
|
+
message.denom = reader.string();
|
112
|
+
break;
|
113
|
+
|
114
|
+
case 2:
|
115
|
+
message.amount = reader.string();
|
116
|
+
break;
|
117
|
+
|
118
|
+
default:
|
119
|
+
reader.skipType(tag & 7);
|
120
|
+
break;
|
121
|
+
}
|
122
|
+
}
|
123
|
+
|
124
|
+
return message;
|
125
|
+
},
|
126
|
+
|
127
|
+
fromJSON(object) {
|
128
|
+
return {
|
129
|
+
denom: isSet(object.denom) ? String(object.denom) : "",
|
130
|
+
amount: isSet(object.amount) ? String(object.amount) : ""
|
131
|
+
};
|
132
|
+
},
|
133
|
+
|
134
|
+
toJSON(message) {
|
135
|
+
const obj = {};
|
136
|
+
message.denom !== undefined && (obj.denom = message.denom);
|
137
|
+
message.amount !== undefined && (obj.amount = message.amount);
|
138
|
+
return obj;
|
139
|
+
},
|
140
|
+
|
141
|
+
fromPartial(object) {
|
142
|
+
var _object$denom2, _object$amount2;
|
143
|
+
|
144
|
+
const message = createBaseDecCoin();
|
145
|
+
message.denom = (_object$denom2 = object.denom) !== null && _object$denom2 !== void 0 ? _object$denom2 : "";
|
146
|
+
message.amount = (_object$amount2 = object.amount) !== null && _object$amount2 !== void 0 ? _object$amount2 : "";
|
147
|
+
return message;
|
148
|
+
}
|
149
|
+
|
150
|
+
};
|
151
|
+
|
152
|
+
function createBaseIntProto() {
|
153
|
+
return {
|
154
|
+
int: ""
|
155
|
+
};
|
156
|
+
}
|
157
|
+
|
158
|
+
export const IntProto = {
|
159
|
+
encode(message, writer = _m0.Writer.create()) {
|
160
|
+
if (message.int !== "") {
|
161
|
+
writer.uint32(10).string(message.int);
|
162
|
+
}
|
163
|
+
|
164
|
+
return writer;
|
165
|
+
},
|
166
|
+
|
167
|
+
decode(input, length) {
|
168
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
169
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
170
|
+
const message = createBaseIntProto();
|
171
|
+
|
172
|
+
while (reader.pos < end) {
|
173
|
+
const tag = reader.uint32();
|
174
|
+
|
175
|
+
switch (tag >>> 3) {
|
176
|
+
case 1:
|
177
|
+
message.int = reader.string();
|
178
|
+
break;
|
179
|
+
|
180
|
+
default:
|
181
|
+
reader.skipType(tag & 7);
|
182
|
+
break;
|
183
|
+
}
|
184
|
+
}
|
185
|
+
|
186
|
+
return message;
|
187
|
+
},
|
188
|
+
|
189
|
+
fromJSON(object) {
|
190
|
+
return {
|
191
|
+
int: isSet(object.int) ? String(object.int) : ""
|
192
|
+
};
|
193
|
+
},
|
194
|
+
|
195
|
+
toJSON(message) {
|
196
|
+
const obj = {};
|
197
|
+
message.int !== undefined && (obj.int = message.int);
|
198
|
+
return obj;
|
199
|
+
},
|
200
|
+
|
201
|
+
fromPartial(object) {
|
202
|
+
var _object$int;
|
203
|
+
|
204
|
+
const message = createBaseIntProto();
|
205
|
+
message.int = (_object$int = object.int) !== null && _object$int !== void 0 ? _object$int : "";
|
206
|
+
return message;
|
207
|
+
}
|
208
|
+
|
209
|
+
};
|
210
|
+
|
211
|
+
function createBaseDecProto() {
|
212
|
+
return {
|
213
|
+
dec: ""
|
214
|
+
};
|
215
|
+
}
|
216
|
+
|
217
|
+
export const DecProto = {
|
218
|
+
encode(message, writer = _m0.Writer.create()) {
|
219
|
+
if (message.dec !== "") {
|
220
|
+
writer.uint32(10).string(message.dec);
|
221
|
+
}
|
222
|
+
|
223
|
+
return writer;
|
224
|
+
},
|
225
|
+
|
226
|
+
decode(input, length) {
|
227
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
228
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
229
|
+
const message = createBaseDecProto();
|
230
|
+
|
231
|
+
while (reader.pos < end) {
|
232
|
+
const tag = reader.uint32();
|
233
|
+
|
234
|
+
switch (tag >>> 3) {
|
235
|
+
case 1:
|
236
|
+
message.dec = reader.string();
|
237
|
+
break;
|
238
|
+
|
239
|
+
default:
|
240
|
+
reader.skipType(tag & 7);
|
241
|
+
break;
|
242
|
+
}
|
243
|
+
}
|
244
|
+
|
245
|
+
return message;
|
246
|
+
},
|
247
|
+
|
248
|
+
fromJSON(object) {
|
249
|
+
return {
|
250
|
+
dec: isSet(object.dec) ? String(object.dec) : ""
|
251
|
+
};
|
252
|
+
},
|
253
|
+
|
254
|
+
toJSON(message) {
|
255
|
+
const obj = {};
|
256
|
+
message.dec !== undefined && (obj.dec = message.dec);
|
257
|
+
return obj;
|
258
|
+
},
|
259
|
+
|
260
|
+
fromPartial(object) {
|
261
|
+
var _object$dec;
|
262
|
+
|
263
|
+
const message = createBaseDecProto();
|
264
|
+
message.dec = (_object$dec = object.dec) !== null && _object$dec !== void 0 ? _object$dec : "";
|
265
|
+
return message;
|
266
|
+
}
|
267
|
+
|
268
|
+
};
|