carbon-js-sdk 0.4.7 → 0.4.8
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 +3 -3
- package/lib/clients/ZILClient.js +17 -17
- package/lib/codec/cdp/event.d.ts +34 -0
- package/lib/codec/cdp/event.js +190 -1
- package/lib/codec/cdp/genesis.d.ts +17 -1
- package/lib/codec/cdp/genesis.js +103 -3
- package/lib/codec/cdp/query.d.ts +71 -0
- package/lib/codec/cdp/query.js +324 -1
- package/lib/codec/cdp/tx.d.ts +83 -1
- package/lib/codec/cdp/tx.js +437 -1
- package/lib/codec/cosmos/gov/v1/query.js +2 -2
- package/lib/codec/cosmos/gov/v1/tx.js +2 -2
- package/lib/codec/cosmos/gov/v1beta1/query.js +2 -2
- package/lib/codec/cosmos/gov/v1beta1/tx.js +2 -2
- package/lib/codec/cosmos/group/v1/events.js +2 -2
- package/lib/codec/cosmos/group/v1/tx.js +4 -4
- package/lib/codec/cosmos/tx/v1beta1/tx.js +4 -4
- package/lib/codec/index.d.ts +14 -5
- package/lib/codec/index.js +50 -12
- package/lib/codec/insurance/event.d.ts +1 -1
- package/lib/codec/market/market.d.ts +10 -0
- package/lib/codec/market/market.js +50 -1
- package/lib/codec/market/tx.d.ts +22 -0
- package/lib/codec/market/tx.js +96 -1
- package/lib/constant/generic.js +1 -1
- package/lib/modules/cdp.d.ts +57 -25
- package/lib/modules/cdp.js +98 -43
- package/lib/modules/cosmwasm.js +1 -1
- package/lib/modules/gov.js +12 -12
- package/lib/modules/liquiditypool.js +1 -1
- package/lib/modules/market.d.ts +5 -0
- package/lib/modules/market.js +13 -0
- 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 +27 -27
- 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 +46 -22
- package/lib/provider/amino/types/coin.js +4 -4
- package/lib/provider/amino/types/gov.js +4 -4
- 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 -7
- package/lib/provider/amino/types/market.js +7 -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/util/tx.d.ts +8 -0
- 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/package.json +1 -1
package/lib/codec/cdp/genesis.js
CHANGED
|
@@ -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.GenesisState_AccountToRewardDebtEntry = exports.GenesisState_AccountToStablecoinInitialCumulativeInterestMultiplierEntry = exports.GenesisState_AccountToPrincipalStablecoinDebtEntry = exports.GenesisState_AccountToInitialCumulativeInterestMultiplierEntry = exports.GenesisState_AccountToPrincipalDebtEntry = exports.GenesisState_AccountToCollateralizedEntry = exports.GenesisState = exports.protobufPackage = void 0;
|
|
6
|
+
exports.GenesisState_AccountToEModeCategoryEntry = exports.GenesisState_AccountToRewardDebtEntry = exports.GenesisState_AccountToStablecoinInitialCumulativeInterestMultiplierEntry = exports.GenesisState_AccountToPrincipalStablecoinDebtEntry = exports.GenesisState_AccountToInitialCumulativeInterestMultiplierEntry = exports.GenesisState_AccountToPrincipalDebtEntry = exports.GenesisState_AccountToCollateralizedEntry = exports.GenesisState = 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"));
|
|
@@ -14,6 +14,7 @@ const rate_strategy_params_1 = require("./rate_strategy_params");
|
|
|
14
14
|
const asset_params_1 = require("./asset_params");
|
|
15
15
|
const debt_info_1 = require("./debt_info");
|
|
16
16
|
const reward_scheme_1 = require("./reward_scheme");
|
|
17
|
+
const e_mode_category_1 = require("./e_mode_category");
|
|
17
18
|
exports.protobufPackage = "Switcheo.carbon.cdp";
|
|
18
19
|
const baseGenesisState = { sequenceNumber: long_1.default.UZERO };
|
|
19
20
|
exports.GenesisState = {
|
|
@@ -60,6 +61,12 @@ exports.GenesisState = {
|
|
|
60
61
|
if (message.stablecoinInterestInfo !== undefined) {
|
|
61
62
|
stablecoin_interest_info_1.StablecoinInterestInfo.encode(message.stablecoinInterestInfo, writer.uint32(114).fork()).ldelim();
|
|
62
63
|
}
|
|
64
|
+
for (const v of message.eModeCategories) {
|
|
65
|
+
e_mode_category_1.EModeCategory.encode(v, writer.uint32(122).fork()).ldelim();
|
|
66
|
+
}
|
|
67
|
+
Object.entries(message.accountToEModeCategory).forEach(([key, value]) => {
|
|
68
|
+
exports.GenesisState_AccountToEModeCategoryEntry.encode({ key: key, value }, writer.uint32(130).fork()).ldelim();
|
|
69
|
+
});
|
|
63
70
|
return writer;
|
|
64
71
|
},
|
|
65
72
|
decode(input, length) {
|
|
@@ -76,6 +83,8 @@ exports.GenesisState = {
|
|
|
76
83
|
message.accountToPrincipalStablecoinDebt = {};
|
|
77
84
|
message.accountToStablecoinInitialCumulativeInterestMultiplier = {};
|
|
78
85
|
message.accountToRewardDebt = {};
|
|
86
|
+
message.eModeCategories = [];
|
|
87
|
+
message.accountToEModeCategory = {};
|
|
79
88
|
while (reader.pos < end) {
|
|
80
89
|
const tag = reader.uint32();
|
|
81
90
|
switch (tag >>> 3) {
|
|
@@ -141,6 +150,15 @@ exports.GenesisState = {
|
|
|
141
150
|
case 14:
|
|
142
151
|
message.stablecoinInterestInfo = stablecoin_interest_info_1.StablecoinInterestInfo.decode(reader, reader.uint32());
|
|
143
152
|
break;
|
|
153
|
+
case 15:
|
|
154
|
+
message.eModeCategories.push(e_mode_category_1.EModeCategory.decode(reader, reader.uint32()));
|
|
155
|
+
break;
|
|
156
|
+
case 16:
|
|
157
|
+
const entry16 = exports.GenesisState_AccountToEModeCategoryEntry.decode(reader, reader.uint32());
|
|
158
|
+
if (entry16.value !== undefined) {
|
|
159
|
+
message.accountToEModeCategory[entry16.key] = entry16.value;
|
|
160
|
+
}
|
|
161
|
+
break;
|
|
144
162
|
default:
|
|
145
163
|
reader.skipType(tag & 7);
|
|
146
164
|
break;
|
|
@@ -149,7 +167,7 @@ exports.GenesisState = {
|
|
|
149
167
|
return message;
|
|
150
168
|
},
|
|
151
169
|
fromJSON(object) {
|
|
152
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
170
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
153
171
|
const message = Object.assign({}, baseGenesisState);
|
|
154
172
|
message.params =
|
|
155
173
|
object.params !== undefined && object.params !== null
|
|
@@ -198,6 +216,11 @@ exports.GenesisState = {
|
|
|
198
216
|
object.stablecoinInterestInfo !== null
|
|
199
217
|
? stablecoin_interest_info_1.StablecoinInterestInfo.fromJSON(object.stablecoinInterestInfo)
|
|
200
218
|
: undefined;
|
|
219
|
+
message.eModeCategories = ((_l = object.eModeCategories) !== null && _l !== void 0 ? _l : []).map((e) => e_mode_category_1.EModeCategory.fromJSON(e));
|
|
220
|
+
message.accountToEModeCategory = Object.entries((_m = object.accountToEModeCategory) !== null && _m !== void 0 ? _m : {}).reduce((acc, [key, value]) => {
|
|
221
|
+
acc[key] = String(value);
|
|
222
|
+
return acc;
|
|
223
|
+
}, {});
|
|
201
224
|
return message;
|
|
202
225
|
},
|
|
203
226
|
toJSON(message) {
|
|
@@ -276,10 +299,22 @@ exports.GenesisState = {
|
|
|
276
299
|
(obj.stablecoinInterestInfo = message.stablecoinInterestInfo
|
|
277
300
|
? stablecoin_interest_info_1.StablecoinInterestInfo.toJSON(message.stablecoinInterestInfo)
|
|
278
301
|
: undefined);
|
|
302
|
+
if (message.eModeCategories) {
|
|
303
|
+
obj.eModeCategories = message.eModeCategories.map((e) => e ? e_mode_category_1.EModeCategory.toJSON(e) : undefined);
|
|
304
|
+
}
|
|
305
|
+
else {
|
|
306
|
+
obj.eModeCategories = [];
|
|
307
|
+
}
|
|
308
|
+
obj.accountToEModeCategory = {};
|
|
309
|
+
if (message.accountToEModeCategory) {
|
|
310
|
+
Object.entries(message.accountToEModeCategory).forEach(([k, v]) => {
|
|
311
|
+
obj.accountToEModeCategory[k] = v;
|
|
312
|
+
});
|
|
313
|
+
}
|
|
279
314
|
return obj;
|
|
280
315
|
},
|
|
281
316
|
fromPartial(object) {
|
|
282
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
317
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
283
318
|
const message = Object.assign({}, baseGenesisState);
|
|
284
319
|
message.params =
|
|
285
320
|
object.params !== undefined && object.params !== null
|
|
@@ -340,6 +375,13 @@ exports.GenesisState = {
|
|
|
340
375
|
object.stablecoinInterestInfo !== null
|
|
341
376
|
? stablecoin_interest_info_1.StablecoinInterestInfo.fromPartial(object.stablecoinInterestInfo)
|
|
342
377
|
: undefined;
|
|
378
|
+
message.eModeCategories = ((_l = object.eModeCategories) !== null && _l !== void 0 ? _l : []).map((e) => e_mode_category_1.EModeCategory.fromPartial(e));
|
|
379
|
+
message.accountToEModeCategory = Object.entries((_m = object.accountToEModeCategory) !== null && _m !== void 0 ? _m : {}).reduce((acc, [key, value]) => {
|
|
380
|
+
if (value !== undefined) {
|
|
381
|
+
acc[key] = String(value);
|
|
382
|
+
}
|
|
383
|
+
return acc;
|
|
384
|
+
}, {});
|
|
343
385
|
return message;
|
|
344
386
|
},
|
|
345
387
|
};
|
|
@@ -689,6 +731,64 @@ exports.GenesisState_AccountToRewardDebtEntry = {
|
|
|
689
731
|
return message;
|
|
690
732
|
},
|
|
691
733
|
};
|
|
734
|
+
const baseGenesisState_AccountToEModeCategoryEntry = {
|
|
735
|
+
key: "",
|
|
736
|
+
value: "",
|
|
737
|
+
};
|
|
738
|
+
exports.GenesisState_AccountToEModeCategoryEntry = {
|
|
739
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
740
|
+
if (message.key !== "") {
|
|
741
|
+
writer.uint32(10).string(message.key);
|
|
742
|
+
}
|
|
743
|
+
if (message.value !== "") {
|
|
744
|
+
writer.uint32(18).string(message.value);
|
|
745
|
+
}
|
|
746
|
+
return writer;
|
|
747
|
+
},
|
|
748
|
+
decode(input, length) {
|
|
749
|
+
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
750
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
751
|
+
const message = Object.assign({}, baseGenesisState_AccountToEModeCategoryEntry);
|
|
752
|
+
while (reader.pos < end) {
|
|
753
|
+
const tag = reader.uint32();
|
|
754
|
+
switch (tag >>> 3) {
|
|
755
|
+
case 1:
|
|
756
|
+
message.key = reader.string();
|
|
757
|
+
break;
|
|
758
|
+
case 2:
|
|
759
|
+
message.value = reader.string();
|
|
760
|
+
break;
|
|
761
|
+
default:
|
|
762
|
+
reader.skipType(tag & 7);
|
|
763
|
+
break;
|
|
764
|
+
}
|
|
765
|
+
}
|
|
766
|
+
return message;
|
|
767
|
+
},
|
|
768
|
+
fromJSON(object) {
|
|
769
|
+
const message = Object.assign({}, baseGenesisState_AccountToEModeCategoryEntry);
|
|
770
|
+
message.key =
|
|
771
|
+
object.key !== undefined && object.key !== null ? String(object.key) : "";
|
|
772
|
+
message.value =
|
|
773
|
+
object.value !== undefined && object.value !== null
|
|
774
|
+
? String(object.value)
|
|
775
|
+
: "";
|
|
776
|
+
return message;
|
|
777
|
+
},
|
|
778
|
+
toJSON(message) {
|
|
779
|
+
const obj = {};
|
|
780
|
+
message.key !== undefined && (obj.key = message.key);
|
|
781
|
+
message.value !== undefined && (obj.value = message.value);
|
|
782
|
+
return obj;
|
|
783
|
+
},
|
|
784
|
+
fromPartial(object) {
|
|
785
|
+
var _a, _b;
|
|
786
|
+
const message = Object.assign({}, baseGenesisState_AccountToEModeCategoryEntry);
|
|
787
|
+
message.key = (_a = object.key) !== null && _a !== void 0 ? _a : "";
|
|
788
|
+
message.value = (_b = object.value) !== null && _b !== void 0 ? _b : "";
|
|
789
|
+
return message;
|
|
790
|
+
},
|
|
791
|
+
};
|
|
692
792
|
var globalThis = (() => {
|
|
693
793
|
if (typeof globalThis !== "undefined")
|
|
694
794
|
return globalThis;
|
package/lib/codec/cdp/query.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ import { AssetParams } from "./asset_params";
|
|
|
7
7
|
import { DebtInfo } from "./debt_info";
|
|
8
8
|
import { StablecoinDebtInfo } from "./stablecoin_debt_info";
|
|
9
9
|
import { StablecoinInterestInfo } from "./stablecoin_interest_info";
|
|
10
|
+
import { EModeCategory } from "./e_mode_category";
|
|
10
11
|
import { Coin } from "../cosmos/base/v1beta1/coin";
|
|
11
12
|
import { RewardScheme, RewardDebt } from "./reward_scheme";
|
|
12
13
|
export declare const protobufPackage = "Switcheo.carbon.cdp";
|
|
@@ -161,11 +162,30 @@ export interface QueryRewardDebtsResponse {
|
|
|
161
162
|
}
|
|
162
163
|
export interface QueryRewardDebtsAllRequest {
|
|
163
164
|
}
|
|
165
|
+
export interface QueryEModeAllRequest {
|
|
166
|
+
pagination?: PageRequest;
|
|
167
|
+
}
|
|
168
|
+
export interface QueryEModeAllResponse {
|
|
169
|
+
eModeCategories: EModeCategory[];
|
|
170
|
+
pagination?: PageResponse;
|
|
171
|
+
}
|
|
164
172
|
export interface QueryStablecoinInterestRequest {
|
|
165
173
|
}
|
|
166
174
|
export interface QueryStablecoinInterestResponse {
|
|
167
175
|
stablecoinInterestInfo?: StablecoinInterestInfo;
|
|
168
176
|
}
|
|
177
|
+
export interface QueryEModeRequest {
|
|
178
|
+
name: string;
|
|
179
|
+
}
|
|
180
|
+
export interface QueryEModeResponse {
|
|
181
|
+
eModeCategory?: EModeCategory;
|
|
182
|
+
}
|
|
183
|
+
export interface QueryAccountEModeRequest {
|
|
184
|
+
address: string;
|
|
185
|
+
}
|
|
186
|
+
export interface QueryAccountEModeResponse {
|
|
187
|
+
eModeCategoryName: string;
|
|
188
|
+
}
|
|
169
189
|
export declare const QueryParamsRequest: {
|
|
170
190
|
encode(_: QueryParamsRequest, writer?: _m0.Writer): _m0.Writer;
|
|
171
191
|
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): QueryParamsRequest;
|
|
@@ -439,6 +459,20 @@ export declare const QueryRewardDebtsAllRequest: {
|
|
|
439
459
|
toJSON(_: QueryRewardDebtsAllRequest): unknown;
|
|
440
460
|
fromPartial(_: DeepPartial<QueryRewardDebtsAllRequest>): QueryRewardDebtsAllRequest;
|
|
441
461
|
};
|
|
462
|
+
export declare const QueryEModeAllRequest: {
|
|
463
|
+
encode(message: QueryEModeAllRequest, writer?: _m0.Writer): _m0.Writer;
|
|
464
|
+
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): QueryEModeAllRequest;
|
|
465
|
+
fromJSON(object: any): QueryEModeAllRequest;
|
|
466
|
+
toJSON(message: QueryEModeAllRequest): unknown;
|
|
467
|
+
fromPartial(object: DeepPartial<QueryEModeAllRequest>): QueryEModeAllRequest;
|
|
468
|
+
};
|
|
469
|
+
export declare const QueryEModeAllResponse: {
|
|
470
|
+
encode(message: QueryEModeAllResponse, writer?: _m0.Writer): _m0.Writer;
|
|
471
|
+
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): QueryEModeAllResponse;
|
|
472
|
+
fromJSON(object: any): QueryEModeAllResponse;
|
|
473
|
+
toJSON(message: QueryEModeAllResponse): unknown;
|
|
474
|
+
fromPartial(object: DeepPartial<QueryEModeAllResponse>): QueryEModeAllResponse;
|
|
475
|
+
};
|
|
442
476
|
export declare const QueryStablecoinInterestRequest: {
|
|
443
477
|
encode(_: QueryStablecoinInterestRequest, writer?: _m0.Writer): _m0.Writer;
|
|
444
478
|
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): QueryStablecoinInterestRequest;
|
|
@@ -453,6 +487,34 @@ export declare const QueryStablecoinInterestResponse: {
|
|
|
453
487
|
toJSON(message: QueryStablecoinInterestResponse): unknown;
|
|
454
488
|
fromPartial(object: DeepPartial<QueryStablecoinInterestResponse>): QueryStablecoinInterestResponse;
|
|
455
489
|
};
|
|
490
|
+
export declare const QueryEModeRequest: {
|
|
491
|
+
encode(message: QueryEModeRequest, writer?: _m0.Writer): _m0.Writer;
|
|
492
|
+
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): QueryEModeRequest;
|
|
493
|
+
fromJSON(object: any): QueryEModeRequest;
|
|
494
|
+
toJSON(message: QueryEModeRequest): unknown;
|
|
495
|
+
fromPartial(object: DeepPartial<QueryEModeRequest>): QueryEModeRequest;
|
|
496
|
+
};
|
|
497
|
+
export declare const QueryEModeResponse: {
|
|
498
|
+
encode(message: QueryEModeResponse, writer?: _m0.Writer): _m0.Writer;
|
|
499
|
+
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): QueryEModeResponse;
|
|
500
|
+
fromJSON(object: any): QueryEModeResponse;
|
|
501
|
+
toJSON(message: QueryEModeResponse): unknown;
|
|
502
|
+
fromPartial(object: DeepPartial<QueryEModeResponse>): QueryEModeResponse;
|
|
503
|
+
};
|
|
504
|
+
export declare const QueryAccountEModeRequest: {
|
|
505
|
+
encode(message: QueryAccountEModeRequest, writer?: _m0.Writer): _m0.Writer;
|
|
506
|
+
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): QueryAccountEModeRequest;
|
|
507
|
+
fromJSON(object: any): QueryAccountEModeRequest;
|
|
508
|
+
toJSON(message: QueryAccountEModeRequest): unknown;
|
|
509
|
+
fromPartial(object: DeepPartial<QueryAccountEModeRequest>): QueryAccountEModeRequest;
|
|
510
|
+
};
|
|
511
|
+
export declare const QueryAccountEModeResponse: {
|
|
512
|
+
encode(message: QueryAccountEModeResponse, writer?: _m0.Writer): _m0.Writer;
|
|
513
|
+
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): QueryAccountEModeResponse;
|
|
514
|
+
fromJSON(object: any): QueryAccountEModeResponse;
|
|
515
|
+
toJSON(message: QueryAccountEModeResponse): unknown;
|
|
516
|
+
fromPartial(object: DeepPartial<QueryAccountEModeResponse>): QueryAccountEModeResponse;
|
|
517
|
+
};
|
|
456
518
|
/** Query defines the gRPC querier service. */
|
|
457
519
|
export interface Query {
|
|
458
520
|
/** Parameters queries the parameters of the module. */
|
|
@@ -491,6 +553,12 @@ export interface Query {
|
|
|
491
553
|
RewardDebtsAll(request: QueryRewardDebtsAllRequest): Promise<QueryRewardDebtsResponse>;
|
|
492
554
|
/** Queries a list of CDP Positions */
|
|
493
555
|
PositionsAll(request: QueryCdpPositionsRequest): Promise<QueryCdpPositionsResponse>;
|
|
556
|
+
/** Queries a list of EMode items. */
|
|
557
|
+
EMode(request: QueryEModeRequest): Promise<QueryEModeResponse>;
|
|
558
|
+
/** Queries a list of EModeAll items. */
|
|
559
|
+
EModeAll(request: QueryEModeAllRequest): Promise<QueryEModeAllResponse>;
|
|
560
|
+
/** Queries a list of AccountEMode items. */
|
|
561
|
+
AccountEMode(request: QueryAccountEModeRequest): Promise<QueryAccountEModeResponse>;
|
|
494
562
|
/** Queries StablecoinInterest. */
|
|
495
563
|
StablecoinInterest(request: QueryStablecoinInterestRequest): Promise<QueryStablecoinInterestResponse>;
|
|
496
564
|
}
|
|
@@ -515,6 +583,9 @@ export declare class QueryClientImpl implements Query {
|
|
|
515
583
|
RewardDebts(request: QueryRewardDebtsRequest): Promise<QueryRewardDebtsResponse>;
|
|
516
584
|
RewardDebtsAll(request: QueryRewardDebtsAllRequest): Promise<QueryRewardDebtsResponse>;
|
|
517
585
|
PositionsAll(request: QueryCdpPositionsRequest): Promise<QueryCdpPositionsResponse>;
|
|
586
|
+
EMode(request: QueryEModeRequest): Promise<QueryEModeResponse>;
|
|
587
|
+
EModeAll(request: QueryEModeAllRequest): Promise<QueryEModeAllResponse>;
|
|
588
|
+
AccountEMode(request: QueryAccountEModeRequest): Promise<QueryAccountEModeResponse>;
|
|
518
589
|
StablecoinInterest(request: QueryStablecoinInterestRequest): Promise<QueryStablecoinInterestResponse>;
|
|
519
590
|
}
|
|
520
591
|
interface Rpc {
|
package/lib/codec/cdp/query.js
CHANGED
|
@@ -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.QueryStablecoinInterestResponse = exports.QueryStablecoinInterestRequest = exports.QueryRewardDebtsAllRequest = exports.QueryRewardDebtsResponse = exports.QueryRewardDebtsRequest = exports.QueryRewardSchemesAllResponse = exports.QueryRewardSchemesAllRequest = exports.QueryCdpPositionsResponse = exports.QueryCdpPositionsRequest = exports.CdpPosition = exports.CdpPositionItem = exports.QueryStablecoinDebtResponse = exports.QueryStablecoinDebtRequest = exports.QueryTokenDebtAllResponse = exports.QueryTokenDebtAllRequest = exports.QueryTokenDebtResponse = exports.QueryTokenDebtRequest = exports.QueryAssetAllResponse = exports.QueryAssetAllRequest = exports.QueryAssetResponse = exports.QueryAssetRequest = exports.QueryAccountStablecoinResponse = exports.QueryAccountStablecoinRequest = exports.Debt = exports.QueryAccountDebtAllResponse = exports.QueryAccountDebtAllRequest = exports.QueryAccountDebtResponse = exports.QueryAccountDebtRequest = exports.Collateral = exports.QueryAccountCollateralAllResponse = exports.QueryAccountCollateralAllRequest = exports.QueryAccountCollateralResponse = exports.QueryAccountCollateralRequest = exports.QueryAccountDataResponse = exports.QueryAccountDataRequest = exports.QueryRateStrategyAllResponse = exports.QueryRateStrategyAllRequest = exports.QueryRateStrategyResponse = exports.QueryRateStrategyRequest = exports.QueryParamsResponse = exports.QueryParamsRequest = exports.protobufPackage = void 0;
|
|
6
|
+
exports.QueryClientImpl = exports.QueryAccountEModeResponse = exports.QueryAccountEModeRequest = exports.QueryEModeResponse = exports.QueryEModeRequest = exports.QueryStablecoinInterestResponse = exports.QueryStablecoinInterestRequest = exports.QueryEModeAllResponse = exports.QueryEModeAllRequest = exports.QueryRewardDebtsAllRequest = exports.QueryRewardDebtsResponse = exports.QueryRewardDebtsRequest = exports.QueryRewardSchemesAllResponse = exports.QueryRewardSchemesAllRequest = exports.QueryCdpPositionsResponse = exports.QueryCdpPositionsRequest = exports.CdpPosition = exports.CdpPositionItem = exports.QueryStablecoinDebtResponse = exports.QueryStablecoinDebtRequest = exports.QueryTokenDebtAllResponse = exports.QueryTokenDebtAllRequest = exports.QueryTokenDebtResponse = exports.QueryTokenDebtRequest = exports.QueryAssetAllResponse = exports.QueryAssetAllRequest = exports.QueryAssetResponse = exports.QueryAssetRequest = exports.QueryAccountStablecoinResponse = exports.QueryAccountStablecoinRequest = exports.Debt = exports.QueryAccountDebtAllResponse = exports.QueryAccountDebtAllRequest = exports.QueryAccountDebtResponse = exports.QueryAccountDebtRequest = exports.Collateral = exports.QueryAccountCollateralAllResponse = exports.QueryAccountCollateralAllRequest = exports.QueryAccountCollateralResponse = exports.QueryAccountCollateralRequest = exports.QueryAccountDataResponse = exports.QueryAccountDataRequest = exports.QueryRateStrategyAllResponse = exports.QueryRateStrategyAllRequest = exports.QueryRateStrategyResponse = exports.QueryRateStrategyRequest = exports.QueryParamsResponse = exports.QueryParamsRequest = 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"));
|
|
@@ -14,6 +14,7 @@ const asset_params_1 = require("./asset_params");
|
|
|
14
14
|
const debt_info_1 = require("./debt_info");
|
|
15
15
|
const stablecoin_debt_info_1 = require("./stablecoin_debt_info");
|
|
16
16
|
const stablecoin_interest_info_1 = require("./stablecoin_interest_info");
|
|
17
|
+
const e_mode_category_1 = require("./e_mode_category");
|
|
17
18
|
const coin_1 = require("../cosmos/base/v1beta1/coin");
|
|
18
19
|
const reward_scheme_1 = require("./reward_scheme");
|
|
19
20
|
exports.protobufPackage = "Switcheo.carbon.cdp";
|
|
@@ -2354,6 +2355,123 @@ exports.QueryRewardDebtsAllRequest = {
|
|
|
2354
2355
|
return message;
|
|
2355
2356
|
},
|
|
2356
2357
|
};
|
|
2358
|
+
const baseQueryEModeAllRequest = {};
|
|
2359
|
+
exports.QueryEModeAllRequest = {
|
|
2360
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
2361
|
+
if (message.pagination !== undefined) {
|
|
2362
|
+
pagination_1.PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim();
|
|
2363
|
+
}
|
|
2364
|
+
return writer;
|
|
2365
|
+
},
|
|
2366
|
+
decode(input, length) {
|
|
2367
|
+
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
2368
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
2369
|
+
const message = Object.assign({}, baseQueryEModeAllRequest);
|
|
2370
|
+
while (reader.pos < end) {
|
|
2371
|
+
const tag = reader.uint32();
|
|
2372
|
+
switch (tag >>> 3) {
|
|
2373
|
+
case 1:
|
|
2374
|
+
message.pagination = pagination_1.PageRequest.decode(reader, reader.uint32());
|
|
2375
|
+
break;
|
|
2376
|
+
default:
|
|
2377
|
+
reader.skipType(tag & 7);
|
|
2378
|
+
break;
|
|
2379
|
+
}
|
|
2380
|
+
}
|
|
2381
|
+
return message;
|
|
2382
|
+
},
|
|
2383
|
+
fromJSON(object) {
|
|
2384
|
+
const message = Object.assign({}, baseQueryEModeAllRequest);
|
|
2385
|
+
message.pagination =
|
|
2386
|
+
object.pagination !== undefined && object.pagination !== null
|
|
2387
|
+
? pagination_1.PageRequest.fromJSON(object.pagination)
|
|
2388
|
+
: undefined;
|
|
2389
|
+
return message;
|
|
2390
|
+
},
|
|
2391
|
+
toJSON(message) {
|
|
2392
|
+
const obj = {};
|
|
2393
|
+
message.pagination !== undefined &&
|
|
2394
|
+
(obj.pagination = message.pagination
|
|
2395
|
+
? pagination_1.PageRequest.toJSON(message.pagination)
|
|
2396
|
+
: undefined);
|
|
2397
|
+
return obj;
|
|
2398
|
+
},
|
|
2399
|
+
fromPartial(object) {
|
|
2400
|
+
const message = Object.assign({}, baseQueryEModeAllRequest);
|
|
2401
|
+
message.pagination =
|
|
2402
|
+
object.pagination !== undefined && object.pagination !== null
|
|
2403
|
+
? pagination_1.PageRequest.fromPartial(object.pagination)
|
|
2404
|
+
: undefined;
|
|
2405
|
+
return message;
|
|
2406
|
+
},
|
|
2407
|
+
};
|
|
2408
|
+
const baseQueryEModeAllResponse = {};
|
|
2409
|
+
exports.QueryEModeAllResponse = {
|
|
2410
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
2411
|
+
for (const v of message.eModeCategories) {
|
|
2412
|
+
e_mode_category_1.EModeCategory.encode(v, writer.uint32(10).fork()).ldelim();
|
|
2413
|
+
}
|
|
2414
|
+
if (message.pagination !== undefined) {
|
|
2415
|
+
pagination_1.PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim();
|
|
2416
|
+
}
|
|
2417
|
+
return writer;
|
|
2418
|
+
},
|
|
2419
|
+
decode(input, length) {
|
|
2420
|
+
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
2421
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
2422
|
+
const message = Object.assign({}, baseQueryEModeAllResponse);
|
|
2423
|
+
message.eModeCategories = [];
|
|
2424
|
+
while (reader.pos < end) {
|
|
2425
|
+
const tag = reader.uint32();
|
|
2426
|
+
switch (tag >>> 3) {
|
|
2427
|
+
case 1:
|
|
2428
|
+
message.eModeCategories.push(e_mode_category_1.EModeCategory.decode(reader, reader.uint32()));
|
|
2429
|
+
break;
|
|
2430
|
+
case 2:
|
|
2431
|
+
message.pagination = pagination_1.PageResponse.decode(reader, reader.uint32());
|
|
2432
|
+
break;
|
|
2433
|
+
default:
|
|
2434
|
+
reader.skipType(tag & 7);
|
|
2435
|
+
break;
|
|
2436
|
+
}
|
|
2437
|
+
}
|
|
2438
|
+
return message;
|
|
2439
|
+
},
|
|
2440
|
+
fromJSON(object) {
|
|
2441
|
+
var _a;
|
|
2442
|
+
const message = Object.assign({}, baseQueryEModeAllResponse);
|
|
2443
|
+
message.eModeCategories = ((_a = object.eModeCategories) !== null && _a !== void 0 ? _a : []).map((e) => e_mode_category_1.EModeCategory.fromJSON(e));
|
|
2444
|
+
message.pagination =
|
|
2445
|
+
object.pagination !== undefined && object.pagination !== null
|
|
2446
|
+
? pagination_1.PageResponse.fromJSON(object.pagination)
|
|
2447
|
+
: undefined;
|
|
2448
|
+
return message;
|
|
2449
|
+
},
|
|
2450
|
+
toJSON(message) {
|
|
2451
|
+
const obj = {};
|
|
2452
|
+
if (message.eModeCategories) {
|
|
2453
|
+
obj.eModeCategories = message.eModeCategories.map((e) => e ? e_mode_category_1.EModeCategory.toJSON(e) : undefined);
|
|
2454
|
+
}
|
|
2455
|
+
else {
|
|
2456
|
+
obj.eModeCategories = [];
|
|
2457
|
+
}
|
|
2458
|
+
message.pagination !== undefined &&
|
|
2459
|
+
(obj.pagination = message.pagination
|
|
2460
|
+
? pagination_1.PageResponse.toJSON(message.pagination)
|
|
2461
|
+
: undefined);
|
|
2462
|
+
return obj;
|
|
2463
|
+
},
|
|
2464
|
+
fromPartial(object) {
|
|
2465
|
+
var _a;
|
|
2466
|
+
const message = Object.assign({}, baseQueryEModeAllResponse);
|
|
2467
|
+
message.eModeCategories = ((_a = object.eModeCategories) !== null && _a !== void 0 ? _a : []).map((e) => e_mode_category_1.EModeCategory.fromPartial(e));
|
|
2468
|
+
message.pagination =
|
|
2469
|
+
object.pagination !== undefined && object.pagination !== null
|
|
2470
|
+
? pagination_1.PageResponse.fromPartial(object.pagination)
|
|
2471
|
+
: undefined;
|
|
2472
|
+
return message;
|
|
2473
|
+
},
|
|
2474
|
+
};
|
|
2357
2475
|
const baseQueryStablecoinInterestRequest = {};
|
|
2358
2476
|
exports.QueryStablecoinInterestRequest = {
|
|
2359
2477
|
encode(_, writer = minimal_1.default.Writer.create()) {
|
|
@@ -2438,6 +2556,193 @@ exports.QueryStablecoinInterestResponse = {
|
|
|
2438
2556
|
return message;
|
|
2439
2557
|
},
|
|
2440
2558
|
};
|
|
2559
|
+
const baseQueryEModeRequest = { name: "" };
|
|
2560
|
+
exports.QueryEModeRequest = {
|
|
2561
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
2562
|
+
if (message.name !== "") {
|
|
2563
|
+
writer.uint32(10).string(message.name);
|
|
2564
|
+
}
|
|
2565
|
+
return writer;
|
|
2566
|
+
},
|
|
2567
|
+
decode(input, length) {
|
|
2568
|
+
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
2569
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
2570
|
+
const message = Object.assign({}, baseQueryEModeRequest);
|
|
2571
|
+
while (reader.pos < end) {
|
|
2572
|
+
const tag = reader.uint32();
|
|
2573
|
+
switch (tag >>> 3) {
|
|
2574
|
+
case 1:
|
|
2575
|
+
message.name = reader.string();
|
|
2576
|
+
break;
|
|
2577
|
+
default:
|
|
2578
|
+
reader.skipType(tag & 7);
|
|
2579
|
+
break;
|
|
2580
|
+
}
|
|
2581
|
+
}
|
|
2582
|
+
return message;
|
|
2583
|
+
},
|
|
2584
|
+
fromJSON(object) {
|
|
2585
|
+
const message = Object.assign({}, baseQueryEModeRequest);
|
|
2586
|
+
message.name =
|
|
2587
|
+
object.name !== undefined && object.name !== null
|
|
2588
|
+
? String(object.name)
|
|
2589
|
+
: "";
|
|
2590
|
+
return message;
|
|
2591
|
+
},
|
|
2592
|
+
toJSON(message) {
|
|
2593
|
+
const obj = {};
|
|
2594
|
+
message.name !== undefined && (obj.name = message.name);
|
|
2595
|
+
return obj;
|
|
2596
|
+
},
|
|
2597
|
+
fromPartial(object) {
|
|
2598
|
+
var _a;
|
|
2599
|
+
const message = Object.assign({}, baseQueryEModeRequest);
|
|
2600
|
+
message.name = (_a = object.name) !== null && _a !== void 0 ? _a : "";
|
|
2601
|
+
return message;
|
|
2602
|
+
},
|
|
2603
|
+
};
|
|
2604
|
+
const baseQueryEModeResponse = {};
|
|
2605
|
+
exports.QueryEModeResponse = {
|
|
2606
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
2607
|
+
if (message.eModeCategory !== undefined) {
|
|
2608
|
+
e_mode_category_1.EModeCategory.encode(message.eModeCategory, writer.uint32(10).fork()).ldelim();
|
|
2609
|
+
}
|
|
2610
|
+
return writer;
|
|
2611
|
+
},
|
|
2612
|
+
decode(input, length) {
|
|
2613
|
+
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
2614
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
2615
|
+
const message = Object.assign({}, baseQueryEModeResponse);
|
|
2616
|
+
while (reader.pos < end) {
|
|
2617
|
+
const tag = reader.uint32();
|
|
2618
|
+
switch (tag >>> 3) {
|
|
2619
|
+
case 1:
|
|
2620
|
+
message.eModeCategory = e_mode_category_1.EModeCategory.decode(reader, reader.uint32());
|
|
2621
|
+
break;
|
|
2622
|
+
default:
|
|
2623
|
+
reader.skipType(tag & 7);
|
|
2624
|
+
break;
|
|
2625
|
+
}
|
|
2626
|
+
}
|
|
2627
|
+
return message;
|
|
2628
|
+
},
|
|
2629
|
+
fromJSON(object) {
|
|
2630
|
+
const message = Object.assign({}, baseQueryEModeResponse);
|
|
2631
|
+
message.eModeCategory =
|
|
2632
|
+
object.eModeCategory !== undefined && object.eModeCategory !== null
|
|
2633
|
+
? e_mode_category_1.EModeCategory.fromJSON(object.eModeCategory)
|
|
2634
|
+
: undefined;
|
|
2635
|
+
return message;
|
|
2636
|
+
},
|
|
2637
|
+
toJSON(message) {
|
|
2638
|
+
const obj = {};
|
|
2639
|
+
message.eModeCategory !== undefined &&
|
|
2640
|
+
(obj.eModeCategory = message.eModeCategory
|
|
2641
|
+
? e_mode_category_1.EModeCategory.toJSON(message.eModeCategory)
|
|
2642
|
+
: undefined);
|
|
2643
|
+
return obj;
|
|
2644
|
+
},
|
|
2645
|
+
fromPartial(object) {
|
|
2646
|
+
const message = Object.assign({}, baseQueryEModeResponse);
|
|
2647
|
+
message.eModeCategory =
|
|
2648
|
+
object.eModeCategory !== undefined && object.eModeCategory !== null
|
|
2649
|
+
? e_mode_category_1.EModeCategory.fromPartial(object.eModeCategory)
|
|
2650
|
+
: undefined;
|
|
2651
|
+
return message;
|
|
2652
|
+
},
|
|
2653
|
+
};
|
|
2654
|
+
const baseQueryAccountEModeRequest = { address: "" };
|
|
2655
|
+
exports.QueryAccountEModeRequest = {
|
|
2656
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
2657
|
+
if (message.address !== "") {
|
|
2658
|
+
writer.uint32(10).string(message.address);
|
|
2659
|
+
}
|
|
2660
|
+
return writer;
|
|
2661
|
+
},
|
|
2662
|
+
decode(input, length) {
|
|
2663
|
+
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
2664
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
2665
|
+
const message = Object.assign({}, baseQueryAccountEModeRequest);
|
|
2666
|
+
while (reader.pos < end) {
|
|
2667
|
+
const tag = reader.uint32();
|
|
2668
|
+
switch (tag >>> 3) {
|
|
2669
|
+
case 1:
|
|
2670
|
+
message.address = reader.string();
|
|
2671
|
+
break;
|
|
2672
|
+
default:
|
|
2673
|
+
reader.skipType(tag & 7);
|
|
2674
|
+
break;
|
|
2675
|
+
}
|
|
2676
|
+
}
|
|
2677
|
+
return message;
|
|
2678
|
+
},
|
|
2679
|
+
fromJSON(object) {
|
|
2680
|
+
const message = Object.assign({}, baseQueryAccountEModeRequest);
|
|
2681
|
+
message.address =
|
|
2682
|
+
object.address !== undefined && object.address !== null
|
|
2683
|
+
? String(object.address)
|
|
2684
|
+
: "";
|
|
2685
|
+
return message;
|
|
2686
|
+
},
|
|
2687
|
+
toJSON(message) {
|
|
2688
|
+
const obj = {};
|
|
2689
|
+
message.address !== undefined && (obj.address = message.address);
|
|
2690
|
+
return obj;
|
|
2691
|
+
},
|
|
2692
|
+
fromPartial(object) {
|
|
2693
|
+
var _a;
|
|
2694
|
+
const message = Object.assign({}, baseQueryAccountEModeRequest);
|
|
2695
|
+
message.address = (_a = object.address) !== null && _a !== void 0 ? _a : "";
|
|
2696
|
+
return message;
|
|
2697
|
+
},
|
|
2698
|
+
};
|
|
2699
|
+
const baseQueryAccountEModeResponse = { eModeCategoryName: "" };
|
|
2700
|
+
exports.QueryAccountEModeResponse = {
|
|
2701
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
2702
|
+
if (message.eModeCategoryName !== "") {
|
|
2703
|
+
writer.uint32(10).string(message.eModeCategoryName);
|
|
2704
|
+
}
|
|
2705
|
+
return writer;
|
|
2706
|
+
},
|
|
2707
|
+
decode(input, length) {
|
|
2708
|
+
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
2709
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
2710
|
+
const message = Object.assign({}, baseQueryAccountEModeResponse);
|
|
2711
|
+
while (reader.pos < end) {
|
|
2712
|
+
const tag = reader.uint32();
|
|
2713
|
+
switch (tag >>> 3) {
|
|
2714
|
+
case 1:
|
|
2715
|
+
message.eModeCategoryName = reader.string();
|
|
2716
|
+
break;
|
|
2717
|
+
default:
|
|
2718
|
+
reader.skipType(tag & 7);
|
|
2719
|
+
break;
|
|
2720
|
+
}
|
|
2721
|
+
}
|
|
2722
|
+
return message;
|
|
2723
|
+
},
|
|
2724
|
+
fromJSON(object) {
|
|
2725
|
+
const message = Object.assign({}, baseQueryAccountEModeResponse);
|
|
2726
|
+
message.eModeCategoryName =
|
|
2727
|
+
object.eModeCategoryName !== undefined &&
|
|
2728
|
+
object.eModeCategoryName !== null
|
|
2729
|
+
? String(object.eModeCategoryName)
|
|
2730
|
+
: "";
|
|
2731
|
+
return message;
|
|
2732
|
+
},
|
|
2733
|
+
toJSON(message) {
|
|
2734
|
+
const obj = {};
|
|
2735
|
+
message.eModeCategoryName !== undefined &&
|
|
2736
|
+
(obj.eModeCategoryName = message.eModeCategoryName);
|
|
2737
|
+
return obj;
|
|
2738
|
+
},
|
|
2739
|
+
fromPartial(object) {
|
|
2740
|
+
var _a;
|
|
2741
|
+
const message = Object.assign({}, baseQueryAccountEModeResponse);
|
|
2742
|
+
message.eModeCategoryName = (_a = object.eModeCategoryName) !== null && _a !== void 0 ? _a : "";
|
|
2743
|
+
return message;
|
|
2744
|
+
},
|
|
2745
|
+
};
|
|
2441
2746
|
class QueryClientImpl {
|
|
2442
2747
|
constructor(rpc) {
|
|
2443
2748
|
this.rpc = rpc;
|
|
@@ -2459,6 +2764,9 @@ class QueryClientImpl {
|
|
|
2459
2764
|
this.RewardDebts = this.RewardDebts.bind(this);
|
|
2460
2765
|
this.RewardDebtsAll = this.RewardDebtsAll.bind(this);
|
|
2461
2766
|
this.PositionsAll = this.PositionsAll.bind(this);
|
|
2767
|
+
this.EMode = this.EMode.bind(this);
|
|
2768
|
+
this.EModeAll = this.EModeAll.bind(this);
|
|
2769
|
+
this.AccountEMode = this.AccountEMode.bind(this);
|
|
2462
2770
|
this.StablecoinInterest = this.StablecoinInterest.bind(this);
|
|
2463
2771
|
}
|
|
2464
2772
|
Params(request) {
|
|
@@ -2551,6 +2859,21 @@ class QueryClientImpl {
|
|
|
2551
2859
|
const promise = this.rpc.request("Switcheo.carbon.cdp.Query", "PositionsAll", data);
|
|
2552
2860
|
return promise.then((data) => exports.QueryCdpPositionsResponse.decode(new minimal_1.default.Reader(data)));
|
|
2553
2861
|
}
|
|
2862
|
+
EMode(request) {
|
|
2863
|
+
const data = exports.QueryEModeRequest.encode(request).finish();
|
|
2864
|
+
const promise = this.rpc.request("Switcheo.carbon.cdp.Query", "EMode", data);
|
|
2865
|
+
return promise.then((data) => exports.QueryEModeResponse.decode(new minimal_1.default.Reader(data)));
|
|
2866
|
+
}
|
|
2867
|
+
EModeAll(request) {
|
|
2868
|
+
const data = exports.QueryEModeAllRequest.encode(request).finish();
|
|
2869
|
+
const promise = this.rpc.request("Switcheo.carbon.cdp.Query", "EModeAll", data);
|
|
2870
|
+
return promise.then((data) => exports.QueryEModeAllResponse.decode(new minimal_1.default.Reader(data)));
|
|
2871
|
+
}
|
|
2872
|
+
AccountEMode(request) {
|
|
2873
|
+
const data = exports.QueryAccountEModeRequest.encode(request).finish();
|
|
2874
|
+
const promise = this.rpc.request("Switcheo.carbon.cdp.Query", "AccountEMode", data);
|
|
2875
|
+
return promise.then((data) => exports.QueryAccountEModeResponse.decode(new minimal_1.default.Reader(data)));
|
|
2876
|
+
}
|
|
2554
2877
|
StablecoinInterest(request) {
|
|
2555
2878
|
const data = exports.QueryStablecoinInterestRequest.encode(request).finish();
|
|
2556
2879
|
const promise = this.rpc.request("Switcheo.carbon.cdp.Query", "StablecoinInterest", data);
|