carbon-js-sdk 0.2.13 → 0.2.14-dev.1
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/clients/TokenClient.d.ts +5 -0
- package/lib/clients/TokenClient.js +29 -7
- 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 -12
- package/lib/codec/cdp/asset_params.js +14 -81
- package/lib/codec/cdp/debt_info.d.ts +1 -1
- package/lib/codec/cdp/debt_info.js +11 -13
- package/lib/codec/cdp/event.d.ts +321 -22
- package/lib/codec/cdp/event.js +2005 -82
- package/lib/codec/cdp/genesis.d.ts +80 -4
- package/lib/codec/cdp/genesis.js +531 -22
- package/lib/codec/cdp/params.d.ts +35 -0
- package/lib/codec/cdp/params.js +47 -1
- package/lib/codec/cdp/query.d.ts +437 -89
- package/lib/codec/cdp/query.js +1966 -177
- package/lib/codec/cdp/reward_scheme.d.ts +85 -0
- package/lib/codec/cdp/reward_scheme.js +656 -0
- package/lib/codec/cdp/stablecoin_debt_info.d.ts +1 -1
- package/lib/codec/cdp/stablecoin_debt_info.js +11 -13
- package/lib/codec/cdp/tx.d.ts +667 -96
- package/lib/codec/cdp/tx.js +3196 -243
- 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/authz.d.ts +19 -0
- package/lib/codec/cosmos/authz/v1beta1/authz.js +89 -1
- package/lib/codec/cosmos/authz/v1beta1/genesis.d.ts +1 -15
- package/lib/codec/cosmos/authz/v1beta1/genesis.js +7 -120
- package/lib/codec/cosmos/authz/v1beta1/query.d.ts +70 -2
- package/lib/codec/cosmos/authz/v1beta1/query.js +275 -3
- 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/export.d.ts +1 -1
- package/lib/codec/cosmos/bank/v1beta1/export.js +3 -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 +43 -3
- package/lib/codec/cosmos/bank/v1beta1/query.js +140 -4
- 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/snapshots/v1beta1/snapshot.d.ts +64 -0
- package/lib/codec/cosmos/base/snapshots/v1beta1/snapshot.js +343 -1
- 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 +35 -2
- package/lib/codec/cosmos/feegrant/v1beta1/query.js +139 -3
- 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 +14 -1
- package/lib/codec/cosmos/tx/signing/v1beta1/signing.js +19 -1
- package/lib/codec/cosmos/tx/v1beta1/export.d.ts +1 -1
- package/lib/codec/cosmos/tx/v1beta1/export.js +3 -1
- package/lib/codec/cosmos/tx/v1beta1/service.d.ts +53 -5
- package/lib/codec/cosmos/tx/v1beta1/service.js +179 -4
- 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 +71 -23
- package/lib/codec/index.js +590 -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 +68 -1
- package/lib/codec/pricing/query.js +321 -2
- 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 +53 -1
- package/lib/modules/admin.js +175 -43
- package/lib/modules/cdp.d.ts +104 -13
- package/lib/modules/cdp.js +618 -20
- package/lib/provider/amino/types/admin.js +48 -7
- package/lib/provider/amino/types/cdp.js +72 -32
- package/lib/util/number.d.ts +1 -0
- package/lib/util/number.js +2 -1
- package/lib/util/tx.d.ts +58 -14
- package/lib/wallet/CarbonSigningClient.js +27 -2
- package/lib/wallet/CarbonWallet.js +0 -1
- package/lib/websocket/channel.js +60 -0
- package/lib/websocket/models.d.ts +179 -21
- package/lib/websocket/types.d.ts +69 -3
- package/lib/websocket/types.js +27 -0
- package/package.json +1 -1
|
@@ -2,6 +2,7 @@ export interface RecentTrade {
|
|
|
2
2
|
block_created_at: string;
|
|
3
3
|
block_height: number;
|
|
4
4
|
id: number;
|
|
5
|
+
liquidation?: string;
|
|
5
6
|
maker_address: string;
|
|
6
7
|
maker_fee_amount: string;
|
|
7
8
|
maker_fee_denom: string;
|
|
@@ -19,18 +20,19 @@ export interface RecentTrade {
|
|
|
19
20
|
export interface HistoryOrder {
|
|
20
21
|
address: string;
|
|
21
22
|
allocated_margin: string;
|
|
23
|
+
avg_filled_price: string;
|
|
22
24
|
available: string;
|
|
23
25
|
block_created_at: string;
|
|
24
26
|
block_height: number;
|
|
25
27
|
filled: string;
|
|
26
28
|
id: string;
|
|
27
29
|
initiator: string;
|
|
28
|
-
is_liquidation
|
|
29
|
-
is_post_only
|
|
30
|
-
is_reduce_only
|
|
30
|
+
is_liquidation?: boolean;
|
|
31
|
+
is_post_only?: boolean;
|
|
32
|
+
is_reduce_only?: boolean;
|
|
31
33
|
market: string;
|
|
32
|
-
order_id: string;
|
|
33
34
|
order_type: string;
|
|
35
|
+
pool_id?: number;
|
|
34
36
|
price: string;
|
|
35
37
|
quantity: string;
|
|
36
38
|
side: string;
|
|
@@ -39,47 +41,52 @@ export interface HistoryOrder {
|
|
|
39
41
|
time_in_force: string;
|
|
40
42
|
trigger_type: string;
|
|
41
43
|
triggered_block_height: number;
|
|
42
|
-
|
|
43
|
-
|
|
44
|
+
referral_address?: string;
|
|
45
|
+
referral_commission?: number;
|
|
46
|
+
referral_kickback?: number;
|
|
44
47
|
}
|
|
45
48
|
export interface BaseHistoryOrder {
|
|
46
49
|
allocated_margin_amount: string;
|
|
47
50
|
allocated_margin_denom: string;
|
|
51
|
+
last_updated_block_height: number;
|
|
48
52
|
order: HistoryOrder;
|
|
53
|
+
username?: string;
|
|
54
|
+
}
|
|
55
|
+
export interface BaseHistoryOrderEvent extends BaseHistoryOrder {
|
|
56
|
+
type?: string;
|
|
49
57
|
}
|
|
50
58
|
export interface Candlestick {
|
|
51
|
-
time:
|
|
59
|
+
time: string;
|
|
52
60
|
close: string;
|
|
61
|
+
market: string;
|
|
53
62
|
open: string;
|
|
54
63
|
high: string;
|
|
55
64
|
low: string;
|
|
56
65
|
volume: string;
|
|
57
66
|
quote_volume: string;
|
|
67
|
+
resolution: number;
|
|
58
68
|
}
|
|
59
69
|
export interface AccountTrade {
|
|
60
70
|
address: string;
|
|
61
|
-
base_precision: number;
|
|
62
71
|
block_created_at: string;
|
|
63
|
-
block_height:
|
|
72
|
+
block_height: number;
|
|
64
73
|
fee_amount: string;
|
|
65
74
|
fee_denom: string;
|
|
66
|
-
fee_precision: number;
|
|
67
|
-
id: number;
|
|
68
75
|
market: string;
|
|
69
76
|
order_id: string;
|
|
70
77
|
price: string;
|
|
71
78
|
quantity: string;
|
|
72
|
-
quote_precision: number;
|
|
73
79
|
side: string;
|
|
80
|
+
trade_id: number;
|
|
74
81
|
}
|
|
75
82
|
export interface Position {
|
|
76
83
|
market: string;
|
|
77
84
|
address: string;
|
|
78
85
|
trade_id: string;
|
|
79
86
|
side: string;
|
|
80
|
-
opened_block_height:
|
|
81
|
-
updated_block_height:
|
|
82
|
-
closed_block_height
|
|
87
|
+
opened_block_height: number;
|
|
88
|
+
updated_block_height: number;
|
|
89
|
+
closed_block_height?: number;
|
|
83
90
|
realized_pnl: string;
|
|
84
91
|
max_lots: string;
|
|
85
92
|
total_fee_amount: string;
|
|
@@ -89,7 +96,7 @@ export interface Position {
|
|
|
89
96
|
allocated_margin: string;
|
|
90
97
|
lots: string;
|
|
91
98
|
opened_at: string;
|
|
92
|
-
closed_at
|
|
99
|
+
closed_at?: string;
|
|
93
100
|
}
|
|
94
101
|
export interface MarketStat {
|
|
95
102
|
day_high: string;
|
|
@@ -103,18 +110,22 @@ export interface MarketStat {
|
|
|
103
110
|
last_price: string;
|
|
104
111
|
market: string;
|
|
105
112
|
market_type: string;
|
|
106
|
-
premium_rate
|
|
107
|
-
last_funding_at
|
|
108
|
-
open_interest
|
|
113
|
+
premium_rate: string;
|
|
114
|
+
last_funding_at: string;
|
|
115
|
+
open_interest: string;
|
|
109
116
|
}
|
|
110
117
|
export interface PriceLevel {
|
|
111
118
|
price: string;
|
|
112
119
|
quantity: string;
|
|
120
|
+
market?: string;
|
|
121
|
+
side?: string;
|
|
122
|
+
}
|
|
123
|
+
export interface PriceLevelEvent extends PriceLevel {
|
|
124
|
+
type?: string;
|
|
113
125
|
}
|
|
114
126
|
export interface Leverage {
|
|
115
|
-
market
|
|
127
|
+
market?: string;
|
|
116
128
|
leverage: string;
|
|
117
|
-
originator?: string;
|
|
118
129
|
}
|
|
119
130
|
export interface Pool {
|
|
120
131
|
pool: {
|
|
@@ -141,6 +152,153 @@ export interface Commitment {
|
|
|
141
152
|
amount: string;
|
|
142
153
|
start_time: string;
|
|
143
154
|
end_time: string;
|
|
155
|
+
duration?: number;
|
|
156
|
+
is_locked: boolean;
|
|
144
157
|
commitment_power: string;
|
|
145
158
|
boost_factor: string;
|
|
146
159
|
}
|
|
160
|
+
export interface CommitmentEvent extends Commitment {
|
|
161
|
+
Type?: string;
|
|
162
|
+
}
|
|
163
|
+
export interface CDPParams {
|
|
164
|
+
interest_fee: string;
|
|
165
|
+
liquidation_fee: string;
|
|
166
|
+
stablecoin_interest_rate: string;
|
|
167
|
+
complete_liquidation_threshold: string;
|
|
168
|
+
minimum_close_factor: string;
|
|
169
|
+
small_liquidation_size: string;
|
|
170
|
+
}
|
|
171
|
+
export interface RateStrategy {
|
|
172
|
+
name: string;
|
|
173
|
+
optimal_usage: string;
|
|
174
|
+
base_variable_borrow_rate: string;
|
|
175
|
+
variable_rate_slope_1: string;
|
|
176
|
+
variable_rate_slope_2: string;
|
|
177
|
+
base_stable_borrow_rate: string;
|
|
178
|
+
stable_rate_slope_1: string;
|
|
179
|
+
stable_rate_slope_2: string;
|
|
180
|
+
optimal_stable_to_total_debt_ratio: string;
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* @deprecated old websocket response struct for get_cdp_assets_all
|
|
184
|
+
* use AssetParams instead
|
|
185
|
+
*/
|
|
186
|
+
export interface Asset {
|
|
187
|
+
asset_params: {
|
|
188
|
+
denom: string;
|
|
189
|
+
oracle_id: string;
|
|
190
|
+
rate_strategy_name: string;
|
|
191
|
+
loan_to_value: string;
|
|
192
|
+
liquidation_threshold: string;
|
|
193
|
+
liquidation_bonus: string;
|
|
194
|
+
supply_cap: string;
|
|
195
|
+
borrow_cap: string;
|
|
196
|
+
};
|
|
197
|
+
asset_utilization: {
|
|
198
|
+
denom: string;
|
|
199
|
+
total_borrowed: string;
|
|
200
|
+
total_amount: string;
|
|
201
|
+
utilization_rate: string;
|
|
202
|
+
};
|
|
203
|
+
}
|
|
204
|
+
export interface AssetParams {
|
|
205
|
+
denom: string;
|
|
206
|
+
oracle_id: string;
|
|
207
|
+
rate_strategy_name: string;
|
|
208
|
+
allow_repay_stablecoin_interest_debt: boolean;
|
|
209
|
+
loan_to_value: string;
|
|
210
|
+
liquidation_threshold: string;
|
|
211
|
+
liquidation_bonus: string;
|
|
212
|
+
supply_cap: string;
|
|
213
|
+
borrow_cap: string;
|
|
214
|
+
}
|
|
215
|
+
export interface Collateral {
|
|
216
|
+
cdp_denom: string;
|
|
217
|
+
denom: string;
|
|
218
|
+
collateral_amount: string;
|
|
219
|
+
}
|
|
220
|
+
export interface Debt {
|
|
221
|
+
denom: string;
|
|
222
|
+
principal_debt: string;
|
|
223
|
+
initial_cumulative_interest_multiplier: string;
|
|
224
|
+
}
|
|
225
|
+
export interface AccountData {
|
|
226
|
+
total_collaterals_usd: string;
|
|
227
|
+
total_debts_usd: string;
|
|
228
|
+
available_borrows_usd: string;
|
|
229
|
+
curr_liquidation_threshold: string;
|
|
230
|
+
health_factor: string;
|
|
231
|
+
}
|
|
232
|
+
export interface CDPAccountStablecoin {
|
|
233
|
+
principal_debt: string;
|
|
234
|
+
interest_debt: string;
|
|
235
|
+
initial_cumulative_interest_multiplier: string;
|
|
236
|
+
}
|
|
237
|
+
/**
|
|
238
|
+
* Response for get_cdp_total_borrows and get_cdp_borrows
|
|
239
|
+
* Do not confuse with Debt
|
|
240
|
+
*/
|
|
241
|
+
export interface CDPBorrow {
|
|
242
|
+
address: string;
|
|
243
|
+
amount: string;
|
|
244
|
+
denom: string;
|
|
245
|
+
type: string;
|
|
246
|
+
}
|
|
247
|
+
/**
|
|
248
|
+
* Response for get_cdp_total_collaterals and get_cdp_collaterals
|
|
249
|
+
* Do not confuse with Collateral
|
|
250
|
+
*/
|
|
251
|
+
export interface CDPCollateral {
|
|
252
|
+
address: string;
|
|
253
|
+
amount: string;
|
|
254
|
+
denom: string;
|
|
255
|
+
}
|
|
256
|
+
export interface CDPDebtInfo {
|
|
257
|
+
denom: string;
|
|
258
|
+
last_updated_time: string;
|
|
259
|
+
total_principal: string;
|
|
260
|
+
cumulative_interest_multiplier: string;
|
|
261
|
+
total_accumulated_interest: string;
|
|
262
|
+
utilization_rate: string;
|
|
263
|
+
}
|
|
264
|
+
export interface CDPStableCoinDebtInfo {
|
|
265
|
+
denom: string;
|
|
266
|
+
last_updated_time: string;
|
|
267
|
+
total_principal: string;
|
|
268
|
+
cumulative_interest_multiplier: string;
|
|
269
|
+
total_accumulated_interest: string;
|
|
270
|
+
}
|
|
271
|
+
export interface CDPLiquidation {
|
|
272
|
+
liquidator: string;
|
|
273
|
+
debtor: string;
|
|
274
|
+
collateral_denom: string;
|
|
275
|
+
collateral_amount_liquidated: string;
|
|
276
|
+
collateral_amount_liquidator: string;
|
|
277
|
+
collateral_amount_fee: string;
|
|
278
|
+
liquidation_price: string;
|
|
279
|
+
market_price: string;
|
|
280
|
+
discount: string;
|
|
281
|
+
debt_denom: string;
|
|
282
|
+
debt_amount: string;
|
|
283
|
+
block_height: number;
|
|
284
|
+
block_time: string;
|
|
285
|
+
transaction_hash: string;
|
|
286
|
+
}
|
|
287
|
+
export interface RewardScheme {
|
|
288
|
+
id: number;
|
|
289
|
+
creator: string;
|
|
290
|
+
reward_denom: string;
|
|
291
|
+
asset_denom: string;
|
|
292
|
+
reward_type: string;
|
|
293
|
+
reward_amount_per_second: string;
|
|
294
|
+
start_time: string;
|
|
295
|
+
end_time: string;
|
|
296
|
+
reward_reserve_amount: string;
|
|
297
|
+
reward_per_share_last_updated_at: string;
|
|
298
|
+
reward_per_share: string;
|
|
299
|
+
}
|
|
300
|
+
export interface RewardDebt {
|
|
301
|
+
user_address: string;
|
|
302
|
+
reward_scheme_id: number;
|
|
303
|
+
reward_debt: string;
|
|
304
|
+
}
|
package/lib/websocket/types.d.ts
CHANGED
|
@@ -15,7 +15,14 @@ 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"
|
|
18
|
+
commitments = "commitments",
|
|
19
|
+
cdp_borrows = "cdp_borrows",
|
|
20
|
+
cdp_collaterals = "cdp_collaterals",
|
|
21
|
+
cdp_liquidate_collaterals = "cdp_liquidate_collaterals",
|
|
22
|
+
cdp_all_token_debts = "cdp_all_token_debts",
|
|
23
|
+
cdp_token_debt = "cdp_token_debt",
|
|
24
|
+
cdp_reward_schemes = "cdp_reward_schemes",
|
|
25
|
+
cdp_reward_debts = "cdp_reward_debts"
|
|
19
26
|
}
|
|
20
27
|
export declare enum WSRequest {
|
|
21
28
|
MarketStats = "get_market_stats",
|
|
@@ -31,7 +38,27 @@ export declare enum WSRequest {
|
|
|
31
38
|
Balances = "get_balances",
|
|
32
39
|
OrderBook = "get_orderbook",
|
|
33
40
|
Pools = "get_pools",
|
|
34
|
-
Commitments = "get_commitments"
|
|
41
|
+
Commitments = "get_commitments",
|
|
42
|
+
CDPAllAssets = "get_cdp_all_assets",
|
|
43
|
+
CDPAssets = "get_cdp_assets",
|
|
44
|
+
CDPAccountCollaterals = "get_cdp_account_collaterals",
|
|
45
|
+
CDPAccountDebts = "get_cdp_account_debts",
|
|
46
|
+
CDPAccountData = "get_cdp_account_data",
|
|
47
|
+
CDPParams = "get_cdp_params",
|
|
48
|
+
CDPAllRateStrategies = "get_cdp_all_rate_strategies",
|
|
49
|
+
CDPRateStrategies = "get_cdp_rate_strategies",
|
|
50
|
+
CDPBorrows = "get_cdp_borrows",
|
|
51
|
+
CDPTotalBorrows = "get_cdp_total_borrows",
|
|
52
|
+
CDPCollaterals = "get_cdp_collaterals",
|
|
53
|
+
CDPTotalCollaterals = "get_cdp_total_collaterals",
|
|
54
|
+
CDPLiquidateCollateral = "get_cdp_liquidate_collateral",
|
|
55
|
+
CDPTokenDebt = "get_cdp_token_debt",
|
|
56
|
+
CDPAllTokenDebts = "get_cdp_all_token_debts",
|
|
57
|
+
CDPStablecoinDebt = "get_cdp_stablecoin_debt",
|
|
58
|
+
CDPLiquidations = "get_cdp_liquidations",
|
|
59
|
+
CDPAccountStablecoin = "get_cdp_account_stablecoin",
|
|
60
|
+
CDPRewardSchemes = "get_reward_schemes",
|
|
61
|
+
CDPRewardsDebts = "get_reward_debts"
|
|
35
62
|
}
|
|
36
63
|
export interface WsGetRecentTradesParams {
|
|
37
64
|
market: string;
|
|
@@ -75,6 +102,26 @@ export interface WsGetPositionsParams {
|
|
|
75
102
|
export interface WsGetCommitmentsParams {
|
|
76
103
|
address: string;
|
|
77
104
|
}
|
|
105
|
+
export interface WsGetCDPParams {
|
|
106
|
+
}
|
|
107
|
+
export interface WsGetCDPAssetParams {
|
|
108
|
+
denom: string;
|
|
109
|
+
}
|
|
110
|
+
export interface WsGetCDPAccountParams {
|
|
111
|
+
address: string;
|
|
112
|
+
}
|
|
113
|
+
export interface WsGetCDPRateStrategiesParams {
|
|
114
|
+
name: string;
|
|
115
|
+
}
|
|
116
|
+
export interface WsGetCdpTokenDebt {
|
|
117
|
+
denom: string;
|
|
118
|
+
}
|
|
119
|
+
export interface WsGetCdpAllTokenDebts {
|
|
120
|
+
}
|
|
121
|
+
export interface WsGetCdpStablecoinDebt {
|
|
122
|
+
}
|
|
123
|
+
export interface WsGetCdpLiquidations {
|
|
124
|
+
}
|
|
78
125
|
export interface WsSubscribeParams {
|
|
79
126
|
channel: WSChannel;
|
|
80
127
|
}
|
|
@@ -137,4 +184,23 @@ export interface WsUnsubscribeCandlesticksParams extends WsSubscribeParams {
|
|
|
137
184
|
market: string;
|
|
138
185
|
resolution: string;
|
|
139
186
|
}
|
|
140
|
-
export
|
|
187
|
+
export interface WsSubscribeCDPBorrows extends WsSubscribeParams {
|
|
188
|
+
address: string;
|
|
189
|
+
}
|
|
190
|
+
export interface WsSubscribeCDPCollaterals extends WsSubscribeParams {
|
|
191
|
+
address: string;
|
|
192
|
+
}
|
|
193
|
+
export interface WsSubscribeCDPLiquidateCollaterals extends WsSubscribeParams {
|
|
194
|
+
}
|
|
195
|
+
export interface WsSubscribeAllTokenDebts extends WsSubscribeParams {
|
|
196
|
+
}
|
|
197
|
+
export interface WsSubscribeTokenDebt extends WsSubscribeParams {
|
|
198
|
+
denom: string;
|
|
199
|
+
}
|
|
200
|
+
export interface WsSubscribeRewardSchemes extends WsSubscribeParams {
|
|
201
|
+
address?: string;
|
|
202
|
+
}
|
|
203
|
+
export interface WsSubscribeRewardDebts extends WsSubscribeParams {
|
|
204
|
+
address?: string;
|
|
205
|
+
}
|
|
206
|
+
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 | WsSubscribeAllTokenDebts | WsSubscribeTokenDebt | WsSubscribeRewardSchemes | WsSubscribeRewardDebts;
|
package/lib/websocket/types.js
CHANGED
|
@@ -20,6 +20,13 @@ 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
|
+
WSChannel["cdp_all_token_debts"] = "cdp_all_token_debts";
|
|
27
|
+
WSChannel["cdp_token_debt"] = "cdp_token_debt";
|
|
28
|
+
WSChannel["cdp_reward_schemes"] = "cdp_reward_schemes";
|
|
29
|
+
WSChannel["cdp_reward_debts"] = "cdp_reward_debts";
|
|
23
30
|
})(WSChannel = exports.WSChannel || (exports.WSChannel = {}));
|
|
24
31
|
var WSRequest;
|
|
25
32
|
(function (WSRequest) {
|
|
@@ -37,4 +44,24 @@ var WSRequest;
|
|
|
37
44
|
WSRequest["OrderBook"] = "get_orderbook";
|
|
38
45
|
WSRequest["Pools"] = "get_pools";
|
|
39
46
|
WSRequest["Commitments"] = "get_commitments";
|
|
47
|
+
WSRequest["CDPAllAssets"] = "get_cdp_all_assets";
|
|
48
|
+
WSRequest["CDPAssets"] = "get_cdp_assets";
|
|
49
|
+
WSRequest["CDPAccountCollaterals"] = "get_cdp_account_collaterals";
|
|
50
|
+
WSRequest["CDPAccountDebts"] = "get_cdp_account_debts";
|
|
51
|
+
WSRequest["CDPAccountData"] = "get_cdp_account_data";
|
|
52
|
+
WSRequest["CDPParams"] = "get_cdp_params";
|
|
53
|
+
WSRequest["CDPAllRateStrategies"] = "get_cdp_all_rate_strategies";
|
|
54
|
+
WSRequest["CDPRateStrategies"] = "get_cdp_rate_strategies";
|
|
55
|
+
WSRequest["CDPBorrows"] = "get_cdp_borrows";
|
|
56
|
+
WSRequest["CDPTotalBorrows"] = "get_cdp_total_borrows";
|
|
57
|
+
WSRequest["CDPCollaterals"] = "get_cdp_collaterals";
|
|
58
|
+
WSRequest["CDPTotalCollaterals"] = "get_cdp_total_collaterals";
|
|
59
|
+
WSRequest["CDPLiquidateCollateral"] = "get_cdp_liquidate_collateral";
|
|
60
|
+
WSRequest["CDPTokenDebt"] = "get_cdp_token_debt";
|
|
61
|
+
WSRequest["CDPAllTokenDebts"] = "get_cdp_all_token_debts";
|
|
62
|
+
WSRequest["CDPStablecoinDebt"] = "get_cdp_stablecoin_debt";
|
|
63
|
+
WSRequest["CDPLiquidations"] = "get_cdp_liquidations";
|
|
64
|
+
WSRequest["CDPAccountStablecoin"] = "get_cdp_account_stablecoin";
|
|
65
|
+
WSRequest["CDPRewardSchemes"] = "get_reward_schemes";
|
|
66
|
+
WSRequest["CDPRewardsDebts"] = "get_reward_debts";
|
|
40
67
|
})(WSRequest = exports.WSRequest || (exports.WSRequest = {}));
|