carbon-js-sdk 0.2.17 → 0.2.18-dev.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/CarbonSDK.d.ts +13 -1
- package/lib/CarbonSDK.js +31 -2
- package/lib/clients/CarbonQueryClient.js +2 -2
- package/lib/clients/ETHClient.d.ts +1 -1
- package/lib/clients/ETHClient.js +15 -15
- package/lib/clients/HydrogenClient.js +1 -1
- package/lib/clients/N3Client.js +3 -2
- package/lib/clients/NEOClient.d.ts +1 -1
- package/lib/clients/NEOClient.js +7 -7
- package/lib/clients/TokenClient.d.ts +5 -0
- package/lib/clients/TokenClient.js +38 -10
- package/lib/clients/ZILClient.d.ts +1 -1
- 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/event.d.ts +389 -22
- package/lib/codec/cdp/event.js +2494 -83
- package/lib/codec/cdp/genesis.d.ts +97 -4
- package/lib/codec/cdp/genesis.js +648 -23
- package/lib/codec/cdp/query.d.ts +439 -89
- package/lib/codec/cdp/query.js +1995 -177
- package/lib/codec/cdp/tx.d.ts +760 -96
- package/lib/codec/cdp/tx.js +3645 -235
- 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 -2
- package/lib/codec/coin/query.js +2 -2
- 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/genesis.d.ts +1 -1
- package/lib/codec/cosmos/authz/v1beta1/genesis.js +1 -1
- 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 +89 -18
- package/lib/codec/index.js +463 -180
- 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/liquiditypool.d.ts +3 -0
- package/lib/codec/liquiditypool/liquiditypool.js +44 -1
- package/lib/codec/liquiditypool/proposal.d.ts +1 -1
- package/lib/codec/liquiditypool/proposal.js +1 -1
- package/lib/codec/liquiditypool/query.d.ts +39 -2
- package/lib/codec/liquiditypool/query.js +195 -3
- package/lib/codec/liquiditypool/tx.d.ts +3 -1
- package/lib/codec/liquiditypool/tx.js +35 -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 -1
- package/lib/codec/market/genesis.js +1 -1
- 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/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 +4 -1
- package/lib/codec/oracle/genesis.js +34 -3
- 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 +56 -1
- package/lib/codec/pricing/event.js +298 -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 +14 -0
- package/lib/codec/pricing/pricing.js +103 -1
- package/lib/codec/pricing/query.d.ts +68 -1
- package/lib/codec/pricing/query.js +321 -2
- package/lib/codec/pricing/tx.d.ts +96 -0
- package/lib/codec/pricing/tx.js +399 -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/constant/token.d.ts +4 -0
- package/lib/constant/token.js +5 -1
- package/lib/modules/admin.d.ts +114 -7
- package/lib/modules/admin.js +275 -53
- package/lib/modules/cdp.d.ts +152 -13
- package/lib/modules/cdp.js +800 -20
- package/lib/modules/gov.js +14 -14
- package/lib/modules/liquiditypool.d.ts +3 -0
- package/lib/modules/liquiditypool.js +3 -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 +91 -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 +135 -24
- 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 +9 -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.d.ts +1 -0
- package/lib/util/address.js +21 -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.d.ts +1 -0
- package/lib/util/number.js +7 -6
- package/lib/util/tx.d.ts +74 -10
- package/lib/wallet/CarbonSigner.js +2 -2
- package/lib/wallet/CarbonSigningClient.js +8 -8
- package/lib/wallet/CarbonWallet.js +6 -7
- package/lib/websocket/channel.js +115 -21
- package/lib/websocket/connector.js +3 -3
- package/lib/websocket/models.d.ts +156 -0
- package/lib/websocket/types.d.ts +87 -3
- package/lib/websocket/types.js +31 -0
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import Long from "long";
|
|
2
2
|
import _m0 from "protobufjs/minimal";
|
|
3
|
-
import { Vote, LightBlock } from "
|
|
4
|
-
import { Validator } from "
|
|
3
|
+
import { Vote, LightBlock } from "./types";
|
|
4
|
+
import { Validator } from "./validator";
|
|
5
5
|
export declare const protobufPackage = "tendermint.types";
|
|
6
6
|
export interface Evidence {
|
|
7
7
|
duplicateVoteEvidence?: DuplicateVoteEvidence | undefined;
|
|
@@ -7,9 +7,9 @@ exports.EvidenceList = exports.LightClientAttackEvidence = exports.DuplicateVote
|
|
|
7
7
|
/* eslint-disable */
|
|
8
8
|
const long_1 = __importDefault(require("long"));
|
|
9
9
|
const minimal_1 = __importDefault(require("protobufjs/minimal"));
|
|
10
|
-
const types_1 = require("
|
|
10
|
+
const types_1 = require("./types");
|
|
11
11
|
const timestamp_1 = require("../../google/protobuf/timestamp");
|
|
12
|
-
const validator_1 = require("
|
|
12
|
+
const validator_1 = require("./validator");
|
|
13
13
|
exports.protobufPackage = "tendermint.types";
|
|
14
14
|
const baseEvidence = {};
|
|
15
15
|
exports.Evidence = {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import Long from "long";
|
|
2
2
|
import _m0 from "protobufjs/minimal";
|
|
3
|
-
import { Proof } from "
|
|
4
|
-
import { Consensus } from "
|
|
5
|
-
import { ValidatorSet } from "
|
|
3
|
+
import { Proof } from "../crypto/proof";
|
|
4
|
+
import { Consensus } from "../version/types";
|
|
5
|
+
import { ValidatorSet } from "./validator";
|
|
6
6
|
export declare const protobufPackage = "tendermint.types";
|
|
7
7
|
/** BlockIdFlag indicates which BlcokID the signature is for */
|
|
8
8
|
export declare enum BlockIDFlag {
|
|
@@ -7,9 +7,9 @@ exports.TxProof = exports.BlockMeta = exports.LightBlock = exports.SignedHeader
|
|
|
7
7
|
/* eslint-disable */
|
|
8
8
|
const long_1 = __importDefault(require("long"));
|
|
9
9
|
const minimal_1 = __importDefault(require("protobufjs/minimal"));
|
|
10
|
-
const proof_1 = require("
|
|
11
|
-
const types_1 = require("
|
|
12
|
-
const validator_1 = require("
|
|
10
|
+
const proof_1 = require("../crypto/proof");
|
|
11
|
+
const types_1 = require("../version/types");
|
|
12
|
+
const validator_1 = require("./validator");
|
|
13
13
|
const timestamp_1 = require("../../google/protobuf/timestamp");
|
|
14
14
|
exports.protobufPackage = "tendermint.types";
|
|
15
15
|
/** BlockIdFlag indicates which BlcokID the signature is for */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Long from "long";
|
|
2
2
|
import _m0 from "protobufjs/minimal";
|
|
3
|
-
import { PublicKey } from "
|
|
3
|
+
import { PublicKey } from "../crypto/keys";
|
|
4
4
|
export declare const protobufPackage = "tendermint.types";
|
|
5
5
|
export interface ValidatorSet {
|
|
6
6
|
validators: Validator[];
|
|
@@ -7,7 +7,7 @@ exports.SimpleValidator = exports.Validator = exports.ValidatorSet = exports.pro
|
|
|
7
7
|
/* eslint-disable */
|
|
8
8
|
const long_1 = __importDefault(require("long"));
|
|
9
9
|
const minimal_1 = __importDefault(require("protobufjs/minimal"));
|
|
10
|
-
const keys_1 = require("
|
|
10
|
+
const keys_1 = require("../crypto/keys");
|
|
11
11
|
exports.protobufPackage = "tendermint.types";
|
|
12
12
|
const baseValidatorSet = { totalVotingPower: long_1.default.ZERO };
|
|
13
13
|
exports.ValidatorSet = {
|
package/lib/constant/generic.js
CHANGED
|
@@ -12,7 +12,7 @@ exports.DEFAULT_FEE_DENOM = "swth";
|
|
|
12
12
|
exports.DEFAULT_GAS_PRICE = new bignumber_js_1.default(10);
|
|
13
13
|
exports.DEFAULT_GAS = new bignumber_js_1.default(10000000);
|
|
14
14
|
exports.DEFAULT_FEE = {
|
|
15
|
-
amount:
|
|
15
|
+
amount: proto_signing_1.coins(exports.DEFAULT_GAS_PRICE.times(exports.DEFAULT_GAS).dp(0).toString(), "swth"),
|
|
16
16
|
gas: exports.DEFAULT_GAS.toString(10),
|
|
17
17
|
};
|
|
18
18
|
exports.CURRENT_GAS_PRICE = 769.23077;
|
package/lib/constant/token.d.ts
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { OptionalNetworkMap, SimpleMap } from "../util/type";
|
|
2
|
+
export declare const DenomPrefix: {
|
|
3
|
+
LPToken: string;
|
|
4
|
+
CDPToken: string;
|
|
5
|
+
};
|
|
2
6
|
export declare const CommonAssetName: SimpleMap<string>;
|
|
3
7
|
export declare const CoinGeckoTokenNames: SimpleMap<string>;
|
|
4
8
|
export declare const TokenBlacklist: OptionalNetworkMap<string[]>;
|
package/lib/constant/token.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TokenBlacklist = exports.CoinGeckoTokenNames = exports.CommonAssetName = void 0;
|
|
3
|
+
exports.TokenBlacklist = exports.CoinGeckoTokenNames = exports.CommonAssetName = exports.DenomPrefix = void 0;
|
|
4
4
|
const network_1 = require("./network");
|
|
5
|
+
exports.DenomPrefix = {
|
|
6
|
+
LPToken: "clpt",
|
|
7
|
+
CDPToken: "cibt",
|
|
8
|
+
};
|
|
5
9
|
exports.CommonAssetName = {
|
|
6
10
|
swth: 'swth',
|
|
7
11
|
'swth-n': 'swth',
|
package/lib/modules/admin.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Any, SettlementPriceParams } from "../codec";
|
|
2
2
|
import { Coin } from "../codec/cosmos/base/v1beta1/coin";
|
|
3
3
|
import { Description } from "../codec/cosmos/staking/v1beta1/staking";
|
|
4
|
+
import { CarbonWallet } from "../wallet";
|
|
4
5
|
import { CarbonTx } from "../util";
|
|
5
6
|
import BigNumber from "bignumber.js";
|
|
6
7
|
import Long from "long";
|
|
@@ -16,7 +17,6 @@ export declare class AdminModule extends BaseModule {
|
|
|
16
17
|
linkToken(params: AdminModule.LinkTokenParams, opts?: CarbonTx.SignTxOpts): Promise<import("@cosmjs/stargate").DeliverTxResponse>;
|
|
17
18
|
createMarket(params: AdminModule.CreateMarketParams, opts?: CarbonTx.SignTxOpts): Promise<import("@cosmjs/stargate").DeliverTxResponse>;
|
|
18
19
|
createMarkets(params: AdminModule.CreateMarketParams[], opts?: CarbonTx.SignTxOpts): Promise<import("@cosmjs/stargate").DeliverTxResponse>;
|
|
19
|
-
createVaultType(params: AdminModule.CreateVaultTypeParams, opts?: CarbonTx.SignTxOpts): Promise<import("@cosmjs/stargate").DeliverTxResponse>;
|
|
20
20
|
linkPool(params: AdminModule.LinkPoolParams, opts?: CarbonTx.SignTxOpts): Promise<import("@cosmjs/stargate").DeliverTxResponse>;
|
|
21
21
|
unlinkPool(params: AdminModule.UnlinkPoolParams, opts?: CarbonTx.SignTxOpts): Promise<import("@cosmjs/stargate").DeliverTxResponse>;
|
|
22
22
|
setRewardsWeights(params: AdminModule.SetRewardsWeightsParams[], opts?: CarbonTx.SignTxOpts): Promise<import("@cosmjs/stargate").DeliverTxResponse>;
|
|
@@ -33,6 +33,19 @@ export declare class AdminModule extends BaseModule {
|
|
|
33
33
|
editValidator(params: AdminModule.EditValidatorParams, opts?: CarbonTx.SignTxOpts): Promise<import("@cosmjs/stargate").DeliverTxResponse>;
|
|
34
34
|
authorizeBridge(params: AdminModule.AuthorizeBridgeParams, opts?: CarbonTx.SignTxOpts): Promise<import("@cosmjs/stargate").DeliverTxResponse>;
|
|
35
35
|
deauthorizeBridge(params: AdminModule.DeauthorizeBridgeParams, opts?: CarbonTx.SignTxOpts): Promise<import("@cosmjs/stargate").DeliverTxResponse>;
|
|
36
|
+
addRateStrategy(params: AdminModule.AddRateStrategyParams, opts?: CarbonTx.SignTxOpts): Promise<import("@cosmjs/stargate").DeliverTxResponse>;
|
|
37
|
+
updateRateStrategy(params: AdminModule.UpdateRateStrategyParams, opts?: CarbonTx.SignTxOpts): Promise<import("@cosmjs/stargate").DeliverTxResponse>;
|
|
38
|
+
removeRateStrategy(params: AdminModule.RemoveRateStrategyParams, opts?: CarbonTx.SignTxOpts): Promise<import("@cosmjs/stargate").DeliverTxResponse>;
|
|
39
|
+
addAsset(params: AdminModule.AddAssetParams, opts?: CarbonTx.SignTxOpts): Promise<import("@cosmjs/stargate").DeliverTxResponse>;
|
|
40
|
+
updateAsset(params: AdminModule.UpdateAssetParams, opts?: CarbonTx.SignTxOpts): Promise<import("@cosmjs/stargate").DeliverTxResponse>;
|
|
41
|
+
setLiquidationFee(params: AdminModule.SetLiquidationFeeParams, opts?: CarbonTx.SignTxOpts): Promise<import("@cosmjs/stargate").DeliverTxResponse>;
|
|
42
|
+
setInterestFee(params: AdminModule.SetInterestFeeParams, opts?: CarbonTx.SignTxOpts): Promise<import("@cosmjs/stargate").DeliverTxResponse>;
|
|
43
|
+
setStableCoinInterestRate(params: AdminModule.SetStableCoinInterestRateParams, opts?: CarbonTx.SignTxOpts): Promise<import("@cosmjs/stargate").DeliverTxResponse>;
|
|
44
|
+
setCompleteLiquidationThreshold(params: AdminModule.SetCompleteLiquidationThresholdParams, opts?: CarbonTx.SignTxOpts): Promise<import("@cosmjs/stargate").DeliverTxResponse>;
|
|
45
|
+
setMinimumCloseFactor(params: AdminModule.SetMinimumCloseFactorParams, opts?: CarbonTx.SignTxOpts): Promise<import("@cosmjs/stargate").DeliverTxResponse>;
|
|
46
|
+
setSmallLiquidationSize(params: AdminModule.SetSmallLiquidationSizeParams, opts?: CarbonTx.SignTxOpts): Promise<import("@cosmjs/stargate").DeliverTxResponse>;
|
|
47
|
+
createRewardScheme(params: AdminModule.CreateRewardSchemeParams, opts?: CarbonTx.SignTxOpts): Promise<import("@cosmjs/stargate").DeliverTxResponse>;
|
|
48
|
+
updateRewardScheme(params: AdminModule.UpdateRewardSchemeParams, opts?: CarbonTx.SignTxOpts): Promise<import("@cosmjs/stargate").DeliverTxResponse>;
|
|
36
49
|
}
|
|
37
50
|
export declare namespace AdminModule {
|
|
38
51
|
interface AuthorizeBridgeParams {
|
|
@@ -181,6 +194,83 @@ export declare namespace AdminModule {
|
|
|
181
194
|
commissionRate: BigNumber;
|
|
182
195
|
minSelfDelegation: BigNumber;
|
|
183
196
|
}
|
|
197
|
+
interface RateStrategy {
|
|
198
|
+
name: string;
|
|
199
|
+
optimalUsage: BigNumber;
|
|
200
|
+
baseVariableBorrowRate: BigNumber;
|
|
201
|
+
variableRateSlope1: BigNumber;
|
|
202
|
+
variableRateSlope2: BigNumber;
|
|
203
|
+
baseStableBorrowRate: BigNumber;
|
|
204
|
+
stableRateSlope1: BigNumber;
|
|
205
|
+
stableRateSlope2: BigNumber;
|
|
206
|
+
optimalStableToTotalDebtRatio: BigNumber;
|
|
207
|
+
}
|
|
208
|
+
interface Asset {
|
|
209
|
+
denom: string;
|
|
210
|
+
oracleId: string;
|
|
211
|
+
rateStrategyName: string;
|
|
212
|
+
loanToValue: BigNumber;
|
|
213
|
+
liquidationThreshold: BigNumber;
|
|
214
|
+
liquidationDiscount: BigNumber;
|
|
215
|
+
supplyCap: BigNumber;
|
|
216
|
+
borrowCap: BigNumber;
|
|
217
|
+
}
|
|
218
|
+
interface AddRateStrategyParams {
|
|
219
|
+
rateStrategy: RateStrategy;
|
|
220
|
+
}
|
|
221
|
+
interface UpdateRateStrategyParams {
|
|
222
|
+
rateStrategy: RateStrategy;
|
|
223
|
+
}
|
|
224
|
+
interface RemoveRateStrategyParams {
|
|
225
|
+
name: string;
|
|
226
|
+
}
|
|
227
|
+
interface AddAssetParams {
|
|
228
|
+
asset: Asset;
|
|
229
|
+
}
|
|
230
|
+
interface UpdateAssetParams {
|
|
231
|
+
asset: Asset;
|
|
232
|
+
}
|
|
233
|
+
interface SetLiquidationFeeParams {
|
|
234
|
+
liquidationFee: BigNumber;
|
|
235
|
+
}
|
|
236
|
+
interface SetInterestFeeParams {
|
|
237
|
+
interestFee: BigNumber;
|
|
238
|
+
}
|
|
239
|
+
interface SetStableCoinInterestRateParams {
|
|
240
|
+
stablecoinInterestRate: BigNumber;
|
|
241
|
+
}
|
|
242
|
+
interface SetCompleteLiquidationThresholdParams {
|
|
243
|
+
completeLiquidationThreshold: BigNumber;
|
|
244
|
+
}
|
|
245
|
+
interface SetMinimumCloseFactorParams {
|
|
246
|
+
minimumCloseFactor: BigNumber;
|
|
247
|
+
}
|
|
248
|
+
interface SetSmallLiquidationSizeParams {
|
|
249
|
+
smallLiquidationSize: BigNumber;
|
|
250
|
+
}
|
|
251
|
+
interface CreateRewardSchemeParams {
|
|
252
|
+
rewardDenom: string;
|
|
253
|
+
assetDenom: string;
|
|
254
|
+
rewardType: string;
|
|
255
|
+
rewardAmountPerSecond: BigNumber;
|
|
256
|
+
startTime?: Date;
|
|
257
|
+
endTime?: Date;
|
|
258
|
+
}
|
|
259
|
+
interface UpdateRewardSchemeParams {
|
|
260
|
+
rewardSchemeId: number;
|
|
261
|
+
rewardDenom?: string;
|
|
262
|
+
assetDenom?: string;
|
|
263
|
+
rewardType?: string;
|
|
264
|
+
rewardAmountPerSecond: BigNumber;
|
|
265
|
+
startTime?: Date;
|
|
266
|
+
endTime?: Date;
|
|
267
|
+
}
|
|
268
|
+
interface AddRewardReserveParams {
|
|
269
|
+
creator?: string;
|
|
270
|
+
rewardSchemeId: number;
|
|
271
|
+
amount: BigNumber;
|
|
272
|
+
denom: string;
|
|
273
|
+
}
|
|
184
274
|
}
|
|
185
275
|
export declare function transfromCreateOracleParams(msg: AdminModule.CreateOracleParams, address: string): {
|
|
186
276
|
creator: string;
|
|
@@ -207,12 +297,6 @@ export declare function transfromSyncTokenParams(msg: AdminModule.SyncTokenParam
|
|
|
207
297
|
syncer: string;
|
|
208
298
|
denom: string;
|
|
209
299
|
};
|
|
210
|
-
export declare function transfromCreateVaultTypeParams(msg: AdminModule.CreateVaultTypeParams, address: string): {
|
|
211
|
-
creator: string;
|
|
212
|
-
collateralDenom: string;
|
|
213
|
-
debtDenom: string;
|
|
214
|
-
collateralizationRatio: string;
|
|
215
|
-
};
|
|
216
300
|
export declare function transfromLinkPoolParams(msg: AdminModule.LinkPoolParams): {
|
|
217
301
|
poolId: Long.Long;
|
|
218
302
|
market: string;
|
|
@@ -261,3 +345,26 @@ export declare function transformSetSettlementPriceParams(msg: SettlementPricePa
|
|
|
261
345
|
settlementPrice: string;
|
|
262
346
|
};
|
|
263
347
|
export declare function transformCommunityPoolSpendAmount(amount: Coin[]): Coin[];
|
|
348
|
+
export declare function transformCreateRewardScheme(msg: AdminModule.CreateRewardSchemeParams): {
|
|
349
|
+
rewardDenom: string;
|
|
350
|
+
assetDenom: string;
|
|
351
|
+
rewardType: string;
|
|
352
|
+
rewardAmountPerSecond: string;
|
|
353
|
+
startTime: Date | undefined;
|
|
354
|
+
endTime: Date | undefined;
|
|
355
|
+
};
|
|
356
|
+
export declare function transformUpdateRewardScheme(msg: AdminModule.UpdateRewardSchemeParams): {
|
|
357
|
+
rewardSchemeId: Long.Long;
|
|
358
|
+
rewardDenom: string | undefined;
|
|
359
|
+
assetDenom: string | undefined;
|
|
360
|
+
rewardType: string | undefined;
|
|
361
|
+
rewardAmountPerSecond: string;
|
|
362
|
+
startTime: Date | undefined;
|
|
363
|
+
endTime: Date | undefined;
|
|
364
|
+
};
|
|
365
|
+
export declare function transformAddRewardReserve(msg: AdminModule.AddRewardReserveParams, wallet: CarbonWallet): {
|
|
366
|
+
creator: string;
|
|
367
|
+
rewardSchemeId: Long.Long;
|
|
368
|
+
amount: string;
|
|
369
|
+
denom: string;
|
|
370
|
+
};
|