carbon-js-sdk 0.3.43-dev.1 → 0.3.43-dev.3
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/lib/clients/CarbonQueryClient.js +2 -2
- package/lib/clients/ETHClient.js +15 -15
- package/lib/clients/HydrogenClient.js +1 -1
- package/lib/clients/NEOClient.js +7 -7
- package/lib/clients/TokenClient.js +1 -1
- package/lib/clients/ZILClient.js +17 -17
- package/lib/codec/cosmos/gov/v1beta1/query.js +2 -2
- package/lib/codec/cosmos/gov/v1beta1/tx.js +2 -2
- package/lib/codec/cosmos/tx/v1beta1/tx.js +2 -2
- package/lib/codec/index.d.ts +2 -2
- package/lib/codec/index.js +10 -6
- package/lib/codec/liquiditypool/event.d.ts +14 -0
- package/lib/codec/liquiditypool/event.js +107 -1
- package/lib/codec/liquiditypool/query.d.ts +71 -34
- package/lib/codec/liquiditypool/query.js +304 -112
- package/lib/codec/liquiditypool/tx.d.ts +0 -1
- package/lib/codec/liquiditypool/tx.js +1 -18
- package/lib/constant/generic.js +1 -1
- package/lib/modules/cdp.js +43 -43
- package/lib/modules/gov.js +12 -12
- package/lib/modules/liquiditypool.d.ts +0 -1
- package/lib/modules/liquiditypool.js +1 -2
- package/lib/provider/account/EthLedgerAccount/EthLedgerAccount.js +1 -1
- package/lib/provider/account/NeoLedgerAccount/N3Ledger/ErrorCode.js +1 -1
- package/lib/provider/account/NeoLedgerAccount/N3Ledger/main.js +8 -8
- package/lib/provider/account/NeoLedgerAccount/NeoLedgerAccount.js +3 -3
- package/lib/provider/account/NeoLedgerAccount/NeonLedger.js +1 -1
- package/lib/provider/amino/types/admin.js +28 -28
- package/lib/provider/amino/types/bank.js +1 -1
- package/lib/provider/amino/types/broker.js +1 -1
- package/lib/provider/amino/types/cdp.js +22 -22
- package/lib/provider/amino/types/coin.js +4 -4
- package/lib/provider/amino/types/gov.js +4 -12
- package/lib/provider/amino/types/ibc.js +1 -1
- package/lib/provider/amino/types/leverage.js +1 -1
- package/lib/provider/amino/types/liquidityPool.js +7 -9
- package/lib/provider/amino/types/market.js +1 -1
- package/lib/provider/amino/types/oracle.js +1 -1
- package/lib/provider/amino/types/order.js +4 -4
- package/lib/provider/amino/types/position.js +1 -1
- package/lib/provider/amino/types/profile.js +1 -1
- package/lib/provider/amino/types/staking.js +4 -4
- package/lib/provider/amino/types/subaccount.js +3 -3
- package/lib/provider/amino/utils.js +11 -11
- package/lib/provider/ledger/ledger.js +2 -2
- package/lib/provider/metamask/MetaMask.js +1 -1
- package/lib/provider/o3/O3Wallet.js +2 -2
- package/lib/util/address.js +13 -13
- package/lib/util/api.js +4 -4
- package/lib/util/fetch.js +1 -1
- package/lib/util/generic.js +3 -3
- package/lib/util/number.js +5 -5
- package/lib/wallet/CarbonSigner.js +2 -2
- package/lib/wallet/CarbonSigningClient.js +8 -8
- package/lib/wallet/CarbonWallet.js +6 -6
- package/lib/websocket/connector.js +3 -3
- package/lib/websocket/models.d.ts +7 -2
- package/package.json +1 -1
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.QueryClientImpl = exports.
|
|
6
|
+
exports.QueryClientImpl = exports.QueryAllPoolRouteAddressResponse_AddressesEntry = exports.QueryAllPoolRouteAddressResponse = exports.QueryAllPoolRouteAddressRequest = exports.QueryAllPoolRouteResponse = exports.QueryAllPoolRouteRequest = exports.QueryParamsResponse = exports.QueryParamsRequest = exports.QueryClaimableRewardsResponse = exports.QueryClaimableRewardsRequest = exports.QueryAllTotalCommitmentResponse = exports.QueryAllTotalCommitmentRequest = exports.QueryTotalCommitmentResponse = exports.QueryTotalCommitmentRequest = exports.QueryRewardCurveResponse = exports.QueryRewardCurveRequest = exports.QueryCommitmentCurveResponse = exports.QueryCommitmentCurveRequest = exports.QueryLastClaimResponse = exports.QueryLastClaimRequest = exports.QueryAllCommitmentResponse = exports.QueryAllCommitmentRequest = exports.QueryCommitmentResponse = exports.QueryCommitmentRequest = exports.QueryRewardHistoryResponse = exports.ExtendedPool = exports.QueryRewardHistoryRequest = exports.QueryAllPoolAddressResponse_AddressesEntry = exports.QueryAllPoolAddressResponse = exports.QueryAllPoolAddressRequest = exports.QueryAllPoolResponse = exports.QueryAllPoolRequest = exports.QueryGetPoolResponse = exports.QueryGetPoolRequest = exports.protobufPackage = void 0;
|
|
7
7
|
/* eslint-disable */
|
|
8
8
|
const long_1 = __importDefault(require("long"));
|
|
9
9
|
const minimal_1 = __importDefault(require("protobufjs/minimal"));
|
|
@@ -226,6 +226,192 @@ exports.QueryAllPoolResponse = {
|
|
|
226
226
|
return message;
|
|
227
227
|
},
|
|
228
228
|
};
|
|
229
|
+
const baseQueryAllPoolAddressRequest = {};
|
|
230
|
+
exports.QueryAllPoolAddressRequest = {
|
|
231
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
232
|
+
if (message.pagination !== undefined) {
|
|
233
|
+
pagination_1.PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim();
|
|
234
|
+
}
|
|
235
|
+
return writer;
|
|
236
|
+
},
|
|
237
|
+
decode(input, length) {
|
|
238
|
+
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
239
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
240
|
+
const message = Object.assign({}, baseQueryAllPoolAddressRequest);
|
|
241
|
+
while (reader.pos < end) {
|
|
242
|
+
const tag = reader.uint32();
|
|
243
|
+
switch (tag >>> 3) {
|
|
244
|
+
case 1:
|
|
245
|
+
message.pagination = pagination_1.PageRequest.decode(reader, reader.uint32());
|
|
246
|
+
break;
|
|
247
|
+
default:
|
|
248
|
+
reader.skipType(tag & 7);
|
|
249
|
+
break;
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
return message;
|
|
253
|
+
},
|
|
254
|
+
fromJSON(object) {
|
|
255
|
+
const message = Object.assign({}, baseQueryAllPoolAddressRequest);
|
|
256
|
+
message.pagination =
|
|
257
|
+
object.pagination !== undefined && object.pagination !== null
|
|
258
|
+
? pagination_1.PageRequest.fromJSON(object.pagination)
|
|
259
|
+
: undefined;
|
|
260
|
+
return message;
|
|
261
|
+
},
|
|
262
|
+
toJSON(message) {
|
|
263
|
+
const obj = {};
|
|
264
|
+
message.pagination !== undefined &&
|
|
265
|
+
(obj.pagination = message.pagination
|
|
266
|
+
? pagination_1.PageRequest.toJSON(message.pagination)
|
|
267
|
+
: undefined);
|
|
268
|
+
return obj;
|
|
269
|
+
},
|
|
270
|
+
fromPartial(object) {
|
|
271
|
+
const message = Object.assign({}, baseQueryAllPoolAddressRequest);
|
|
272
|
+
message.pagination =
|
|
273
|
+
object.pagination !== undefined && object.pagination !== null
|
|
274
|
+
? pagination_1.PageRequest.fromPartial(object.pagination)
|
|
275
|
+
: undefined;
|
|
276
|
+
return message;
|
|
277
|
+
},
|
|
278
|
+
};
|
|
279
|
+
const baseQueryAllPoolAddressResponse = {};
|
|
280
|
+
exports.QueryAllPoolAddressResponse = {
|
|
281
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
282
|
+
Object.entries(message.addresses).forEach(([key, value]) => {
|
|
283
|
+
exports.QueryAllPoolAddressResponse_AddressesEntry.encode({ key: key, value }, writer.uint32(10).fork()).ldelim();
|
|
284
|
+
});
|
|
285
|
+
if (message.pagination !== undefined) {
|
|
286
|
+
pagination_1.PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim();
|
|
287
|
+
}
|
|
288
|
+
return writer;
|
|
289
|
+
},
|
|
290
|
+
decode(input, length) {
|
|
291
|
+
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
292
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
293
|
+
const message = Object.assign({}, baseQueryAllPoolAddressResponse);
|
|
294
|
+
message.addresses = {};
|
|
295
|
+
while (reader.pos < end) {
|
|
296
|
+
const tag = reader.uint32();
|
|
297
|
+
switch (tag >>> 3) {
|
|
298
|
+
case 1:
|
|
299
|
+
const entry1 = exports.QueryAllPoolAddressResponse_AddressesEntry.decode(reader, reader.uint32());
|
|
300
|
+
if (entry1.value !== undefined) {
|
|
301
|
+
message.addresses[entry1.key] = entry1.value;
|
|
302
|
+
}
|
|
303
|
+
break;
|
|
304
|
+
case 2:
|
|
305
|
+
message.pagination = pagination_1.PageResponse.decode(reader, reader.uint32());
|
|
306
|
+
break;
|
|
307
|
+
default:
|
|
308
|
+
reader.skipType(tag & 7);
|
|
309
|
+
break;
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
return message;
|
|
313
|
+
},
|
|
314
|
+
fromJSON(object) {
|
|
315
|
+
var _a;
|
|
316
|
+
const message = Object.assign({}, baseQueryAllPoolAddressResponse);
|
|
317
|
+
message.addresses = Object.entries((_a = object.addresses) !== null && _a !== void 0 ? _a : {}).reduce((acc, [key, value]) => {
|
|
318
|
+
acc[key] = String(value);
|
|
319
|
+
return acc;
|
|
320
|
+
}, {});
|
|
321
|
+
message.pagination =
|
|
322
|
+
object.pagination !== undefined && object.pagination !== null
|
|
323
|
+
? pagination_1.PageResponse.fromJSON(object.pagination)
|
|
324
|
+
: undefined;
|
|
325
|
+
return message;
|
|
326
|
+
},
|
|
327
|
+
toJSON(message) {
|
|
328
|
+
const obj = {};
|
|
329
|
+
obj.addresses = {};
|
|
330
|
+
if (message.addresses) {
|
|
331
|
+
Object.entries(message.addresses).forEach(([k, v]) => {
|
|
332
|
+
obj.addresses[k] = v;
|
|
333
|
+
});
|
|
334
|
+
}
|
|
335
|
+
message.pagination !== undefined &&
|
|
336
|
+
(obj.pagination = message.pagination
|
|
337
|
+
? pagination_1.PageResponse.toJSON(message.pagination)
|
|
338
|
+
: undefined);
|
|
339
|
+
return obj;
|
|
340
|
+
},
|
|
341
|
+
fromPartial(object) {
|
|
342
|
+
var _a;
|
|
343
|
+
const message = Object.assign({}, baseQueryAllPoolAddressResponse);
|
|
344
|
+
message.addresses = Object.entries((_a = object.addresses) !== null && _a !== void 0 ? _a : {}).reduce((acc, [key, value]) => {
|
|
345
|
+
if (value !== undefined) {
|
|
346
|
+
acc[key] = String(value);
|
|
347
|
+
}
|
|
348
|
+
return acc;
|
|
349
|
+
}, {});
|
|
350
|
+
message.pagination =
|
|
351
|
+
object.pagination !== undefined && object.pagination !== null
|
|
352
|
+
? pagination_1.PageResponse.fromPartial(object.pagination)
|
|
353
|
+
: undefined;
|
|
354
|
+
return message;
|
|
355
|
+
},
|
|
356
|
+
};
|
|
357
|
+
const baseQueryAllPoolAddressResponse_AddressesEntry = {
|
|
358
|
+
key: "",
|
|
359
|
+
value: "",
|
|
360
|
+
};
|
|
361
|
+
exports.QueryAllPoolAddressResponse_AddressesEntry = {
|
|
362
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
363
|
+
if (message.key !== "") {
|
|
364
|
+
writer.uint32(10).string(message.key);
|
|
365
|
+
}
|
|
366
|
+
if (message.value !== "") {
|
|
367
|
+
writer.uint32(18).string(message.value);
|
|
368
|
+
}
|
|
369
|
+
return writer;
|
|
370
|
+
},
|
|
371
|
+
decode(input, length) {
|
|
372
|
+
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
373
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
374
|
+
const message = Object.assign({}, baseQueryAllPoolAddressResponse_AddressesEntry);
|
|
375
|
+
while (reader.pos < end) {
|
|
376
|
+
const tag = reader.uint32();
|
|
377
|
+
switch (tag >>> 3) {
|
|
378
|
+
case 1:
|
|
379
|
+
message.key = reader.string();
|
|
380
|
+
break;
|
|
381
|
+
case 2:
|
|
382
|
+
message.value = reader.string();
|
|
383
|
+
break;
|
|
384
|
+
default:
|
|
385
|
+
reader.skipType(tag & 7);
|
|
386
|
+
break;
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
return message;
|
|
390
|
+
},
|
|
391
|
+
fromJSON(object) {
|
|
392
|
+
const message = Object.assign({}, baseQueryAllPoolAddressResponse_AddressesEntry);
|
|
393
|
+
message.key =
|
|
394
|
+
object.key !== undefined && object.key !== null ? String(object.key) : "";
|
|
395
|
+
message.value =
|
|
396
|
+
object.value !== undefined && object.value !== null
|
|
397
|
+
? String(object.value)
|
|
398
|
+
: "";
|
|
399
|
+
return message;
|
|
400
|
+
},
|
|
401
|
+
toJSON(message) {
|
|
402
|
+
const obj = {};
|
|
403
|
+
message.key !== undefined && (obj.key = message.key);
|
|
404
|
+
message.value !== undefined && (obj.value = message.value);
|
|
405
|
+
return obj;
|
|
406
|
+
},
|
|
407
|
+
fromPartial(object) {
|
|
408
|
+
var _a, _b;
|
|
409
|
+
const message = Object.assign({}, baseQueryAllPoolAddressResponse_AddressesEntry);
|
|
410
|
+
message.key = (_a = object.key) !== null && _a !== void 0 ? _a : "";
|
|
411
|
+
message.value = (_b = object.value) !== null && _b !== void 0 ? _b : "";
|
|
412
|
+
return message;
|
|
413
|
+
},
|
|
414
|
+
};
|
|
229
415
|
const baseQueryRewardHistoryRequest = {
|
|
230
416
|
poolId: "",
|
|
231
417
|
startBlockHeight: "",
|
|
@@ -1370,8 +1556,8 @@ exports.QueryParamsResponse = {
|
|
|
1370
1556
|
return message;
|
|
1371
1557
|
},
|
|
1372
1558
|
};
|
|
1373
|
-
const
|
|
1374
|
-
exports.
|
|
1559
|
+
const baseQueryAllPoolRouteRequest = {};
|
|
1560
|
+
exports.QueryAllPoolRouteRequest = {
|
|
1375
1561
|
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
1376
1562
|
if (message.pagination !== undefined) {
|
|
1377
1563
|
pagination_1.PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim();
|
|
@@ -1381,7 +1567,7 @@ exports.QueryAllPoolAddressRequest = {
|
|
|
1381
1567
|
decode(input, length) {
|
|
1382
1568
|
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
1383
1569
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1384
|
-
const message = Object.assign({},
|
|
1570
|
+
const message = Object.assign({}, baseQueryAllPoolRouteRequest);
|
|
1385
1571
|
while (reader.pos < end) {
|
|
1386
1572
|
const tag = reader.uint32();
|
|
1387
1573
|
switch (tag >>> 3) {
|
|
@@ -1396,7 +1582,7 @@ exports.QueryAllPoolAddressRequest = {
|
|
|
1396
1582
|
return message;
|
|
1397
1583
|
},
|
|
1398
1584
|
fromJSON(object) {
|
|
1399
|
-
const message = Object.assign({},
|
|
1585
|
+
const message = Object.assign({}, baseQueryAllPoolRouteRequest);
|
|
1400
1586
|
message.pagination =
|
|
1401
1587
|
object.pagination !== undefined && object.pagination !== null
|
|
1402
1588
|
? pagination_1.PageRequest.fromJSON(object.pagination)
|
|
@@ -1412,7 +1598,7 @@ exports.QueryAllPoolAddressRequest = {
|
|
|
1412
1598
|
return obj;
|
|
1413
1599
|
},
|
|
1414
1600
|
fromPartial(object) {
|
|
1415
|
-
const message = Object.assign({},
|
|
1601
|
+
const message = Object.assign({}, baseQueryAllPoolRouteRequest);
|
|
1416
1602
|
message.pagination =
|
|
1417
1603
|
object.pagination !== undefined && object.pagination !== null
|
|
1418
1604
|
? pagination_1.PageRequest.fromPartial(object.pagination)
|
|
@@ -1420,12 +1606,12 @@ exports.QueryAllPoolAddressRequest = {
|
|
|
1420
1606
|
return message;
|
|
1421
1607
|
},
|
|
1422
1608
|
};
|
|
1423
|
-
const
|
|
1424
|
-
exports.
|
|
1609
|
+
const baseQueryAllPoolRouteResponse = {};
|
|
1610
|
+
exports.QueryAllPoolRouteResponse = {
|
|
1425
1611
|
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
}
|
|
1612
|
+
for (const v of message.poolRoutes) {
|
|
1613
|
+
liquiditypool_1.PoolRoute.encode(v, writer.uint32(10).fork()).ldelim();
|
|
1614
|
+
}
|
|
1429
1615
|
if (message.pagination !== undefined) {
|
|
1430
1616
|
pagination_1.PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim();
|
|
1431
1617
|
}
|
|
@@ -1434,16 +1620,13 @@ exports.QueryAllPoolAddressResponse = {
|
|
|
1434
1620
|
decode(input, length) {
|
|
1435
1621
|
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
1436
1622
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1437
|
-
const message = Object.assign({},
|
|
1438
|
-
message.
|
|
1623
|
+
const message = Object.assign({}, baseQueryAllPoolRouteResponse);
|
|
1624
|
+
message.poolRoutes = [];
|
|
1439
1625
|
while (reader.pos < end) {
|
|
1440
1626
|
const tag = reader.uint32();
|
|
1441
1627
|
switch (tag >>> 3) {
|
|
1442
1628
|
case 1:
|
|
1443
|
-
|
|
1444
|
-
if (entry1.value !== undefined) {
|
|
1445
|
-
message.addresses[entry1.key] = entry1.value;
|
|
1446
|
-
}
|
|
1629
|
+
message.poolRoutes.push(liquiditypool_1.PoolRoute.decode(reader, reader.uint32()));
|
|
1447
1630
|
break;
|
|
1448
1631
|
case 2:
|
|
1449
1632
|
message.pagination = pagination_1.PageResponse.decode(reader, reader.uint32());
|
|
@@ -1457,11 +1640,8 @@ exports.QueryAllPoolAddressResponse = {
|
|
|
1457
1640
|
},
|
|
1458
1641
|
fromJSON(object) {
|
|
1459
1642
|
var _a;
|
|
1460
|
-
const message = Object.assign({},
|
|
1461
|
-
message.
|
|
1462
|
-
acc[key] = String(value);
|
|
1463
|
-
return acc;
|
|
1464
|
-
}, {});
|
|
1643
|
+
const message = Object.assign({}, baseQueryAllPoolRouteResponse);
|
|
1644
|
+
message.poolRoutes = ((_a = object.poolRoutes) !== null && _a !== void 0 ? _a : []).map((e) => liquiditypool_1.PoolRoute.fromJSON(e));
|
|
1465
1645
|
message.pagination =
|
|
1466
1646
|
object.pagination !== undefined && object.pagination !== null
|
|
1467
1647
|
? pagination_1.PageResponse.fromJSON(object.pagination)
|
|
@@ -1470,11 +1650,11 @@ exports.QueryAllPoolAddressResponse = {
|
|
|
1470
1650
|
},
|
|
1471
1651
|
toJSON(message) {
|
|
1472
1652
|
const obj = {};
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1653
|
+
if (message.poolRoutes) {
|
|
1654
|
+
obj.poolRoutes = message.poolRoutes.map((e) => e ? liquiditypool_1.PoolRoute.toJSON(e) : undefined);
|
|
1655
|
+
}
|
|
1656
|
+
else {
|
|
1657
|
+
obj.poolRoutes = [];
|
|
1478
1658
|
}
|
|
1479
1659
|
message.pagination !== undefined &&
|
|
1480
1660
|
(obj.pagination = message.pagination
|
|
@@ -1484,13 +1664,8 @@ exports.QueryAllPoolAddressResponse = {
|
|
|
1484
1664
|
},
|
|
1485
1665
|
fromPartial(object) {
|
|
1486
1666
|
var _a;
|
|
1487
|
-
const message = Object.assign({},
|
|
1488
|
-
message.
|
|
1489
|
-
if (value !== undefined) {
|
|
1490
|
-
acc[key] = String(value);
|
|
1491
|
-
}
|
|
1492
|
-
return acc;
|
|
1493
|
-
}, {});
|
|
1667
|
+
const message = Object.assign({}, baseQueryAllPoolRouteResponse);
|
|
1668
|
+
message.poolRoutes = ((_a = object.poolRoutes) !== null && _a !== void 0 ? _a : []).map((e) => liquiditypool_1.PoolRoute.fromPartial(e));
|
|
1494
1669
|
message.pagination =
|
|
1495
1670
|
object.pagination !== undefined && object.pagination !== null
|
|
1496
1671
|
? pagination_1.PageResponse.fromPartial(object.pagination)
|
|
@@ -1498,32 +1673,23 @@ exports.QueryAllPoolAddressResponse = {
|
|
|
1498
1673
|
return message;
|
|
1499
1674
|
},
|
|
1500
1675
|
};
|
|
1501
|
-
const
|
|
1502
|
-
|
|
1503
|
-
value: "",
|
|
1504
|
-
};
|
|
1505
|
-
exports.QueryAllPoolAddressResponse_AddressesEntry = {
|
|
1676
|
+
const baseQueryAllPoolRouteAddressRequest = {};
|
|
1677
|
+
exports.QueryAllPoolRouteAddressRequest = {
|
|
1506
1678
|
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
1507
|
-
if (message.
|
|
1508
|
-
writer.uint32(10).
|
|
1509
|
-
}
|
|
1510
|
-
if (message.value !== "") {
|
|
1511
|
-
writer.uint32(18).string(message.value);
|
|
1679
|
+
if (message.pagination !== undefined) {
|
|
1680
|
+
pagination_1.PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim();
|
|
1512
1681
|
}
|
|
1513
1682
|
return writer;
|
|
1514
1683
|
},
|
|
1515
1684
|
decode(input, length) {
|
|
1516
1685
|
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
1517
1686
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1518
|
-
const message = Object.assign({},
|
|
1687
|
+
const message = Object.assign({}, baseQueryAllPoolRouteAddressRequest);
|
|
1519
1688
|
while (reader.pos < end) {
|
|
1520
1689
|
const tag = reader.uint32();
|
|
1521
1690
|
switch (tag >>> 3) {
|
|
1522
1691
|
case 1:
|
|
1523
|
-
message.
|
|
1524
|
-
break;
|
|
1525
|
-
case 2:
|
|
1526
|
-
message.value = reader.string();
|
|
1692
|
+
message.pagination = pagination_1.PageRequest.decode(reader, reader.uint32());
|
|
1527
1693
|
break;
|
|
1528
1694
|
default:
|
|
1529
1695
|
reader.skipType(tag & 7);
|
|
@@ -1533,46 +1699,57 @@ exports.QueryAllPoolAddressResponse_AddressesEntry = {
|
|
|
1533
1699
|
return message;
|
|
1534
1700
|
},
|
|
1535
1701
|
fromJSON(object) {
|
|
1536
|
-
const message = Object.assign({},
|
|
1537
|
-
message.
|
|
1538
|
-
object.
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
? String(object.value)
|
|
1542
|
-
: "";
|
|
1702
|
+
const message = Object.assign({}, baseQueryAllPoolRouteAddressRequest);
|
|
1703
|
+
message.pagination =
|
|
1704
|
+
object.pagination !== undefined && object.pagination !== null
|
|
1705
|
+
? pagination_1.PageRequest.fromJSON(object.pagination)
|
|
1706
|
+
: undefined;
|
|
1543
1707
|
return message;
|
|
1544
1708
|
},
|
|
1545
1709
|
toJSON(message) {
|
|
1546
1710
|
const obj = {};
|
|
1547
|
-
message.
|
|
1548
|
-
|
|
1711
|
+
message.pagination !== undefined &&
|
|
1712
|
+
(obj.pagination = message.pagination
|
|
1713
|
+
? pagination_1.PageRequest.toJSON(message.pagination)
|
|
1714
|
+
: undefined);
|
|
1549
1715
|
return obj;
|
|
1550
1716
|
},
|
|
1551
1717
|
fromPartial(object) {
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1718
|
+
const message = Object.assign({}, baseQueryAllPoolRouteAddressRequest);
|
|
1719
|
+
message.pagination =
|
|
1720
|
+
object.pagination !== undefined && object.pagination !== null
|
|
1721
|
+
? pagination_1.PageRequest.fromPartial(object.pagination)
|
|
1722
|
+
: undefined;
|
|
1556
1723
|
return message;
|
|
1557
1724
|
},
|
|
1558
1725
|
};
|
|
1559
|
-
const
|
|
1560
|
-
exports.
|
|
1726
|
+
const baseQueryAllPoolRouteAddressResponse = {};
|
|
1727
|
+
exports.QueryAllPoolRouteAddressResponse = {
|
|
1561
1728
|
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
1729
|
+
Object.entries(message.addresses).forEach(([key, value]) => {
|
|
1730
|
+
exports.QueryAllPoolRouteAddressResponse_AddressesEntry.encode({ key: key, value }, writer.uint32(10).fork()).ldelim();
|
|
1731
|
+
});
|
|
1562
1732
|
if (message.pagination !== undefined) {
|
|
1563
|
-
pagination_1.
|
|
1733
|
+
pagination_1.PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim();
|
|
1564
1734
|
}
|
|
1565
1735
|
return writer;
|
|
1566
1736
|
},
|
|
1567
1737
|
decode(input, length) {
|
|
1568
1738
|
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
1569
1739
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1570
|
-
const message = Object.assign({},
|
|
1740
|
+
const message = Object.assign({}, baseQueryAllPoolRouteAddressResponse);
|
|
1741
|
+
message.addresses = {};
|
|
1571
1742
|
while (reader.pos < end) {
|
|
1572
1743
|
const tag = reader.uint32();
|
|
1573
1744
|
switch (tag >>> 3) {
|
|
1574
1745
|
case 1:
|
|
1575
|
-
|
|
1746
|
+
const entry1 = exports.QueryAllPoolRouteAddressResponse_AddressesEntry.decode(reader, reader.uint32());
|
|
1747
|
+
if (entry1.value !== undefined) {
|
|
1748
|
+
message.addresses[entry1.key] = entry1.value;
|
|
1749
|
+
}
|
|
1750
|
+
break;
|
|
1751
|
+
case 2:
|
|
1752
|
+
message.pagination = pagination_1.PageResponse.decode(reader, reader.uint32());
|
|
1576
1753
|
break;
|
|
1577
1754
|
default:
|
|
1578
1755
|
reader.skipType(tag & 7);
|
|
@@ -1582,54 +1759,74 @@ exports.QueryAllPoolRouteRequest = {
|
|
|
1582
1759
|
return message;
|
|
1583
1760
|
},
|
|
1584
1761
|
fromJSON(object) {
|
|
1585
|
-
|
|
1762
|
+
var _a;
|
|
1763
|
+
const message = Object.assign({}, baseQueryAllPoolRouteAddressResponse);
|
|
1764
|
+
message.addresses = Object.entries((_a = object.addresses) !== null && _a !== void 0 ? _a : {}).reduce((acc, [key, value]) => {
|
|
1765
|
+
acc[key] = String(value);
|
|
1766
|
+
return acc;
|
|
1767
|
+
}, {});
|
|
1586
1768
|
message.pagination =
|
|
1587
1769
|
object.pagination !== undefined && object.pagination !== null
|
|
1588
|
-
? pagination_1.
|
|
1770
|
+
? pagination_1.PageResponse.fromJSON(object.pagination)
|
|
1589
1771
|
: undefined;
|
|
1590
1772
|
return message;
|
|
1591
1773
|
},
|
|
1592
1774
|
toJSON(message) {
|
|
1593
1775
|
const obj = {};
|
|
1776
|
+
obj.addresses = {};
|
|
1777
|
+
if (message.addresses) {
|
|
1778
|
+
Object.entries(message.addresses).forEach(([k, v]) => {
|
|
1779
|
+
obj.addresses[k] = v;
|
|
1780
|
+
});
|
|
1781
|
+
}
|
|
1594
1782
|
message.pagination !== undefined &&
|
|
1595
1783
|
(obj.pagination = message.pagination
|
|
1596
|
-
? pagination_1.
|
|
1784
|
+
? pagination_1.PageResponse.toJSON(message.pagination)
|
|
1597
1785
|
: undefined);
|
|
1598
1786
|
return obj;
|
|
1599
1787
|
},
|
|
1600
1788
|
fromPartial(object) {
|
|
1601
|
-
|
|
1789
|
+
var _a;
|
|
1790
|
+
const message = Object.assign({}, baseQueryAllPoolRouteAddressResponse);
|
|
1791
|
+
message.addresses = Object.entries((_a = object.addresses) !== null && _a !== void 0 ? _a : {}).reduce((acc, [key, value]) => {
|
|
1792
|
+
if (value !== undefined) {
|
|
1793
|
+
acc[key] = String(value);
|
|
1794
|
+
}
|
|
1795
|
+
return acc;
|
|
1796
|
+
}, {});
|
|
1602
1797
|
message.pagination =
|
|
1603
1798
|
object.pagination !== undefined && object.pagination !== null
|
|
1604
|
-
? pagination_1.
|
|
1799
|
+
? pagination_1.PageResponse.fromPartial(object.pagination)
|
|
1605
1800
|
: undefined;
|
|
1606
1801
|
return message;
|
|
1607
1802
|
},
|
|
1608
1803
|
};
|
|
1609
|
-
const
|
|
1610
|
-
|
|
1804
|
+
const baseQueryAllPoolRouteAddressResponse_AddressesEntry = {
|
|
1805
|
+
key: "",
|
|
1806
|
+
value: "",
|
|
1807
|
+
};
|
|
1808
|
+
exports.QueryAllPoolRouteAddressResponse_AddressesEntry = {
|
|
1611
1809
|
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
1612
|
-
|
|
1613
|
-
|
|
1810
|
+
if (message.key !== "") {
|
|
1811
|
+
writer.uint32(10).string(message.key);
|
|
1614
1812
|
}
|
|
1615
|
-
if (message.
|
|
1616
|
-
|
|
1813
|
+
if (message.value !== "") {
|
|
1814
|
+
writer.uint32(18).string(message.value);
|
|
1617
1815
|
}
|
|
1618
1816
|
return writer;
|
|
1619
1817
|
},
|
|
1620
1818
|
decode(input, length) {
|
|
1621
1819
|
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
1622
1820
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1623
|
-
const message = Object.assign({},
|
|
1624
|
-
message.poolRoutes = [];
|
|
1821
|
+
const message = Object.assign({}, baseQueryAllPoolRouteAddressResponse_AddressesEntry);
|
|
1625
1822
|
while (reader.pos < end) {
|
|
1626
1823
|
const tag = reader.uint32();
|
|
1627
1824
|
switch (tag >>> 3) {
|
|
1628
1825
|
case 1:
|
|
1629
|
-
message.
|
|
1826
|
+
message.key = reader.string();
|
|
1630
1827
|
break;
|
|
1631
1828
|
case 2:
|
|
1632
|
-
message.
|
|
1829
|
+
message.value = reader.string();
|
|
1633
1830
|
break;
|
|
1634
1831
|
default:
|
|
1635
1832
|
reader.skipType(tag & 7);
|
|
@@ -1639,43 +1836,33 @@ exports.QueryAllPoolRouteResponse = {
|
|
|
1639
1836
|
return message;
|
|
1640
1837
|
},
|
|
1641
1838
|
fromJSON(object) {
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
message.
|
|
1646
|
-
object.
|
|
1647
|
-
?
|
|
1648
|
-
:
|
|
1839
|
+
const message = Object.assign({}, baseQueryAllPoolRouteAddressResponse_AddressesEntry);
|
|
1840
|
+
message.key =
|
|
1841
|
+
object.key !== undefined && object.key !== null ? String(object.key) : "";
|
|
1842
|
+
message.value =
|
|
1843
|
+
object.value !== undefined && object.value !== null
|
|
1844
|
+
? String(object.value)
|
|
1845
|
+
: "";
|
|
1649
1846
|
return message;
|
|
1650
1847
|
},
|
|
1651
1848
|
toJSON(message) {
|
|
1652
1849
|
const obj = {};
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
}
|
|
1656
|
-
else {
|
|
1657
|
-
obj.poolRoutes = [];
|
|
1658
|
-
}
|
|
1659
|
-
message.pagination !== undefined &&
|
|
1660
|
-
(obj.pagination = message.pagination
|
|
1661
|
-
? pagination_1.PageResponse.toJSON(message.pagination)
|
|
1662
|
-
: undefined);
|
|
1850
|
+
message.key !== undefined && (obj.key = message.key);
|
|
1851
|
+
message.value !== undefined && (obj.value = message.value);
|
|
1663
1852
|
return obj;
|
|
1664
1853
|
},
|
|
1665
1854
|
fromPartial(object) {
|
|
1666
|
-
var _a;
|
|
1667
|
-
const message = Object.assign({},
|
|
1668
|
-
message.
|
|
1669
|
-
message.
|
|
1670
|
-
object.pagination !== undefined && object.pagination !== null
|
|
1671
|
-
? pagination_1.PageResponse.fromPartial(object.pagination)
|
|
1672
|
-
: undefined;
|
|
1855
|
+
var _a, _b;
|
|
1856
|
+
const message = Object.assign({}, baseQueryAllPoolRouteAddressResponse_AddressesEntry);
|
|
1857
|
+
message.key = (_a = object.key) !== null && _a !== void 0 ? _a : "";
|
|
1858
|
+
message.value = (_b = object.value) !== null && _b !== void 0 ? _b : "";
|
|
1673
1859
|
return message;
|
|
1674
1860
|
},
|
|
1675
1861
|
};
|
|
1676
1862
|
class QueryClientImpl {
|
|
1677
1863
|
constructor(rpc) {
|
|
1678
1864
|
this.rpc = rpc;
|
|
1865
|
+
this.PoolAddressAll = this.PoolAddressAll.bind(this);
|
|
1679
1866
|
this.Pool = this.Pool.bind(this);
|
|
1680
1867
|
this.PoolAll = this.PoolAll.bind(this);
|
|
1681
1868
|
this.RewardHistory = this.RewardHistory.bind(this);
|
|
@@ -1688,8 +1875,13 @@ class QueryClientImpl {
|
|
|
1688
1875
|
this.TotalCommitmentAll = this.TotalCommitmentAll.bind(this);
|
|
1689
1876
|
this.ClaimableRewards = this.ClaimableRewards.bind(this);
|
|
1690
1877
|
this.Params = this.Params.bind(this);
|
|
1691
|
-
this.PoolAddressAll = this.PoolAddressAll.bind(this);
|
|
1692
1878
|
this.PoolRouteAll = this.PoolRouteAll.bind(this);
|
|
1879
|
+
this.PoolRouteAddressAll = this.PoolRouteAddressAll.bind(this);
|
|
1880
|
+
}
|
|
1881
|
+
PoolAddressAll(request) {
|
|
1882
|
+
const data = exports.QueryAllPoolAddressRequest.encode(request).finish();
|
|
1883
|
+
const promise = this.rpc.request("Switcheo.carbon.liquiditypool.Query", "PoolAddressAll", data);
|
|
1884
|
+
return promise.then((data) => exports.QueryAllPoolAddressResponse.decode(new minimal_1.default.Reader(data)));
|
|
1693
1885
|
}
|
|
1694
1886
|
Pool(request) {
|
|
1695
1887
|
const data = exports.QueryGetPoolRequest.encode(request).finish();
|
|
@@ -1751,16 +1943,16 @@ class QueryClientImpl {
|
|
|
1751
1943
|
const promise = this.rpc.request("Switcheo.carbon.liquiditypool.Query", "Params", data);
|
|
1752
1944
|
return promise.then((data) => exports.QueryParamsResponse.decode(new minimal_1.default.Reader(data)));
|
|
1753
1945
|
}
|
|
1754
|
-
PoolAddressAll(request) {
|
|
1755
|
-
const data = exports.QueryAllPoolAddressRequest.encode(request).finish();
|
|
1756
|
-
const promise = this.rpc.request("Switcheo.carbon.liquiditypool.Query", "PoolAddressAll", data);
|
|
1757
|
-
return promise.then((data) => exports.QueryAllPoolAddressResponse.decode(new minimal_1.default.Reader(data)));
|
|
1758
|
-
}
|
|
1759
1946
|
PoolRouteAll(request) {
|
|
1760
1947
|
const data = exports.QueryAllPoolRouteRequest.encode(request).finish();
|
|
1761
1948
|
const promise = this.rpc.request("Switcheo.carbon.liquiditypool.Query", "PoolRouteAll", data);
|
|
1762
1949
|
return promise.then((data) => exports.QueryAllPoolRouteResponse.decode(new minimal_1.default.Reader(data)));
|
|
1763
1950
|
}
|
|
1951
|
+
PoolRouteAddressAll(request) {
|
|
1952
|
+
const data = exports.QueryAllPoolRouteAddressRequest.encode(request).finish();
|
|
1953
|
+
const promise = this.rpc.request("Switcheo.carbon.liquiditypool.Query", "PoolRouteAddressAll", data);
|
|
1954
|
+
return promise.then((data) => exports.QueryAllPoolRouteAddressResponse.decode(new minimal_1.default.Reader(data)));
|
|
1955
|
+
}
|
|
1764
1956
|
}
|
|
1765
1957
|
exports.QueryClientImpl = QueryClientImpl;
|
|
1766
1958
|
function toTimestamp(date) {
|