carbon-js-sdk 0.2.13-dev.2 → 0.2.14
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 +0 -4
- package/lib/clients/TokenClient.js +7 -23
- package/lib/codec/book/genesis.d.ts +1 -1
- package/lib/codec/book/genesis.js +1 -1
- package/lib/codec/book/query.d.ts +1 -1
- package/lib/codec/book/query.js +1 -1
- package/lib/codec/broker/genesis.d.ts +1 -1
- package/lib/codec/broker/genesis.js +1 -1
- package/lib/codec/broker/query.d.ts +3 -3
- package/lib/codec/broker/query.js +3 -3
- package/lib/codec/btcx/denom_cross_chain_info.d.ts +1 -1
- package/lib/codec/btcx/denom_cross_chain_info.js +1 -1
- package/lib/codec/btcx/query.d.ts +1 -1
- package/lib/codec/btcx/query.js +1 -1
- package/lib/codec/ccm/genesis.d.ts +1 -1
- package/lib/codec/ccm/genesis.js +1 -1
- package/lib/codec/cdp/event.d.ts +22 -240
- package/lib/codec/cdp/event.js +80 -1516
- package/lib/codec/cdp/genesis.d.ts +4 -80
- package/lib/codec/cdp/genesis.js +22 -531
- package/lib/codec/cdp/query.d.ts +94 -397
- package/lib/codec/cdp/query.js +230 -1586
- package/lib/codec/cdp/tx.d.ts +96 -466
- package/lib/codec/cdp/tx.js +182 -1962
- package/lib/codec/coin/event.d.ts +1 -1
- package/lib/codec/coin/event.js +1 -1
- package/lib/codec/coin/genesis.d.ts +2 -2
- package/lib/codec/coin/genesis.js +2 -2
- package/lib/codec/coin/proposal.d.ts +1 -1
- package/lib/codec/coin/proposal.js +1 -1
- package/lib/codec/coin/query.d.ts +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/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 +16 -52
- package/lib/codec/index.js +55 -204
- package/lib/codec/inflation/genesis.d.ts +1 -1
- package/lib/codec/inflation/genesis.js +1 -1
- package/lib/codec/inflation/query.d.ts +1 -1
- package/lib/codec/inflation/query.js +1 -1
- package/lib/codec/insurance/genesis.d.ts +1 -1
- package/lib/codec/insurance/genesis.js +1 -1
- package/lib/codec/leverage/genesis.d.ts +1 -1
- package/lib/codec/leverage/genesis.js +1 -1
- package/lib/codec/leverage/query.d.ts +1 -1
- package/lib/codec/leverage/query.js +1 -1
- package/lib/codec/liquidation/genesis.d.ts +1 -1
- package/lib/codec/liquidation/genesis.js +1 -1
- package/lib/codec/liquidation/query.d.ts +1 -1
- package/lib/codec/liquidation/query.js +1 -1
- package/lib/codec/liquidation/quote_changes.d.ts +1 -1
- package/lib/codec/liquidation/quote_changes.js +1 -1
- package/lib/codec/liquiditypool/event.d.ts +2 -2
- package/lib/codec/liquiditypool/event.js +2 -2
- package/lib/codec/liquiditypool/genesis.d.ts +2 -2
- package/lib/codec/liquiditypool/genesis.js +2 -2
- package/lib/codec/liquiditypool/proposal.d.ts +1 -1
- package/lib/codec/liquiditypool/proposal.js +1 -1
- package/lib/codec/liquiditypool/query.d.ts +2 -2
- package/lib/codec/liquiditypool/query.js +2 -2
- package/lib/codec/liquiditypool/tx.d.ts +1 -1
- package/lib/codec/liquiditypool/tx.js +1 -1
- package/lib/codec/lockproxy/genesis.d.ts +1 -1
- package/lib/codec/lockproxy/genesis.js +1 -1
- package/lib/codec/lockproxy/query.d.ts +1 -1
- package/lib/codec/lockproxy/query.js +1 -1
- package/lib/codec/market/event.d.ts +1 -1
- package/lib/codec/market/event.js +1 -1
- package/lib/codec/market/genesis.d.ts +1 -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 +1 -1
- package/lib/codec/oracle/genesis.js +1 -1
- package/lib/codec/oracle/proposal.d.ts +1 -1
- package/lib/codec/oracle/proposal.js +1 -1
- package/lib/codec/oracle/query.d.ts +2 -2
- package/lib/codec/oracle/query.js +2 -2
- package/lib/codec/order/event.d.ts +1 -1
- package/lib/codec/order/event.js +1 -1
- package/lib/codec/order/genesis.d.ts +1 -1
- package/lib/codec/order/genesis.js +1 -1
- package/lib/codec/order/query.d.ts +1 -1
- package/lib/codec/order/query.js +1 -1
- package/lib/codec/position/event.d.ts +1 -1
- package/lib/codec/position/event.js +1 -1
- package/lib/codec/position/genesis.d.ts +1 -1
- package/lib/codec/position/genesis.js +1 -1
- package/lib/codec/position/query.d.ts +1 -1
- package/lib/codec/position/query.js +1 -1
- package/lib/codec/pricing/event.d.ts +1 -11
- package/lib/codec/pricing/event.js +2 -52
- package/lib/codec/pricing/genesis.d.ts +1 -2
- package/lib/codec/pricing/genesis.js +5 -20
- package/lib/codec/pricing/pricing.d.ts +0 -13
- package/lib/codec/pricing/pricing.js +1 -83
- package/lib/codec/pricing/query.d.ts +1 -1
- package/lib/codec/pricing/query.js +1 -1
- package/lib/codec/profile/event.d.ts +1 -1
- package/lib/codec/profile/event.js +1 -1
- package/lib/codec/profile/genesis.d.ts +1 -1
- package/lib/codec/profile/genesis.js +1 -1
- package/lib/codec/profile/query.d.ts +1 -1
- package/lib/codec/profile/query.js +1 -1
- package/lib/codec/subaccount/genesis.d.ts +1 -1
- package/lib/codec/subaccount/genesis.js +1 -1
- package/lib/codec/subaccount/query.d.ts +1 -1
- package/lib/codec/subaccount/query.js +1 -1
- package/lib/codec/tendermint/abci/types.d.ts +4 -4
- package/lib/codec/tendermint/abci/types.js +4 -4
- package/lib/codec/tendermint/types/block.d.ts +2 -2
- package/lib/codec/tendermint/types/block.js +2 -2
- package/lib/codec/tendermint/types/evidence.d.ts +2 -2
- package/lib/codec/tendermint/types/evidence.js +2 -2
- package/lib/codec/tendermint/types/types.d.ts +3 -3
- package/lib/codec/tendermint/types/types.js +3 -3
- package/lib/codec/tendermint/types/validator.d.ts +1 -1
- package/lib/codec/tendermint/types/validator.js +1 -1
- package/lib/modules/admin.d.ts +1 -53
- package/lib/modules/admin.js +43 -175
- package/lib/modules/cdp.d.ts +12 -62
- package/lib/modules/cdp.js +20 -149
- package/lib/provider/amino/types/admin.js +7 -48
- package/lib/provider/amino/types/cdp.js +32 -72
- package/lib/util/tx.d.ts +10 -42
- package/lib/wallet/CarbonSigningClient.js +27 -2
- package/lib/websocket/channel.js +0 -44
- package/lib/websocket/models.d.ts +36 -136
- package/lib/websocket/types.d.ts +3 -58
- package/lib/websocket/types.js +0 -22
- 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,122 +152,11 @@ 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
|
}
|
|
147
|
-
export interface
|
|
148
|
-
|
|
149
|
-
liquidation_fee: string;
|
|
150
|
-
stable_coin_interest_rate: string;
|
|
151
|
-
}
|
|
152
|
-
export interface RateStrategy {
|
|
153
|
-
name: string;
|
|
154
|
-
optimal_usage: string;
|
|
155
|
-
base_variable_borrow_rate: string;
|
|
156
|
-
variable_rate_slope_1: string;
|
|
157
|
-
variable_rate_slope_2: string;
|
|
158
|
-
base_stable_borrow_rate: string;
|
|
159
|
-
stable_rate_slope_1: string;
|
|
160
|
-
stable_rate_slope_2: string;
|
|
161
|
-
optimal_stable_to_total_debt_ratio: string;
|
|
162
|
-
}
|
|
163
|
-
/**
|
|
164
|
-
* @deprecated old websocket response struct for get_cdp_assets_all
|
|
165
|
-
* use AssetParams instead
|
|
166
|
-
*/
|
|
167
|
-
export interface Asset {
|
|
168
|
-
asset_params: {
|
|
169
|
-
denom: string;
|
|
170
|
-
oracle_id: string;
|
|
171
|
-
rate_strategy_name: string;
|
|
172
|
-
loan_to_value: string;
|
|
173
|
-
liquidation_threshold: string;
|
|
174
|
-
liquidation_bonus: string;
|
|
175
|
-
supply_cap: string;
|
|
176
|
-
borrow_cap: string;
|
|
177
|
-
};
|
|
178
|
-
asset_utilization: {
|
|
179
|
-
denom: string;
|
|
180
|
-
total_borrowed: string;
|
|
181
|
-
total_amount: string;
|
|
182
|
-
utilization_rate: string;
|
|
183
|
-
};
|
|
184
|
-
}
|
|
185
|
-
export interface AssetParams {
|
|
186
|
-
denom: string;
|
|
187
|
-
oracle_id: string;
|
|
188
|
-
rate_strategy_name: string;
|
|
189
|
-
repay_stablecoin_interest_debt: boolean;
|
|
190
|
-
loan_to_value: string;
|
|
191
|
-
liquidation_threshold: string;
|
|
192
|
-
liquidation_bonus: string;
|
|
193
|
-
supply_cap: string;
|
|
194
|
-
borrow_cap: string;
|
|
195
|
-
}
|
|
196
|
-
export interface Collateral {
|
|
197
|
-
cdp_denom: string;
|
|
198
|
-
denom: string;
|
|
199
|
-
collateral_amount: string;
|
|
200
|
-
}
|
|
201
|
-
export interface Debt {
|
|
202
|
-
denom: string;
|
|
203
|
-
principal_debt: string;
|
|
204
|
-
initial_cumulative_interest_multiplier: string;
|
|
205
|
-
}
|
|
206
|
-
export interface AccountData {
|
|
207
|
-
total_collaterals_usd: string;
|
|
208
|
-
total_debts_usd: string;
|
|
209
|
-
available_borrows_usd: string;
|
|
210
|
-
curr_liquidation_threshold: string;
|
|
211
|
-
health_factor: string;
|
|
212
|
-
}
|
|
213
|
-
/**
|
|
214
|
-
* Response for get_cdp_total_borrows and get_cdp_borrows
|
|
215
|
-
* Do not confuse with Debt
|
|
216
|
-
*/
|
|
217
|
-
export interface CDPBorrow {
|
|
218
|
-
address: string;
|
|
219
|
-
amount: string;
|
|
220
|
-
denom: string;
|
|
221
|
-
type: string;
|
|
222
|
-
}
|
|
223
|
-
/**
|
|
224
|
-
* Response for get_cdp_total_collaterals and get_cdp_collaterals
|
|
225
|
-
* Do not confuse with Collateral
|
|
226
|
-
*/
|
|
227
|
-
export interface CDPCollateral {
|
|
228
|
-
address: string;
|
|
229
|
-
amount: string;
|
|
230
|
-
denom: string;
|
|
231
|
-
}
|
|
232
|
-
export interface CDPDebtInfo {
|
|
233
|
-
denom: string;
|
|
234
|
-
last_updated_time: string;
|
|
235
|
-
total_principal: string;
|
|
236
|
-
cumulative_interest_multiplier: string;
|
|
237
|
-
initial_cumulative_interest_multiplier: string;
|
|
238
|
-
utilization_rate: string;
|
|
239
|
-
}
|
|
240
|
-
export interface CDPStableCoinDebtInfo {
|
|
241
|
-
denom: string;
|
|
242
|
-
last_updated_time: string;
|
|
243
|
-
total_principal: string;
|
|
244
|
-
cumulative_interest_multiplier: string;
|
|
245
|
-
initial_cumulative_interest_multiplier: string;
|
|
246
|
-
utilization_rate: string;
|
|
247
|
-
}
|
|
248
|
-
export interface CDPLiquidation {
|
|
249
|
-
liquidation: string;
|
|
250
|
-
debtor: string;
|
|
251
|
-
collateral_denom: string;
|
|
252
|
-
collateral_amount_liquidated: string;
|
|
253
|
-
collateral_amount_liquidator: string;
|
|
254
|
-
collateral_amount_fee: string;
|
|
255
|
-
liquidation_price: string;
|
|
256
|
-
market_price: string;
|
|
257
|
-
discount: string;
|
|
258
|
-
debt_denom: string;
|
|
259
|
-
debt_amount: string;
|
|
260
|
-
block_height: number;
|
|
261
|
-
block_time: string;
|
|
160
|
+
export interface CommitmentEvent extends Commitment {
|
|
161
|
+
Type?: string;
|
|
262
162
|
}
|
package/lib/websocket/types.d.ts
CHANGED
|
@@ -15,12 +15,7 @@ export declare enum WSChannel {
|
|
|
15
15
|
positions_by_market = "positions_by_market",
|
|
16
16
|
pools = "pools",
|
|
17
17
|
pools_by_id = "pools_by_id",
|
|
18
|
-
commitments = "commitments"
|
|
19
|
-
cdp_borrows = "cdp_borrows",
|
|
20
|
-
cdp_collaterals = "cdp_collaterals",
|
|
21
|
-
cdp_liquidate_collaterals = "cdp_liquidate_collaterals",
|
|
22
|
-
cdp_all_token_debts = "cdp_all_token_debts",
|
|
23
|
-
cdp_token_debt = "cdp_token_debt"
|
|
18
|
+
commitments = "commitments"
|
|
24
19
|
}
|
|
25
20
|
export declare enum WSRequest {
|
|
26
21
|
MarketStats = "get_market_stats",
|
|
@@ -36,24 +31,7 @@ export declare enum WSRequest {
|
|
|
36
31
|
Balances = "get_balances",
|
|
37
32
|
OrderBook = "get_orderbook",
|
|
38
33
|
Pools = "get_pools",
|
|
39
|
-
Commitments = "get_commitments"
|
|
40
|
-
CDPAllAssets = "get_cdp_all_assets",
|
|
41
|
-
CDPAssets = "get_cdp_assets",
|
|
42
|
-
CDPAccountCollaterals = "get_cdp_account_collaterals",
|
|
43
|
-
CDPAccountDebts = "get_cdp_account_debts",
|
|
44
|
-
CDPAccountData = "get_cdp_account_data",
|
|
45
|
-
CDPParams = "get_cdp_params",
|
|
46
|
-
CDPAllRateStrategies = "get_cdp_all_rate_strategies",
|
|
47
|
-
CDPRateStrategies = "get_cdp_rate_strategies",
|
|
48
|
-
CDPBorrows = "get_cdp_borrows",
|
|
49
|
-
CDPTotalBorrows = "get_cdp_total_borrows",
|
|
50
|
-
CDPCollaterals = "get_cdp_collaterals",
|
|
51
|
-
CDPTotalCollaterals = "get_cdp_total_collaterals",
|
|
52
|
-
CDPLiquidateCollateral = "get_cdp_liquidate_collateral",
|
|
53
|
-
CDPTokenDebt = "get_cdp_token_debt",
|
|
54
|
-
CDPAllTokenDebts = "get_cdp_all_token_debts",
|
|
55
|
-
CDPStablecoinDebt = "get_cdp_stablecoin_debt",
|
|
56
|
-
CDPLiquidations = "get_cdp_liquidations"
|
|
34
|
+
Commitments = "get_commitments"
|
|
57
35
|
}
|
|
58
36
|
export interface WsGetRecentTradesParams {
|
|
59
37
|
market: string;
|
|
@@ -97,26 +75,6 @@ export interface WsGetPositionsParams {
|
|
|
97
75
|
export interface WsGetCommitmentsParams {
|
|
98
76
|
address: string;
|
|
99
77
|
}
|
|
100
|
-
export interface WsGetCDPParams {
|
|
101
|
-
}
|
|
102
|
-
export interface WsGetCDPAssetParams {
|
|
103
|
-
denom: string;
|
|
104
|
-
}
|
|
105
|
-
export interface WsGetCDPAccountParams {
|
|
106
|
-
address: string;
|
|
107
|
-
}
|
|
108
|
-
export interface WsGetCDPRateStrategiesParams {
|
|
109
|
-
name: string;
|
|
110
|
-
}
|
|
111
|
-
export interface WsGetCdpTokenDebt {
|
|
112
|
-
denom: string;
|
|
113
|
-
}
|
|
114
|
-
export interface WsGetCdpAllTokenDebts {
|
|
115
|
-
}
|
|
116
|
-
export interface WsGetCdpStablecoinDebt {
|
|
117
|
-
}
|
|
118
|
-
export interface WsGetCdpLiquidations {
|
|
119
|
-
}
|
|
120
78
|
export interface WsSubscribeParams {
|
|
121
79
|
channel: WSChannel;
|
|
122
80
|
}
|
|
@@ -179,17 +137,4 @@ export interface WsUnsubscribeCandlesticksParams extends WsSubscribeParams {
|
|
|
179
137
|
market: string;
|
|
180
138
|
resolution: string;
|
|
181
139
|
}
|
|
182
|
-
export
|
|
183
|
-
address: string;
|
|
184
|
-
}
|
|
185
|
-
export interface WsSubscribeCDPCollaterals extends WsSubscribeParams {
|
|
186
|
-
address: string;
|
|
187
|
-
}
|
|
188
|
-
export interface WsSubscribeCDPLiquidateCollaterals extends WsSubscribeParams {
|
|
189
|
-
}
|
|
190
|
-
export interface WsSubscribeAllTokenDebts extends WsSubscribeParams {
|
|
191
|
-
}
|
|
192
|
-
export interface WsSubscribeTokenDebt extends WsSubscribeParams {
|
|
193
|
-
denom: string;
|
|
194
|
-
}
|
|
195
|
-
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;
|
|
140
|
+
export declare type WsSubscriptionParams = WsSubscribeCandlesticksParams | WsSubscribeBooksParams | WsSubscribeRecentTradesParams | WsSubscribeOrdersAllParams | WsSubscribeOrdersByMarketParams | WsSubscribeWalletBalanceParams | WsSubscribeAccountTradesAllParams | WsSubscribeAccountTradesByMarketParams | WsSubscribeMarketStatsAllParams | WsSubscribeMarketStatsByMarketParams | WsSubscribeLeveragesAllParams | WsSubscribeLeveragesByMarketParams | WsSubscribePositionsAllParams | WsSubscribePositionsByMarketParams | WsSubscribePoolsAllParams | WsSubscribePoolsByIdParams | WsSubscribeCommitmentParams | WsUnsubscribeCandlesticksParams;
|
package/lib/websocket/types.js
CHANGED
|
@@ -20,11 +20,6 @@ var WSChannel;
|
|
|
20
20
|
WSChannel["pools"] = "pools";
|
|
21
21
|
WSChannel["pools_by_id"] = "pools_by_id";
|
|
22
22
|
WSChannel["commitments"] = "commitments";
|
|
23
|
-
WSChannel["cdp_borrows"] = "cdp_borrows";
|
|
24
|
-
WSChannel["cdp_collaterals"] = "cdp_collaterals";
|
|
25
|
-
WSChannel["cdp_liquidate_collaterals"] = "cdp_liquidate_collaterals";
|
|
26
|
-
WSChannel["cdp_all_token_debts"] = "cdp_all_token_debts";
|
|
27
|
-
WSChannel["cdp_token_debt"] = "cdp_token_debt";
|
|
28
23
|
})(WSChannel = exports.WSChannel || (exports.WSChannel = {}));
|
|
29
24
|
var WSRequest;
|
|
30
25
|
(function (WSRequest) {
|
|
@@ -42,21 +37,4 @@ var WSRequest;
|
|
|
42
37
|
WSRequest["OrderBook"] = "get_orderbook";
|
|
43
38
|
WSRequest["Pools"] = "get_pools";
|
|
44
39
|
WSRequest["Commitments"] = "get_commitments";
|
|
45
|
-
WSRequest["CDPAllAssets"] = "get_cdp_all_assets";
|
|
46
|
-
WSRequest["CDPAssets"] = "get_cdp_assets";
|
|
47
|
-
WSRequest["CDPAccountCollaterals"] = "get_cdp_account_collaterals";
|
|
48
|
-
WSRequest["CDPAccountDebts"] = "get_cdp_account_debts";
|
|
49
|
-
WSRequest["CDPAccountData"] = "get_cdp_account_data";
|
|
50
|
-
WSRequest["CDPParams"] = "get_cdp_params";
|
|
51
|
-
WSRequest["CDPAllRateStrategies"] = "get_cdp_all_rate_strategies";
|
|
52
|
-
WSRequest["CDPRateStrategies"] = "get_cdp_rate_strategies";
|
|
53
|
-
WSRequest["CDPBorrows"] = "get_cdp_borrows";
|
|
54
|
-
WSRequest["CDPTotalBorrows"] = "get_cdp_total_borrows";
|
|
55
|
-
WSRequest["CDPCollaterals"] = "get_cdp_collaterals";
|
|
56
|
-
WSRequest["CDPTotalCollaterals"] = "get_cdp_total_collaterals";
|
|
57
|
-
WSRequest["CDPLiquidateCollateral"] = "get_cdp_liquidate_collateral";
|
|
58
|
-
WSRequest["CDPTokenDebt"] = "get_cdp_token_debt";
|
|
59
|
-
WSRequest["CDPAllTokenDebts"] = "get_cdp_all_token_debts";
|
|
60
|
-
WSRequest["CDPStablecoinDebt"] = "get_cdp_stablecoin_debt";
|
|
61
|
-
WSRequest["CDPLiquidations"] = "get_cdp_liquidations";
|
|
62
40
|
})(WSRequest = exports.WSRequest || (exports.WSRequest = {}));
|