carbon-js-sdk 0.3.59 → 0.4.0
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/bank/query.d.ts +1 -1
- package/lib/codec/bank/query.js +1 -1
- package/lib/codec/broker/query.d.ts +1 -4
- package/lib/codec/broker/query.js +4 -47
- package/lib/codec/cdp/event.d.ts +2 -0
- package/lib/codec/cdp/event.js +16 -1
- package/lib/codec/cdp/genesis.d.ts +3 -1
- package/lib/codec/cdp/genesis.js +21 -0
- package/lib/codec/cdp/params.d.ts +6 -0
- package/lib/codec/cdp/params.js +41 -1
- package/lib/codec/cdp/query.d.ts +23 -0
- package/lib/codec/cdp/query.js +92 -1
- package/lib/codec/{crisis/genesis.d.ts → cdp/stablecoin_interest_info.d.ts} +10 -9
- package/lib/codec/cdp/stablecoin_interest_info.js +99 -0
- package/lib/codec/cdp/tx.d.ts +20 -20
- package/lib/codec/cdp/tx.js +43 -43
- package/lib/codec/cosmos/auth/v1beta1/export.d.ts +1 -1
- package/lib/codec/cosmos/auth/v1beta1/export.js +13 -1
- package/lib/codec/cosmos/auth/v1beta1/query.d.ts +213 -0
- package/lib/codec/cosmos/auth/v1beta1/query.js +602 -1
- package/lib/codec/cosmos/authz/v1beta1/authz.d.ts +17 -2
- package/lib/codec/cosmos/authz/v1beta1/authz.js +50 -1
- package/lib/codec/cosmos/authz/v1beta1/query.d.ts +2 -2
- package/lib/codec/cosmos/bank/v1beta1/bank.d.ts +14 -1
- package/lib/codec/cosmos/bank/v1beta1/bank.js +25 -1
- package/lib/codec/cosmos/bank/v1beta1/export.d.ts +1 -1
- package/lib/codec/cosmos/bank/v1beta1/export.js +4 -1
- package/lib/codec/cosmos/bank/v1beta1/query.d.ts +73 -1
- package/lib/codec/cosmos/bank/v1beta1/query.js +200 -1
- package/lib/codec/cosmos/base/abci/v1beta1/abci.d.ts +24 -1
- package/lib/codec/cosmos/base/abci/v1beta1/abci.js +34 -4
- package/lib/codec/cosmos/base/query/v1beta1/pagination.d.ts +2 -1
- package/lib/codec/cosmos/base/snapshots/v1beta1/snapshot.d.ts +58 -5
- package/lib/codec/cosmos/base/snapshots/v1beta1/snapshot.js +145 -1
- package/lib/codec/cosmos/base/store/v1beta1/listening.d.ts +32 -0
- package/lib/codec/cosmos/base/store/v1beta1/listening.js +213 -1
- package/lib/codec/cosmos/base/store/v1beta1/snapshot.d.ts +45 -0
- package/lib/codec/cosmos/base/store/v1beta1/snapshot.js +246 -0
- package/lib/codec/cosmos/base/tendermint/v1beta1/query.d.ts +129 -9
- package/lib/codec/cosmos/base/tendermint/v1beta1/query.js +457 -7
- package/lib/codec/cosmos/distribution/v1beta1/tx.d.ts +12 -8
- package/lib/codec/cosmos/distribution/v1beta1/tx.js +42 -8
- package/lib/codec/cosmos/feegrant/v1beta1/feegrant.d.ts +5 -5
- package/lib/codec/cosmos/feegrant/v1beta1/query.d.ts +12 -3
- package/lib/codec/cosmos/feegrant/v1beta1/tx.d.ts +1 -1
- package/lib/codec/cosmos/gov/v1beta1/gov.d.ts +6 -1
- package/lib/codec/cosmos/gov/v1beta1/gov.js +1 -1
- package/lib/codec/cosmos/gov/v1beta1/query.d.ts +1 -1
- package/lib/codec/cosmos/gov/v1beta1/query.js +2 -2
- package/lib/codec/cosmos/gov/v1beta1/tx.js +2 -2
- package/lib/codec/cosmos/params/v1beta1/export.d.ts +1 -1
- package/lib/codec/cosmos/params/v1beta1/export.js +4 -1
- package/lib/codec/cosmos/params/v1beta1/query.d.ts +55 -0
- package/lib/codec/cosmos/params/v1beta1/query.js +149 -1
- package/lib/codec/cosmos/staking/v1beta1/export.d.ts +1 -1
- package/lib/codec/cosmos/staking/v1beta1/export.js +3 -1
- package/lib/codec/cosmos/staking/v1beta1/query.d.ts +3 -3
- package/lib/codec/cosmos/staking/v1beta1/staking.d.ts +7 -1
- package/lib/codec/cosmos/staking/v1beta1/staking.js +16 -1
- package/lib/codec/cosmos/staking/v1beta1/tx.d.ts +42 -0
- package/lib/codec/cosmos/staking/v1beta1/tx.js +134 -1
- package/lib/codec/cosmos/tx/signing/v1beta1/signing.d.ts +23 -5
- package/lib/codec/cosmos/tx/signing/v1beta1/signing.js +28 -5
- package/lib/codec/cosmos/tx/v1beta1/export.d.ts +1 -1
- package/lib/codec/cosmos/tx/v1beta1/export.js +4 -1
- package/lib/codec/cosmos/tx/v1beta1/service.d.ts +21 -2
- package/lib/codec/cosmos/tx/v1beta1/service.js +55 -2
- package/lib/codec/cosmos/tx/v1beta1/tx.d.ts +101 -0
- package/lib/codec/cosmos/tx/v1beta1/tx.js +298 -3
- package/lib/codec/cosmos/upgrade/v1beta1/query.d.ts +36 -0
- package/lib/codec/cosmos/upgrade/v1beta1/query.js +84 -1
- package/lib/codec/cosmos/upgrade/v1beta1/upgrade.d.ts +8 -0
- package/lib/codec/cosmos/vesting/v1beta1/export.d.ts +1 -1
- package/lib/codec/cosmos/vesting/v1beta1/export.js +5 -1
- package/lib/codec/cosmos/vesting/v1beta1/tx.d.ts +83 -0
- package/lib/codec/cosmos/vesting/v1beta1/tx.js +251 -1
- package/lib/codec/google/protobuf/any.d.ts +8 -5
- package/lib/codec/ibc/applications/interchain_accounts/controller/export.d.ts +1 -0
- package/lib/codec/ibc/applications/interchain_accounts/controller/export.js +6 -1
- package/lib/codec/ibc/applications/interchain_accounts/v1/export.d.ts +0 -1
- package/lib/codec/ibc/applications/interchain_accounts/v1/export.js +1 -6
- package/lib/codec/ibc/core/channel/v1/channel.d.ts +20 -0
- package/lib/codec/ibc/core/channel/v1/channel.js +78 -1
- package/lib/codec/ibc/core/channel/v1/export.d.ts +1 -1
- package/lib/codec/ibc/core/channel/v1/export.js +3 -2
- package/lib/codec/ibc/core/channel/v1/tx.d.ts +3 -2
- package/lib/codec/ibc/core/client/v1/query.d.ts +1 -1
- package/lib/codec/ibc/core/connection/v1/export.d.ts +1 -1
- package/lib/codec/ibc/core/connection/v1/export.js +3 -1
- package/lib/codec/ibc/core/connection/v1/query.d.ts +26 -1
- package/lib/codec/ibc/core/connection/v1/query.js +87 -1
- package/lib/codec/ibc/core/connection/v1/tx.d.ts +3 -2
- package/lib/codec/index.d.ts +88 -15
- package/lib/codec/index.js +858 -701
- package/lib/codec/liquidation/query.d.ts +3 -2
- package/lib/codec/liquidation/query.js +39 -32
- package/lib/codec/misc/query.d.ts +1 -1
- package/lib/codec/misc/query.js +1 -1
- package/lib/codec/oracle/event.d.ts +1 -0
- package/lib/codec/oracle/event.js +15 -1
- package/lib/codec/order/query.d.ts +1 -1
- package/lib/codec/order/query.js +1 -1
- package/lib/codec/position/query.d.ts +1 -2
- package/lib/codec/position/query.js +3 -16
- package/lib/codec/proofs.d.ts +1 -0
- package/lib/codec/proofs.js +6 -0
- package/lib/codec/tendermint/abci/types.d.ts +8 -0
- package/lib/codec/tendermint/abci/types.js +45 -1
- package/lib/constant/generic.js +1 -1
- package/lib/modules/admin.d.ts +0 -1
- package/lib/modules/admin.js +0 -13
- package/lib/modules/cdp.js +43 -43
- package/lib/modules/cosmwasm.js +1 -1
- package/lib/modules/gov.js +12 -12
- package/lib/modules/liquiditypool.d.ts +0 -2
- package/lib/modules/liquiditypool.js +1 -34
- 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 -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 -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 +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/util/tx.d.ts +80 -10
- 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/cosmos/app/v1alpha1/export.d.ts +0 -3
- package/lib/codec/cosmos/app/v1alpha1/export.js +0 -13
- package/lib/codec/cosmos/authz/v1beta1/export.d.ts +0 -4
- package/lib/codec/cosmos/authz/v1beta1/export.js +0 -25
- package/lib/codec/cosmos/capability/v1beta1/export.d.ts +0 -2
- package/lib/codec/cosmos/capability/v1beta1/export.js +0 -9
- package/lib/codec/cosmos/crisis/v1beta1/export.d.ts +0 -1
- package/lib/codec/cosmos/crisis/v1beta1/export.js +0 -6
- package/lib/codec/cosmos/evidence/v1beta1/export.d.ts +0 -3
- package/lib/codec/cosmos/evidence/v1beta1/export.js +0 -13
- package/lib/codec/cosmos/feegrant/v1beta1/export.d.ts +0 -3
- package/lib/codec/cosmos/feegrant/v1beta1/export.js +0 -20
- package/lib/codec/cosmos/gov/v1/export.d.ts +0 -3
- package/lib/codec/cosmos/gov/v1/export.js +0 -46
- package/lib/codec/cosmos/group/v1/export.d.ts +0 -4
- package/lib/codec/cosmos/group/v1/export.js +0 -94
- package/lib/codec/cosmos/nft/v1beta1/export.d.ts +0 -5
- package/lib/codec/cosmos/nft/v1beta1/export.js +0 -30
- package/lib/codec/cosmos/orm/v1/export.d.ts +0 -1
- package/lib/codec/cosmos/orm/v1/export.js +0 -8
- package/lib/codec/cosmos/orm/v1alpha1/export.d.ts +0 -1
- package/lib/codec/cosmos/orm/v1alpha1/export.js +0 -9
- package/lib/codec/cosmos/upgrade/v1beta1/export.d.ts +0 -3
- package/lib/codec/cosmos/upgrade/v1beta1/export.js +0 -24
- package/lib/codec/crisis/genesis.js +0 -46
- package/lib/codec/crisis/query.d.ts +0 -43
- package/lib/codec/crisis/query.js +0 -103
- package/lib/codec/crisis/tx.d.ts +0 -12
- package/lib/codec/crisis/tx.js +0 -20
- package/lib/codec/ibc/applications/fee/v1/export.d.ts +0 -6
- package/lib/codec/ibc/applications/fee/v1/export.js +0 -47
- package/lib/codec/liquiditypool/legacy.d.ts +0 -18
- package/lib/codec/liquiditypool/legacy.js +0 -64
package/lib/codec/cdp/genesis.js
CHANGED
|
@@ -9,6 +9,7 @@ const long_1 = __importDefault(require("long"));
|
|
|
9
9
|
const minimal_1 = __importDefault(require("protobufjs/minimal"));
|
|
10
10
|
const params_1 = require("./params");
|
|
11
11
|
const stablecoin_debt_info_1 = require("./stablecoin_debt_info");
|
|
12
|
+
const stablecoin_interest_info_1 = require("./stablecoin_interest_info");
|
|
12
13
|
const rate_strategy_params_1 = require("./rate_strategy_params");
|
|
13
14
|
const asset_params_1 = require("./asset_params");
|
|
14
15
|
const debt_info_1 = require("./debt_info");
|
|
@@ -56,6 +57,9 @@ exports.GenesisState = {
|
|
|
56
57
|
Object.entries(message.accountToRewardDebt).forEach(([key, value]) => {
|
|
57
58
|
exports.GenesisState_AccountToRewardDebtEntry.encode({ key: key, value }, writer.uint32(106).fork()).ldelim();
|
|
58
59
|
});
|
|
60
|
+
if (message.stablecoinInterestInfo !== undefined) {
|
|
61
|
+
stablecoin_interest_info_1.StablecoinInterestInfo.encode(message.stablecoinInterestInfo, writer.uint32(114).fork()).ldelim();
|
|
62
|
+
}
|
|
59
63
|
return writer;
|
|
60
64
|
},
|
|
61
65
|
decode(input, length) {
|
|
@@ -134,6 +138,9 @@ exports.GenesisState = {
|
|
|
134
138
|
message.accountToRewardDebt[entry13.key] = entry13.value;
|
|
135
139
|
}
|
|
136
140
|
break;
|
|
141
|
+
case 14:
|
|
142
|
+
message.stablecoinInterestInfo = stablecoin_interest_info_1.StablecoinInterestInfo.decode(reader, reader.uint32());
|
|
143
|
+
break;
|
|
137
144
|
default:
|
|
138
145
|
reader.skipType(tag & 7);
|
|
139
146
|
break;
|
|
@@ -186,6 +193,11 @@ exports.GenesisState = {
|
|
|
186
193
|
acc[key] = bytesFromBase64(value);
|
|
187
194
|
return acc;
|
|
188
195
|
}, {});
|
|
196
|
+
message.stablecoinInterestInfo =
|
|
197
|
+
object.stablecoinInterestInfo !== undefined &&
|
|
198
|
+
object.stablecoinInterestInfo !== null
|
|
199
|
+
? stablecoin_interest_info_1.StablecoinInterestInfo.fromJSON(object.stablecoinInterestInfo)
|
|
200
|
+
: undefined;
|
|
189
201
|
return message;
|
|
190
202
|
},
|
|
191
203
|
toJSON(message) {
|
|
@@ -260,6 +272,10 @@ exports.GenesisState = {
|
|
|
260
272
|
obj.accountToRewardDebt[k] = base64FromBytes(v);
|
|
261
273
|
});
|
|
262
274
|
}
|
|
275
|
+
message.stablecoinInterestInfo !== undefined &&
|
|
276
|
+
(obj.stablecoinInterestInfo = message.stablecoinInterestInfo
|
|
277
|
+
? stablecoin_interest_info_1.StablecoinInterestInfo.toJSON(message.stablecoinInterestInfo)
|
|
278
|
+
: undefined);
|
|
263
279
|
return obj;
|
|
264
280
|
},
|
|
265
281
|
fromPartial(object) {
|
|
@@ -319,6 +335,11 @@ exports.GenesisState = {
|
|
|
319
335
|
}
|
|
320
336
|
return acc;
|
|
321
337
|
}, {});
|
|
338
|
+
message.stablecoinInterestInfo =
|
|
339
|
+
object.stablecoinInterestInfo !== undefined &&
|
|
340
|
+
object.stablecoinInterestInfo !== null
|
|
341
|
+
? stablecoin_interest_info_1.StablecoinInterestInfo.fromPartial(object.stablecoinInterestInfo)
|
|
342
|
+
: undefined;
|
|
322
343
|
return message;
|
|
323
344
|
},
|
|
324
345
|
};
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import Long from "long";
|
|
2
2
|
import _m0 from "protobufjs/minimal";
|
|
3
|
+
import { Duration } from "../google/protobuf/duration";
|
|
3
4
|
export declare const protobufPackage = "Switcheo.carbon.cdp";
|
|
4
5
|
/** Params defines the parameters for the module. */
|
|
5
6
|
export interface Params {
|
|
6
7
|
interestFee: string;
|
|
7
8
|
liquidationFee: string;
|
|
9
|
+
/** Stablecoin interest rate deprecated. Moved to stablecoin_interest_info.proto */
|
|
8
10
|
stablecoinInterestRate: string;
|
|
9
11
|
stablecoinMintCap: string;
|
|
10
12
|
/**
|
|
@@ -49,6 +51,10 @@ export interface Params {
|
|
|
49
51
|
stalePriceGracePeriod: string;
|
|
50
52
|
/** cdp_paused if true, causes all supply, locking, lending, borrowing and liquidations to be paused */
|
|
51
53
|
cdpPaused: boolean;
|
|
54
|
+
/** time interval in between each adjustment of stablecoin interest rate to help stablecoin price stability */
|
|
55
|
+
stablecoinInterestRateEpoch?: Duration;
|
|
56
|
+
/** used in formula to calculate stablecoin interest rate to help stablecoin price stability */
|
|
57
|
+
stablecoinInterestRateAdjusterCoefficient: string;
|
|
52
58
|
}
|
|
53
59
|
export declare const Params: {
|
|
54
60
|
encode(message: Params, writer?: _m0.Writer): _m0.Writer;
|
package/lib/codec/cdp/params.js
CHANGED
|
@@ -7,6 +7,7 @@ exports.Params = 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"));
|
|
10
|
+
const duration_1 = require("../google/protobuf/duration");
|
|
10
11
|
exports.protobufPackage = "Switcheo.carbon.cdp";
|
|
11
12
|
const baseParams = {
|
|
12
13
|
interestFee: "",
|
|
@@ -18,6 +19,7 @@ const baseParams = {
|
|
|
18
19
|
smallLiquidationSize: "",
|
|
19
20
|
stalePriceGracePeriod: "",
|
|
20
21
|
cdpPaused: false,
|
|
22
|
+
stablecoinInterestRateAdjusterCoefficient: "",
|
|
21
23
|
};
|
|
22
24
|
exports.Params = {
|
|
23
25
|
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
@@ -48,6 +50,14 @@ exports.Params = {
|
|
|
48
50
|
if (message.cdpPaused === true) {
|
|
49
51
|
writer.uint32(72).bool(message.cdpPaused);
|
|
50
52
|
}
|
|
53
|
+
if (message.stablecoinInterestRateEpoch !== undefined) {
|
|
54
|
+
duration_1.Duration.encode(message.stablecoinInterestRateEpoch, writer.uint32(82).fork()).ldelim();
|
|
55
|
+
}
|
|
56
|
+
if (message.stablecoinInterestRateAdjusterCoefficient !== "") {
|
|
57
|
+
writer
|
|
58
|
+
.uint32(90)
|
|
59
|
+
.string(message.stablecoinInterestRateAdjusterCoefficient);
|
|
60
|
+
}
|
|
51
61
|
return writer;
|
|
52
62
|
},
|
|
53
63
|
decode(input, length) {
|
|
@@ -84,6 +94,12 @@ exports.Params = {
|
|
|
84
94
|
case 9:
|
|
85
95
|
message.cdpPaused = reader.bool();
|
|
86
96
|
break;
|
|
97
|
+
case 10:
|
|
98
|
+
message.stablecoinInterestRateEpoch = duration_1.Duration.decode(reader, reader.uint32());
|
|
99
|
+
break;
|
|
100
|
+
case 11:
|
|
101
|
+
message.stablecoinInterestRateAdjusterCoefficient = reader.string();
|
|
102
|
+
break;
|
|
87
103
|
default:
|
|
88
104
|
reader.skipType(tag & 7);
|
|
89
105
|
break;
|
|
@@ -135,6 +151,16 @@ exports.Params = {
|
|
|
135
151
|
object.cdpPaused !== undefined && object.cdpPaused !== null
|
|
136
152
|
? Boolean(object.cdpPaused)
|
|
137
153
|
: false;
|
|
154
|
+
message.stablecoinInterestRateEpoch =
|
|
155
|
+
object.stablecoinInterestRateEpoch !== undefined &&
|
|
156
|
+
object.stablecoinInterestRateEpoch !== null
|
|
157
|
+
? duration_1.Duration.fromJSON(object.stablecoinInterestRateEpoch)
|
|
158
|
+
: undefined;
|
|
159
|
+
message.stablecoinInterestRateAdjusterCoefficient =
|
|
160
|
+
object.stablecoinInterestRateAdjusterCoefficient !== undefined &&
|
|
161
|
+
object.stablecoinInterestRateAdjusterCoefficient !== null
|
|
162
|
+
? String(object.stablecoinInterestRateAdjusterCoefficient)
|
|
163
|
+
: "";
|
|
138
164
|
return message;
|
|
139
165
|
},
|
|
140
166
|
toJSON(message) {
|
|
@@ -156,10 +182,17 @@ exports.Params = {
|
|
|
156
182
|
message.stalePriceGracePeriod !== undefined &&
|
|
157
183
|
(obj.stalePriceGracePeriod = message.stalePriceGracePeriod);
|
|
158
184
|
message.cdpPaused !== undefined && (obj.cdpPaused = message.cdpPaused);
|
|
185
|
+
message.stablecoinInterestRateEpoch !== undefined &&
|
|
186
|
+
(obj.stablecoinInterestRateEpoch = message.stablecoinInterestRateEpoch
|
|
187
|
+
? duration_1.Duration.toJSON(message.stablecoinInterestRateEpoch)
|
|
188
|
+
: undefined);
|
|
189
|
+
message.stablecoinInterestRateAdjusterCoefficient !== undefined &&
|
|
190
|
+
(obj.stablecoinInterestRateAdjusterCoefficient =
|
|
191
|
+
message.stablecoinInterestRateAdjusterCoefficient);
|
|
159
192
|
return obj;
|
|
160
193
|
},
|
|
161
194
|
fromPartial(object) {
|
|
162
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
195
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
163
196
|
const message = Object.assign({}, baseParams);
|
|
164
197
|
message.interestFee = (_a = object.interestFee) !== null && _a !== void 0 ? _a : "";
|
|
165
198
|
message.liquidationFee = (_b = object.liquidationFee) !== null && _b !== void 0 ? _b : "";
|
|
@@ -171,6 +204,13 @@ exports.Params = {
|
|
|
171
204
|
message.smallLiquidationSize = (_g = object.smallLiquidationSize) !== null && _g !== void 0 ? _g : "";
|
|
172
205
|
message.stalePriceGracePeriod = (_h = object.stalePriceGracePeriod) !== null && _h !== void 0 ? _h : "";
|
|
173
206
|
message.cdpPaused = (_j = object.cdpPaused) !== null && _j !== void 0 ? _j : false;
|
|
207
|
+
message.stablecoinInterestRateEpoch =
|
|
208
|
+
object.stablecoinInterestRateEpoch !== undefined &&
|
|
209
|
+
object.stablecoinInterestRateEpoch !== null
|
|
210
|
+
? duration_1.Duration.fromPartial(object.stablecoinInterestRateEpoch)
|
|
211
|
+
: undefined;
|
|
212
|
+
message.stablecoinInterestRateAdjusterCoefficient =
|
|
213
|
+
(_k = object.stablecoinInterestRateAdjusterCoefficient) !== null && _k !== void 0 ? _k : "";
|
|
174
214
|
return message;
|
|
175
215
|
},
|
|
176
216
|
};
|
package/lib/codec/cdp/query.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ import { PageRequest, PageResponse } from "../cosmos/base/query/v1beta1/paginati
|
|
|
6
6
|
import { AssetParams } from "./asset_params";
|
|
7
7
|
import { DebtInfo } from "./debt_info";
|
|
8
8
|
import { StablecoinDebtInfo } from "./stablecoin_debt_info";
|
|
9
|
+
import { StablecoinInterestInfo } from "./stablecoin_interest_info";
|
|
9
10
|
import { Coin } from "../cosmos/base/v1beta1/coin";
|
|
10
11
|
import { RewardScheme, RewardDebt } from "./reward_scheme";
|
|
11
12
|
export declare const protobufPackage = "Switcheo.carbon.cdp";
|
|
@@ -160,6 +161,11 @@ export interface QueryRewardDebtsResponse {
|
|
|
160
161
|
}
|
|
161
162
|
export interface QueryRewardDebtsAllRequest {
|
|
162
163
|
}
|
|
164
|
+
export interface QueryStablecoinInterestRequest {
|
|
165
|
+
}
|
|
166
|
+
export interface QueryStablecoinInterestResponse {
|
|
167
|
+
stablecoinInterestInfo?: StablecoinInterestInfo;
|
|
168
|
+
}
|
|
163
169
|
export declare const QueryParamsRequest: {
|
|
164
170
|
encode(_: QueryParamsRequest, writer?: _m0.Writer): _m0.Writer;
|
|
165
171
|
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): QueryParamsRequest;
|
|
@@ -433,6 +439,20 @@ export declare const QueryRewardDebtsAllRequest: {
|
|
|
433
439
|
toJSON(_: QueryRewardDebtsAllRequest): unknown;
|
|
434
440
|
fromPartial(_: DeepPartial<QueryRewardDebtsAllRequest>): QueryRewardDebtsAllRequest;
|
|
435
441
|
};
|
|
442
|
+
export declare const QueryStablecoinInterestRequest: {
|
|
443
|
+
encode(_: QueryStablecoinInterestRequest, writer?: _m0.Writer): _m0.Writer;
|
|
444
|
+
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): QueryStablecoinInterestRequest;
|
|
445
|
+
fromJSON(_: any): QueryStablecoinInterestRequest;
|
|
446
|
+
toJSON(_: QueryStablecoinInterestRequest): unknown;
|
|
447
|
+
fromPartial(_: DeepPartial<QueryStablecoinInterestRequest>): QueryStablecoinInterestRequest;
|
|
448
|
+
};
|
|
449
|
+
export declare const QueryStablecoinInterestResponse: {
|
|
450
|
+
encode(message: QueryStablecoinInterestResponse, writer?: _m0.Writer): _m0.Writer;
|
|
451
|
+
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): QueryStablecoinInterestResponse;
|
|
452
|
+
fromJSON(object: any): QueryStablecoinInterestResponse;
|
|
453
|
+
toJSON(message: QueryStablecoinInterestResponse): unknown;
|
|
454
|
+
fromPartial(object: DeepPartial<QueryStablecoinInterestResponse>): QueryStablecoinInterestResponse;
|
|
455
|
+
};
|
|
436
456
|
/** Query defines the gRPC querier service. */
|
|
437
457
|
export interface Query {
|
|
438
458
|
/** Parameters queries the parameters of the module. */
|
|
@@ -471,6 +491,8 @@ export interface Query {
|
|
|
471
491
|
RewardDebtsAll(request: QueryRewardDebtsAllRequest): Promise<QueryRewardDebtsResponse>;
|
|
472
492
|
/** Queries a list of CDP Positions */
|
|
473
493
|
PositionsAll(request: QueryCdpPositionsRequest): Promise<QueryCdpPositionsResponse>;
|
|
494
|
+
/** Queries StablecoinInterest. */
|
|
495
|
+
StablecoinInterest(request: QueryStablecoinInterestRequest): Promise<QueryStablecoinInterestResponse>;
|
|
474
496
|
}
|
|
475
497
|
export declare class QueryClientImpl implements Query {
|
|
476
498
|
private readonly rpc;
|
|
@@ -493,6 +515,7 @@ export declare class QueryClientImpl implements Query {
|
|
|
493
515
|
RewardDebts(request: QueryRewardDebtsRequest): Promise<QueryRewardDebtsResponse>;
|
|
494
516
|
RewardDebtsAll(request: QueryRewardDebtsAllRequest): Promise<QueryRewardDebtsResponse>;
|
|
495
517
|
PositionsAll(request: QueryCdpPositionsRequest): Promise<QueryCdpPositionsResponse>;
|
|
518
|
+
StablecoinInterest(request: QueryStablecoinInterestRequest): Promise<QueryStablecoinInterestResponse>;
|
|
496
519
|
}
|
|
497
520
|
interface Rpc {
|
|
498
521
|
request(service: string, method: string, data: Uint8Array): Promise<Uint8Array>;
|
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.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.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;
|
|
7
7
|
/* eslint-disable */
|
|
8
8
|
const long_1 = __importDefault(require("long"));
|
|
9
9
|
const minimal_1 = __importDefault(require("protobufjs/minimal"));
|
|
@@ -13,6 +13,7 @@ const pagination_1 = require("../cosmos/base/query/v1beta1/pagination");
|
|
|
13
13
|
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
|
+
const stablecoin_interest_info_1 = require("./stablecoin_interest_info");
|
|
16
17
|
const coin_1 = require("../cosmos/base/v1beta1/coin");
|
|
17
18
|
const reward_scheme_1 = require("./reward_scheme");
|
|
18
19
|
exports.protobufPackage = "Switcheo.carbon.cdp";
|
|
@@ -2353,6 +2354,90 @@ exports.QueryRewardDebtsAllRequest = {
|
|
|
2353
2354
|
return message;
|
|
2354
2355
|
},
|
|
2355
2356
|
};
|
|
2357
|
+
const baseQueryStablecoinInterestRequest = {};
|
|
2358
|
+
exports.QueryStablecoinInterestRequest = {
|
|
2359
|
+
encode(_, writer = minimal_1.default.Writer.create()) {
|
|
2360
|
+
return writer;
|
|
2361
|
+
},
|
|
2362
|
+
decode(input, length) {
|
|
2363
|
+
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
2364
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
2365
|
+
const message = Object.assign({}, baseQueryStablecoinInterestRequest);
|
|
2366
|
+
while (reader.pos < end) {
|
|
2367
|
+
const tag = reader.uint32();
|
|
2368
|
+
switch (tag >>> 3) {
|
|
2369
|
+
default:
|
|
2370
|
+
reader.skipType(tag & 7);
|
|
2371
|
+
break;
|
|
2372
|
+
}
|
|
2373
|
+
}
|
|
2374
|
+
return message;
|
|
2375
|
+
},
|
|
2376
|
+
fromJSON(_) {
|
|
2377
|
+
const message = Object.assign({}, baseQueryStablecoinInterestRequest);
|
|
2378
|
+
return message;
|
|
2379
|
+
},
|
|
2380
|
+
toJSON(_) {
|
|
2381
|
+
const obj = {};
|
|
2382
|
+
return obj;
|
|
2383
|
+
},
|
|
2384
|
+
fromPartial(_) {
|
|
2385
|
+
const message = Object.assign({}, baseQueryStablecoinInterestRequest);
|
|
2386
|
+
return message;
|
|
2387
|
+
},
|
|
2388
|
+
};
|
|
2389
|
+
const baseQueryStablecoinInterestResponse = {};
|
|
2390
|
+
exports.QueryStablecoinInterestResponse = {
|
|
2391
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
2392
|
+
if (message.stablecoinInterestInfo !== undefined) {
|
|
2393
|
+
stablecoin_interest_info_1.StablecoinInterestInfo.encode(message.stablecoinInterestInfo, writer.uint32(10).fork()).ldelim();
|
|
2394
|
+
}
|
|
2395
|
+
return writer;
|
|
2396
|
+
},
|
|
2397
|
+
decode(input, length) {
|
|
2398
|
+
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
2399
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
2400
|
+
const message = Object.assign({}, baseQueryStablecoinInterestResponse);
|
|
2401
|
+
while (reader.pos < end) {
|
|
2402
|
+
const tag = reader.uint32();
|
|
2403
|
+
switch (tag >>> 3) {
|
|
2404
|
+
case 1:
|
|
2405
|
+
message.stablecoinInterestInfo = stablecoin_interest_info_1.StablecoinInterestInfo.decode(reader, reader.uint32());
|
|
2406
|
+
break;
|
|
2407
|
+
default:
|
|
2408
|
+
reader.skipType(tag & 7);
|
|
2409
|
+
break;
|
|
2410
|
+
}
|
|
2411
|
+
}
|
|
2412
|
+
return message;
|
|
2413
|
+
},
|
|
2414
|
+
fromJSON(object) {
|
|
2415
|
+
const message = Object.assign({}, baseQueryStablecoinInterestResponse);
|
|
2416
|
+
message.stablecoinInterestInfo =
|
|
2417
|
+
object.stablecoinInterestInfo !== undefined &&
|
|
2418
|
+
object.stablecoinInterestInfo !== null
|
|
2419
|
+
? stablecoin_interest_info_1.StablecoinInterestInfo.fromJSON(object.stablecoinInterestInfo)
|
|
2420
|
+
: undefined;
|
|
2421
|
+
return message;
|
|
2422
|
+
},
|
|
2423
|
+
toJSON(message) {
|
|
2424
|
+
const obj = {};
|
|
2425
|
+
message.stablecoinInterestInfo !== undefined &&
|
|
2426
|
+
(obj.stablecoinInterestInfo = message.stablecoinInterestInfo
|
|
2427
|
+
? stablecoin_interest_info_1.StablecoinInterestInfo.toJSON(message.stablecoinInterestInfo)
|
|
2428
|
+
: undefined);
|
|
2429
|
+
return obj;
|
|
2430
|
+
},
|
|
2431
|
+
fromPartial(object) {
|
|
2432
|
+
const message = Object.assign({}, baseQueryStablecoinInterestResponse);
|
|
2433
|
+
message.stablecoinInterestInfo =
|
|
2434
|
+
object.stablecoinInterestInfo !== undefined &&
|
|
2435
|
+
object.stablecoinInterestInfo !== null
|
|
2436
|
+
? stablecoin_interest_info_1.StablecoinInterestInfo.fromPartial(object.stablecoinInterestInfo)
|
|
2437
|
+
: undefined;
|
|
2438
|
+
return message;
|
|
2439
|
+
},
|
|
2440
|
+
};
|
|
2356
2441
|
class QueryClientImpl {
|
|
2357
2442
|
constructor(rpc) {
|
|
2358
2443
|
this.rpc = rpc;
|
|
@@ -2374,6 +2459,7 @@ class QueryClientImpl {
|
|
|
2374
2459
|
this.RewardDebts = this.RewardDebts.bind(this);
|
|
2375
2460
|
this.RewardDebtsAll = this.RewardDebtsAll.bind(this);
|
|
2376
2461
|
this.PositionsAll = this.PositionsAll.bind(this);
|
|
2462
|
+
this.StablecoinInterest = this.StablecoinInterest.bind(this);
|
|
2377
2463
|
}
|
|
2378
2464
|
Params(request) {
|
|
2379
2465
|
const data = exports.QueryParamsRequest.encode(request).finish();
|
|
@@ -2465,6 +2551,11 @@ class QueryClientImpl {
|
|
|
2465
2551
|
const promise = this.rpc.request("Switcheo.carbon.cdp.Query", "PositionsAll", data);
|
|
2466
2552
|
return promise.then((data) => exports.QueryCdpPositionsResponse.decode(new minimal_1.default.Reader(data)));
|
|
2467
2553
|
}
|
|
2554
|
+
StablecoinInterest(request) {
|
|
2555
|
+
const data = exports.QueryStablecoinInterestRequest.encode(request).finish();
|
|
2556
|
+
const promise = this.rpc.request("Switcheo.carbon.cdp.Query", "StablecoinInterest", data);
|
|
2557
|
+
return promise.then((data) => exports.QueryStablecoinInterestResponse.decode(new minimal_1.default.Reader(data)));
|
|
2558
|
+
}
|
|
2468
2559
|
}
|
|
2469
2560
|
exports.QueryClientImpl = QueryClientImpl;
|
|
2470
2561
|
if (minimal_1.default.util.Long !== long_1.default) {
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import Long from "long";
|
|
2
2
|
import _m0 from "protobufjs/minimal";
|
|
3
|
-
export declare const protobufPackage = "Switcheo.carbon.
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
export declare const protobufPackage = "Switcheo.carbon.cdp";
|
|
4
|
+
export interface StablecoinInterestInfo {
|
|
5
|
+
lastUpdatedTime?: Date;
|
|
6
|
+
stablecoinInterestRate: string;
|
|
6
7
|
}
|
|
7
|
-
export declare const
|
|
8
|
-
encode(
|
|
9
|
-
decode(input: _m0.Reader | Uint8Array, length?: number | undefined):
|
|
10
|
-
fromJSON(
|
|
11
|
-
toJSON(
|
|
12
|
-
fromPartial(
|
|
8
|
+
export declare const StablecoinInterestInfo: {
|
|
9
|
+
encode(message: StablecoinInterestInfo, writer?: _m0.Writer): _m0.Writer;
|
|
10
|
+
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): StablecoinInterestInfo;
|
|
11
|
+
fromJSON(object: any): StablecoinInterestInfo;
|
|
12
|
+
toJSON(message: StablecoinInterestInfo): unknown;
|
|
13
|
+
fromPartial(object: DeepPartial<StablecoinInterestInfo>): StablecoinInterestInfo;
|
|
13
14
|
};
|
|
14
15
|
declare type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
15
16
|
export declare type DeepPartial<T> = T extends Builtin ? T : T extends Long ? string | number | Long : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.StablecoinInterestInfo = exports.protobufPackage = void 0;
|
|
7
|
+
/* eslint-disable */
|
|
8
|
+
const long_1 = __importDefault(require("long"));
|
|
9
|
+
const minimal_1 = __importDefault(require("protobufjs/minimal"));
|
|
10
|
+
const timestamp_1 = require("../google/protobuf/timestamp");
|
|
11
|
+
exports.protobufPackage = "Switcheo.carbon.cdp";
|
|
12
|
+
const baseStablecoinInterestInfo = { stablecoinInterestRate: "" };
|
|
13
|
+
exports.StablecoinInterestInfo = {
|
|
14
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
15
|
+
if (message.lastUpdatedTime !== undefined) {
|
|
16
|
+
timestamp_1.Timestamp.encode(toTimestamp(message.lastUpdatedTime), writer.uint32(10).fork()).ldelim();
|
|
17
|
+
}
|
|
18
|
+
if (message.stablecoinInterestRate !== "") {
|
|
19
|
+
writer.uint32(18).string(message.stablecoinInterestRate);
|
|
20
|
+
}
|
|
21
|
+
return writer;
|
|
22
|
+
},
|
|
23
|
+
decode(input, length) {
|
|
24
|
+
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
25
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
26
|
+
const message = Object.assign({}, baseStablecoinInterestInfo);
|
|
27
|
+
while (reader.pos < end) {
|
|
28
|
+
const tag = reader.uint32();
|
|
29
|
+
switch (tag >>> 3) {
|
|
30
|
+
case 1:
|
|
31
|
+
message.lastUpdatedTime = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
32
|
+
break;
|
|
33
|
+
case 2:
|
|
34
|
+
message.stablecoinInterestRate = reader.string();
|
|
35
|
+
break;
|
|
36
|
+
default:
|
|
37
|
+
reader.skipType(tag & 7);
|
|
38
|
+
break;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return message;
|
|
42
|
+
},
|
|
43
|
+
fromJSON(object) {
|
|
44
|
+
const message = Object.assign({}, baseStablecoinInterestInfo);
|
|
45
|
+
message.lastUpdatedTime =
|
|
46
|
+
object.lastUpdatedTime !== undefined && object.lastUpdatedTime !== null
|
|
47
|
+
? fromJsonTimestamp(object.lastUpdatedTime)
|
|
48
|
+
: undefined;
|
|
49
|
+
message.stablecoinInterestRate =
|
|
50
|
+
object.stablecoinInterestRate !== undefined &&
|
|
51
|
+
object.stablecoinInterestRate !== null
|
|
52
|
+
? String(object.stablecoinInterestRate)
|
|
53
|
+
: "";
|
|
54
|
+
return message;
|
|
55
|
+
},
|
|
56
|
+
toJSON(message) {
|
|
57
|
+
const obj = {};
|
|
58
|
+
message.lastUpdatedTime !== undefined &&
|
|
59
|
+
(obj.lastUpdatedTime = message.lastUpdatedTime.toISOString());
|
|
60
|
+
message.stablecoinInterestRate !== undefined &&
|
|
61
|
+
(obj.stablecoinInterestRate = message.stablecoinInterestRate);
|
|
62
|
+
return obj;
|
|
63
|
+
},
|
|
64
|
+
fromPartial(object) {
|
|
65
|
+
var _a, _b;
|
|
66
|
+
const message = Object.assign({}, baseStablecoinInterestInfo);
|
|
67
|
+
message.lastUpdatedTime = (_a = object.lastUpdatedTime) !== null && _a !== void 0 ? _a : undefined;
|
|
68
|
+
message.stablecoinInterestRate = (_b = object.stablecoinInterestRate) !== null && _b !== void 0 ? _b : "";
|
|
69
|
+
return message;
|
|
70
|
+
},
|
|
71
|
+
};
|
|
72
|
+
function toTimestamp(date) {
|
|
73
|
+
const seconds = numberToLong(date.getTime() / 1000);
|
|
74
|
+
const nanos = (date.getTime() % 1000) * 1000000;
|
|
75
|
+
return { seconds, nanos };
|
|
76
|
+
}
|
|
77
|
+
function fromTimestamp(t) {
|
|
78
|
+
let millis = t.seconds.toNumber() * 1000;
|
|
79
|
+
millis += t.nanos / 1000000;
|
|
80
|
+
return new Date(millis);
|
|
81
|
+
}
|
|
82
|
+
function fromJsonTimestamp(o) {
|
|
83
|
+
if (o instanceof Date) {
|
|
84
|
+
return o;
|
|
85
|
+
}
|
|
86
|
+
else if (typeof o === "string") {
|
|
87
|
+
return new Date(o);
|
|
88
|
+
}
|
|
89
|
+
else {
|
|
90
|
+
return fromTimestamp(timestamp_1.Timestamp.fromJSON(o));
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
function numberToLong(number) {
|
|
94
|
+
return long_1.default.fromNumber(number);
|
|
95
|
+
}
|
|
96
|
+
if (minimal_1.default.util.Long !== long_1.default) {
|
|
97
|
+
minimal_1.default.util.Long = long_1.default;
|
|
98
|
+
minimal_1.default.configure();
|
|
99
|
+
}
|
package/lib/codec/cdp/tx.d.ts
CHANGED
|
@@ -138,18 +138,18 @@ export interface MsgRepayAssetWithCollateral {
|
|
|
138
138
|
}
|
|
139
139
|
export interface MsgRepayAssetWithCollateralResponse {
|
|
140
140
|
}
|
|
141
|
-
export interface MsgSetStablecoinInterestRate {
|
|
142
|
-
creator: string;
|
|
143
|
-
stablecoinInterestRate: string;
|
|
144
|
-
}
|
|
145
|
-
export interface MsgSetStablecoinInterestRateResponse {
|
|
146
|
-
}
|
|
147
141
|
export interface MsgSetStablecoinMintCap {
|
|
148
142
|
creator: string;
|
|
149
143
|
stablecoinMintCap: string;
|
|
150
144
|
}
|
|
151
145
|
export interface MsgSetStablecoinMintCapResponse {
|
|
152
146
|
}
|
|
147
|
+
export interface MsgSetStablecoinInterestRate {
|
|
148
|
+
creator: string;
|
|
149
|
+
stablecoinInterestRate: string;
|
|
150
|
+
}
|
|
151
|
+
export interface MsgSetStablecoinInterestRateResponse {
|
|
152
|
+
}
|
|
153
153
|
export interface MsgMintStablecoin {
|
|
154
154
|
creator: string;
|
|
155
155
|
amount: string;
|
|
@@ -548,20 +548,6 @@ export declare const MsgRepayAssetWithCollateralResponse: {
|
|
|
548
548
|
toJSON(_: MsgRepayAssetWithCollateralResponse): unknown;
|
|
549
549
|
fromPartial(_: DeepPartial<MsgRepayAssetWithCollateralResponse>): MsgRepayAssetWithCollateralResponse;
|
|
550
550
|
};
|
|
551
|
-
export declare const MsgSetStablecoinInterestRate: {
|
|
552
|
-
encode(message: MsgSetStablecoinInterestRate, writer?: _m0.Writer): _m0.Writer;
|
|
553
|
-
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): MsgSetStablecoinInterestRate;
|
|
554
|
-
fromJSON(object: any): MsgSetStablecoinInterestRate;
|
|
555
|
-
toJSON(message: MsgSetStablecoinInterestRate): unknown;
|
|
556
|
-
fromPartial(object: DeepPartial<MsgSetStablecoinInterestRate>): MsgSetStablecoinInterestRate;
|
|
557
|
-
};
|
|
558
|
-
export declare const MsgSetStablecoinInterestRateResponse: {
|
|
559
|
-
encode(_: MsgSetStablecoinInterestRateResponse, writer?: _m0.Writer): _m0.Writer;
|
|
560
|
-
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): MsgSetStablecoinInterestRateResponse;
|
|
561
|
-
fromJSON(_: any): MsgSetStablecoinInterestRateResponse;
|
|
562
|
-
toJSON(_: MsgSetStablecoinInterestRateResponse): unknown;
|
|
563
|
-
fromPartial(_: DeepPartial<MsgSetStablecoinInterestRateResponse>): MsgSetStablecoinInterestRateResponse;
|
|
564
|
-
};
|
|
565
551
|
export declare const MsgSetStablecoinMintCap: {
|
|
566
552
|
encode(message: MsgSetStablecoinMintCap, writer?: _m0.Writer): _m0.Writer;
|
|
567
553
|
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): MsgSetStablecoinMintCap;
|
|
@@ -576,6 +562,20 @@ export declare const MsgSetStablecoinMintCapResponse: {
|
|
|
576
562
|
toJSON(_: MsgSetStablecoinMintCapResponse): unknown;
|
|
577
563
|
fromPartial(_: DeepPartial<MsgSetStablecoinMintCapResponse>): MsgSetStablecoinMintCapResponse;
|
|
578
564
|
};
|
|
565
|
+
export declare const MsgSetStablecoinInterestRate: {
|
|
566
|
+
encode(message: MsgSetStablecoinInterestRate, writer?: _m0.Writer): _m0.Writer;
|
|
567
|
+
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): MsgSetStablecoinInterestRate;
|
|
568
|
+
fromJSON(object: any): MsgSetStablecoinInterestRate;
|
|
569
|
+
toJSON(message: MsgSetStablecoinInterestRate): unknown;
|
|
570
|
+
fromPartial(object: DeepPartial<MsgSetStablecoinInterestRate>): MsgSetStablecoinInterestRate;
|
|
571
|
+
};
|
|
572
|
+
export declare const MsgSetStablecoinInterestRateResponse: {
|
|
573
|
+
encode(_: MsgSetStablecoinInterestRateResponse, writer?: _m0.Writer): _m0.Writer;
|
|
574
|
+
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): MsgSetStablecoinInterestRateResponse;
|
|
575
|
+
fromJSON(_: any): MsgSetStablecoinInterestRateResponse;
|
|
576
|
+
toJSON(_: MsgSetStablecoinInterestRateResponse): unknown;
|
|
577
|
+
fromPartial(_: DeepPartial<MsgSetStablecoinInterestRateResponse>): MsgSetStablecoinInterestRateResponse;
|
|
578
|
+
};
|
|
579
579
|
export declare const MsgMintStablecoin: {
|
|
580
580
|
encode(message: MsgMintStablecoin, writer?: _m0.Writer): _m0.Writer;
|
|
581
581
|
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): MsgMintStablecoin;
|