carbon-js-sdk 0.2.16-dev.0 → 0.2.16-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/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/NEOClient.d.ts +1 -1
- package/lib/clients/NEOClient.js +6 -6
- package/lib/clients/TokenClient.d.ts +1 -1
- package/lib/clients/TokenClient.js +13 -7
- package/lib/clients/ZILClient.d.ts +1 -1
- package/lib/clients/ZILClient.js +16 -16
- package/lib/codec/cosmos/gov/v1beta1/query.js +2 -2
- package/lib/codec/cosmos/gov/v1beta1/tx.js +2 -2
- package/lib/codec/cosmos/tx/v1beta1/tx.js +2 -2
- 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/cdp.js +44 -44
- 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 +30 -30
- 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 +17 -17
- 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/wallet/CarbonSigner.js +2 -2
- package/lib/wallet/CarbonSigningClient.js +8 -8
- package/lib/wallet/CarbonWallet.js +6 -6
- package/lib/websocket/channel.js +17 -0
- package/lib/websocket/connector.js +3 -3
- package/lib/websocket/models.d.ts +4 -0
- package/lib/websocket/types.d.ts +9 -2
- package/lib/websocket/types.js +2 -0
- package/package.json +1 -1
|
@@ -171,7 +171,7 @@ class WSConnector {
|
|
|
171
171
|
params = [params]; // eslint-disable-line no-param-reassign
|
|
172
172
|
}
|
|
173
173
|
for (const param of params) {
|
|
174
|
-
const channelId = channel_1.generateChannelId(param);
|
|
174
|
+
const channelId = (0, channel_1.generateChannelId)(param);
|
|
175
175
|
const shouldSubscribe = this.channelHandlers[channelId] === undefined;
|
|
176
176
|
this.channelHandlers[channelId] = handler;
|
|
177
177
|
if (shouldSubscribe) {
|
|
@@ -193,7 +193,7 @@ class WSConnector {
|
|
|
193
193
|
}
|
|
194
194
|
const channelIds = [];
|
|
195
195
|
for (const param of params) {
|
|
196
|
-
const channelId = channel_1.generateChannelId(param);
|
|
196
|
+
const channelId = (0, channel_1.generateChannelId)(param);
|
|
197
197
|
delete this.channelHandlers[channelId];
|
|
198
198
|
}
|
|
199
199
|
this.send('unsubscribe', {
|
|
@@ -279,7 +279,7 @@ class WSConnector {
|
|
|
279
279
|
if (!channelHandler) {
|
|
280
280
|
this.debugLog(`handler not found for channel: ${message.channel}`);
|
|
281
281
|
try {
|
|
282
|
-
const params = channel_1.parseChannelId(message.channel);
|
|
282
|
+
const params = (0, channel_1.parseChannelId)(message.channel);
|
|
283
283
|
this.unsubscribe({ channel: params.channel });
|
|
284
284
|
}
|
|
285
285
|
catch (error) {
|
package/lib/websocket/types.d.ts
CHANGED
|
@@ -24,7 +24,9 @@ export declare enum WSChannel {
|
|
|
24
24
|
cdp_token_debts = "cdp_token_debts",
|
|
25
25
|
cdp_token_debts_by_denom = "cdp_token_debts_by_denom",
|
|
26
26
|
cdp_reward_schemes = "cdp_reward_schemes",
|
|
27
|
-
cdp_reward_debts = "cdp_reward_debts"
|
|
27
|
+
cdp_reward_debts = "cdp_reward_debts",
|
|
28
|
+
cdp_token_supply = "cdp_token_supply",
|
|
29
|
+
cdp_token_supply_by_denom = "cdp_token_supply_by_denom"
|
|
28
30
|
}
|
|
29
31
|
export declare enum WSRequest {
|
|
30
32
|
MarketStats = "get_market_stats",
|
|
@@ -214,4 +216,9 @@ export interface WsSubscribeTokenPrices extends WsSubscribeParams {
|
|
|
214
216
|
}
|
|
215
217
|
export interface WsSubscribeAllTokenPrices extends WsSubscribeParams {
|
|
216
218
|
}
|
|
217
|
-
export
|
|
219
|
+
export interface WsSubscribeCDPTokenSupplyByDenom extends WsSubscribeParams {
|
|
220
|
+
denom: string;
|
|
221
|
+
}
|
|
222
|
+
export interface WsSubscribeCDPTokenSupply extends WsSubscribeParams {
|
|
223
|
+
}
|
|
224
|
+
export declare type WsSubscriptionParams = WsSubscribeCandlesticksParams | WsSubscribeBooksParams | WsSubscribeRecentTradesParams | WsSubscribeOrdersAllParams | WsSubscribeOrdersByMarketParams | WsSubscribeWalletBalanceParams | WsSubscribeAccountTradesAllParams | WsSubscribeAccountTradesByMarketParams | WsSubscribeMarketStatsAllParams | WsSubscribeMarketStatsByMarketParams | WsSubscribeLeveragesAllParams | WsSubscribeLeveragesByMarketParams | WsSubscribePositionsAllParams | WsSubscribePositionsByMarketParams | WsSubscribePoolsAllParams | WsSubscribePoolsByIdParams | WsSubscribeTokenPrices | WsSubscribeAllTokenPrices | WsSubscribeCommitmentParams | WsUnsubscribeCandlesticksParams | WsSubscribeCDPBorrows | WsSubscribeCDPCollaterals | WsSubscribeCDPLiquidateCollaterals | WsSubscribeTokenDebts | WsSubscribeTokenDebtByDenom | WsSubscribeRewardSchemes | WsSubscribeRewardDebts | WsSubscribeCDPTokenSupply | WsSubscribeCDPTokenSupplyByDenom;
|
package/lib/websocket/types.js
CHANGED
|
@@ -29,6 +29,8 @@ var WSChannel;
|
|
|
29
29
|
WSChannel["cdp_token_debts_by_denom"] = "cdp_token_debts_by_denom";
|
|
30
30
|
WSChannel["cdp_reward_schemes"] = "cdp_reward_schemes";
|
|
31
31
|
WSChannel["cdp_reward_debts"] = "cdp_reward_debts";
|
|
32
|
+
WSChannel["cdp_token_supply"] = "cdp_token_supply";
|
|
33
|
+
WSChannel["cdp_token_supply_by_denom"] = "cdp_token_supply_by_denom";
|
|
32
34
|
})(WSChannel = exports.WSChannel || (exports.WSChannel = {}));
|
|
33
35
|
var WSRequest;
|
|
34
36
|
(function (WSRequest) {
|