carbon-js-sdk 0.2.10 → 0.2.11-dev.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/clients/CarbonQueryClient.js +1 -1
- package/lib/clients/ETHClient.js +15 -15
- package/lib/clients/HydrogenClient.js +1 -1
- package/lib/clients/InsightsQueryClient.d.ts +3 -1
- package/lib/clients/InsightsQueryClient.js +17 -6
- package/lib/clients/NEOClient.js +7 -7
- package/lib/clients/TokenClient.d.ts +4 -0
- package/lib/clients/TokenClient.js +23 -7
- package/lib/clients/ZILClient.js +16 -16
- 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/asset_params.d.ts +1 -0
- package/lib/codec/cdp/asset_params.js +31 -15
- package/lib/codec/cdp/event.d.ts +226 -22
- package/lib/codec/cdp/event.js +1414 -80
- package/lib/codec/cdp/genesis.d.ts +57 -4
- package/lib/codec/cdp/genesis.js +417 -22
- package/lib/codec/cdp/query.d.ts +328 -94
- package/lib/codec/cdp/query.js +1300 -236
- package/lib/codec/cdp/tx.d.ts +466 -96
- package/lib/codec/cdp/tx.js +1961 -181
- 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 +2 -5
- package/lib/codec/coin/query.js +2 -8
- package/lib/codec/coin/token.d.ts +11 -0
- package/lib/codec/coin/token.js +65 -1
- 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 +4 -4
- package/lib/codec/cosmos/gov/v1beta1/tx.d.ts +2 -2
- package/lib/codec/cosmos/gov/v1beta1/tx.js +4 -4
- 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 +5 -5
- 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 +53 -22
- package/lib/codec/index.js +514 -384
- 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 +2 -1
- package/lib/codec/market/genesis.js +20 -2
- 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 +1 -0
- package/lib/codec/misc/trade.js +17 -0
- 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 +11 -1
- package/lib/codec/pricing/event.js +52 -2
- package/lib/codec/pricing/genesis.d.ts +2 -1
- package/lib/codec/pricing/genesis.js +20 -5
- package/lib/codec/pricing/pricing.d.ts +13 -0
- package/lib/codec/pricing/pricing.js +83 -1
- 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/constant/generic.js +1 -1
- package/lib/insights/common.d.ts +2 -0
- package/lib/insights/common.js +2 -0
- package/lib/insights/competition.d.ts +49 -7
- package/lib/modules/admin.d.ts +61 -1
- package/lib/modules/admin.js +193 -42
- package/lib/modules/cdp.d.ts +55 -12
- package/lib/modules/cdp.js +134 -20
- package/lib/modules/gov.js +14 -14
- package/lib/modules/liquiditypool.js +1 -1
- 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 +67 -26
- 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 +72 -32
- package/lib/provider/amino/types/coin.js +2 -2
- 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/keplr/KeplrStore.js +1 -1
- 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 +42 -14
- package/lib/wallet/CarbonSigner.js +2 -2
- package/lib/wallet/CarbonSigningClient.js +8 -8
- package/lib/wallet/CarbonWallet.js +6 -6
- package/lib/websocket/channel.js +26 -0
- package/lib/websocket/connector.js +3 -3
- package/lib/websocket/models.d.ts +63 -0
- package/lib/websocket/types.d.ts +38 -3
- package/lib/websocket/types.js +16 -0
- package/package.json +2 -1
package/lib/modules/admin.js
CHANGED
|
@@ -13,14 +13,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.transformCommunityPoolSpendAmount = exports.transformSetSettlementPriceParams = exports.transfromSetMinGasPriceParams = exports.transfromSetMsgGasCostParams = exports.transfromSetTradingFlagParams = exports.transfromUpdatePoolParams = exports.transfromSetCommitmentCurveParams = exports.transfromSetRewardCurveParams = exports.transfromSetRewardsWeightsParams = exports.transfromUnlinkPoolParams = exports.transfromLinkPoolParams = exports.transfromCreateVaultTypeParams = exports.transfromSyncTokenParams = exports.transfromCreateTokenParams = exports.transfromCreateOracleParams = exports.AdminModule = void 0;
|
|
16
|
-
const
|
|
17
|
-
const
|
|
18
|
-
const
|
|
19
|
-
const
|
|
20
|
-
const
|
|
21
|
-
const
|
|
22
|
-
const
|
|
23
|
-
const
|
|
16
|
+
const codec_1 = require("../codec");
|
|
17
|
+
const tx_1 = require("../codec/coin/tx");
|
|
18
|
+
const tx_2 = require("../codec/cosmos/staking/v1beta1/tx");
|
|
19
|
+
const tx_3 = require("../codec/fee/tx");
|
|
20
|
+
const tx_4 = require("../codec/liquiditypool/tx");
|
|
21
|
+
const tx_5 = require("../codec/market/tx");
|
|
22
|
+
const tx_6 = require("../codec/oracle/tx");
|
|
23
|
+
const tx_7 = require("../codec/order/tx");
|
|
24
24
|
const util_1 = require("../util");
|
|
25
25
|
const bignumber_js_1 = __importDefault(require("bignumber.js"));
|
|
26
26
|
const long_1 = __importDefault(require("long"));
|
|
@@ -29,7 +29,7 @@ class AdminModule extends base_1.default {
|
|
|
29
29
|
createOracle(params, opts) {
|
|
30
30
|
return __awaiter(this, void 0, void 0, function* () {
|
|
31
31
|
const wallet = this.getWallet();
|
|
32
|
-
const value =
|
|
32
|
+
const value = tx_6.MsgCreateOracle.fromPartial({
|
|
33
33
|
creator: wallet.bech32Address,
|
|
34
34
|
createOracleParams: transfromCreateOracleParams(params, wallet.bech32Address),
|
|
35
35
|
});
|
|
@@ -42,7 +42,7 @@ class AdminModule extends base_1.default {
|
|
|
42
42
|
createToken(params, opts) {
|
|
43
43
|
return __awaiter(this, void 0, void 0, function* () {
|
|
44
44
|
const wallet = this.getWallet();
|
|
45
|
-
const value =
|
|
45
|
+
const value = tx_1.MsgCreateToken.fromPartial({
|
|
46
46
|
creator: wallet.bech32Address,
|
|
47
47
|
createTokenParams: transfromCreateTokenParams(params, wallet.bech32Address),
|
|
48
48
|
});
|
|
@@ -56,7 +56,7 @@ class AdminModule extends base_1.default {
|
|
|
56
56
|
return __awaiter(this, void 0, void 0, function* () {
|
|
57
57
|
const wallet = this.getWallet();
|
|
58
58
|
const msgs = params.map(param => {
|
|
59
|
-
const value =
|
|
59
|
+
const value = tx_1.MsgCreateToken.fromPartial({
|
|
60
60
|
creator: wallet.bech32Address,
|
|
61
61
|
createTokenParams: transfromCreateTokenParams(param, wallet.bech32Address),
|
|
62
62
|
});
|
|
@@ -71,7 +71,7 @@ class AdminModule extends base_1.default {
|
|
|
71
71
|
syncToken(params, opts) {
|
|
72
72
|
return __awaiter(this, void 0, void 0, function* () {
|
|
73
73
|
const wallet = this.getWallet();
|
|
74
|
-
const value =
|
|
74
|
+
const value = tx_1.MsgSyncToken.fromPartial(transfromSyncTokenParams(params, wallet.bech32Address));
|
|
75
75
|
return yield wallet.sendTx({
|
|
76
76
|
typeUrl: util_1.CarbonTx.Types.MsgSyncToken,
|
|
77
77
|
value,
|
|
@@ -81,7 +81,7 @@ class AdminModule extends base_1.default {
|
|
|
81
81
|
bindToken(params, opts) {
|
|
82
82
|
return __awaiter(this, void 0, void 0, function* () {
|
|
83
83
|
const wallet = this.getWallet();
|
|
84
|
-
const value =
|
|
84
|
+
const value = tx_1.MsgBindToken.fromPartial({
|
|
85
85
|
creator: wallet.bech32Address,
|
|
86
86
|
sourceDenom: params.sourceDenom,
|
|
87
87
|
wrappedDenom: params.wrappedDenom,
|
|
@@ -95,7 +95,7 @@ class AdminModule extends base_1.default {
|
|
|
95
95
|
unbindToken(params, opts) {
|
|
96
96
|
return __awaiter(this, void 0, void 0, function* () {
|
|
97
97
|
const wallet = this.getWallet();
|
|
98
|
-
const value =
|
|
98
|
+
const value = tx_1.MsgUnbindToken.fromPartial({
|
|
99
99
|
creator: wallet.bech32Address,
|
|
100
100
|
wrappedDenom: params.wrappedDenom,
|
|
101
101
|
});
|
|
@@ -105,10 +105,29 @@ class AdminModule extends base_1.default {
|
|
|
105
105
|
}, opts);
|
|
106
106
|
});
|
|
107
107
|
}
|
|
108
|
+
updateToken(params, opts) {
|
|
109
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
110
|
+
const wallet = this.getWallet();
|
|
111
|
+
const value = tx_1.MsgUpdateToken.fromPartial({
|
|
112
|
+
updater: wallet.bech32Address,
|
|
113
|
+
denom: params.denom,
|
|
114
|
+
updateTokenParams: {
|
|
115
|
+
name: params.name,
|
|
116
|
+
symbol: params.symbol,
|
|
117
|
+
decimals: params.decimals,
|
|
118
|
+
isActive: params.isActive,
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
return yield wallet.sendTx({
|
|
122
|
+
typeUrl: util_1.CarbonTx.Types.MsgUpdateToken,
|
|
123
|
+
value,
|
|
124
|
+
}, opts);
|
|
125
|
+
});
|
|
126
|
+
}
|
|
108
127
|
linkToken(params, opts) {
|
|
109
128
|
return __awaiter(this, void 0, void 0, function* () {
|
|
110
129
|
const wallet = this.getWallet();
|
|
111
|
-
const value =
|
|
130
|
+
const value = tx_1.MsgLinkToken.fromPartial({
|
|
112
131
|
creator: wallet.bech32Address,
|
|
113
132
|
denom: params.denom,
|
|
114
133
|
bridgeAddress: params.bridgeAddress,
|
|
@@ -123,7 +142,7 @@ class AdminModule extends base_1.default {
|
|
|
123
142
|
var _a, _b;
|
|
124
143
|
return __awaiter(this, void 0, void 0, function* () {
|
|
125
144
|
const wallet = this.getWallet();
|
|
126
|
-
const value =
|
|
145
|
+
const value = tx_5.MsgCreateMarket.fromPartial({
|
|
127
146
|
creator: wallet.bech32Address,
|
|
128
147
|
marketType: params.marketType,
|
|
129
148
|
base: params.base,
|
|
@@ -144,7 +163,7 @@ class AdminModule extends base_1.default {
|
|
|
144
163
|
const wallet = this.getWallet();
|
|
145
164
|
const msgs = params.map((param) => {
|
|
146
165
|
var _a;
|
|
147
|
-
const value =
|
|
166
|
+
const value = tx_5.MsgCreateMarket.fromPartial(Object.assign({ creator: wallet.bech32Address, marketType: param.marketType, base: param.base, quote: param.quote, currentBasePriceUsd: param.currentBasePriceUsd.toString(10), currentQuotePriceUsd: param.currentQuotePriceUsd.toString(10), indexOracleId: (_a = param.indexOracleId) !== null && _a !== void 0 ? _a : "" }, param.expiryTime && { expiryTime: param.expiryTime }));
|
|
148
167
|
return {
|
|
149
168
|
typeUrl: util_1.CarbonTx.Types.MsgCreateMarket,
|
|
150
169
|
value,
|
|
@@ -153,20 +172,10 @@ class AdminModule extends base_1.default {
|
|
|
153
172
|
return yield wallet.sendTxs(msgs, opts);
|
|
154
173
|
});
|
|
155
174
|
}
|
|
156
|
-
createVaultType(params, opts) {
|
|
157
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
158
|
-
const wallet = this.getWallet();
|
|
159
|
-
const value = tx_1.MsgCreateVaultType.fromPartial(transfromCreateVaultTypeParams(params, wallet.bech32Address));
|
|
160
|
-
return yield wallet.sendTx({
|
|
161
|
-
typeUrl: util_1.CarbonTx.Types.MsgCreateVaultType,
|
|
162
|
-
value,
|
|
163
|
-
}, opts);
|
|
164
|
-
});
|
|
165
|
-
}
|
|
166
175
|
linkPool(params, opts) {
|
|
167
176
|
return __awaiter(this, void 0, void 0, function* () {
|
|
168
177
|
const wallet = this.getWallet();
|
|
169
|
-
const value =
|
|
178
|
+
const value = tx_4.MsgLinkPool.fromPartial({
|
|
170
179
|
creator: wallet.bech32Address,
|
|
171
180
|
linkPoolParams: transfromLinkPoolParams(params)
|
|
172
181
|
});
|
|
@@ -179,7 +188,7 @@ class AdminModule extends base_1.default {
|
|
|
179
188
|
unlinkPool(params, opts) {
|
|
180
189
|
return __awaiter(this, void 0, void 0, function* () {
|
|
181
190
|
const wallet = this.getWallet();
|
|
182
|
-
const value =
|
|
191
|
+
const value = tx_4.MsgUnlinkPool.fromPartial({
|
|
183
192
|
creator: wallet.bech32Address,
|
|
184
193
|
unlinkPoolParams: transfromUnlinkPoolParams(params)
|
|
185
194
|
});
|
|
@@ -192,7 +201,7 @@ class AdminModule extends base_1.default {
|
|
|
192
201
|
setRewardsWeights(params, opts) {
|
|
193
202
|
return __awaiter(this, void 0, void 0, function* () {
|
|
194
203
|
const wallet = this.getWallet();
|
|
195
|
-
const value =
|
|
204
|
+
const value = tx_4.MsgSetRewardsWeights.fromPartial({
|
|
196
205
|
creator: wallet.bech32Address,
|
|
197
206
|
setRewardsWeightsParams: transfromSetRewardsWeightsParams(params)
|
|
198
207
|
});
|
|
@@ -205,7 +214,7 @@ class AdminModule extends base_1.default {
|
|
|
205
214
|
setRewardCurve(params, opts) {
|
|
206
215
|
return __awaiter(this, void 0, void 0, function* () {
|
|
207
216
|
const wallet = this.getWallet();
|
|
208
|
-
const value =
|
|
217
|
+
const value = tx_4.MsgSetRewardCurve.fromPartial({
|
|
209
218
|
creator: wallet.bech32Address,
|
|
210
219
|
setRewardCurveParams: transfromSetRewardCurveParams(params)
|
|
211
220
|
});
|
|
@@ -218,7 +227,7 @@ class AdminModule extends base_1.default {
|
|
|
218
227
|
setCommitmentCurve(params, opts) {
|
|
219
228
|
return __awaiter(this, void 0, void 0, function* () {
|
|
220
229
|
const wallet = this.getWallet();
|
|
221
|
-
const value =
|
|
230
|
+
const value = tx_4.MsgSetCommitmentCurve.fromPartial({
|
|
222
231
|
creator: wallet.bech32Address,
|
|
223
232
|
setCommitmentCurveParams: transfromSetCommitmentCurveParams(params)
|
|
224
233
|
});
|
|
@@ -231,7 +240,7 @@ class AdminModule extends base_1.default {
|
|
|
231
240
|
updatePool(params, opts) {
|
|
232
241
|
return __awaiter(this, void 0, void 0, function* () {
|
|
233
242
|
const wallet = this.getWallet();
|
|
234
|
-
const value =
|
|
243
|
+
const value = tx_4.MsgUpdatePool.fromPartial({
|
|
235
244
|
creator: wallet.bech32Address,
|
|
236
245
|
updatePoolParams: transfromUpdatePoolParams(params),
|
|
237
246
|
});
|
|
@@ -244,7 +253,7 @@ class AdminModule extends base_1.default {
|
|
|
244
253
|
setTradingFlag(params, opts) {
|
|
245
254
|
return __awaiter(this, void 0, void 0, function* () {
|
|
246
255
|
const wallet = this.getWallet();
|
|
247
|
-
const value =
|
|
256
|
+
const value = tx_7.MsgSetTradingFlag.fromPartial(transfromSetTradingFlagParams(params, wallet.bech32Address));
|
|
248
257
|
return yield wallet.sendTx({
|
|
249
258
|
typeUrl: util_1.CarbonTx.Types.MsgSetTradingFlag,
|
|
250
259
|
value,
|
|
@@ -259,7 +268,7 @@ class AdminModule extends base_1.default {
|
|
|
259
268
|
setMsgGasCost(params, opts) {
|
|
260
269
|
return __awaiter(this, void 0, void 0, function* () {
|
|
261
270
|
const wallet = this.getWallet();
|
|
262
|
-
const value =
|
|
271
|
+
const value = tx_3.MsgSetGasCost.fromPartial({
|
|
263
272
|
creator: wallet.bech32Address,
|
|
264
273
|
setGasCostParams: transfromSetMsgGasCostParams(params)
|
|
265
274
|
});
|
|
@@ -272,7 +281,7 @@ class AdminModule extends base_1.default {
|
|
|
272
281
|
setMinGasPrice(params, opts) {
|
|
273
282
|
return __awaiter(this, void 0, void 0, function* () {
|
|
274
283
|
const wallet = this.getWallet();
|
|
275
|
-
const value =
|
|
284
|
+
const value = tx_3.MsgSetMinGasPrice.fromPartial({
|
|
276
285
|
creator: wallet.bech32Address,
|
|
277
286
|
setMinGasPriceParams: transfromSetMinGasPriceParams(params)
|
|
278
287
|
});
|
|
@@ -285,7 +294,7 @@ class AdminModule extends base_1.default {
|
|
|
285
294
|
removeMsgGasCost(params, opts) {
|
|
286
295
|
return __awaiter(this, void 0, void 0, function* () {
|
|
287
296
|
const wallet = this.getWallet();
|
|
288
|
-
const value =
|
|
297
|
+
const value = tx_3.MsgRemoveGasCost.fromPartial({
|
|
289
298
|
creator: wallet.bech32Address,
|
|
290
299
|
msgType: params.msgType,
|
|
291
300
|
});
|
|
@@ -298,7 +307,7 @@ class AdminModule extends base_1.default {
|
|
|
298
307
|
removeMinGasPrice(params, opts) {
|
|
299
308
|
return __awaiter(this, void 0, void 0, function* () {
|
|
300
309
|
const wallet = this.getWallet();
|
|
301
|
-
const value =
|
|
310
|
+
const value = tx_3.MsgRemoveMinGasPrice.fromPartial({
|
|
302
311
|
creator: wallet.bech32Address,
|
|
303
312
|
denom: params.denom,
|
|
304
313
|
});
|
|
@@ -311,7 +320,7 @@ class AdminModule extends base_1.default {
|
|
|
311
320
|
createValidator(params, opts) {
|
|
312
321
|
return __awaiter(this, void 0, void 0, function* () {
|
|
313
322
|
const wallet = this.getWallet();
|
|
314
|
-
const value =
|
|
323
|
+
const value = tx_2.MsgCreateValidator.fromPartial(Object.assign(Object.assign({ delegatorAddress: params.delegatorAddress, validatorAddress: params.validatorAddress, minSelfDelegation: params.minSelfDelegation.toString(10), description: params.description, pubkey: params.pubkey }, params.commission && {
|
|
315
324
|
commission: {
|
|
316
325
|
rate: params.commission.rate.shiftedBy(18).toString(10),
|
|
317
326
|
maxRate: params.commission.maxRate.shiftedBy(18).toString(10),
|
|
@@ -332,7 +341,7 @@ class AdminModule extends base_1.default {
|
|
|
332
341
|
editValidator(params, opts) {
|
|
333
342
|
return __awaiter(this, void 0, void 0, function* () {
|
|
334
343
|
const wallet = this.getWallet();
|
|
335
|
-
const value =
|
|
344
|
+
const value = tx_2.MsgEditValidator.fromPartial({
|
|
336
345
|
description: params.description,
|
|
337
346
|
validatorAddress: params.validatorAddress,
|
|
338
347
|
commissionRate: params.commissionRate.shiftedBy(18).toString(10),
|
|
@@ -347,7 +356,7 @@ class AdminModule extends base_1.default {
|
|
|
347
356
|
authorizeBridge(params, opts) {
|
|
348
357
|
return __awaiter(this, void 0, void 0, function* () {
|
|
349
358
|
const wallet = this.getWallet();
|
|
350
|
-
const value =
|
|
359
|
+
const value = tx_1.MsgAuthorizeBridge.fromPartial({
|
|
351
360
|
creator: wallet.bech32Address,
|
|
352
361
|
bridgeId: new long_1.default(params.bridgeId),
|
|
353
362
|
chainId: new long_1.default(params.chainId),
|
|
@@ -362,7 +371,7 @@ class AdminModule extends base_1.default {
|
|
|
362
371
|
deauthorizeBridge(params, opts) {
|
|
363
372
|
return __awaiter(this, void 0, void 0, function* () {
|
|
364
373
|
const wallet = this.getWallet();
|
|
365
|
-
const value =
|
|
374
|
+
const value = tx_1.MsgDeauthorizeBridge.fromPartial({
|
|
366
375
|
initiator: wallet.bech32Address,
|
|
367
376
|
bridgeId: new long_1.default(params.bridgeId),
|
|
368
377
|
chainId: new long_1.default(params.chainId),
|
|
@@ -373,6 +382,148 @@ class AdminModule extends base_1.default {
|
|
|
373
382
|
}, opts);
|
|
374
383
|
});
|
|
375
384
|
}
|
|
385
|
+
addRateStrategy(params, opts) {
|
|
386
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
387
|
+
const wallet = this.getWallet();
|
|
388
|
+
const value = codec_1.MsgAddRateStrategy.fromPartial({
|
|
389
|
+
creator: wallet.bech32Address,
|
|
390
|
+
rateStrategyParams: {
|
|
391
|
+
name: params.rateStrategy.name,
|
|
392
|
+
optimalUsage: params.rateStrategy.optimalUsage.toString(10),
|
|
393
|
+
baseVariableBorrowRate: params.rateStrategy.baseVariableBorrowRate.toString(10),
|
|
394
|
+
variableRateSlope1: params.rateStrategy.variableRateSlope1.toString(10),
|
|
395
|
+
variableRateSlope2: params.rateStrategy.variableRateSlope2.toString(10),
|
|
396
|
+
baseStableBorrowRate: params.rateStrategy.baseStableBorrowRate.toString(10),
|
|
397
|
+
stableRateSlope1: params.rateStrategy.stableRateSlope1.toString(10),
|
|
398
|
+
stableRateSlope2: params.rateStrategy.stableRateSlope2.toString(10),
|
|
399
|
+
optimalStableToTotalDebtRatio: params.rateStrategy.optimalStableToTotalDebtRatio.toString(10),
|
|
400
|
+
},
|
|
401
|
+
});
|
|
402
|
+
return yield wallet.sendTx({
|
|
403
|
+
typeUrl: util_1.CarbonTx.Types.MsgAddRateStrategy,
|
|
404
|
+
value
|
|
405
|
+
}, opts);
|
|
406
|
+
});
|
|
407
|
+
}
|
|
408
|
+
updateRateStrategy(params, opts) {
|
|
409
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
410
|
+
const wallet = this.getWallet();
|
|
411
|
+
const value = codec_1.MsgUpdateRateStrategy.fromPartial({
|
|
412
|
+
creator: wallet.bech32Address,
|
|
413
|
+
rateStrategyParams: {
|
|
414
|
+
name: params.rateStrategy.name,
|
|
415
|
+
optimalUsage: params.rateStrategy.optimalUsage.toString(10),
|
|
416
|
+
baseVariableBorrowRate: params.rateStrategy.baseVariableBorrowRate.toString(10),
|
|
417
|
+
variableRateSlope1: params.rateStrategy.variableRateSlope1.toString(10),
|
|
418
|
+
variableRateSlope2: params.rateStrategy.variableRateSlope2.toString(10),
|
|
419
|
+
baseStableBorrowRate: params.rateStrategy.baseStableBorrowRate.toString(10),
|
|
420
|
+
stableRateSlope1: params.rateStrategy.stableRateSlope1.toString(10),
|
|
421
|
+
stableRateSlope2: params.rateStrategy.stableRateSlope2.toString(10),
|
|
422
|
+
optimalStableToTotalDebtRatio: params.rateStrategy.optimalStableToTotalDebtRatio.toString(10),
|
|
423
|
+
},
|
|
424
|
+
});
|
|
425
|
+
return yield wallet.sendTx({
|
|
426
|
+
typeUrl: util_1.CarbonTx.Types.MsgUpdateRateStrategy,
|
|
427
|
+
value
|
|
428
|
+
}, opts);
|
|
429
|
+
});
|
|
430
|
+
}
|
|
431
|
+
removeRateStrategy(params, opts) {
|
|
432
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
433
|
+
const wallet = this.getWallet();
|
|
434
|
+
const value = codec_1.MsgRemoveRateStrategy.fromPartial({
|
|
435
|
+
creator: wallet.bech32Address,
|
|
436
|
+
name: params.name,
|
|
437
|
+
});
|
|
438
|
+
return yield wallet.sendTx({
|
|
439
|
+
typeUrl: util_1.CarbonTx.Types.MsgRemoveRateStrategy,
|
|
440
|
+
value
|
|
441
|
+
}, opts);
|
|
442
|
+
});
|
|
443
|
+
}
|
|
444
|
+
addAsset(params, opts) {
|
|
445
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
446
|
+
const wallet = this.getWallet();
|
|
447
|
+
const value = codec_1.MsgAddAsset.fromPartial({
|
|
448
|
+
creator: wallet.bech32Address,
|
|
449
|
+
assetParams: {
|
|
450
|
+
denom: params.asset.denom,
|
|
451
|
+
oracleId: params.asset.oracleId,
|
|
452
|
+
rateStrategyName: params.asset.rateStrategyName,
|
|
453
|
+
loanToValue: params.asset.loanToValue.toString(10),
|
|
454
|
+
liquidationThreshold: params.asset.liquidationThreshold.toString(10),
|
|
455
|
+
liquidationBonus: params.asset.liquidationBonus.toString(10),
|
|
456
|
+
supplyCap: params.asset.supplyCap.toString(10),
|
|
457
|
+
borrowCap: params.asset.borrowCap.toString(10),
|
|
458
|
+
}
|
|
459
|
+
});
|
|
460
|
+
return yield wallet.sendTx({
|
|
461
|
+
typeUrl: util_1.CarbonTx.Types.MsgAddAsset,
|
|
462
|
+
value
|
|
463
|
+
}, opts);
|
|
464
|
+
});
|
|
465
|
+
}
|
|
466
|
+
updateAsset(params, opts) {
|
|
467
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
468
|
+
const wallet = this.getWallet();
|
|
469
|
+
const value = codec_1.MsgUpdateAsset.fromPartial({
|
|
470
|
+
creator: wallet.bech32Address,
|
|
471
|
+
assetParams: {
|
|
472
|
+
denom: params.asset.denom,
|
|
473
|
+
oracleId: params.asset.oracleId,
|
|
474
|
+
rateStrategyName: params.asset.rateStrategyName,
|
|
475
|
+
loanToValue: params.asset.loanToValue.toString(10),
|
|
476
|
+
liquidationThreshold: params.asset.liquidationThreshold.toString(10),
|
|
477
|
+
liquidationBonus: params.asset.liquidationBonus.toString(10),
|
|
478
|
+
supplyCap: params.asset.supplyCap.toString(10),
|
|
479
|
+
borrowCap: params.asset.borrowCap.toString(10),
|
|
480
|
+
}
|
|
481
|
+
});
|
|
482
|
+
return yield wallet.sendTx({
|
|
483
|
+
typeUrl: util_1.CarbonTx.Types.MsgUpdateAsset,
|
|
484
|
+
value
|
|
485
|
+
}, opts);
|
|
486
|
+
});
|
|
487
|
+
}
|
|
488
|
+
setLiquidationFee(params, opts) {
|
|
489
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
490
|
+
const wallet = this.getWallet();
|
|
491
|
+
const value = codec_1.MsgSetLiquidationFee.fromPartial({
|
|
492
|
+
creator: wallet.bech32Address,
|
|
493
|
+
liquidationFee: params.liquidationFee.toString(10),
|
|
494
|
+
});
|
|
495
|
+
return yield wallet.sendTx({
|
|
496
|
+
typeUrl: util_1.CarbonTx.Types.MsgSetLiquidationFee,
|
|
497
|
+
value
|
|
498
|
+
}, opts);
|
|
499
|
+
});
|
|
500
|
+
}
|
|
501
|
+
setInterestFee(params, opts) {
|
|
502
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
503
|
+
const wallet = this.getWallet();
|
|
504
|
+
const value = codec_1.MsgSetInterestFee.fromPartial({
|
|
505
|
+
creator: wallet.bech32Address,
|
|
506
|
+
interestFee: params.interestFee.toString(10),
|
|
507
|
+
});
|
|
508
|
+
return yield wallet.sendTx({
|
|
509
|
+
typeUrl: util_1.CarbonTx.Types.MsgSetInterestFee,
|
|
510
|
+
value
|
|
511
|
+
}, opts);
|
|
512
|
+
});
|
|
513
|
+
}
|
|
514
|
+
setStableCoinInterestRate(params, opts) {
|
|
515
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
516
|
+
const wallet = this.getWallet();
|
|
517
|
+
const value = codec_1.MsgSetStablecoinInterestRate.fromPartial({
|
|
518
|
+
creator: wallet.bech32Address,
|
|
519
|
+
stablecoinInterestRate: params.stablecoinInterestRate.toString(10),
|
|
520
|
+
});
|
|
521
|
+
return yield wallet.sendTx({
|
|
522
|
+
typeUrl: util_1.CarbonTx.Types.MsgSetStablecoinInterestRate,
|
|
523
|
+
value
|
|
524
|
+
}, opts);
|
|
525
|
+
});
|
|
526
|
+
}
|
|
376
527
|
}
|
|
377
528
|
exports.AdminModule = AdminModule;
|
|
378
529
|
;
|
package/lib/modules/cdp.d.ts
CHANGED
|
@@ -2,26 +2,69 @@ import { CarbonTx } from "../util";
|
|
|
2
2
|
import BaseModule from "./base";
|
|
3
3
|
import { BigNumber } from "bignumber.js";
|
|
4
4
|
export declare class CDPModule extends BaseModule {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
supplyAsset(params: CDPModule.SupplyAssetParams, opts?: CarbonTx.SignTxOpts): Promise<import("@cosmjs/stargate").DeliverTxResponse>;
|
|
6
|
+
withdrawAsset(params: CDPModule.WithdrawAssetParams, opts?: CarbonTx.SignTxOpts): Promise<import("@cosmjs/stargate").DeliverTxResponse>;
|
|
7
|
+
lockCollateral(params: CDPModule.LockCollateralParams, opts?: CarbonTx.SignTxOpts): Promise<import("@cosmjs/stargate").DeliverTxResponse>;
|
|
8
|
+
unlockCollateral(params: CDPModule.UnlockCollateralParams, opts?: CarbonTx.SignTxOpts): Promise<import("@cosmjs/stargate").DeliverTxResponse>;
|
|
9
|
+
borrowAsset(params: CDPModule.BorrowAssetParams, opts?: CarbonTx.SignTxOpts): Promise<import("@cosmjs/stargate").DeliverTxResponse>;
|
|
10
|
+
repayAsset(params: CDPModule.RepayAssetParams, opts?: CarbonTx.SignTxOpts): Promise<import("@cosmjs/stargate").DeliverTxResponse>;
|
|
11
|
+
supplyAssetAndLockCollateral(params: CDPModule.SupplyAssetAndLockCollateralParams, opts?: CarbonTx.SignTxOpts): Promise<import("@cosmjs/stargate").DeliverTxResponse>;
|
|
12
|
+
unlockCollateralAndWithdrawAsset(params: CDPModule.UnlockCollateralAndWithdrawAssetParams, opts?: CarbonTx.SignTxOpts): Promise<import("@cosmjs/stargate").DeliverTxResponse>;
|
|
13
|
+
liquidateCollateral(params: CDPModule.LiquidateCollateralParams, opts?: CarbonTx.SignTxOpts): Promise<import("@cosmjs/stargate").DeliverTxResponse>;
|
|
14
|
+
repayAssetWithCdpTokens(params: CDPModule.RepayAssetWithCdpTokensParams, opts?: CarbonTx.SignTxOpts): Promise<import("@cosmjs/stargate").DeliverTxResponse>;
|
|
15
|
+
repayAssetWithCollateral(params: CDPModule.RepayAssetWithCollateralParams, opts?: CarbonTx.SignTxOpts): Promise<import("@cosmjs/stargate").DeliverTxResponse>;
|
|
16
|
+
mintStablecoin(params: CDPModule.MintStablecoinParams, opts?: CarbonTx.SignTxOpts): Promise<import("@cosmjs/stargate").DeliverTxResponse>;
|
|
9
17
|
}
|
|
10
18
|
export declare namespace CDPModule {
|
|
11
|
-
interface
|
|
12
|
-
|
|
19
|
+
interface SupplyAssetParams {
|
|
20
|
+
denom: string;
|
|
13
21
|
amount: BigNumber;
|
|
14
22
|
}
|
|
15
|
-
interface
|
|
16
|
-
|
|
23
|
+
interface WithdrawAssetParams {
|
|
24
|
+
cdpDenom: string;
|
|
17
25
|
amount: BigNumber;
|
|
18
26
|
}
|
|
19
|
-
interface
|
|
20
|
-
|
|
27
|
+
interface LockCollateralParams {
|
|
28
|
+
cdpDenom: string;
|
|
21
29
|
amount: BigNumber;
|
|
22
30
|
}
|
|
23
|
-
interface
|
|
24
|
-
|
|
31
|
+
interface UnlockCollateralParams {
|
|
32
|
+
cdpDenom: string;
|
|
33
|
+
amount: BigNumber;
|
|
34
|
+
}
|
|
35
|
+
interface BorrowAssetParams {
|
|
36
|
+
denom: string;
|
|
37
|
+
amount: BigNumber;
|
|
38
|
+
}
|
|
39
|
+
interface RepayAssetParams {
|
|
40
|
+
denom: string;
|
|
41
|
+
amount: BigNumber;
|
|
42
|
+
}
|
|
43
|
+
interface SupplyAssetAndLockCollateralParams {
|
|
44
|
+
denom: string;
|
|
45
|
+
supplyAmount: BigNumber;
|
|
46
|
+
lockAmount: BigNumber;
|
|
47
|
+
}
|
|
48
|
+
interface UnlockCollateralAndWithdrawAssetParams {
|
|
49
|
+
cdpDenom: string;
|
|
50
|
+
unlockAmount: BigNumber;
|
|
51
|
+
withdrawAmount: BigNumber;
|
|
52
|
+
}
|
|
53
|
+
interface LiquidateCollateralParams {
|
|
54
|
+
debtor: string;
|
|
55
|
+
collateralDenom: string;
|
|
56
|
+
debtDenom: string;
|
|
57
|
+
debtAmount: BigNumber;
|
|
58
|
+
}
|
|
59
|
+
interface RepayAssetWithCdpTokensParams {
|
|
60
|
+
cdpDenom: string;
|
|
61
|
+
amount: BigNumber;
|
|
62
|
+
}
|
|
63
|
+
interface RepayAssetWithCollateralParams {
|
|
64
|
+
cdpDenom: string;
|
|
65
|
+
amount: BigNumber;
|
|
66
|
+
}
|
|
67
|
+
interface MintStablecoinParams {
|
|
25
68
|
amount: BigNumber;
|
|
26
69
|
}
|
|
27
70
|
}
|