carbon-js-sdk 0.2.9-dev.2 → 0.2.10
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/NEOClient.js +1 -1
- package/lib/codec/book/genesis.d.ts +1 -1
- package/lib/codec/book/genesis.js +1 -1
- package/lib/codec/book/query.d.ts +1 -1
- package/lib/codec/book/query.js +1 -1
- package/lib/codec/broker/genesis.d.ts +1 -1
- package/lib/codec/broker/genesis.js +1 -1
- package/lib/codec/broker/query.d.ts +3 -3
- package/lib/codec/broker/query.js +3 -3
- package/lib/codec/btcx/denom_cross_chain_info.d.ts +1 -1
- package/lib/codec/btcx/denom_cross_chain_info.js +1 -1
- package/lib/codec/btcx/query.d.ts +1 -1
- package/lib/codec/btcx/query.js +1 -1
- package/lib/codec/ccm/genesis.d.ts +1 -1
- package/lib/codec/ccm/genesis.js +1 -1
- package/lib/codec/cdp/event.d.ts +22 -226
- package/lib/codec/cdp/event.js +80 -1414
- package/lib/codec/cdp/genesis.d.ts +4 -57
- package/lib/codec/cdp/genesis.js +22 -417
- package/lib/codec/cdp/query.d.ts +95 -191
- package/lib/codec/cdp/query.js +238 -676
- package/lib/codec/cdp/tx.d.ts +96 -466
- package/lib/codec/cdp/tx.js +182 -1962
- package/lib/codec/coin/event.d.ts +1 -1
- package/lib/codec/coin/event.js +1 -1
- package/lib/codec/coin/genesis.d.ts +2 -2
- package/lib/codec/coin/genesis.js +2 -2
- package/lib/codec/coin/proposal.d.ts +1 -1
- package/lib/codec/coin/proposal.js +1 -1
- package/lib/codec/coin/query.d.ts +5 -2
- package/lib/codec/coin/query.js +8 -2
- package/lib/codec/coin/token.d.ts +0 -11
- package/lib/codec/coin/token.js +1 -65
- package/lib/codec/coin/tx.d.ts +1 -1
- package/lib/codec/coin/tx.js +1 -1
- package/lib/codec/cosmos/auth/v1beta1/genesis.d.ts +1 -1
- package/lib/codec/cosmos/auth/v1beta1/genesis.js +1 -1
- package/lib/codec/cosmos/auth/v1beta1/query.d.ts +2 -2
- package/lib/codec/cosmos/auth/v1beta1/query.js +2 -2
- package/lib/codec/cosmos/authz/v1beta1/query.d.ts +2 -2
- package/lib/codec/cosmos/authz/v1beta1/query.js +2 -2
- package/lib/codec/cosmos/authz/v1beta1/tx.d.ts +1 -1
- package/lib/codec/cosmos/authz/v1beta1/tx.js +1 -1
- package/lib/codec/cosmos/bank/v1beta1/authz.d.ts +1 -1
- package/lib/codec/cosmos/bank/v1beta1/authz.js +1 -1
- package/lib/codec/cosmos/bank/v1beta1/bank.d.ts +1 -1
- package/lib/codec/cosmos/bank/v1beta1/bank.js +1 -1
- package/lib/codec/cosmos/bank/v1beta1/genesis.d.ts +2 -2
- package/lib/codec/cosmos/bank/v1beta1/genesis.js +2 -2
- package/lib/codec/cosmos/bank/v1beta1/query.d.ts +3 -3
- package/lib/codec/cosmos/bank/v1beta1/query.js +3 -3
- package/lib/codec/cosmos/bank/v1beta1/tx.d.ts +2 -2
- package/lib/codec/cosmos/bank/v1beta1/tx.js +2 -2
- package/lib/codec/cosmos/base/tendermint/v1beta1/query.d.ts +1 -1
- package/lib/codec/cosmos/base/tendermint/v1beta1/query.js +1 -1
- package/lib/codec/cosmos/capability/v1beta1/genesis.d.ts +1 -1
- package/lib/codec/cosmos/capability/v1beta1/genesis.js +1 -1
- package/lib/codec/cosmos/crisis/v1beta1/genesis.d.ts +1 -1
- package/lib/codec/cosmos/crisis/v1beta1/genesis.js +1 -1
- package/lib/codec/cosmos/distribution/v1beta1/distribution.d.ts +1 -1
- package/lib/codec/cosmos/distribution/v1beta1/distribution.js +1 -1
- package/lib/codec/cosmos/distribution/v1beta1/genesis.d.ts +2 -2
- package/lib/codec/cosmos/distribution/v1beta1/genesis.js +2 -2
- package/lib/codec/cosmos/distribution/v1beta1/query.d.ts +3 -3
- package/lib/codec/cosmos/distribution/v1beta1/query.js +3 -3
- package/lib/codec/cosmos/distribution/v1beta1/tx.d.ts +1 -1
- package/lib/codec/cosmos/distribution/v1beta1/tx.js +1 -1
- package/lib/codec/cosmos/evidence/v1beta1/query.d.ts +1 -1
- package/lib/codec/cosmos/evidence/v1beta1/query.js +1 -1
- package/lib/codec/cosmos/feegrant/v1beta1/feegrant.d.ts +1 -1
- package/lib/codec/cosmos/feegrant/v1beta1/feegrant.js +1 -1
- package/lib/codec/cosmos/feegrant/v1beta1/genesis.d.ts +1 -1
- package/lib/codec/cosmos/feegrant/v1beta1/genesis.js +1 -1
- package/lib/codec/cosmos/feegrant/v1beta1/query.d.ts +2 -2
- package/lib/codec/cosmos/feegrant/v1beta1/query.js +2 -2
- package/lib/codec/cosmos/gov/v1beta1/genesis.d.ts +1 -1
- package/lib/codec/cosmos/gov/v1beta1/genesis.js +1 -1
- package/lib/codec/cosmos/gov/v1beta1/gov.d.ts +1 -1
- package/lib/codec/cosmos/gov/v1beta1/gov.js +1 -1
- package/lib/codec/cosmos/gov/v1beta1/query.d.ts +2 -2
- package/lib/codec/cosmos/gov/v1beta1/query.js +2 -2
- package/lib/codec/cosmos/gov/v1beta1/tx.d.ts +2 -2
- package/lib/codec/cosmos/gov/v1beta1/tx.js +2 -2
- package/lib/codec/cosmos/mint/v1beta1/genesis.d.ts +1 -1
- package/lib/codec/cosmos/mint/v1beta1/genesis.js +1 -1
- package/lib/codec/cosmos/mint/v1beta1/query.d.ts +1 -1
- package/lib/codec/cosmos/mint/v1beta1/query.js +1 -1
- package/lib/codec/cosmos/params/v1beta1/query.d.ts +1 -1
- package/lib/codec/cosmos/params/v1beta1/query.js +1 -1
- package/lib/codec/cosmos/slashing/v1beta1/genesis.d.ts +1 -1
- package/lib/codec/cosmos/slashing/v1beta1/genesis.js +1 -1
- package/lib/codec/cosmos/slashing/v1beta1/query.d.ts +2 -2
- package/lib/codec/cosmos/slashing/v1beta1/query.js +2 -2
- package/lib/codec/cosmos/staking/v1beta1/authz.d.ts +1 -1
- package/lib/codec/cosmos/staking/v1beta1/authz.js +1 -1
- package/lib/codec/cosmos/staking/v1beta1/genesis.d.ts +1 -1
- package/lib/codec/cosmos/staking/v1beta1/genesis.js +1 -1
- package/lib/codec/cosmos/staking/v1beta1/query.d.ts +2 -2
- package/lib/codec/cosmos/staking/v1beta1/query.js +2 -2
- package/lib/codec/cosmos/staking/v1beta1/staking.d.ts +1 -1
- package/lib/codec/cosmos/staking/v1beta1/staking.js +1 -1
- package/lib/codec/cosmos/staking/v1beta1/tx.d.ts +2 -2
- package/lib/codec/cosmos/staking/v1beta1/tx.js +2 -2
- package/lib/codec/cosmos/tx/signing/v1beta1/signing.d.ts +1 -1
- package/lib/codec/cosmos/tx/signing/v1beta1/signing.js +1 -1
- package/lib/codec/cosmos/tx/v1beta1/service.d.ts +3 -3
- package/lib/codec/cosmos/tx/v1beta1/service.js +3 -3
- package/lib/codec/cosmos/tx/v1beta1/tx.d.ts +3 -3
- package/lib/codec/cosmos/tx/v1beta1/tx.js +3 -3
- package/lib/codec/cosmos/upgrade/v1beta1/query.d.ts +1 -1
- package/lib/codec/cosmos/upgrade/v1beta1/query.js +1 -1
- package/lib/codec/cosmos/vesting/v1beta1/tx.d.ts +1 -1
- package/lib/codec/cosmos/vesting/v1beta1/tx.js +1 -1
- package/lib/codec/cosmos/vesting/v1beta1/vesting.d.ts +2 -2
- package/lib/codec/cosmos/vesting/v1beta1/vesting.js +2 -2
- package/lib/codec/fee/genesis.d.ts +1 -1
- package/lib/codec/fee/genesis.js +1 -1
- package/lib/codec/fee/proposal.d.ts +1 -1
- package/lib/codec/fee/proposal.js +1 -1
- package/lib/codec/fee/query.d.ts +1 -1
- package/lib/codec/fee/query.js +1 -1
- package/lib/codec/fee/tx.d.ts +1 -1
- package/lib/codec/fee/tx.js +1 -1
- package/lib/codec/headersync/genesis.d.ts +1 -1
- package/lib/codec/headersync/genesis.js +1 -1
- package/lib/codec/headersync/query.d.ts +1 -1
- package/lib/codec/headersync/query.js +1 -1
- package/lib/codec/index.d.ts +22 -53
- package/lib/codec/index.js +384 -502
- package/lib/codec/inflation/genesis.d.ts +1 -1
- package/lib/codec/inflation/genesis.js +1 -1
- package/lib/codec/inflation/query.d.ts +1 -1
- package/lib/codec/inflation/query.js +1 -1
- package/lib/codec/insurance/genesis.d.ts +1 -1
- package/lib/codec/insurance/genesis.js +1 -1
- package/lib/codec/leverage/genesis.d.ts +1 -1
- package/lib/codec/leverage/genesis.js +1 -1
- package/lib/codec/leverage/query.d.ts +1 -1
- package/lib/codec/leverage/query.js +1 -1
- package/lib/codec/liquidation/genesis.d.ts +1 -1
- package/lib/codec/liquidation/genesis.js +1 -1
- package/lib/codec/liquidation/query.d.ts +1 -1
- package/lib/codec/liquidation/query.js +1 -1
- package/lib/codec/liquidation/quote_changes.d.ts +1 -1
- package/lib/codec/liquidation/quote_changes.js +1 -1
- package/lib/codec/liquiditypool/event.d.ts +2 -2
- package/lib/codec/liquiditypool/event.js +2 -2
- package/lib/codec/liquiditypool/genesis.d.ts +2 -2
- package/lib/codec/liquiditypool/genesis.js +2 -2
- package/lib/codec/liquiditypool/proposal.d.ts +1 -1
- package/lib/codec/liquiditypool/proposal.js +1 -1
- package/lib/codec/liquiditypool/query.d.ts +2 -2
- package/lib/codec/liquiditypool/query.js +2 -2
- package/lib/codec/liquiditypool/tx.d.ts +1 -1
- package/lib/codec/liquiditypool/tx.js +1 -1
- package/lib/codec/lockproxy/genesis.d.ts +1 -1
- package/lib/codec/lockproxy/genesis.js +1 -1
- package/lib/codec/lockproxy/query.d.ts +1 -1
- package/lib/codec/lockproxy/query.js +1 -1
- package/lib/codec/market/event.d.ts +1 -1
- package/lib/codec/market/event.js +1 -1
- package/lib/codec/market/genesis.d.ts +1 -2
- package/lib/codec/market/genesis.js +2 -20
- package/lib/codec/market/proposal.d.ts +1 -1
- package/lib/codec/market/proposal.js +1 -1
- package/lib/codec/market/query.d.ts +1 -1
- package/lib/codec/market/query.js +1 -1
- package/lib/codec/market/tx.d.ts +1 -1
- package/lib/codec/market/tx.js +1 -1
- package/lib/codec/marketstats/genesis.d.ts +1 -1
- package/lib/codec/marketstats/genesis.js +1 -1
- package/lib/codec/marketstats/query.d.ts +2 -2
- package/lib/codec/marketstats/query.js +2 -2
- package/lib/codec/misc/message.d.ts +1 -1
- package/lib/codec/misc/message.js +1 -1
- package/lib/codec/misc/query.d.ts +3 -3
- package/lib/codec/misc/query.js +3 -3
- package/lib/codec/misc/trade.d.ts +0 -1
- package/lib/codec/misc/trade.js +0 -17
- package/lib/codec/misc/transaction.d.ts +1 -1
- package/lib/codec/misc/transaction.js +1 -1
- package/lib/codec/oracle/event.d.ts +1 -1
- package/lib/codec/oracle/event.js +1 -1
- package/lib/codec/oracle/genesis.d.ts +1 -1
- package/lib/codec/oracle/genesis.js +1 -1
- package/lib/codec/oracle/proposal.d.ts +1 -1
- package/lib/codec/oracle/proposal.js +1 -1
- package/lib/codec/oracle/query.d.ts +2 -2
- package/lib/codec/oracle/query.js +2 -2
- package/lib/codec/order/event.d.ts +1 -1
- package/lib/codec/order/event.js +1 -1
- package/lib/codec/order/genesis.d.ts +1 -1
- package/lib/codec/order/genesis.js +1 -1
- package/lib/codec/order/query.d.ts +1 -1
- package/lib/codec/order/query.js +1 -1
- package/lib/codec/position/event.d.ts +1 -1
- package/lib/codec/position/event.js +1 -1
- package/lib/codec/position/genesis.d.ts +1 -1
- package/lib/codec/position/genesis.js +1 -1
- package/lib/codec/position/query.d.ts +1 -1
- package/lib/codec/position/query.js +1 -1
- package/lib/codec/pricing/event.d.ts +1 -11
- package/lib/codec/pricing/event.js +2 -52
- package/lib/codec/pricing/genesis.d.ts +1 -2
- package/lib/codec/pricing/genesis.js +5 -20
- package/lib/codec/pricing/pricing.d.ts +0 -13
- package/lib/codec/pricing/pricing.js +1 -83
- package/lib/codec/pricing/query.d.ts +1 -1
- package/lib/codec/pricing/query.js +1 -1
- package/lib/codec/profile/event.d.ts +1 -1
- package/lib/codec/profile/event.js +1 -1
- package/lib/codec/profile/genesis.d.ts +1 -1
- package/lib/codec/profile/genesis.js +1 -1
- package/lib/codec/profile/query.d.ts +1 -1
- package/lib/codec/profile/query.js +1 -1
- package/lib/codec/subaccount/genesis.d.ts +1 -1
- package/lib/codec/subaccount/genesis.js +1 -1
- package/lib/codec/subaccount/query.d.ts +1 -1
- package/lib/codec/subaccount/query.js +1 -1
- package/lib/codec/tendermint/abci/types.d.ts +4 -4
- package/lib/codec/tendermint/abci/types.js +4 -4
- package/lib/codec/tendermint/types/block.d.ts +2 -2
- package/lib/codec/tendermint/types/block.js +2 -2
- package/lib/codec/tendermint/types/evidence.d.ts +2 -2
- package/lib/codec/tendermint/types/evidence.js +2 -2
- package/lib/codec/tendermint/types/types.d.ts +3 -3
- package/lib/codec/tendermint/types/types.js +3 -3
- package/lib/codec/tendermint/types/validator.d.ts +1 -1
- package/lib/codec/tendermint/types/validator.js +1 -1
- package/lib/modules/admin.d.ts +1 -53
- package/lib/modules/admin.js +42 -174
- package/lib/modules/cdp.d.ts +12 -55
- package/lib/modules/cdp.js +20 -134
- package/lib/provider/amino/types/admin.js +7 -48
- package/lib/provider/amino/types/cdp.js +32 -72
- package/lib/util/tx.d.ts +14 -42
- package/lib/websocket/channel.js +0 -26
- package/lib/websocket/models.d.ts +0 -63
- package/lib/websocket/types.d.ts +3 -38
- package/lib/websocket/types.js +0 -16
- package/package.json +2 -2
|
@@ -43,14 +43,6 @@ const TxTypes = {
|
|
|
43
43
|
RemoveMinGasPrice: "fee/RemoveMinGasPrice",
|
|
44
44
|
CreateValidator: "cosmos-sdk/MsgCreateValidator",
|
|
45
45
|
EditValidator: "cosmos-sdk/MsgEditValidator",
|
|
46
|
-
AddRateStrategy: "cdp/AddRateStrategy",
|
|
47
|
-
UpdateRateStrategy: "cdp/UpdateRateStrategy",
|
|
48
|
-
RemoveRateStrategy: "cdp/RemoveRateStrategy",
|
|
49
|
-
AddAsset: "cdp/AddAsset",
|
|
50
|
-
UpdateAsset: "cdp/UpdateAsset",
|
|
51
|
-
SetLiquidationFee: "cdp/SetLiquidationFee",
|
|
52
|
-
SetInterestFee: "cdp/SetInterestFee",
|
|
53
|
-
SetStableCoinInterestRate: "cdp/SetStableCoinInterestRate",
|
|
54
46
|
};
|
|
55
47
|
const MsgCreateOracle = {
|
|
56
48
|
aminoType: TxTypes.CreateOracle,
|
|
@@ -92,6 +84,12 @@ const MsgCreateMarket = {
|
|
|
92
84
|
currentQuotePriceUsd: utils_1.ConvertEncType.Dec,
|
|
93
85
|
},
|
|
94
86
|
};
|
|
87
|
+
const MsgCreateVaultType = {
|
|
88
|
+
aminoType: TxTypes.CreateVaultType,
|
|
89
|
+
valueMap: {
|
|
90
|
+
collateralizationRatio: utils_1.ConvertEncType.Dec,
|
|
91
|
+
},
|
|
92
|
+
};
|
|
95
93
|
const MsgLinkPool = {
|
|
96
94
|
aminoType: TxTypes.LinkPool,
|
|
97
95
|
valueMap: {
|
|
@@ -179,38 +177,6 @@ const MsgEditValidator = {
|
|
|
179
177
|
commissionRate: utils_1.ConvertEncType.Dec,
|
|
180
178
|
},
|
|
181
179
|
};
|
|
182
|
-
const MsgAddRateStrategy = {
|
|
183
|
-
aminoType: TxTypes.AddRateStrategy,
|
|
184
|
-
valueMap: {}
|
|
185
|
-
};
|
|
186
|
-
const MsgUpdateRateStrategy = {
|
|
187
|
-
aminoType: TxTypes.UpdateRateStrategy,
|
|
188
|
-
valueMap: {}
|
|
189
|
-
};
|
|
190
|
-
const MsgRemoveRateStrategy = {
|
|
191
|
-
aminoType: TxTypes.RemoveRateStrategy,
|
|
192
|
-
valueMap: {}
|
|
193
|
-
};
|
|
194
|
-
const MsgAddAsset = {
|
|
195
|
-
aminoType: TxTypes.AddAsset,
|
|
196
|
-
valueMap: {}
|
|
197
|
-
};
|
|
198
|
-
const MsgUpdateAsset = {
|
|
199
|
-
aminoType: TxTypes.UpdateAsset,
|
|
200
|
-
valueMap: {}
|
|
201
|
-
};
|
|
202
|
-
const MsgSetLiquidationFee = {
|
|
203
|
-
aminoType: TxTypes.SetLiquidationFee,
|
|
204
|
-
valueMap: {}
|
|
205
|
-
};
|
|
206
|
-
const MsgSetInterestFee = {
|
|
207
|
-
aminoType: TxTypes.SetInterestFee,
|
|
208
|
-
valueMap: {}
|
|
209
|
-
};
|
|
210
|
-
const MsgSetStableCoinInterestRate = {
|
|
211
|
-
aminoType: TxTypes.SetStableCoinInterestRate,
|
|
212
|
-
valueMap: {}
|
|
213
|
-
};
|
|
214
180
|
const AdminAmino = {
|
|
215
181
|
[CarbonTx.Types.MsgCreateOracle]: utils_1.generateAminoType(MsgCreateOracle),
|
|
216
182
|
[CarbonTx.Types.MsgBindToken]: utils_1.generateAminoType(MsgBindToken),
|
|
@@ -218,6 +184,7 @@ const AdminAmino = {
|
|
|
218
184
|
[CarbonTx.Types.MsgLinkToken]: utils_1.generateAminoType(MsgLinkToken),
|
|
219
185
|
[CarbonTx.Types.MsgSyncToken]: utils_1.generateAminoType(MsgSyncToken),
|
|
220
186
|
[CarbonTx.Types.MsgCreateMarket]: utils_1.generateAminoType(MsgCreateMarket),
|
|
187
|
+
[CarbonTx.Types.MsgCreateVaultType]: utils_1.generateAminoType(MsgCreateVaultType),
|
|
221
188
|
[CarbonTx.Types.MsgLinkPool]: utils_1.generateAminoType(MsgLinkPool),
|
|
222
189
|
[CarbonTx.Types.MsgUnlinkPool]: utils_1.generateAminoType(MsgUnlinkPool),
|
|
223
190
|
[CarbonTx.Types.MsgUpdatePool]: utils_1.generateAminoType(MsgUpdatePool),
|
|
@@ -231,13 +198,5 @@ const AdminAmino = {
|
|
|
231
198
|
[CarbonTx.Types.MsgRemoveMinGasPrice]: utils_1.generateAminoType(MsgRemoveMinGasPrice),
|
|
232
199
|
[CarbonTx.Types.MsgCreateValidator]: utils_1.generateAminoType(MsgCreateValidator),
|
|
233
200
|
[CarbonTx.Types.MsgEditValidator]: utils_1.generateAminoType(MsgEditValidator),
|
|
234
|
-
[CarbonTx.Types.MsgAddRateStrategy]: utils_1.generateAminoType(MsgAddRateStrategy),
|
|
235
|
-
[CarbonTx.Types.MsgUpdateRateStrategy]: utils_1.generateAminoType(MsgUpdateRateStrategy),
|
|
236
|
-
[CarbonTx.Types.MsgRemoveRateStrategy]: utils_1.generateAminoType(MsgRemoveRateStrategy),
|
|
237
|
-
[CarbonTx.Types.MsgAddAsset]: utils_1.generateAminoType(MsgAddAsset),
|
|
238
|
-
[CarbonTx.Types.MsgUpdateAsset]: utils_1.generateAminoType(MsgUpdateAsset),
|
|
239
|
-
[CarbonTx.Types.MsgSetLiquidationFee]: utils_1.generateAminoType(MsgSetLiquidationFee),
|
|
240
|
-
[CarbonTx.Types.MsgSetInterestFee]: utils_1.generateAminoType(MsgSetInterestFee),
|
|
241
|
-
[CarbonTx.Types.MsgSetStablecoinInterestRate]: utils_1.generateAminoType(MsgSetStableCoinInterestRate),
|
|
242
201
|
};
|
|
243
202
|
exports.default = AdminAmino;
|
|
@@ -22,79 +22,39 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
22
22
|
const CarbonTx = __importStar(require("../../../util/tx"));
|
|
23
23
|
const utils_1 = require("../utils");
|
|
24
24
|
const TxTypes = {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
};
|
|
42
|
-
const
|
|
43
|
-
aminoType: TxTypes.
|
|
44
|
-
valueMap: {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
};
|
|
54
|
-
const MsgBorrowAsset = {
|
|
55
|
-
aminoType: TxTypes.BorrowAsset,
|
|
56
|
-
valueMap: {},
|
|
57
|
-
};
|
|
58
|
-
const MsgRepayAsset = {
|
|
59
|
-
aminoType: TxTypes.RepayAsset,
|
|
60
|
-
valueMap: {},
|
|
61
|
-
};
|
|
62
|
-
const MsgSupplyAssetAndLockCollateral = {
|
|
63
|
-
aminoType: TxTypes.SupplyAssetAndLockCollateral,
|
|
64
|
-
valueMap: {},
|
|
65
|
-
};
|
|
66
|
-
const MsgUnlockCollateralAndWithdrawAsset = {
|
|
67
|
-
aminoType: TxTypes.UnlockCollateralAndWithdrawAsset,
|
|
68
|
-
valueMap: {},
|
|
69
|
-
};
|
|
70
|
-
const MsgLiquidateCollateral = {
|
|
71
|
-
aminoType: TxTypes.LiquidateCollateral,
|
|
72
|
-
valueMap: {},
|
|
73
|
-
};
|
|
74
|
-
const MsgRepayAssetWithCdpTokens = {
|
|
75
|
-
aminoType: TxTypes.RepayAssetWithCdpTokens,
|
|
76
|
-
valueMap: {},
|
|
77
|
-
};
|
|
78
|
-
const MsgRepayAssetWithCollateral = {
|
|
79
|
-
aminoType: TxTypes.RepayAssetWithCollateral,
|
|
80
|
-
valueMap: {},
|
|
81
|
-
};
|
|
82
|
-
const MsgMintStablecoin = {
|
|
83
|
-
aminoType: TxTypes.MintStablecoin,
|
|
84
|
-
valueMap: {},
|
|
25
|
+
AddCollateral: "cdp/AddCollateral",
|
|
26
|
+
RemoveCollateral: "cdp/removeCollateral",
|
|
27
|
+
AddDebt: "cdp/AddDebt",
|
|
28
|
+
RemoveDebt: "cdp/RemoveDebt",
|
|
29
|
+
};
|
|
30
|
+
const MsgAddCollateral = {
|
|
31
|
+
aminoType: TxTypes.AddCollateral,
|
|
32
|
+
valueMap: {
|
|
33
|
+
vaultTypeId: utils_1.ConvertEncType.Long,
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
const MsgRemoveCollateral = {
|
|
37
|
+
aminoType: TxTypes.RemoveCollateral,
|
|
38
|
+
valueMap: {
|
|
39
|
+
vaultTypeId: utils_1.ConvertEncType.Long,
|
|
40
|
+
},
|
|
41
|
+
};
|
|
42
|
+
const MsgAddDebt = {
|
|
43
|
+
aminoType: TxTypes.AddDebt,
|
|
44
|
+
valueMap: {
|
|
45
|
+
vaultTypeId: utils_1.ConvertEncType.Long,
|
|
46
|
+
},
|
|
47
|
+
};
|
|
48
|
+
const MsgRemoveDebt = {
|
|
49
|
+
aminoType: TxTypes.RemoveDebt,
|
|
50
|
+
valueMap: {
|
|
51
|
+
vaultTypeId: utils_1.ConvertEncType.Long,
|
|
52
|
+
},
|
|
85
53
|
};
|
|
86
54
|
const CdpAmino = {
|
|
87
|
-
[CarbonTx.Types.
|
|
88
|
-
[CarbonTx.Types.
|
|
89
|
-
[CarbonTx.Types.
|
|
90
|
-
[CarbonTx.Types.
|
|
91
|
-
[CarbonTx.Types.MsgBorrowAsset]: utils_1.generateAminoType(MsgBorrowAsset),
|
|
92
|
-
[CarbonTx.Types.MsgRepayAsset]: utils_1.generateAminoType(MsgRepayAsset),
|
|
93
|
-
[CarbonTx.Types.MsgSupplyAssetAndLockCollateral]: utils_1.generateAminoType(MsgSupplyAssetAndLockCollateral),
|
|
94
|
-
[CarbonTx.Types.MsgUnlockCollateralAndWithdrawAsset]: utils_1.generateAminoType(MsgUnlockCollateralAndWithdrawAsset),
|
|
95
|
-
[CarbonTx.Types.MsgLiquidateCollateral]: utils_1.generateAminoType(MsgLiquidateCollateral),
|
|
96
|
-
[CarbonTx.Types.MsgRepayAssetWithCdpTokens]: utils_1.generateAminoType(MsgRepayAssetWithCdpTokens),
|
|
97
|
-
[CarbonTx.Types.MsgRepayAssetWithCollateral]: utils_1.generateAminoType(MsgRepayAssetWithCollateral),
|
|
98
|
-
[CarbonTx.Types.MsgMintStablecoin]: utils_1.generateAminoType(MsgMintStablecoin),
|
|
55
|
+
[CarbonTx.Types.MsgAddCollateral]: utils_1.generateAminoType(MsgAddCollateral),
|
|
56
|
+
[CarbonTx.Types.MsgRemoveCollateral]: utils_1.generateAminoType(MsgRemoveCollateral),
|
|
57
|
+
[CarbonTx.Types.MsgAddDebt]: utils_1.generateAminoType(MsgAddDebt),
|
|
58
|
+
[CarbonTx.Types.MsgRemoveDebt]: utils_1.generateAminoType(MsgRemoveDebt),
|
|
99
59
|
};
|
|
100
60
|
exports.default = CdpAmino;
|
package/lib/util/tx.d.ts
CHANGED
|
@@ -57,48 +57,16 @@ export declare const Types: {
|
|
|
57
57
|
MsgCancelOrderResponse: string;
|
|
58
58
|
MsgCancelAll: string;
|
|
59
59
|
MsgCancelAllResponse: string;
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
MsgSupplyAsset: string;
|
|
71
|
-
MsgSupplyAssetResponse: string;
|
|
72
|
-
MsgWithdrawAsset: string;
|
|
73
|
-
MsgWithdrawAssetResponse: string;
|
|
74
|
-
MsgLockCollateral: string;
|
|
75
|
-
MsgLockCollateralResponse: string;
|
|
76
|
-
MsgUnlockCollateral: string;
|
|
77
|
-
MsgUnlockCollateralResponse: string;
|
|
78
|
-
MsgBorrowAsset: string;
|
|
79
|
-
MsgBorrowAssetResponse: string;
|
|
80
|
-
MsgRepayAsset: string;
|
|
81
|
-
MsgRepayAssetResponse: string;
|
|
82
|
-
MsgSupplyAssetAndLockCollateral: string;
|
|
83
|
-
MsgSupplyAssetAndLockCollateralResponse: string;
|
|
84
|
-
MsgUnlockCollateralAndWithdrawAsset: string;
|
|
85
|
-
MsgUnlockCollateralAndWithdrawAssetResponse: string;
|
|
86
|
-
MsgLiquidateCollateral: string;
|
|
87
|
-
MsgLiquidateCollateralResponse: string;
|
|
88
|
-
MsgSetLiquidationFee: string;
|
|
89
|
-
MsgSetLiquidationFeeResponse: string;
|
|
90
|
-
MsgSetInterestFee: string;
|
|
91
|
-
MsgSetInterestFeeResponse: string;
|
|
92
|
-
MsgRepayAssetWithCdpTokens: string;
|
|
93
|
-
MsgRepayAssetWithCdpTokensResponse: string;
|
|
94
|
-
MsgRepayAssetWithCollateral: string;
|
|
95
|
-
MsgRepayAssetWithCollateralResponse: string;
|
|
96
|
-
MsgSetStablecoinInterestRate: string;
|
|
97
|
-
MsgSetStablecoinInterestRateResponse: string;
|
|
98
|
-
MsgMintStablecoin: string;
|
|
99
|
-
MsgMintStablecoinResponse: string;
|
|
100
|
-
MsgReturnStablecoin: string;
|
|
101
|
-
MsgReturnStablecoinResponse: string;
|
|
60
|
+
MsgAddCollateral: string;
|
|
61
|
+
MsgAddCollateralResponse: string;
|
|
62
|
+
MsgRemoveCollateral: string;
|
|
63
|
+
MsgRemoveCollateralResponse: string;
|
|
64
|
+
MsgAddDebt: string;
|
|
65
|
+
MsgAddDebtResponse: string;
|
|
66
|
+
MsgRemoveDebt: string;
|
|
67
|
+
MsgRemoveDebtResponse: string;
|
|
68
|
+
MsgCreateVaultType: string;
|
|
69
|
+
MsgCreateVaultTypeResponse: string;
|
|
102
70
|
MsgSyncGenesis: string;
|
|
103
71
|
MsgSyncGenesisResponse: string;
|
|
104
72
|
MsgSyncHeaders: string;
|
|
@@ -117,6 +85,10 @@ export declare const Types: {
|
|
|
117
85
|
SetMinGasPriceProposal: string;
|
|
118
86
|
RemoveMsgGasCostProposal: string;
|
|
119
87
|
RemoveMinGasPriceProposal: string;
|
|
88
|
+
MsgEnableSend: string;
|
|
89
|
+
MsgEnableSendResponse: string;
|
|
90
|
+
MsgDisableSend: string;
|
|
91
|
+
MsgDisableSendResponse: string;
|
|
120
92
|
MsgCreate: string;
|
|
121
93
|
MsgCreateResponse: string;
|
|
122
94
|
MsgBind: string;
|
package/lib/websocket/channel.js
CHANGED
|
@@ -72,18 +72,6 @@ const generateChannelId = (params) => {
|
|
|
72
72
|
const { channel, address } = params;
|
|
73
73
|
return [channel, address].join(':');
|
|
74
74
|
}
|
|
75
|
-
case types_1.WSChannel.cdp_borrows: {
|
|
76
|
-
const { channel, address } = params;
|
|
77
|
-
return [channel, address].join(':');
|
|
78
|
-
}
|
|
79
|
-
case types_1.WSChannel.cdp_collaterals: {
|
|
80
|
-
const { channel, address } = params;
|
|
81
|
-
return [channel, address].join(':');
|
|
82
|
-
}
|
|
83
|
-
case types_1.WSChannel.cdp_liquidate_collaterals: {
|
|
84
|
-
const { channel } = params;
|
|
85
|
-
return [channel].join(':');
|
|
86
|
-
}
|
|
87
75
|
default:
|
|
88
76
|
throw new Error(`invalid subscription channel: ${params.channel}`);
|
|
89
77
|
}
|
|
@@ -180,20 +168,6 @@ const parseChannelId = (rawChannelId) => {
|
|
|
180
168
|
channel,
|
|
181
169
|
address,
|
|
182
170
|
};
|
|
183
|
-
case types_1.WSChannel.cdp_borrows:
|
|
184
|
-
return {
|
|
185
|
-
channel,
|
|
186
|
-
address,
|
|
187
|
-
};
|
|
188
|
-
case types_1.WSChannel.cdp_collaterals:
|
|
189
|
-
return {
|
|
190
|
-
channel,
|
|
191
|
-
address,
|
|
192
|
-
};
|
|
193
|
-
case types_1.WSChannel.cdp_liquidate_collaterals:
|
|
194
|
-
return {
|
|
195
|
-
channel,
|
|
196
|
-
};
|
|
197
171
|
default:
|
|
198
172
|
throw new Error('Error parsing channelId');
|
|
199
173
|
}
|
|
@@ -144,66 +144,3 @@ export interface Commitment {
|
|
|
144
144
|
commitment_power: string;
|
|
145
145
|
boost_factor: string;
|
|
146
146
|
}
|
|
147
|
-
export interface CDPParams {
|
|
148
|
-
interest_fee: string;
|
|
149
|
-
liquidation_fee: string;
|
|
150
|
-
stable_coin_interest_rate: string;
|
|
151
|
-
}
|
|
152
|
-
export interface RateStrategy {
|
|
153
|
-
name: string;
|
|
154
|
-
optimal_usage: string;
|
|
155
|
-
base_variable_borrow_rate: string;
|
|
156
|
-
variable_rate_slope_1: string;
|
|
157
|
-
variable_rate_slope_2: string;
|
|
158
|
-
base_stable_borrow_rate: string;
|
|
159
|
-
stable_rate_slope_1: string;
|
|
160
|
-
stable_rate_slope_2: string;
|
|
161
|
-
optimal_stable_to_total_debt_ratio: string;
|
|
162
|
-
}
|
|
163
|
-
export interface Asset {
|
|
164
|
-
asset_params: {
|
|
165
|
-
denom: string;
|
|
166
|
-
oracle_id: string;
|
|
167
|
-
rate_strategy_name: string;
|
|
168
|
-
loan_to_value: string;
|
|
169
|
-
liquidation_threshold: string;
|
|
170
|
-
liquidation_bonus: string;
|
|
171
|
-
supply_cap: string;
|
|
172
|
-
borrow_cap: string;
|
|
173
|
-
};
|
|
174
|
-
asset_utilization: {
|
|
175
|
-
denom: string;
|
|
176
|
-
total_borrowed: string;
|
|
177
|
-
total_amount: string;
|
|
178
|
-
utilizationRate: string;
|
|
179
|
-
};
|
|
180
|
-
}
|
|
181
|
-
export interface Collateral {
|
|
182
|
-
cdp_denom: string;
|
|
183
|
-
denom: string;
|
|
184
|
-
cdp_to_actual_ratio: string;
|
|
185
|
-
amount: string;
|
|
186
|
-
value_in_usd: string;
|
|
187
|
-
}
|
|
188
|
-
export interface Debt {
|
|
189
|
-
denom: string;
|
|
190
|
-
amount: string;
|
|
191
|
-
value_in_usd: string;
|
|
192
|
-
}
|
|
193
|
-
export interface AccountData {
|
|
194
|
-
total_collaterals_usd: string;
|
|
195
|
-
total_debts_usd: string;
|
|
196
|
-
available_borrows_usd: string;
|
|
197
|
-
curr_liquidation_threshold: string;
|
|
198
|
-
health_factor: string;
|
|
199
|
-
}
|
|
200
|
-
export interface CDPBorrow {
|
|
201
|
-
address: string;
|
|
202
|
-
amount: string;
|
|
203
|
-
denom: string;
|
|
204
|
-
}
|
|
205
|
-
export interface CDPCollaterals {
|
|
206
|
-
address: string;
|
|
207
|
-
amount: string;
|
|
208
|
-
denom: string;
|
|
209
|
-
}
|
package/lib/websocket/types.d.ts
CHANGED
|
@@ -15,10 +15,7 @@ export declare enum WSChannel {
|
|
|
15
15
|
positions_by_market = "positions_by_market",
|
|
16
16
|
pools = "pools",
|
|
17
17
|
pools_by_id = "pools_by_id",
|
|
18
|
-
commitments = "commitments"
|
|
19
|
-
cdp_borrows = "cdp_borrows",
|
|
20
|
-
cdp_collaterals = "cdp_collaterals",
|
|
21
|
-
cdp_liquidate_collaterals = "cdp_liquidate_collaterals"
|
|
18
|
+
commitments = "commitments"
|
|
22
19
|
}
|
|
23
20
|
export declare enum WSRequest {
|
|
24
21
|
MarketStats = "get_market_stats",
|
|
@@ -34,20 +31,7 @@ export declare enum WSRequest {
|
|
|
34
31
|
Balances = "get_balances",
|
|
35
32
|
OrderBook = "get_orderbook",
|
|
36
33
|
Pools = "get_pools",
|
|
37
|
-
Commitments = "get_commitments"
|
|
38
|
-
CDPAllAssets = "get_cdp_all_assets",
|
|
39
|
-
CDPAssets = "get_cdp_assets",
|
|
40
|
-
CDPAccountCollaterals = "get_cdp_account_collaterals",
|
|
41
|
-
CDPAccountDebts = "get_cdp_account_debts",
|
|
42
|
-
CDPAccountData = "get_cdp_account_data",
|
|
43
|
-
CDPParams = "get_cdp_params",
|
|
44
|
-
CDPAllRateStrategies = "get_cdp_all_rate_strategies",
|
|
45
|
-
CDPRateStrategies = "get_cdp_rate_strategies",
|
|
46
|
-
CDPBorrows = "get_cdp_borrows",
|
|
47
|
-
CDPTotalBorrows = "get_cdp_total_borrows",
|
|
48
|
-
CDPCollaterals = "get_cdp_collaterals",
|
|
49
|
-
CDPTotalCollaterals = "get_cdp_total_collaterals",
|
|
50
|
-
CDPLiquidateCollateral = "get_cdp_liquidate_collateral"
|
|
34
|
+
Commitments = "get_commitments"
|
|
51
35
|
}
|
|
52
36
|
export interface WsGetRecentTradesParams {
|
|
53
37
|
market: string;
|
|
@@ -91,17 +75,6 @@ export interface WsGetPositionsParams {
|
|
|
91
75
|
export interface WsGetCommitmentsParams {
|
|
92
76
|
address: string;
|
|
93
77
|
}
|
|
94
|
-
export interface WsGetCDPParams {
|
|
95
|
-
}
|
|
96
|
-
export interface WsGetCDPAssetParams {
|
|
97
|
-
denom: string;
|
|
98
|
-
}
|
|
99
|
-
export interface WsGetCDPAccountParams {
|
|
100
|
-
address: string;
|
|
101
|
-
}
|
|
102
|
-
export interface WsGetCDPRateStrategiesParams {
|
|
103
|
-
name: string;
|
|
104
|
-
}
|
|
105
78
|
export interface WsSubscribeParams {
|
|
106
79
|
channel: WSChannel;
|
|
107
80
|
}
|
|
@@ -164,12 +137,4 @@ export interface WsUnsubscribeCandlesticksParams extends WsSubscribeParams {
|
|
|
164
137
|
market: string;
|
|
165
138
|
resolution: string;
|
|
166
139
|
}
|
|
167
|
-
export
|
|
168
|
-
address: string;
|
|
169
|
-
}
|
|
170
|
-
export interface WsSubscribeCDPCollaterals extends WsSubscribeParams {
|
|
171
|
-
address: string;
|
|
172
|
-
}
|
|
173
|
-
export interface WsSubscribeCDPLiquidateCollaterals extends WsSubscribeParams {
|
|
174
|
-
}
|
|
175
|
-
export declare type WsSubscriptionParams = WsSubscribeCandlesticksParams | WsSubscribeBooksParams | WsSubscribeRecentTradesParams | WsSubscribeOrdersAllParams | WsSubscribeOrdersByMarketParams | WsSubscribeWalletBalanceParams | WsSubscribeAccountTradesAllParams | WsSubscribeAccountTradesByMarketParams | WsSubscribeMarketStatsAllParams | WsSubscribeMarketStatsByMarketParams | WsSubscribeLeveragesAllParams | WsSubscribeLeveragesByMarketParams | WsSubscribePositionsAllParams | WsSubscribePositionsByMarketParams | WsSubscribePoolsAllParams | WsSubscribePoolsByIdParams | WsSubscribeCommitmentParams | WsUnsubscribeCandlesticksParams | WsSubscribeCDPBorrows | WsSubscribeCDPCollaterals | WsSubscribeCDPLiquidateCollaterals;
|
|
140
|
+
export declare type WsSubscriptionParams = WsSubscribeCandlesticksParams | WsSubscribeBooksParams | WsSubscribeRecentTradesParams | WsSubscribeOrdersAllParams | WsSubscribeOrdersByMarketParams | WsSubscribeWalletBalanceParams | WsSubscribeAccountTradesAllParams | WsSubscribeAccountTradesByMarketParams | WsSubscribeMarketStatsAllParams | WsSubscribeMarketStatsByMarketParams | WsSubscribeLeveragesAllParams | WsSubscribeLeveragesByMarketParams | WsSubscribePositionsAllParams | WsSubscribePositionsByMarketParams | WsSubscribePoolsAllParams | WsSubscribePoolsByIdParams | WsSubscribeCommitmentParams | WsUnsubscribeCandlesticksParams;
|
package/lib/websocket/types.js
CHANGED
|
@@ -20,9 +20,6 @@ var WSChannel;
|
|
|
20
20
|
WSChannel["pools"] = "pools";
|
|
21
21
|
WSChannel["pools_by_id"] = "pools_by_id";
|
|
22
22
|
WSChannel["commitments"] = "commitments";
|
|
23
|
-
WSChannel["cdp_borrows"] = "cdp_borrows";
|
|
24
|
-
WSChannel["cdp_collaterals"] = "cdp_collaterals";
|
|
25
|
-
WSChannel["cdp_liquidate_collaterals"] = "cdp_liquidate_collaterals";
|
|
26
23
|
})(WSChannel = exports.WSChannel || (exports.WSChannel = {}));
|
|
27
24
|
var WSRequest;
|
|
28
25
|
(function (WSRequest) {
|
|
@@ -40,17 +37,4 @@ var WSRequest;
|
|
|
40
37
|
WSRequest["OrderBook"] = "get_orderbook";
|
|
41
38
|
WSRequest["Pools"] = "get_pools";
|
|
42
39
|
WSRequest["Commitments"] = "get_commitments";
|
|
43
|
-
WSRequest["CDPAllAssets"] = "get_cdp_all_assets";
|
|
44
|
-
WSRequest["CDPAssets"] = "get_cdp_assets";
|
|
45
|
-
WSRequest["CDPAccountCollaterals"] = "get_cdp_account_collaterals";
|
|
46
|
-
WSRequest["CDPAccountDebts"] = "get_cdp_account_debts";
|
|
47
|
-
WSRequest["CDPAccountData"] = "get_cdp_account_data";
|
|
48
|
-
WSRequest["CDPParams"] = "get_cdp_params";
|
|
49
|
-
WSRequest["CDPAllRateStrategies"] = "get_cdp_all_rate_strategies";
|
|
50
|
-
WSRequest["CDPRateStrategies"] = "get_cdp_rate_strategies";
|
|
51
|
-
WSRequest["CDPBorrows"] = "get_cdp_borrows";
|
|
52
|
-
WSRequest["CDPTotalBorrows"] = "get_cdp_total_borrows";
|
|
53
|
-
WSRequest["CDPCollaterals"] = "get_cdp_collaterals";
|
|
54
|
-
WSRequest["CDPTotalCollaterals"] = "get_cdp_total_collaterals";
|
|
55
|
-
WSRequest["CDPLiquidateCollateral"] = "get_cdp_liquidate_collateral";
|
|
56
40
|
})(WSRequest = exports.WSRequest || (exports.WSRequest = {}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "carbon-js-sdk",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.10",
|
|
4
4
|
"description": "TypeScript SDK for Carbon blockchain",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@cityofzion/neon-api": "^4.9.0",
|
|
40
40
|
"@cityofzion/neon-core": "^4.9.0",
|
|
41
|
-
"@cityofzion/neon-core-next": "npm:@cityofzion/neon-core@^5.0.0",
|
|
42
41
|
"@cityofzion/neon-js": "^4.9.0",
|
|
42
|
+
"@cityofzion/neon-core-next": "npm:@cityofzion/neon-core@^5.0.0",
|
|
43
43
|
"@cosmjs/proto-signing": "^0.28.10",
|
|
44
44
|
"@cosmjs/stargate": "^0.28.10",
|
|
45
45
|
"@grpc/grpc-js": "^1.3.2",
|