@injectivelabs/sdk-ts 1.17.2-alpha.0 → 1.17.2-alpha.10
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/dist/cjs/{ChainGrpcExchangeApi-BtyGj9nz.cjs → ChainGrpcExchangeApi-DLpkgEyg.cjs} +2 -2
- package/dist/cjs/{ChainRestTendermintApi-QfW64O3w.cjs → ChainRestTendermintApi-BiZOeKcG.cjs} +1 -1
- package/dist/cjs/{DirectEthSecp256k1Wallet-DoKnf40T.cjs → DirectEthSecp256k1Wallet-CU18lti3.cjs} +2 -2
- package/dist/cjs/{ExecArgNeptuneWithdraw-Bq-vm03i.cjs → ExecArgNeptuneWithdraw-DOHeo3AJ.cjs} +6 -6
- package/dist/cjs/{IndexerGrpcWeb3GwApi-DqzAO5JM.cjs → IndexerGrpcWeb3GwApi-BgWT2tWK.cjs} +6 -6
- package/dist/cjs/{MsgBase-BJ1-Qh5c.cjs → MsgBase-DqOmzCyS.cjs} +1 -0
- package/dist/cjs/{MsgSetDenomMetadata-DRNtJ4-D.cjs → MsgSetDenomMetadata-CUoGqV8P.cjs} +9 -9
- package/dist/cjs/{QueryTradingStrategyContractTotalStrategies-C9cHGYOE.cjs → QueryTradingStrategyContractTotalStrategies-Bh8AXm4k.cjs} +3 -3
- package/dist/cjs/{IndexerGrpcAccountPortfolioStream-DeTA0ie2.cjs → StreamManager-ikNObdr-.cjs} +1257 -278
- package/dist/cjs/{accounts-D7eN2BGD.cjs → accounts-CXaUasU5.cjs} +9 -8
- package/dist/cjs/{any_pb-CP-3DVyl.d.cts → any_pb-CutLnOUR.d.cts} +2 -2
- package/dist/cjs/{chain--FmH8auB.cjs → chain-Cs9sNuT1.cjs} +2 -2
- package/dist/cjs/client/chain.cjs +4 -4
- package/dist/cjs/client/chain.d.cts +7 -7
- package/dist/cjs/client/indexer.cjs +72 -58
- package/dist/cjs/client/indexer.d.cts +8 -8
- package/dist/cjs/client/olp.d.cts +1 -1
- package/dist/cjs/client/wasm.cjs +7 -7
- package/dist/cjs/client/wasm.d.cts +2 -2
- package/dist/cjs/core/accounts.cjs +3 -3
- package/dist/cjs/core/accounts.d.cts +7 -7
- package/dist/cjs/core/modules.cjs +9 -9
- package/dist/cjs/core/modules.d.cts +7 -7
- package/dist/cjs/core/tx.cjs +6 -6
- package/dist/cjs/core/tx.d.cts +7 -7
- package/dist/cjs/cosmjs.cjs +7 -7
- package/dist/cjs/cosmjs.d.cts +3 -3
- package/dist/cjs/exports.cjs +7 -7
- package/dist/cjs/exports.d.cts +3 -3
- package/dist/cjs/{index-Cqfc1ppG.d.cts → index-B1AYbshM.d.cts} +223 -19
- package/dist/cjs/{index-D4uWOVE5.d.cts → index-B8XmWgDc.d.cts} +5 -5
- package/dist/cjs/{index-Cc4mqAsR.d.cts → index-D6ubyMlR.d.cts} +1 -1
- package/dist/cjs/{index-9KV6P3U_.d.cts → index-DDQzXOux.d.cts} +933 -154
- package/dist/cjs/{index-CKBod1ba.d.cts → index-D__cYp7U.d.cts} +3 -2
- package/dist/cjs/{index-Cc5Q73-y.d.cts → index-FEXnDdOc.d.cts} +1 -1
- package/dist/cjs/index.cjs +89 -68
- package/dist/cjs/index.d.cts +8 -8
- package/dist/cjs/{service-BsjIvzFh.cjs → service-yA6fSem8.cjs} +2 -2
- package/dist/cjs/service.cjs +3 -3
- package/dist/cjs/service.d.cts +4 -4
- package/dist/cjs/{tx-BXz2UdNK.cjs → tx-Cn0j2SRh.cjs} +4 -4
- package/dist/{esm/tx_pb-TiSRD5ay.d.ts → cjs/tx_pb-D-cNmrlO.d.cts} +4 -3
- package/dist/cjs/{types-NFV4P_J_.cjs → types-DvoTS2v1.cjs} +104 -7
- package/dist/cjs/types.cjs +6 -1
- package/dist/cjs/types.d.cts +4 -4
- package/dist/cjs/{utils-WpVZ-fdd.cjs → utils-V1uXtT51.cjs} +120 -88
- package/dist/cjs/utils.cjs +3 -1
- package/dist/cjs/utils.d.cts +8 -8
- package/dist/esm/{ChainGrpcExchangeApi-C2PzFFLo.js → ChainGrpcExchangeApi-C-2XsVVs.js} +2 -2
- package/dist/esm/{ChainRestTendermintApi-iWnboboL.js → ChainRestTendermintApi-CMrAg0Zm.js} +1 -1
- package/dist/esm/{DirectEthSecp256k1Wallet-3qFMEHzf.js → DirectEthSecp256k1Wallet-a9KiF9fA.js} +2 -2
- package/dist/esm/{ExecArgNeptuneWithdraw-D_zdRFlV.js → ExecArgNeptuneWithdraw-DEljIeLd.js} +6 -6
- package/dist/esm/{IndexerGrpcWeb3GwApi-C82holuJ.js → IndexerGrpcWeb3GwApi-CtUYowus.js} +6 -6
- package/dist/esm/{MsgBase-aKq3ln6R.js → MsgBase-BkRgVbdY.js} +1 -0
- package/dist/esm/{MsgSetDenomMetadata-WwlO0X1r.js → MsgSetDenomMetadata-BhJMebO9.js} +9 -9
- package/dist/esm/{QueryTradingStrategyContractTotalStrategies-Bov-bhFt.js → QueryTradingStrategyContractTotalStrategies-7IjWZLsc.js} +3 -3
- package/dist/esm/{IndexerGrpcAccountPortfolioStream-CxK8ZbH1.js → StreamManager-Bz2mGjMt.js} +926 -31
- package/dist/esm/{accounts-B8PWTc1V.js → accounts-DFC9RYDH.js} +9 -8
- package/dist/esm/{any_pb-B1YYUSUf.d.ts → any_pb-DBt7qvTr.d.ts} +2 -2
- package/dist/esm/{chain-B93GTjUS.js → chain-phKWVf8c.js} +2 -2
- package/dist/esm/client/chain.d.ts +7 -7
- package/dist/esm/client/chain.js +4 -4
- package/dist/esm/client/indexer.d.ts +8 -8
- package/dist/esm/client/indexer.js +5 -5
- package/dist/esm/client/olp.d.ts +1 -1
- package/dist/esm/client/wasm.d.ts +2 -2
- package/dist/esm/client/wasm.js +7 -7
- package/dist/esm/core/accounts.d.ts +7 -7
- package/dist/esm/core/accounts.js +3 -3
- package/dist/esm/core/modules.d.ts +7 -7
- package/dist/esm/core/modules.js +9 -9
- package/dist/esm/core/tx.d.ts +7 -7
- package/dist/esm/core/tx.js +6 -6
- package/dist/esm/cosmjs.d.ts +3 -3
- package/dist/esm/cosmjs.js +7 -7
- package/dist/esm/exports.d.ts +3 -3
- package/dist/esm/exports.js +7 -7
- package/dist/esm/{index-BOKuUpVZ.d.ts → index--sg5xbEP.d.ts} +1 -1
- package/dist/esm/{index-aNMYd-s0.d.ts → index-BoEe6weX.d.ts} +3 -2
- package/dist/esm/{index-CIU3qLo9.d.ts → index-DSY58vw-.d.ts} +949 -170
- package/dist/esm/{index-DS6aJrL5.d.ts → index-DgYt7OQg.d.ts} +1 -1
- package/dist/esm/{index-DdGVE3_u.d.ts → index-GcFVWcCn.d.ts} +5 -5
- package/dist/esm/{index-B1R417vW.d.ts → index-mAmKmwGY.d.ts} +223 -19
- package/dist/esm/index.d.ts +8 -8
- package/dist/esm/index.js +15 -15
- package/dist/esm/{service-DsZ0vnDP.js → service-B_k552b0.js} +2 -2
- package/dist/esm/service.d.ts +4 -4
- package/dist/esm/service.js +3 -3
- package/dist/esm/{tx-C1AZz6w-.js → tx-CcaVBSym.js} +4 -4
- package/dist/{cjs/tx_pb-tECSPcSB.d.cts → esm/tx_pb-zz4o4hHG.d.ts} +4 -3
- package/dist/esm/types-Bu8IAJ0R.js +137 -0
- package/dist/esm/types.d.ts +4 -4
- package/dist/esm/types.js +2 -2
- package/dist/esm/{utils-BaRG9oyg.js → utils-DwGoPRTL.js} +111 -90
- package/dist/esm/utils.d.ts +8 -8
- package/dist/esm/utils.js +2 -2
- package/package.json +17 -17
- package/dist/esm/types-Cq0sRR6y.js +0 -70
package/dist/cjs/{IndexerGrpcAccountPortfolioStream-DeTA0ie2.cjs → StreamManager-ikNObdr-.cjs}
RENAMED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
const require_chunk = require('./chunk-CbDLau6x.cjs');
|
|
2
|
-
const require_utils = require('./utils-
|
|
2
|
+
const require_utils = require('./utils-V1uXtT51.cjs');
|
|
3
3
|
const require_defineProperty = require('./defineProperty-dyr5BsvG.cjs');
|
|
4
4
|
const require_BaseGrpcConsumer = require('./BaseGrpcConsumer-DUwCngI6.cjs');
|
|
5
5
|
const require_BaseIndexerGrpcConsumer = require('./BaseIndexerGrpcConsumer-BGLVnJtw.cjs');
|
|
6
6
|
const require_BaseRestConsumer = require('./BaseRestConsumer-uSzCOit7.cjs');
|
|
7
|
-
const require_IndexerGrpcWeb3GwApi = require('./IndexerGrpcWeb3GwApi-
|
|
8
|
-
const require_types = require('./types-
|
|
7
|
+
const require_IndexerGrpcWeb3GwApi = require('./IndexerGrpcWeb3GwApi-BgWT2tWK.cjs');
|
|
8
|
+
const require_types = require('./types-DvoTS2v1.cjs');
|
|
9
9
|
let __injectivelabs_utils = require("@injectivelabs/utils");
|
|
10
10
|
let __injectivelabs_exceptions = require("@injectivelabs/exceptions");
|
|
11
|
-
let __injectivelabs_ts_types = require("@injectivelabs/ts-types");
|
|
12
11
|
let __injectivelabs_mito_proto_ts_v2_generated_goadesign_goagen_mito_api_pb_client = require("@injectivelabs/mito-proto-ts-v2/generated/goadesign_goagen_mito_api_pb.client");
|
|
13
12
|
let __injectivelabs_mito_proto_ts_v2_generated_goadesign_goagen_mito_api_pb = require("@injectivelabs/mito-proto-ts-v2/generated/goadesign_goagen_mito_api_pb");
|
|
14
13
|
__injectivelabs_mito_proto_ts_v2_generated_goadesign_goagen_mito_api_pb = require_chunk.__toESM(__injectivelabs_mito_proto_ts_v2_generated_goadesign_goagen_mito_api_pb);
|
|
@@ -54,6 +53,7 @@ let __injectivelabs_indexer_proto_ts_v2_generated_injective_portfolio_rpc_pb_cli
|
|
|
54
53
|
let __injectivelabs_indexer_proto_ts_v2_generated_injective_insurance_rpc_pb = require("@injectivelabs/indexer-proto-ts-v2/generated/injective_insurance_rpc_pb");
|
|
55
54
|
__injectivelabs_indexer_proto_ts_v2_generated_injective_insurance_rpc_pb = require_chunk.__toESM(__injectivelabs_indexer_proto_ts_v2_generated_injective_insurance_rpc_pb);
|
|
56
55
|
let __injectivelabs_indexer_proto_ts_v2_generated_injective_insurance_rpc_pb_client = require("@injectivelabs/indexer-proto-ts-v2/generated/injective_insurance_rpc_pb.client");
|
|
56
|
+
let eventemitter3 = require("eventemitter3");
|
|
57
57
|
|
|
58
58
|
//#region src/client/indexer/transformers/IndexerCommonTransformer.ts
|
|
59
59
|
var IndexerCommonTransformer = class {
|
|
@@ -1982,7 +1982,7 @@ require_defineProperty._defineProperty(IndexerAuctionStreamTransformer, "bidsStr
|
|
|
1982
1982
|
bidAmount: response.bidAmount,
|
|
1983
1983
|
bidTimestamp: typeof response.timestamp === "bigint" ? Number(response.timestamp) : parseInt(response.timestamp, 10)
|
|
1984
1984
|
},
|
|
1985
|
-
operation:
|
|
1985
|
+
operation: require_types.StreamOperation.Insert
|
|
1986
1986
|
}));
|
|
1987
1987
|
|
|
1988
1988
|
//#endregion
|
|
@@ -2228,7 +2228,7 @@ require_defineProperty._defineProperty(ExplorerStreamTransformer, "transactionsS
|
|
|
2228
2228
|
//#endregion
|
|
2229
2229
|
//#region src/client/indexer/transformers/IndexerGrpcDerivativeTransformer.ts
|
|
2230
2230
|
const zeroPositionDelta = () => ({
|
|
2231
|
-
tradeDirection:
|
|
2231
|
+
tradeDirection: require_types.TradeDirection.Buy,
|
|
2232
2232
|
executionPrice: "0",
|
|
2233
2233
|
executionQuantity: "0",
|
|
2234
2234
|
executionMargin: "0"
|
|
@@ -2572,7 +2572,7 @@ var IndexerGrpcDerivativeTransformer = class IndexerGrpcDerivativeTransformer {
|
|
|
2572
2572
|
};
|
|
2573
2573
|
}
|
|
2574
2574
|
static grpcOrderHistoryListToOrderHistoryList(orderHistory, isConditional) {
|
|
2575
|
-
return (isConditional ? orderHistory : orderHistory.filter((order) => order.state !==
|
|
2575
|
+
return (isConditional ? orderHistory : orderHistory.filter((order) => order.state !== require_types.OrderState.Booked)).map((orderHistory$1) => IndexerGrpcDerivativeTransformer.grpcOrderHistoryToOrderHistory(orderHistory$1));
|
|
2576
2576
|
}
|
|
2577
2577
|
static grpcPositionToPosition(position) {
|
|
2578
2578
|
return {
|
|
@@ -4632,7 +4632,7 @@ var IndexerRestLeaderboardChronosApi = class extends require_BaseRestConsumer.Ba
|
|
|
4632
4632
|
};
|
|
4633
4633
|
|
|
4634
4634
|
//#endregion
|
|
4635
|
-
//#region src/client/indexer/grpc_stream/streamHelpers.ts
|
|
4635
|
+
//#region src/client/indexer/grpc_stream/stream/streamHelpers.ts
|
|
4636
4636
|
/**
|
|
4637
4637
|
* Creates a subscription wrapper for V2 streaming with proper cancellation support.
|
|
4638
4638
|
*
|
|
@@ -4666,7 +4666,7 @@ function createStreamSubscription(stream, handleResponse, onEndCallback, onStatu
|
|
|
4666
4666
|
}
|
|
4667
4667
|
|
|
4668
4668
|
//#endregion
|
|
4669
|
-
//#region src/client/indexer/grpc_stream/IndexerGrpcSpotStream.ts
|
|
4669
|
+
//#region src/client/indexer/grpc_stream/stream/IndexerGrpcSpotStream.ts
|
|
4670
4670
|
/**
|
|
4671
4671
|
* @category Indexer Grpc Stream
|
|
4672
4672
|
* @description Provides streaming access to spot market data from Injective Indexer
|
|
@@ -4678,9 +4678,9 @@ var IndexerGrpcSpotStream = class {
|
|
|
4678
4678
|
this.transport = new require_BaseGrpcConsumer.GrpcWebRpcTransport(endpoint, metadata);
|
|
4679
4679
|
this.client = new __injectivelabs_indexer_proto_ts_v2_generated_injective_spot_exchange_rpc_pb_client.InjectiveSpotExchangeRPCClient(this.transport);
|
|
4680
4680
|
}
|
|
4681
|
-
/** @deprecated - use
|
|
4682
|
-
|
|
4683
|
-
throw new __injectivelabs_exceptions.GeneralException(/* @__PURE__ */ new Error("deprecated - use
|
|
4681
|
+
/** @deprecated - use streamOrderbookV2 */
|
|
4682
|
+
streamOrderbook(_args) {
|
|
4683
|
+
throw new __injectivelabs_exceptions.GeneralException(/* @__PURE__ */ new Error("deprecated - use streamOrderbookV2"));
|
|
4684
4684
|
}
|
|
4685
4685
|
/**
|
|
4686
4686
|
* Stream spot orders
|
|
@@ -4693,7 +4693,7 @@ var IndexerGrpcSpotStream = class {
|
|
|
4693
4693
|
* @param params.onStatusCallback - Called on stream errors
|
|
4694
4694
|
* @returns Subscription object with unsubscribe method
|
|
4695
4695
|
*/
|
|
4696
|
-
|
|
4696
|
+
streamOrders({ marketId, subaccountId, orderSide, callback, onEndCallback, onStatusCallback }) {
|
|
4697
4697
|
if (typeof callback !== "function") throw new Error("callback must be a function");
|
|
4698
4698
|
const request = __injectivelabs_indexer_proto_ts_v2_generated_injective_spot_exchange_rpc_pb.StreamOrdersRequest.create();
|
|
4699
4699
|
if (marketId) request.marketId = marketId;
|
|
@@ -4717,7 +4717,7 @@ var IndexerGrpcSpotStream = class {
|
|
|
4717
4717
|
* @param params.onStatusCallback - Called on stream errors
|
|
4718
4718
|
* @returns Subscription object with unsubscribe method
|
|
4719
4719
|
*/
|
|
4720
|
-
|
|
4720
|
+
streamOrderHistory({ marketId, subaccountId, orderTypes, executionTypes, direction, state, callback, onEndCallback, onStatusCallback }) {
|
|
4721
4721
|
if (typeof callback !== "function") throw new Error("callback must be a function");
|
|
4722
4722
|
const request = __injectivelabs_indexer_proto_ts_v2_generated_injective_spot_exchange_rpc_pb.StreamOrdersHistoryRequest.create();
|
|
4723
4723
|
if (subaccountId) request.subaccountId = subaccountId;
|
|
@@ -4745,7 +4745,7 @@ var IndexerGrpcSpotStream = class {
|
|
|
4745
4745
|
* @param params.onStatusCallback - Called on stream errors
|
|
4746
4746
|
* @returns Subscription object with unsubscribe method
|
|
4747
4747
|
*/
|
|
4748
|
-
|
|
4748
|
+
streamTrades({ marketIds, marketId, subaccountIds, subaccountId, pagination, direction, executionSide, callback, onEndCallback, onStatusCallback }) {
|
|
4749
4749
|
if (typeof callback !== "function") throw new Error("callback must be a function");
|
|
4750
4750
|
const request = __injectivelabs_indexer_proto_ts_v2_generated_injective_spot_exchange_rpc_pb.StreamTradesRequest.create();
|
|
4751
4751
|
if (marketIds) request.marketIds = marketIds;
|
|
@@ -4771,7 +4771,7 @@ var IndexerGrpcSpotStream = class {
|
|
|
4771
4771
|
* @param params.onStatusCallback - Called on stream errors
|
|
4772
4772
|
* @returns Subscription object with unsubscribe method
|
|
4773
4773
|
*/
|
|
4774
|
-
|
|
4774
|
+
streamMarkets({ marketIds, callback, onEndCallback, onStatusCallback }) {
|
|
4775
4775
|
if (typeof callback !== "function") throw new Error("callback must be a function");
|
|
4776
4776
|
const request = __injectivelabs_indexer_proto_ts_v2_generated_injective_spot_exchange_rpc_pb.StreamMarketsRequest.create();
|
|
4777
4777
|
if (marketIds) request.marketIds = marketIds;
|
|
@@ -4788,7 +4788,7 @@ var IndexerGrpcSpotStream = class {
|
|
|
4788
4788
|
* @param params.onStatusCallback - Called on stream errors
|
|
4789
4789
|
* @returns Subscription object with unsubscribe method
|
|
4790
4790
|
*/
|
|
4791
|
-
|
|
4791
|
+
streamOrderbooksV2({ marketIds, callback, onEndCallback, onStatusCallback }) {
|
|
4792
4792
|
if (!marketIds || marketIds.length === 0) throw new Error("marketIds is required and cannot be empty");
|
|
4793
4793
|
if (typeof callback !== "function") throw new Error("callback must be a function");
|
|
4794
4794
|
const request = __injectivelabs_indexer_proto_ts_v2_generated_injective_spot_exchange_rpc_pb.StreamOrderbookV2Request.create();
|
|
@@ -4806,7 +4806,7 @@ var IndexerGrpcSpotStream = class {
|
|
|
4806
4806
|
* @param params.onStatusCallback - Called on stream errors
|
|
4807
4807
|
* @returns Subscription object with unsubscribe method
|
|
4808
4808
|
*/
|
|
4809
|
-
|
|
4809
|
+
streamOrderbookUpdates({ marketIds, callback, onEndCallback, onStatusCallback }) {
|
|
4810
4810
|
if (!marketIds || marketIds.length === 0) throw new Error("marketIds is required and cannot be empty");
|
|
4811
4811
|
if (typeof callback !== "function") throw new Error("callback must be a function");
|
|
4812
4812
|
const request = __injectivelabs_indexer_proto_ts_v2_generated_injective_spot_exchange_rpc_pb.StreamOrderbookUpdateRequest.create();
|
|
@@ -4818,7 +4818,7 @@ var IndexerGrpcSpotStream = class {
|
|
|
4818
4818
|
};
|
|
4819
4819
|
|
|
4820
4820
|
//#endregion
|
|
4821
|
-
//#region src/client/indexer/grpc_stream/IndexerGrpcMitoStream.ts
|
|
4821
|
+
//#region src/client/indexer/grpc_stream/stream/IndexerGrpcMitoStream.ts
|
|
4822
4822
|
/**
|
|
4823
4823
|
* @category Indexer Grpc Stream
|
|
4824
4824
|
* @description Provides streaming access to Mito vault data from Injective Indexer
|
|
@@ -4933,7 +4933,7 @@ var IndexerGrpcMitoStream = class {
|
|
|
4933
4933
|
};
|
|
4934
4934
|
|
|
4935
4935
|
//#endregion
|
|
4936
|
-
//#region src/client/indexer/grpc_stream/IndexerGrpcOracleStream.ts
|
|
4936
|
+
//#region src/client/indexer/grpc_stream/stream/IndexerGrpcOracleStream.ts
|
|
4937
4937
|
/**
|
|
4938
4938
|
* @category Indexer Grpc Stream
|
|
4939
4939
|
* @description Provides streaming access to oracle price data from Injective Indexer
|
|
@@ -4987,7 +4987,7 @@ var IndexerGrpcOracleStream = class {
|
|
|
4987
4987
|
};
|
|
4988
4988
|
|
|
4989
4989
|
//#endregion
|
|
4990
|
-
//#region src/client/indexer/grpc_stream/IndexerGrpcAccountStream.ts
|
|
4990
|
+
//#region src/client/indexer/grpc_stream/stream/IndexerGrpcAccountStream.ts
|
|
4991
4991
|
/**
|
|
4992
4992
|
* @category Indexer Grpc Stream
|
|
4993
4993
|
* @description Provides streaming access to account data from the Injective Indexer
|
|
@@ -5020,7 +5020,7 @@ var IndexerGrpcAccountStream = class {
|
|
|
5020
5020
|
};
|
|
5021
5021
|
|
|
5022
5022
|
//#endregion
|
|
5023
|
-
//#region src/client/indexer/grpc_stream/IndexerGrpcAuctionStream.ts
|
|
5023
|
+
//#region src/client/indexer/grpc_stream/stream/IndexerGrpcAuctionStream.ts
|
|
5024
5024
|
/**
|
|
5025
5025
|
* @category Indexer Grpc Stream
|
|
5026
5026
|
* @description Provides streaming access to auction data from Injective Indexer
|
|
@@ -5050,7 +5050,7 @@ var IndexerGrpcAuctionStream = class {
|
|
|
5050
5050
|
};
|
|
5051
5051
|
|
|
5052
5052
|
//#endregion
|
|
5053
|
-
//#region src/client/indexer/grpc_stream/IndexerGrpcTradingStream.ts
|
|
5053
|
+
//#region src/client/indexer/grpc_stream/stream/IndexerGrpcTradingStream.ts
|
|
5054
5054
|
/**
|
|
5055
5055
|
* @category Indexer Grid Strategy Grpc Stream
|
|
5056
5056
|
* @description Provides streaming access to grid strategy data from Injective Indexer
|
|
@@ -5085,7 +5085,7 @@ var IndexerGrpcTradingStream = class {
|
|
|
5085
5085
|
};
|
|
5086
5086
|
|
|
5087
5087
|
//#endregion
|
|
5088
|
-
//#region src/client/indexer/grpc_stream/IndexerGrpcArchiverStream.ts
|
|
5088
|
+
//#region src/client/indexer/grpc_stream/stream/IndexerGrpcArchiverStream.ts
|
|
5089
5089
|
/**
|
|
5090
5090
|
* @category Indexer Grpc Stream
|
|
5091
5091
|
* @description Provides streaming access to archiver data from Injective Indexer
|
|
@@ -5118,7 +5118,7 @@ var IndexerGrpcArchiverStream = class {
|
|
|
5118
5118
|
};
|
|
5119
5119
|
|
|
5120
5120
|
//#endregion
|
|
5121
|
-
//#region src/client/indexer/grpc_stream/IndexerGrpcExplorerStream.ts
|
|
5121
|
+
//#region src/client/indexer/grpc_stream/stream/IndexerGrpcExplorerStream.ts
|
|
5122
5122
|
/**
|
|
5123
5123
|
* @category Indexer Grpc Stream
|
|
5124
5124
|
* @description Provides streaming access to blockchain explorer data from Injective Indexer
|
|
@@ -5178,7 +5178,7 @@ var IndexerGrpcExplorerStream = class {
|
|
|
5178
5178
|
};
|
|
5179
5179
|
|
|
5180
5180
|
//#endregion
|
|
5181
|
-
//#region src/client/indexer/grpc_stream/IndexerGrpcDerivativesStream.ts
|
|
5181
|
+
//#region src/client/indexer/grpc_stream/stream/IndexerGrpcDerivativesStream.ts
|
|
5182
5182
|
/**
|
|
5183
5183
|
* @category Indexer Grpc Stream
|
|
5184
5184
|
* @description Provides streaming access to derivatives market data from Injective Indexer
|
|
@@ -5368,7 +5368,7 @@ var IndexerGrpcDerivativesStream = class {
|
|
|
5368
5368
|
};
|
|
5369
5369
|
|
|
5370
5370
|
//#endregion
|
|
5371
|
-
//#region src/client/indexer/grpc_stream/IndexerGrpcAccountPortfolioStream.ts
|
|
5371
|
+
//#region src/client/indexer/grpc_stream/stream/IndexerGrpcAccountPortfolioStream.ts
|
|
5372
5372
|
/**
|
|
5373
5373
|
* @category Indexer Grpc Stream
|
|
5374
5374
|
* @description Provides streaming access to account portfolio data from Injective Indexer
|
|
@@ -5405,257 +5405,1206 @@ var IndexerGrpcAccountPortfolioStream = class {
|
|
|
5405
5405
|
};
|
|
5406
5406
|
|
|
5407
5407
|
//#endregion
|
|
5408
|
-
|
|
5409
|
-
|
|
5410
|
-
|
|
5411
|
-
|
|
5412
|
-
|
|
5413
|
-
|
|
5414
|
-
|
|
5415
|
-
|
|
5416
|
-
|
|
5417
|
-
|
|
5418
|
-
|
|
5419
|
-
|
|
5420
|
-
|
|
5421
|
-
|
|
5422
|
-
|
|
5423
|
-
|
|
5424
|
-
|
|
5425
|
-
|
|
5426
|
-
|
|
5427
|
-
|
|
5428
|
-
|
|
5429
|
-
|
|
5430
|
-
|
|
5431
|
-
|
|
5432
|
-
|
|
5433
|
-
|
|
5434
|
-
|
|
5435
|
-
|
|
5436
|
-
|
|
5437
|
-
});
|
|
5438
|
-
|
|
5439
|
-
|
|
5440
|
-
|
|
5441
|
-
|
|
5442
|
-
|
|
5443
|
-
|
|
5444
|
-
|
|
5445
|
-
|
|
5446
|
-
|
|
5447
|
-
|
|
5448
|
-
|
|
5449
|
-
|
|
5450
|
-
|
|
5451
|
-
|
|
5452
|
-
|
|
5453
|
-
|
|
5454
|
-
|
|
5455
|
-
|
|
5456
|
-
|
|
5457
|
-
|
|
5458
|
-
|
|
5459
|
-
|
|
5460
|
-
|
|
5461
|
-
|
|
5462
|
-
|
|
5463
|
-
|
|
5464
|
-
|
|
5465
|
-
|
|
5466
|
-
|
|
5467
|
-
|
|
5468
|
-
|
|
5469
|
-
|
|
5470
|
-
|
|
5471
|
-
|
|
5472
|
-
|
|
5473
|
-
|
|
5474
|
-
|
|
5475
|
-
|
|
5476
|
-
|
|
5477
|
-
|
|
5478
|
-
|
|
5479
|
-
}
|
|
5480
|
-
|
|
5481
|
-
|
|
5482
|
-
|
|
5483
|
-
|
|
5484
|
-
|
|
5485
|
-
|
|
5486
|
-
|
|
5487
|
-
|
|
5488
|
-
|
|
5489
|
-
|
|
5490
|
-
|
|
5491
|
-
|
|
5492
|
-
|
|
5493
|
-
|
|
5494
|
-
|
|
5495
|
-
|
|
5496
|
-
|
|
5497
|
-
|
|
5498
|
-
|
|
5499
|
-
|
|
5500
|
-
|
|
5501
|
-
|
|
5502
|
-
|
|
5503
|
-
|
|
5504
|
-
|
|
5505
|
-
|
|
5506
|
-
|
|
5507
|
-
|
|
5508
|
-
|
|
5509
|
-
|
|
5510
|
-
|
|
5511
|
-
|
|
5512
|
-
|
|
5513
|
-
|
|
5514
|
-
|
|
5515
|
-
|
|
5516
|
-
|
|
5517
|
-
|
|
5518
|
-
|
|
5519
|
-
|
|
5520
|
-
|
|
5521
|
-
}
|
|
5522
|
-
|
|
5523
|
-
|
|
5524
|
-
|
|
5525
|
-
|
|
5526
|
-
|
|
5527
|
-
|
|
5528
|
-
|
|
5529
|
-
|
|
5530
|
-
|
|
5531
|
-
|
|
5532
|
-
|
|
5533
|
-
|
|
5534
|
-
|
|
5535
|
-
|
|
5536
|
-
|
|
5537
|
-
|
|
5538
|
-
|
|
5539
|
-
}
|
|
5540
|
-
|
|
5541
|
-
|
|
5542
|
-
|
|
5543
|
-
|
|
5544
|
-
|
|
5545
|
-
|
|
5546
|
-
|
|
5547
|
-
|
|
5548
|
-
|
|
5549
|
-
|
|
5550
|
-
|
|
5551
|
-
})
|
|
5552
|
-
|
|
5553
|
-
|
|
5554
|
-
|
|
5555
|
-
|
|
5556
|
-
|
|
5557
|
-
|
|
5558
|
-
|
|
5559
|
-
|
|
5560
|
-
|
|
5561
|
-
|
|
5562
|
-
|
|
5563
|
-
}
|
|
5564
|
-
|
|
5565
|
-
|
|
5566
|
-
|
|
5567
|
-
|
|
5568
|
-
|
|
5569
|
-
|
|
5570
|
-
|
|
5571
|
-
|
|
5572
|
-
|
|
5573
|
-
|
|
5574
|
-
|
|
5575
|
-
|
|
5576
|
-
|
|
5577
|
-
|
|
5578
|
-
|
|
5579
|
-
|
|
5580
|
-
|
|
5581
|
-
|
|
5582
|
-
|
|
5583
|
-
|
|
5584
|
-
|
|
5585
|
-
|
|
5586
|
-
|
|
5587
|
-
|
|
5588
|
-
|
|
5589
|
-
|
|
5590
|
-
|
|
5591
|
-
|
|
5592
|
-
|
|
5593
|
-
|
|
5594
|
-
|
|
5595
|
-
|
|
5596
|
-
|
|
5597
|
-
|
|
5598
|
-
|
|
5599
|
-
|
|
5600
|
-
|
|
5601
|
-
|
|
5602
|
-
|
|
5603
|
-
|
|
5604
|
-
|
|
5605
|
-
|
|
5606
|
-
|
|
5607
|
-
|
|
5608
|
-
|
|
5609
|
-
|
|
5610
|
-
|
|
5611
|
-
|
|
5612
|
-
|
|
5613
|
-
|
|
5614
|
-
|
|
5615
|
-
|
|
5616
|
-
|
|
5617
|
-
|
|
5618
|
-
|
|
5619
|
-
|
|
5620
|
-
|
|
5621
|
-
|
|
5622
|
-
|
|
5623
|
-
})
|
|
5624
|
-
|
|
5625
|
-
|
|
5626
|
-
|
|
5627
|
-
|
|
5628
|
-
|
|
5629
|
-
});
|
|
5630
|
-
|
|
5631
|
-
|
|
5632
|
-
|
|
5633
|
-
|
|
5634
|
-
|
|
5635
|
-
|
|
5636
|
-
|
|
5637
|
-
|
|
5638
|
-
|
|
5639
|
-
|
|
5640
|
-
|
|
5641
|
-
|
|
5642
|
-
|
|
5643
|
-
|
|
5644
|
-
|
|
5645
|
-
|
|
5646
|
-
|
|
5647
|
-
|
|
5648
|
-
|
|
5649
|
-
|
|
5650
|
-
|
|
5651
|
-
|
|
5652
|
-
|
|
5653
|
-
|
|
5654
|
-
|
|
5655
|
-
|
|
5656
|
-
|
|
5657
|
-
|
|
5658
|
-
|
|
5408
|
+
//#region src/client/indexer/grpc_stream/stream/StreamManager.ts
|
|
5409
|
+
/**
|
|
5410
|
+
* StreamManager - Simple registry for managing multiple V1 stream subscriptions by key
|
|
5411
|
+
*
|
|
5412
|
+
* This is a lightweight utility for storing and canceling multiple V1 RxJS-based streams.
|
|
5413
|
+
* For V2 streams with advanced lifecycle management and retry logic, use StreamManagerV2.
|
|
5414
|
+
*/
|
|
5415
|
+
var StreamManager = class {
|
|
5416
|
+
constructor() {
|
|
5417
|
+
require_defineProperty._defineProperty(this, "streams", /* @__PURE__ */ new Map());
|
|
5418
|
+
}
|
|
5419
|
+
set(stream, streamKey) {
|
|
5420
|
+
if (this.streams.has(streamKey)) throw new Error(`Stream ${streamKey} already exists`);
|
|
5421
|
+
this.streams.set(streamKey, stream);
|
|
5422
|
+
}
|
|
5423
|
+
get(streamKey) {
|
|
5424
|
+
if (!this.streams.has(streamKey)) throw new Error(`Stream ${streamKey} is not found`);
|
|
5425
|
+
return this.streams.get(streamKey);
|
|
5426
|
+
}
|
|
5427
|
+
exists(streamKey) {
|
|
5428
|
+
return this.streams.has(streamKey);
|
|
5429
|
+
}
|
|
5430
|
+
cancelAll() {
|
|
5431
|
+
this.streams.forEach((stream) => {
|
|
5432
|
+
stream.cancel();
|
|
5433
|
+
});
|
|
5434
|
+
this.streams = /* @__PURE__ */ new Map();
|
|
5435
|
+
}
|
|
5436
|
+
cancel(streamKey) {
|
|
5437
|
+
if (!this.streams.has(streamKey)) throw new Error(`Stream ${streamKey} is not found`);
|
|
5438
|
+
this.streams.get(streamKey).cancel();
|
|
5439
|
+
this.streams.delete(streamKey);
|
|
5440
|
+
}
|
|
5441
|
+
cancelIfExists(streamKey) {
|
|
5442
|
+
if (!this.streams.has(streamKey)) return;
|
|
5443
|
+
this.streams.get(streamKey).cancel();
|
|
5444
|
+
this.streams.delete(streamKey);
|
|
5445
|
+
}
|
|
5446
|
+
};
|
|
5447
|
+
|
|
5448
|
+
//#endregion
|
|
5449
|
+
//#region src/client/indexer/grpc_stream/streamV2/streamHelpersV2.ts
|
|
5450
|
+
/**
|
|
5451
|
+
* Creates an event-based subscription for StreamManager V2.
|
|
5452
|
+
* This emits 'error' and 'complete' events instead of using callbacks.
|
|
5453
|
+
*
|
|
5454
|
+
* @param stream - The ServerStreamingCall from the V2 client
|
|
5455
|
+
* @param handleResponse - Callback to process each stream response
|
|
5456
|
+
* @returns StreamSubscription with event emitters for error/complete
|
|
5457
|
+
*/
|
|
5458
|
+
function createStreamSubscriptionV2(stream, handleResponse) {
|
|
5459
|
+
const emitter = new eventemitter3.EventEmitter();
|
|
5460
|
+
const abortController = new AbortController();
|
|
5461
|
+
const subscription = {
|
|
5462
|
+
unsubscribe: () => {
|
|
5463
|
+
abortController.abort();
|
|
5464
|
+
emitter.removeAllListeners();
|
|
5465
|
+
},
|
|
5466
|
+
on: (event, handler) => {
|
|
5467
|
+
emitter.on(event, handler);
|
|
5468
|
+
},
|
|
5469
|
+
off: (event, handler) => {
|
|
5470
|
+
emitter.off(event, handler);
|
|
5471
|
+
}
|
|
5472
|
+
};
|
|
5473
|
+
(async () => {
|
|
5474
|
+
try {
|
|
5475
|
+
for await (const response of stream.responses) {
|
|
5476
|
+
if (abortController.signal.aborted) break;
|
|
5477
|
+
if (abortController.signal.aborted) break;
|
|
5478
|
+
handleResponse(response);
|
|
5479
|
+
}
|
|
5480
|
+
if (!abortController.signal.aborted) emitter.emit("complete");
|
|
5481
|
+
} catch (error) {
|
|
5482
|
+
if (!abortController.signal.aborted) {
|
|
5483
|
+
const errorMessage = error instanceof Error ? error.message : "Unknown stream error";
|
|
5484
|
+
let grpcCode = 2;
|
|
5485
|
+
if (error && typeof error === "object" && "code" in error) grpcCode = error.code;
|
|
5486
|
+
const streamError = {
|
|
5487
|
+
code: grpcCode,
|
|
5488
|
+
metadata: error,
|
|
5489
|
+
details: errorMessage
|
|
5490
|
+
};
|
|
5491
|
+
emitter.emit("error", streamError);
|
|
5492
|
+
}
|
|
5493
|
+
}
|
|
5494
|
+
})();
|
|
5495
|
+
return subscription;
|
|
5496
|
+
}
|
|
5497
|
+
|
|
5498
|
+
//#endregion
|
|
5499
|
+
//#region src/client/indexer/grpc_stream/streamV2/IndexerGrpcSpotStreamV2.ts
|
|
5500
|
+
var IndexerGrpcSpotStreamV2 = class {
|
|
5501
|
+
constructor(endpoint, metadata) {
|
|
5502
|
+
require_defineProperty._defineProperty(this, "client", void 0);
|
|
5503
|
+
require_defineProperty._defineProperty(this, "transport", void 0);
|
|
5504
|
+
this.transport = new require_BaseGrpcConsumer.GrpcWebRpcTransport(endpoint, metadata);
|
|
5505
|
+
this.client = new __injectivelabs_indexer_proto_ts_v2_generated_injective_spot_exchange_rpc_pb_client.InjectiveSpotExchangeRPCClient(this.transport);
|
|
5506
|
+
}
|
|
5507
|
+
/**
|
|
5508
|
+
* Stream spot orderbook updates
|
|
5509
|
+
* @param params.marketIds - Array of market IDs to stream
|
|
5510
|
+
* @param params.callback - Called for each orderbook update
|
|
5511
|
+
* @returns StreamSubscription
|
|
5512
|
+
*/
|
|
5513
|
+
streamOrderbookUpdates({ marketIds, callback }) {
|
|
5514
|
+
if (!marketIds || marketIds.length === 0) throw new Error("marketIds is required");
|
|
5515
|
+
if (typeof callback !== "function") throw new Error("callback must be a function");
|
|
5516
|
+
const request = __injectivelabs_indexer_proto_ts_v2_generated_injective_spot_exchange_rpc_pb.StreamOrderbookUpdateRequest.create();
|
|
5517
|
+
request.marketIds = marketIds;
|
|
5518
|
+
return createStreamSubscriptionV2(this.client.streamOrderbookUpdate(request), (response) => {
|
|
5519
|
+
callback(IndexerSpotStreamTransformer.orderbookUpdateStreamCallback(response));
|
|
5520
|
+
});
|
|
5521
|
+
}
|
|
5522
|
+
/**
|
|
5523
|
+
* Stream spot orders
|
|
5524
|
+
* @param params.marketId - Optional market ID to filter
|
|
5525
|
+
* @param params.subaccountId - Optional subaccount ID to filter
|
|
5526
|
+
* @param params.orderSide - Optional order side to filter
|
|
5527
|
+
* @param params.callback - Called for each order update
|
|
5528
|
+
* @returns StreamSubscription
|
|
5529
|
+
*/
|
|
5530
|
+
streamOrders({ marketId, subaccountId, orderSide, callback }) {
|
|
5531
|
+
if (typeof callback !== "function") throw new Error("callback must be a function");
|
|
5532
|
+
const request = __injectivelabs_indexer_proto_ts_v2_generated_injective_spot_exchange_rpc_pb.StreamOrdersRequest.create();
|
|
5533
|
+
if (marketId) request.marketId = marketId;
|
|
5534
|
+
if (subaccountId) request.subaccountId = subaccountId;
|
|
5535
|
+
if (orderSide) request.orderSide = orderSide;
|
|
5536
|
+
return createStreamSubscriptionV2(this.client.streamOrders(request), (response) => {
|
|
5537
|
+
callback(IndexerSpotStreamTransformer.ordersStreamCallback(response));
|
|
5538
|
+
});
|
|
5539
|
+
}
|
|
5540
|
+
/**
|
|
5541
|
+
* Stream spot order history
|
|
5542
|
+
* @param params.subaccountId - Optional subaccount ID to filter
|
|
5543
|
+
* @param params.marketId - Optional market ID to filter
|
|
5544
|
+
* @param params.orderTypes - Optional order types to filter
|
|
5545
|
+
* @param params.direction - Optional direction to filter
|
|
5546
|
+
* @param params.state - Optional state to filter
|
|
5547
|
+
* @param params.executionTypes - Optional execution types to filter
|
|
5548
|
+
* @param params.callback - Called for each order history update
|
|
5549
|
+
* @returns StreamSubscription
|
|
5550
|
+
*/
|
|
5551
|
+
streamOrderHistory({ subaccountId, marketId, orderTypes, direction, state, executionTypes, callback }) {
|
|
5552
|
+
if (typeof callback !== "function") throw new Error("callback must be a function");
|
|
5553
|
+
const request = __injectivelabs_indexer_proto_ts_v2_generated_injective_spot_exchange_rpc_pb.StreamOrdersHistoryRequest.create();
|
|
5554
|
+
if (subaccountId) request.subaccountId = subaccountId;
|
|
5555
|
+
if (marketId) request.marketId = marketId;
|
|
5556
|
+
if (orderTypes) request.orderTypes = orderTypes;
|
|
5557
|
+
if (direction) request.direction = direction;
|
|
5558
|
+
if (state) request.state = state;
|
|
5559
|
+
if (executionTypes) request.executionTypes = executionTypes;
|
|
5560
|
+
return createStreamSubscriptionV2(this.client.streamOrdersHistory(request), (response) => {
|
|
5561
|
+
callback(IndexerSpotStreamTransformer.orderHistoryStreamCallback(response));
|
|
5562
|
+
});
|
|
5563
|
+
}
|
|
5564
|
+
/**
|
|
5565
|
+
* Stream spot trades
|
|
5566
|
+
* @param params.marketId - Optional market ID to filter
|
|
5567
|
+
* @param params.marketIds - Optional array of market IDs to filter
|
|
5568
|
+
* @param params.subaccountId - Optional subaccount ID to filter
|
|
5569
|
+
* @param params.subaccountIds - Optional array of subaccount IDs to filter
|
|
5570
|
+
* @param params.executionSide - Optional execution side to filter
|
|
5571
|
+
* @param params.direction - Optional direction to filter
|
|
5572
|
+
* @param params.executionTypes - Optional execution types to filter
|
|
5573
|
+
* @param params.callback - Called for each trade update
|
|
5574
|
+
* @returns StreamSubscription
|
|
5575
|
+
*/
|
|
5576
|
+
streamTrades({ marketId, marketIds, subaccountId, subaccountIds, executionSide, direction, executionTypes, callback }) {
|
|
5577
|
+
if (typeof callback !== "function") throw new Error("callback must be a function");
|
|
5578
|
+
const request = __injectivelabs_indexer_proto_ts_v2_generated_injective_spot_exchange_rpc_pb.StreamTradesRequest.create();
|
|
5579
|
+
if (marketId) request.marketId = marketId;
|
|
5580
|
+
if (marketIds) request.marketIds = marketIds;
|
|
5581
|
+
if (subaccountId) request.subaccountId = subaccountId;
|
|
5582
|
+
if (subaccountIds) request.subaccountIds = subaccountIds;
|
|
5583
|
+
if (executionSide) request.executionSide = executionSide;
|
|
5584
|
+
if (direction) request.direction = direction;
|
|
5585
|
+
if (executionTypes) request.executionTypes = executionTypes;
|
|
5586
|
+
return createStreamSubscriptionV2(this.client.streamTrades(request), (response) => {
|
|
5587
|
+
callback(IndexerSpotStreamTransformer.tradesStreamCallback(response));
|
|
5588
|
+
});
|
|
5589
|
+
}
|
|
5590
|
+
};
|
|
5591
|
+
|
|
5592
|
+
//#endregion
|
|
5593
|
+
//#region src/client/indexer/grpc_stream/streamV2/IndexerGrpcMitoStreamV2.ts
|
|
5594
|
+
var IndexerGrpcMitoStreamV2 = class {
|
|
5595
|
+
constructor(endpoint, metadata) {
|
|
5596
|
+
require_defineProperty._defineProperty(this, "client", void 0);
|
|
5597
|
+
require_defineProperty._defineProperty(this, "transport", void 0);
|
|
5598
|
+
this.transport = new require_BaseGrpcConsumer.GrpcWebRpcTransport(endpoint, metadata);
|
|
5599
|
+
this.client = new __injectivelabs_mito_proto_ts_v2_generated_goadesign_goagen_mito_api_pb_client.MitoAPIClient(this.transport);
|
|
5600
|
+
}
|
|
5601
|
+
/**
|
|
5602
|
+
* Stream vault transfers
|
|
5603
|
+
* @param params.vault - Optional vault address to filter
|
|
5604
|
+
* @param params.account - Optional account address to filter
|
|
5605
|
+
* @param params.callback - Called for each transfer update
|
|
5606
|
+
* @returns StreamSubscription
|
|
5607
|
+
*/
|
|
5608
|
+
streamTransfers({ vault, account, callback }) {
|
|
5609
|
+
if (typeof callback !== "function") throw new Error("callback must be a function");
|
|
5610
|
+
const request = __injectivelabs_mito_proto_ts_v2_generated_goadesign_goagen_mito_api_pb.StreamTransfersRequest.create();
|
|
5611
|
+
if (vault) request.vault = vault;
|
|
5612
|
+
if (account) request.account = account;
|
|
5613
|
+
return createStreamSubscriptionV2(this.client.streamTransfers(request), (response) => {
|
|
5614
|
+
callback(IndexerGrpcMitoStreamTransformer.transfersStreamCallback(response));
|
|
5615
|
+
});
|
|
5616
|
+
}
|
|
5617
|
+
/**
|
|
5618
|
+
* Stream vault information
|
|
5619
|
+
* @param params.vault - Optional vault address to filter
|
|
5620
|
+
* @param params.callback - Called for each vault update
|
|
5621
|
+
* @returns StreamSubscription
|
|
5622
|
+
*/
|
|
5623
|
+
streamVault({ vault, callback }) {
|
|
5624
|
+
if (typeof callback !== "function") throw new Error("callback must be a function");
|
|
5625
|
+
const request = __injectivelabs_mito_proto_ts_v2_generated_goadesign_goagen_mito_api_pb.StreamVaultRequest.create();
|
|
5626
|
+
if (vault) request.vault = vault;
|
|
5627
|
+
return createStreamSubscriptionV2(this.client.streamVault(request), (response) => {
|
|
5628
|
+
callback(IndexerGrpcMitoStreamTransformer.vaultStreamCallback(response));
|
|
5629
|
+
});
|
|
5630
|
+
}
|
|
5631
|
+
/**
|
|
5632
|
+
* Stream vault holder subscriptions
|
|
5633
|
+
* @param params.holderAddress - The holder address to stream subscriptions for
|
|
5634
|
+
* @param params.vaultAddress - Optional vault address to filter
|
|
5635
|
+
* @param params.stakingContractAddress - Optional staking contract address to filter
|
|
5636
|
+
* @param params.callback - Called for each subscription update
|
|
5637
|
+
* @returns StreamSubscription
|
|
5638
|
+
*/
|
|
5639
|
+
streamVaultHolderSubscriptions({ holderAddress, vaultAddress, stakingContractAddress, callback }) {
|
|
5640
|
+
if (!holderAddress) throw new Error("holderAddress is required");
|
|
5641
|
+
if (typeof callback !== "function") throw new Error("callback must be a function");
|
|
5642
|
+
const request = __injectivelabs_mito_proto_ts_v2_generated_goadesign_goagen_mito_api_pb.StreamHolderSubscriptionRequest.create();
|
|
5643
|
+
request.holderAddress = holderAddress;
|
|
5644
|
+
if (vaultAddress) request.vaultAddress = vaultAddress;
|
|
5645
|
+
if (stakingContractAddress) request.stakingContractAddress = stakingContractAddress;
|
|
5646
|
+
return createStreamSubscriptionV2(this.client.streamHolderSubscription(request), (response) => {
|
|
5647
|
+
callback(IndexerGrpcMitoStreamTransformer.vaultHolderSubscriptionStreamCallback(response));
|
|
5648
|
+
});
|
|
5649
|
+
}
|
|
5650
|
+
/**
|
|
5651
|
+
* Stream staking rewards by account
|
|
5652
|
+
* @param params.staker - The staker address to stream rewards for
|
|
5653
|
+
* @param params.stakingContractAddress - The staking contract address
|
|
5654
|
+
* @param params.callback - Called for each reward update
|
|
5655
|
+
* @returns StreamSubscription
|
|
5656
|
+
*/
|
|
5657
|
+
streamStakingRewardsByAccount({ staker, stakingContractAddress, callback }) {
|
|
5658
|
+
if (!staker) throw new Error("staker is required");
|
|
5659
|
+
if (!stakingContractAddress) throw new Error("stakingContractAddress is required");
|
|
5660
|
+
if (typeof callback !== "function") throw new Error("callback must be a function");
|
|
5661
|
+
const request = __injectivelabs_mito_proto_ts_v2_generated_goadesign_goagen_mito_api_pb.StreamStakingRewardByAccountRequest.create();
|
|
5662
|
+
request.staker = staker;
|
|
5663
|
+
request.stakingContractAddress = stakingContractAddress;
|
|
5664
|
+
return createStreamSubscriptionV2(this.client.streamStakingRewardByAccount(request), (response) => {
|
|
5665
|
+
callback(IndexerGrpcMitoStreamTransformer.stakingRewardByAccountStreamCallback(response));
|
|
5666
|
+
});
|
|
5667
|
+
}
|
|
5668
|
+
/**
|
|
5669
|
+
* Stream historical staking data
|
|
5670
|
+
* @param params.staker - The staker address to stream data for
|
|
5671
|
+
* @param params.stakingContractAddress - The staking contract address
|
|
5672
|
+
* @param params.callback - Called for each historical staking update
|
|
5673
|
+
* @returns StreamSubscription
|
|
5674
|
+
*/
|
|
5675
|
+
streamHistoricalStaking({ staker, stakingContractAddress, callback }) {
|
|
5676
|
+
if (!staker) throw new Error("staker is required");
|
|
5677
|
+
if (!stakingContractAddress) throw new Error("stakingContractAddress is required");
|
|
5678
|
+
if (typeof callback !== "function") throw new Error("callback must be a function");
|
|
5679
|
+
const request = __injectivelabs_mito_proto_ts_v2_generated_goadesign_goagen_mito_api_pb.StreamHistoricalStakingRequest.create();
|
|
5680
|
+
request.staker = staker;
|
|
5681
|
+
request.stakingContractAddress = stakingContractAddress;
|
|
5682
|
+
return createStreamSubscriptionV2(this.client.streamHistoricalStaking(request), (response) => {
|
|
5683
|
+
callback(IndexerGrpcMitoStreamTransformer.historicalStakingStreamCallback(response));
|
|
5684
|
+
});
|
|
5685
|
+
}
|
|
5686
|
+
};
|
|
5687
|
+
|
|
5688
|
+
//#endregion
|
|
5689
|
+
//#region src/client/indexer/grpc_stream/streamV2/IndexerGrpcOracleStreamV2.ts
|
|
5690
|
+
var IndexerGrpcOracleStreamV2 = class {
|
|
5691
|
+
constructor(endpoint, metadata) {
|
|
5692
|
+
require_defineProperty._defineProperty(this, "client", void 0);
|
|
5693
|
+
require_defineProperty._defineProperty(this, "transport", void 0);
|
|
5694
|
+
this.transport = new require_BaseGrpcConsumer.GrpcWebRpcTransport(endpoint, metadata);
|
|
5695
|
+
this.client = new __injectivelabs_indexer_proto_ts_v2_generated_injective_oracle_rpc_pb_client.InjectiveOracleRPCClient(this.transport);
|
|
5696
|
+
}
|
|
5697
|
+
/**
|
|
5698
|
+
* Stream oracle price updates
|
|
5699
|
+
* @param params.oracleType - The oracle type to stream prices for
|
|
5700
|
+
* @param params.baseSymbol - Optional base symbol filter
|
|
5701
|
+
* @param params.quoteSymbol - Optional quote symbol filter
|
|
5702
|
+
* @param params.callback - Called for each price update
|
|
5703
|
+
* @returns StreamSubscription
|
|
5704
|
+
*/
|
|
5705
|
+
streamOraclePrices({ oracleType, baseSymbol, quoteSymbol, callback }) {
|
|
5706
|
+
if (!oracleType) throw new Error("oracleType is required");
|
|
5707
|
+
if (typeof callback !== "function") throw new Error("callback must be a function");
|
|
5708
|
+
const request = __injectivelabs_indexer_proto_ts_v2_generated_injective_oracle_rpc_pb.StreamPricesRequest.create();
|
|
5709
|
+
if (baseSymbol) request.baseSymbol = baseSymbol;
|
|
5710
|
+
if (quoteSymbol) request.quoteSymbol = quoteSymbol;
|
|
5711
|
+
request.oracleType = oracleType;
|
|
5712
|
+
return createStreamSubscriptionV2(this.client.streamPrices(request), (response) => {
|
|
5713
|
+
callback(IndexerOracleStreamTransformer.pricesStreamCallback(response));
|
|
5714
|
+
});
|
|
5715
|
+
}
|
|
5716
|
+
/**
|
|
5717
|
+
* Stream oracle prices by markets
|
|
5718
|
+
* @param params.marketIds - Optional array of market IDs to filter
|
|
5719
|
+
* @param params.callback - Called for each price update
|
|
5720
|
+
* @returns StreamSubscription
|
|
5721
|
+
*/
|
|
5722
|
+
streamOraclePricesByMarkets({ marketIds, callback }) {
|
|
5723
|
+
if (typeof callback !== "function") throw new Error("callback must be a function");
|
|
5724
|
+
const request = __injectivelabs_indexer_proto_ts_v2_generated_injective_oracle_rpc_pb.StreamPricesByMarketsRequest.create();
|
|
5725
|
+
if (marketIds) request.marketIds = marketIds;
|
|
5726
|
+
return createStreamSubscriptionV2(this.client.streamPricesByMarkets(request), (response) => {
|
|
5727
|
+
callback(IndexerOracleStreamTransformer.pricesByMarketsCallback(response));
|
|
5728
|
+
});
|
|
5729
|
+
}
|
|
5730
|
+
};
|
|
5731
|
+
|
|
5732
|
+
//#endregion
|
|
5733
|
+
//#region src/client/indexer/grpc_stream/streamV2/IndexerGrpcAccountStreamV2.ts
|
|
5734
|
+
var IndexerGrpcAccountStreamV2 = class {
|
|
5735
|
+
constructor(endpoint, metadata) {
|
|
5736
|
+
require_defineProperty._defineProperty(this, "client", void 0);
|
|
5737
|
+
require_defineProperty._defineProperty(this, "transport", void 0);
|
|
5738
|
+
this.transport = new require_BaseGrpcConsumer.GrpcWebRpcTransport(endpoint, metadata);
|
|
5739
|
+
this.client = new __injectivelabs_indexer_proto_ts_v2_generated_injective_accounts_rpc_pb_client.InjectiveAccountsRPCClient(this.transport);
|
|
5740
|
+
}
|
|
5741
|
+
/**
|
|
5742
|
+
* Stream subaccount balance updates
|
|
5743
|
+
* @param params.subaccountId - The subaccount ID to stream balance for
|
|
5744
|
+
* @param params.callback - Called for each balance update
|
|
5745
|
+
* @returns StreamSubscription
|
|
5746
|
+
*/
|
|
5747
|
+
streamSubaccountBalance({ subaccountId, callback }) {
|
|
5748
|
+
if (!subaccountId) throw new Error("subaccountId is required");
|
|
5749
|
+
if (typeof callback !== "function") throw new Error("callback must be a function");
|
|
5750
|
+
const request = __injectivelabs_indexer_proto_ts_v2_generated_injective_accounts_rpc_pb.StreamSubaccountBalanceRequest.create();
|
|
5751
|
+
request.subaccountId = subaccountId;
|
|
5752
|
+
return createStreamSubscriptionV2(this.client.streamSubaccountBalance(request), (response) => {
|
|
5753
|
+
callback(IndexerAccountStreamTransformer.balanceStreamCallback(response));
|
|
5754
|
+
});
|
|
5755
|
+
}
|
|
5756
|
+
};
|
|
5757
|
+
|
|
5758
|
+
//#endregion
|
|
5759
|
+
//#region src/client/indexer/grpc_stream/streamV2/IndexerGrpcAuctionStreamV2.ts
|
|
5760
|
+
var IndexerGrpcAuctionStreamV2 = class {
|
|
5761
|
+
constructor(endpoint, metadata) {
|
|
5762
|
+
require_defineProperty._defineProperty(this, "client", void 0);
|
|
5763
|
+
require_defineProperty._defineProperty(this, "transport", void 0);
|
|
5764
|
+
this.transport = new require_BaseGrpcConsumer.GrpcWebRpcTransport(endpoint, metadata);
|
|
5765
|
+
this.client = new __injectivelabs_indexer_proto_ts_v2_generated_injective_auction_rpc_pb_client.InjectiveAuctionRPCClient(this.transport);
|
|
5766
|
+
}
|
|
5767
|
+
/**
|
|
5768
|
+
* Stream auction bids
|
|
5769
|
+
* @param params.callback - Called for each bid update
|
|
5770
|
+
* @returns StreamSubscription
|
|
5771
|
+
*/
|
|
5772
|
+
streamBids({ callback }) {
|
|
5773
|
+
if (typeof callback !== "function") throw new Error("callback must be a function");
|
|
5774
|
+
const request = __injectivelabs_indexer_proto_ts_v2_generated_injective_auction_rpc_pb.StreamBidsRequest.create();
|
|
5775
|
+
return createStreamSubscriptionV2(this.client.streamBids(request), (response) => {
|
|
5776
|
+
callback(IndexerAuctionStreamTransformer.bidsStreamCallback(response));
|
|
5777
|
+
});
|
|
5778
|
+
}
|
|
5779
|
+
};
|
|
5780
|
+
|
|
5781
|
+
//#endregion
|
|
5782
|
+
//#region src/client/indexer/grpc_stream/streamV2/IndexerGrpcTradingStreamV2.ts
|
|
5783
|
+
var IndexerGrpcTradingStreamV2 = class {
|
|
5784
|
+
constructor(endpoint, metadata) {
|
|
5785
|
+
require_defineProperty._defineProperty(this, "client", void 0);
|
|
5786
|
+
require_defineProperty._defineProperty(this, "transport", void 0);
|
|
5787
|
+
this.transport = new require_BaseGrpcConsumer.GrpcWebRpcTransport(endpoint, metadata);
|
|
5788
|
+
this.client = new __injectivelabs_indexer_proto_ts_v2_generated_injective_trading_rpc_pb_client.InjectiveTradingRPCClient(this.transport);
|
|
5789
|
+
}
|
|
5790
|
+
/**
|
|
5791
|
+
* Stream grid strategies
|
|
5792
|
+
* @param params.marketId - Optional market ID to filter strategies
|
|
5793
|
+
* @param params.accountAddresses - Optional array of account addresses to filter
|
|
5794
|
+
* @param params.callback - Called for each strategy update
|
|
5795
|
+
* @returns StreamSubscription
|
|
5796
|
+
*/
|
|
5797
|
+
streamGridStrategies({ marketId, accountAddresses, callback }) {
|
|
5798
|
+
if ((!accountAddresses || accountAddresses.length === 0) && !marketId) throw new Error("accountAddresses or marketId is required");
|
|
5799
|
+
if (typeof callback !== "function") throw new Error("callback must be a function");
|
|
5800
|
+
const request = __injectivelabs_indexer_proto_ts_v2_generated_injective_trading_rpc_pb.StreamStrategyRequest.create();
|
|
5801
|
+
if (accountAddresses) request.accountAddresses = accountAddresses;
|
|
5802
|
+
if (marketId) request.marketId = marketId;
|
|
5803
|
+
return createStreamSubscriptionV2(this.client.streamStrategy(request), (response) => {
|
|
5804
|
+
callback(response);
|
|
5805
|
+
});
|
|
5806
|
+
}
|
|
5807
|
+
};
|
|
5808
|
+
|
|
5809
|
+
//#endregion
|
|
5810
|
+
//#region src/client/indexer/grpc_stream/streamV2/IndexerGrpcArchiverStreamV2.ts
|
|
5811
|
+
var IndexerGrpcArchiverStreamV2 = class {
|
|
5812
|
+
constructor(endpoint, metadata) {
|
|
5813
|
+
require_defineProperty._defineProperty(this, "client", void 0);
|
|
5814
|
+
require_defineProperty._defineProperty(this, "transport", void 0);
|
|
5815
|
+
this.transport = new require_BaseGrpcConsumer.GrpcWebRpcTransport(endpoint, metadata);
|
|
5816
|
+
this.client = new __injectivelabs_indexer_proto_ts_v2_generated_injective_archiver_rpc_pb_client.InjectiveArchiverRPCClient(this.transport);
|
|
5817
|
+
}
|
|
5818
|
+
/**
|
|
5819
|
+
* Stream spot average entries
|
|
5820
|
+
* @param params.account - The account address to stream entries for
|
|
5821
|
+
* @param params.callback - Called for each average entry update
|
|
5822
|
+
* @returns StreamSubscription
|
|
5823
|
+
*/
|
|
5824
|
+
streamSpotAverageEntries({ account, callback }) {
|
|
5825
|
+
if (!account) throw new Error("account is required");
|
|
5826
|
+
if (typeof callback !== "function") throw new Error("callback must be a function");
|
|
5827
|
+
const request = __injectivelabs_indexer_proto_ts_v2_generated_injective_archiver_rpc_pb.StreamSpotAverageEntriesRequest.create();
|
|
5828
|
+
request.account = account;
|
|
5829
|
+
return createStreamSubscriptionV2(this.client.streamSpotAverageEntries(request), (response) => {
|
|
5830
|
+
callback(IndexerArchiverStreamTransformer.spotAverageEntriesStreamCallback(response));
|
|
5831
|
+
});
|
|
5832
|
+
}
|
|
5833
|
+
};
|
|
5834
|
+
|
|
5835
|
+
//#endregion
|
|
5836
|
+
//#region src/client/indexer/grpc_stream/streamV2/IndexerGrpcExplorerStreamV2.ts
|
|
5837
|
+
var IndexerGrpcExplorerStreamV2 = class {
|
|
5838
|
+
constructor(endpoint, metadata) {
|
|
5839
|
+
require_defineProperty._defineProperty(this, "client", void 0);
|
|
5840
|
+
require_defineProperty._defineProperty(this, "transport", void 0);
|
|
5841
|
+
this.transport = new require_BaseGrpcConsumer.GrpcWebRpcTransport(endpoint, metadata);
|
|
5842
|
+
this.client = new __injectivelabs_indexer_proto_ts_v2_generated_injective_explorer_rpc_pb_client.InjectiveExplorerRPCClient(this.transport);
|
|
5843
|
+
}
|
|
5844
|
+
/**
|
|
5845
|
+
* Stream block updates
|
|
5846
|
+
* @param params.callback - Called for each block update
|
|
5847
|
+
* @returns StreamSubscription
|
|
5848
|
+
*/
|
|
5849
|
+
streamBlocks({ callback }) {
|
|
5850
|
+
if (typeof callback !== "function") throw new Error("callback must be a function");
|
|
5851
|
+
const request = __injectivelabs_indexer_proto_ts_v2_generated_injective_explorer_rpc_pb.StreamBlocksRequest.create();
|
|
5852
|
+
return createStreamSubscriptionV2(this.client.streamBlocks(request), (response) => {
|
|
5853
|
+
callback(ExplorerStreamTransformer.blocksStreamCallback(response));
|
|
5854
|
+
});
|
|
5855
|
+
}
|
|
5856
|
+
/**
|
|
5857
|
+
* Stream blocks with transactions
|
|
5858
|
+
* @param params.callback - Called for each block with transactions update
|
|
5859
|
+
* @returns StreamSubscription
|
|
5860
|
+
*/
|
|
5861
|
+
streamBlocksWithTxs({ callback }) {
|
|
5862
|
+
if (typeof callback !== "function") throw new Error("callback must be a function");
|
|
5863
|
+
const request = __injectivelabs_indexer_proto_ts_v2_generated_injective_explorer_rpc_pb.StreamBlocksRequest.create();
|
|
5864
|
+
return createStreamSubscriptionV2(this.client.streamBlocks(request), (response) => {
|
|
5865
|
+
callback(ExplorerStreamTransformer.blocksWithTxsStreamCallback(response));
|
|
5866
|
+
});
|
|
5867
|
+
}
|
|
5868
|
+
/**
|
|
5869
|
+
* Stream transaction updates
|
|
5870
|
+
* @param params.callback - Called for each transaction update
|
|
5871
|
+
* @returns StreamSubscription
|
|
5872
|
+
*/
|
|
5873
|
+
streamTransactions({ callback }) {
|
|
5874
|
+
if (typeof callback !== "function") throw new Error("callback must be a function");
|
|
5875
|
+
const request = __injectivelabs_indexer_proto_ts_v2_generated_injective_explorer_rpc_pb.StreamTxsRequest.create();
|
|
5876
|
+
return createStreamSubscriptionV2(this.client.streamTxs(request), (response) => {
|
|
5877
|
+
callback(ExplorerStreamTransformer.transactionsStreamCallback(response));
|
|
5878
|
+
});
|
|
5879
|
+
}
|
|
5880
|
+
};
|
|
5881
|
+
|
|
5882
|
+
//#endregion
|
|
5883
|
+
//#region src/client/indexer/grpc_stream/streamV2/IndexerGrpcDerivativesStreamV2.ts
|
|
5884
|
+
var IndexerGrpcDerivativesStreamV2 = class {
|
|
5885
|
+
constructor(endpoint, metadata) {
|
|
5886
|
+
require_defineProperty._defineProperty(this, "client", void 0);
|
|
5887
|
+
require_defineProperty._defineProperty(this, "transport", void 0);
|
|
5888
|
+
this.transport = new require_BaseGrpcConsumer.GrpcWebRpcTransport(endpoint, metadata);
|
|
5889
|
+
this.client = new __injectivelabs_indexer_proto_ts_v2_generated_injective_derivative_exchange_rpc_pb_client.InjectiveDerivativeExchangeRPCClient(this.transport);
|
|
5890
|
+
}
|
|
5891
|
+
/**
|
|
5892
|
+
* Stream derivative orders
|
|
5893
|
+
* @param params.marketId - Optional market ID to filter
|
|
5894
|
+
* @param params.subaccountId - Optional subaccount ID to filter
|
|
5895
|
+
* @param params.orderSide - Optional order side to filter
|
|
5896
|
+
* @param params.callback - Called for each order update
|
|
5897
|
+
* @returns StreamSubscription
|
|
5898
|
+
*/
|
|
5899
|
+
streamOrders({ marketId, subaccountId, orderSide, callback }) {
|
|
5900
|
+
if (typeof callback !== "function") throw new Error("callback must be a function");
|
|
5901
|
+
const request = __injectivelabs_indexer_proto_ts_v2_generated_injective_derivative_exchange_rpc_pb.StreamOrdersRequest.create();
|
|
5902
|
+
if (marketId) request.marketId = marketId;
|
|
5903
|
+
if (subaccountId) request.subaccountId = subaccountId;
|
|
5904
|
+
if (orderSide) request.orderSide = orderSide;
|
|
5905
|
+
return createStreamSubscriptionV2(this.client.streamOrders(request), (response) => {
|
|
5906
|
+
callback(IndexerDerivativeStreamTransformer.ordersStreamCallback(response));
|
|
5907
|
+
});
|
|
5908
|
+
}
|
|
5909
|
+
/**
|
|
5910
|
+
* Stream derivative order history
|
|
5911
|
+
* @param params.subaccountId - Optional subaccount ID to filter
|
|
5912
|
+
* @param params.marketId - Optional market ID to filter
|
|
5913
|
+
* @param params.orderTypes - Optional order types to filter
|
|
5914
|
+
* @param params.direction - Optional direction to filter
|
|
5915
|
+
* @param params.state - Optional state to filter
|
|
5916
|
+
* @param params.executionTypes - Optional execution types to filter
|
|
5917
|
+
* @param params.callback - Called for each order history update
|
|
5918
|
+
* @returns StreamSubscription
|
|
5919
|
+
*/
|
|
5920
|
+
streamOrdersHistory({ subaccountId, marketId, orderTypes, direction, state, executionTypes, callback }) {
|
|
5921
|
+
if (typeof callback !== "function") throw new Error("callback must be a function");
|
|
5922
|
+
const request = __injectivelabs_indexer_proto_ts_v2_generated_injective_derivative_exchange_rpc_pb.StreamOrdersHistoryRequest.create();
|
|
5923
|
+
if (subaccountId) request.subaccountId = subaccountId;
|
|
5924
|
+
if (marketId) request.marketId = marketId;
|
|
5925
|
+
if (orderTypes) request.orderTypes = orderTypes;
|
|
5926
|
+
if (direction) request.direction = direction;
|
|
5927
|
+
if (state) request.state = state;
|
|
5928
|
+
if (executionTypes) request.executionTypes = executionTypes;
|
|
5929
|
+
return createStreamSubscriptionV2(this.client.streamOrdersHistory(request), (response) => {
|
|
5930
|
+
callback(IndexerDerivativeStreamTransformer.orderHistoryStreamCallback(response));
|
|
5931
|
+
});
|
|
5932
|
+
}
|
|
5933
|
+
/**
|
|
5934
|
+
* Stream derivative trades
|
|
5935
|
+
* @param params.marketId - Optional market ID to filter
|
|
5936
|
+
* @param params.marketIds - Optional array of market IDs to filter
|
|
5937
|
+
* @param params.subaccountId - Optional subaccount ID to filter
|
|
5938
|
+
* @param params.subaccountIds - Optional array of subaccount IDs to filter
|
|
5939
|
+
* @param params.executionSide - Optional execution side to filter
|
|
5940
|
+
* @param params.direction - Optional direction to filter
|
|
5941
|
+
* @param params.pagination - Optional pagination options
|
|
5942
|
+
* @param params.callback - Called for each trade update
|
|
5943
|
+
* @returns StreamSubscription
|
|
5944
|
+
*/
|
|
5945
|
+
streamTrades({ marketIds, marketId, subaccountIds, subaccountId, executionSide, direction, pagination, callback }) {
|
|
5946
|
+
if (typeof callback !== "function") throw new Error("callback must be a function");
|
|
5947
|
+
const request = __injectivelabs_indexer_proto_ts_v2_generated_injective_derivative_exchange_rpc_pb.StreamTradesRequest.create();
|
|
5948
|
+
if (marketIds) request.marketIds = marketIds;
|
|
5949
|
+
if (marketId) request.marketId = marketId;
|
|
5950
|
+
if (subaccountIds) request.subaccountIds = subaccountIds;
|
|
5951
|
+
if (subaccountId) request.subaccountId = subaccountId;
|
|
5952
|
+
if (executionSide) request.executionSide = executionSide;
|
|
5953
|
+
if (direction) request.direction = direction;
|
|
5954
|
+
if (pagination) {
|
|
5955
|
+
if (pagination.skip !== void 0) request.skip = BigInt(pagination.skip);
|
|
5956
|
+
if (pagination.limit !== void 0) request.limit = pagination.limit;
|
|
5957
|
+
}
|
|
5958
|
+
return createStreamSubscriptionV2(this.client.streamTrades(request), (response) => {
|
|
5959
|
+
callback(IndexerDerivativeStreamTransformer.tradesStreamCallback(response));
|
|
5960
|
+
});
|
|
5961
|
+
}
|
|
5962
|
+
/**
|
|
5963
|
+
* Stream derivative positions
|
|
5964
|
+
* @param params.marketId - Optional market ID to filter
|
|
5965
|
+
* @param params.address - Optional address to filter
|
|
5966
|
+
* @param params.subaccountId - Optional subaccount ID to filter
|
|
5967
|
+
* @param params.callback - Called for each position update
|
|
5968
|
+
* @returns StreamSubscription
|
|
5969
|
+
*/
|
|
5970
|
+
streamPositions({ marketId, address, subaccountId, callback }) {
|
|
5971
|
+
if (typeof callback !== "function") throw new Error("callback must be a function");
|
|
5972
|
+
const request = __injectivelabs_indexer_proto_ts_v2_generated_injective_derivative_exchange_rpc_pb.StreamPositionsRequest.create();
|
|
5973
|
+
if (marketId) request.marketId = marketId;
|
|
5974
|
+
if (address) request.accountAddress = address;
|
|
5975
|
+
if (subaccountId) request.subaccountId = subaccountId;
|
|
5976
|
+
return createStreamSubscriptionV2(this.client.streamPositions(request), (response) => {
|
|
5977
|
+
callback(IndexerDerivativeStreamTransformer.positionStreamCallback(response));
|
|
5978
|
+
});
|
|
5979
|
+
}
|
|
5980
|
+
/**
|
|
5981
|
+
* Stream derivative markets
|
|
5982
|
+
* @param params.marketIds - Optional array of market IDs to filter
|
|
5983
|
+
* @param params.callback - Called for each market update
|
|
5984
|
+
* @returns StreamSubscription
|
|
5985
|
+
*/
|
|
5986
|
+
streamMarkets({ marketIds, callback }) {
|
|
5987
|
+
if (typeof callback !== "function") throw new Error("callback must be a function");
|
|
5988
|
+
const request = __injectivelabs_indexer_proto_ts_v2_generated_injective_derivative_exchange_rpc_pb.StreamMarketRequest.create();
|
|
5989
|
+
if (marketIds && marketIds.length) request.marketIds = marketIds;
|
|
5990
|
+
return createStreamSubscriptionV2(this.client.streamMarket(request), (response) => {
|
|
5991
|
+
callback(response);
|
|
5992
|
+
});
|
|
5993
|
+
}
|
|
5994
|
+
/**
|
|
5995
|
+
* Stream derivative orderbooks V2
|
|
5996
|
+
* @param params.marketIds - Array of market IDs to stream
|
|
5997
|
+
* @param params.callback - Called for each orderbook update
|
|
5998
|
+
* @returns StreamSubscription
|
|
5999
|
+
*/
|
|
6000
|
+
streamOrderbooksV2({ marketIds, callback }) {
|
|
6001
|
+
if (!marketIds || marketIds.length === 0) throw new Error("marketIds is required and cannot be empty");
|
|
6002
|
+
if (typeof callback !== "function") throw new Error("callback must be a function");
|
|
6003
|
+
const request = __injectivelabs_indexer_proto_ts_v2_generated_injective_derivative_exchange_rpc_pb.StreamOrderbookV2Request.create();
|
|
6004
|
+
request.marketIds = marketIds;
|
|
6005
|
+
return createStreamSubscriptionV2(this.client.streamOrderbookV2(request), (response) => {
|
|
6006
|
+
callback(IndexerDerivativeStreamTransformer.orderbookV2StreamCallback(response));
|
|
6007
|
+
});
|
|
6008
|
+
}
|
|
6009
|
+
/**
|
|
6010
|
+
* Stream derivative orderbook updates
|
|
6011
|
+
* @param params.marketIds - Array of market IDs to stream
|
|
6012
|
+
* @param params.callback - Called for each orderbook update
|
|
6013
|
+
* @returns StreamSubscription
|
|
6014
|
+
*/
|
|
6015
|
+
streamOrderbookUpdates({ marketIds, callback }) {
|
|
6016
|
+
if (!marketIds || marketIds.length === 0) throw new Error("marketIds is required and cannot be empty");
|
|
6017
|
+
if (typeof callback !== "function") throw new Error("callback must be a function");
|
|
6018
|
+
const request = __injectivelabs_indexer_proto_ts_v2_generated_injective_derivative_exchange_rpc_pb.StreamOrderbookUpdateRequest.create();
|
|
6019
|
+
request.marketIds = marketIds;
|
|
6020
|
+
return createStreamSubscriptionV2(this.client.streamOrderbookUpdate(request), (response) => {
|
|
6021
|
+
callback(IndexerDerivativeStreamTransformer.orderbookUpdateStreamCallback(response));
|
|
6022
|
+
});
|
|
6023
|
+
}
|
|
6024
|
+
/**
|
|
6025
|
+
* Stream derivative positions V2
|
|
6026
|
+
* @param params.marketId - Optional market ID to filter
|
|
6027
|
+
* @param params.address - Optional address to filter
|
|
6028
|
+
* @param params.subaccountId - Optional subaccount ID to filter
|
|
6029
|
+
* @param params.callback - Called for each position update
|
|
6030
|
+
* @returns StreamSubscription
|
|
6031
|
+
*/
|
|
6032
|
+
streamPositionsV2({ marketId, address, subaccountId, callback }) {
|
|
6033
|
+
if (typeof callback !== "function") throw new Error("callback must be a function");
|
|
6034
|
+
const request = __injectivelabs_indexer_proto_ts_v2_generated_injective_derivative_exchange_rpc_pb.StreamPositionsV2Request.create();
|
|
6035
|
+
if (marketId) request.marketId = marketId;
|
|
6036
|
+
if (address) request.accountAddress = address;
|
|
6037
|
+
if (subaccountId) request.subaccountId = subaccountId;
|
|
6038
|
+
return createStreamSubscriptionV2(this.client.streamPositionsV2(request), (response) => {
|
|
6039
|
+
callback(IndexerDerivativeStreamTransformer.positionV2StreamCallback(response));
|
|
6040
|
+
});
|
|
6041
|
+
}
|
|
6042
|
+
};
|
|
6043
|
+
|
|
6044
|
+
//#endregion
|
|
6045
|
+
//#region src/client/indexer/grpc_stream/streamV2/IndexerGrpcAccountPortfolioStreamV2.ts
|
|
6046
|
+
var IndexerGrpcAccountPortfolioStreamV2 = class {
|
|
6047
|
+
constructor(endpoint, metadata) {
|
|
6048
|
+
require_defineProperty._defineProperty(this, "client", void 0);
|
|
6049
|
+
require_defineProperty._defineProperty(this, "transport", void 0);
|
|
6050
|
+
this.transport = new require_BaseGrpcConsumer.GrpcWebRpcTransport(endpoint, metadata);
|
|
6051
|
+
this.client = new __injectivelabs_indexer_proto_ts_v2_generated_injective_portfolio_rpc_pb_client.InjectivePortfolioRPCClient(this.transport);
|
|
6052
|
+
}
|
|
6053
|
+
/**
|
|
6054
|
+
* Stream account portfolio updates
|
|
6055
|
+
* @param params.accountAddress - The account address to stream portfolio for
|
|
6056
|
+
* @param params.subaccountId - Optional subaccount ID to filter
|
|
6057
|
+
* @param params.type - Optional portfolio type to filter
|
|
6058
|
+
* @param params.callback - Called for each portfolio update
|
|
6059
|
+
* @returns StreamSubscription
|
|
6060
|
+
*/
|
|
6061
|
+
streamAccountPortfolio({ accountAddress, subaccountId, type, callback }) {
|
|
6062
|
+
if (!accountAddress) throw new Error("accountAddress is required");
|
|
6063
|
+
if (typeof callback !== "function") throw new Error("callback must be a function");
|
|
6064
|
+
const request = __injectivelabs_indexer_proto_ts_v2_generated_injective_portfolio_rpc_pb.StreamAccountPortfolioRequest.create();
|
|
6065
|
+
request.accountAddress = accountAddress;
|
|
6066
|
+
if (subaccountId) request.subaccountId = subaccountId;
|
|
6067
|
+
if (type) request.type = type;
|
|
6068
|
+
return createStreamSubscriptionV2(this.client.streamAccountPortfolio(request), (response) => {
|
|
6069
|
+
callback(IndexerAccountPortfolioStreamTransformer.accountPortfolioStreamCallback(response));
|
|
6070
|
+
});
|
|
6071
|
+
}
|
|
6072
|
+
};
|
|
6073
|
+
|
|
6074
|
+
//#endregion
|
|
6075
|
+
//#region src/client/indexer/grpc_stream/streamV2/StreamManager.ts
|
|
6076
|
+
/**
|
|
6077
|
+
* Default retry configuration
|
|
6078
|
+
*/
|
|
6079
|
+
const DEFAULT_RETRY_CONFIG = {
|
|
6080
|
+
enabled: true,
|
|
6081
|
+
maxAttempts: 5,
|
|
6082
|
+
initialDelayMs: 1e3,
|
|
6083
|
+
maxDelayMs: 3e4,
|
|
6084
|
+
backoffMultiplier: 2,
|
|
6085
|
+
persistent: true
|
|
6086
|
+
};
|
|
6087
|
+
/**
|
|
6088
|
+
* StreamManagerV2 - Manages gRPC stream connections with automatic retry
|
|
6089
|
+
*
|
|
6090
|
+
* V2 Features:
|
|
6091
|
+
* - Event-based lifecycle (on/off methods)
|
|
6092
|
+
* - Automatic retry with exponential backoff
|
|
6093
|
+
* - Persistent retry mode
|
|
6094
|
+
* - Comprehensive statistics tracking
|
|
6095
|
+
* - gRPC error code mapping
|
|
6096
|
+
*
|
|
6097
|
+
*/
|
|
6098
|
+
var StreamManagerV2 = class extends eventemitter3.EventEmitter {
|
|
6099
|
+
constructor(config) {
|
|
6100
|
+
super();
|
|
6101
|
+
require_defineProperty._defineProperty(this, "config", void 0);
|
|
6102
|
+
require_defineProperty._defineProperty(this, "state", require_types.StreamState.Idle);
|
|
6103
|
+
require_defineProperty._defineProperty(this, "subscription", null);
|
|
6104
|
+
require_defineProperty._defineProperty(this, "retryTimeoutId", null);
|
|
6105
|
+
require_defineProperty._defineProperty(this, "stats", void 0);
|
|
6106
|
+
require_defineProperty._defineProperty(this, "retryAttempt", 0);
|
|
6107
|
+
this.config = {
|
|
6108
|
+
id: config.id,
|
|
6109
|
+
streamFactory: config.streamFactory,
|
|
6110
|
+
onData: config.onData,
|
|
6111
|
+
retryConfig: {
|
|
6112
|
+
...DEFAULT_RETRY_CONFIG,
|
|
6113
|
+
...config.retryConfig
|
|
6114
|
+
}
|
|
6115
|
+
};
|
|
6116
|
+
this.stats = {
|
|
6117
|
+
state: require_types.StreamState.Idle,
|
|
6118
|
+
connectCount: 0,
|
|
6119
|
+
disconnectCount: 0,
|
|
6120
|
+
retryCount: 0,
|
|
6121
|
+
dataReceivedCount: 0,
|
|
6122
|
+
errorCount: 0,
|
|
6123
|
+
lastDataAt: null,
|
|
6124
|
+
createdAt: Date.now(),
|
|
6125
|
+
connectedAt: null,
|
|
6126
|
+
disconnectedAt: null
|
|
6127
|
+
};
|
|
6128
|
+
const originalEmit = this.emit.bind(this);
|
|
6129
|
+
this.emit = ((event, ...args) => {
|
|
6130
|
+
if (event === require_types.StreamEvent.Data && args.length > 0) this.handleData(args[0]);
|
|
6131
|
+
return originalEmit(event, ...args);
|
|
6132
|
+
});
|
|
6133
|
+
}
|
|
6134
|
+
start() {
|
|
6135
|
+
if (this.state !== require_types.StreamState.Idle && this.state !== require_types.StreamState.Stopped) {
|
|
6136
|
+
this.emit(require_types.StreamEvent.Warn, { message: `Stream already started (state: ${this.state})` });
|
|
6137
|
+
return;
|
|
6138
|
+
}
|
|
6139
|
+
this.connect();
|
|
6140
|
+
}
|
|
6141
|
+
stop() {
|
|
6142
|
+
this.handleDisconnect(require_types.StreamDisconnectReason.UserStopped);
|
|
6143
|
+
}
|
|
6144
|
+
getId() {
|
|
6145
|
+
return this.config.id;
|
|
6146
|
+
}
|
|
6147
|
+
getState() {
|
|
6148
|
+
return this.state;
|
|
6149
|
+
}
|
|
6150
|
+
getStats() {
|
|
6151
|
+
return {
|
|
6152
|
+
...this.stats,
|
|
6153
|
+
state: this.state
|
|
6154
|
+
};
|
|
6155
|
+
}
|
|
6156
|
+
/**
|
|
6157
|
+
* Destroy the stream manager and clean up all resources
|
|
6158
|
+
* Call this when the stream manager is no longer needed
|
|
6159
|
+
*/
|
|
6160
|
+
destroy() {
|
|
6161
|
+
this.stop();
|
|
6162
|
+
this.removeAllListeners();
|
|
6163
|
+
}
|
|
6164
|
+
updateState(newState) {
|
|
6165
|
+
const oldState = this.state;
|
|
6166
|
+
this.state = newState;
|
|
6167
|
+
this.stats.state = newState;
|
|
6168
|
+
this.emit(require_types.StreamEvent.StateChange, {
|
|
6169
|
+
from: oldState,
|
|
6170
|
+
to: newState
|
|
6171
|
+
});
|
|
6172
|
+
}
|
|
6173
|
+
clearSubscription() {
|
|
6174
|
+
if (!this.subscription) return;
|
|
6175
|
+
this.subscription.unsubscribe();
|
|
6176
|
+
this.subscription = null;
|
|
6177
|
+
}
|
|
6178
|
+
clearRetryTimeout() {
|
|
6179
|
+
if (!this.retryTimeoutId) return;
|
|
6180
|
+
clearTimeout(this.retryTimeoutId);
|
|
6181
|
+
this.retryTimeoutId = null;
|
|
6182
|
+
}
|
|
6183
|
+
calculateNextBackoff() {
|
|
6184
|
+
if (this.config.retryConfig.maxAttempts > 0 && this.retryAttempt >= this.config.retryConfig.maxAttempts) return this.config.retryConfig.persistent ? this.config.retryConfig.maxDelayMs : null;
|
|
6185
|
+
const nextBackoffDelay = this.config.retryConfig.initialDelayMs * Math.pow(this.config.retryConfig.backoffMultiplier, this.retryAttempt);
|
|
6186
|
+
return Math.min(nextBackoffDelay, this.config.retryConfig.maxDelayMs);
|
|
6187
|
+
}
|
|
6188
|
+
scheduleRetry() {
|
|
6189
|
+
if (!this.config.retryConfig.enabled) return;
|
|
6190
|
+
const nextBackoff = this.calculateNextBackoff();
|
|
6191
|
+
if (nextBackoff === null) {
|
|
6192
|
+
this.handleMaxRetriesReached();
|
|
6193
|
+
return;
|
|
6194
|
+
}
|
|
6195
|
+
this.retryTimeoutId = setTimeout(() => {
|
|
6196
|
+
this.retryAttempt++;
|
|
6197
|
+
this.stats.retryCount++;
|
|
6198
|
+
this.emit(require_types.StreamEvent.Retry, {
|
|
6199
|
+
attempt: this.retryAttempt,
|
|
6200
|
+
delayMs: nextBackoff,
|
|
6201
|
+
nextBackoff: this.calculateNextBackoff()
|
|
6202
|
+
});
|
|
6203
|
+
this.connect();
|
|
6204
|
+
}, nextBackoff);
|
|
6205
|
+
}
|
|
6206
|
+
handleMaxRetriesReached() {
|
|
6207
|
+
this.emit(require_types.StreamEvent.Error, { message: `Max retries (${this.config.retryConfig.maxAttempts}) reached` });
|
|
6208
|
+
this.handleDisconnect(require_types.StreamDisconnectReason.MaxRetries);
|
|
6209
|
+
}
|
|
6210
|
+
handleError(error) {
|
|
6211
|
+
const errorInfo = this.extractErrorInfo(error);
|
|
6212
|
+
this.stats.errorCount++;
|
|
6213
|
+
this.emit(require_types.StreamEvent.Error, errorInfo);
|
|
6214
|
+
let reason = require_types.StreamDisconnectReason.StreamError;
|
|
6215
|
+
if (error && typeof error === "object" && "code" in error) switch (error.code) {
|
|
6216
|
+
case 14:
|
|
6217
|
+
reason = require_types.StreamDisconnectReason.NetworkError;
|
|
6218
|
+
break;
|
|
6219
|
+
case 4:
|
|
6220
|
+
reason = require_types.StreamDisconnectReason.Timeout;
|
|
6221
|
+
break;
|
|
6222
|
+
case 16:
|
|
6223
|
+
reason = require_types.StreamDisconnectReason.AuthenticationError;
|
|
6224
|
+
break;
|
|
6225
|
+
case 1:
|
|
6226
|
+
reason = require_types.StreamDisconnectReason.UserStopped;
|
|
6227
|
+
break;
|
|
6228
|
+
}
|
|
6229
|
+
this.handleDisconnect(reason);
|
|
6230
|
+
}
|
|
6231
|
+
/**
|
|
6232
|
+
* Handles incoming data - tracks stats and calls user callback
|
|
6233
|
+
* Called automatically when user emits 'data' event from streamFactory callback
|
|
6234
|
+
*/
|
|
6235
|
+
handleData(response) {
|
|
6236
|
+
this.stats.dataReceivedCount++;
|
|
6237
|
+
this.stats.lastDataAt = Date.now();
|
|
6238
|
+
try {
|
|
6239
|
+
this.config.onData(response);
|
|
6240
|
+
} catch (error) {
|
|
6241
|
+
this.handleError(error);
|
|
6242
|
+
}
|
|
6243
|
+
}
|
|
6244
|
+
handleConnected(isReconnect) {
|
|
6245
|
+
this.updateState(require_types.StreamState.Connected);
|
|
6246
|
+
this.retryAttempt = 0;
|
|
6247
|
+
this.stats.connectCount++;
|
|
6248
|
+
this.stats.connectedAt = Date.now();
|
|
6249
|
+
this.emit(require_types.StreamEvent.Connect, {
|
|
6250
|
+
isReconnect,
|
|
6251
|
+
attempt: this.stats.connectCount
|
|
6252
|
+
});
|
|
6253
|
+
}
|
|
6254
|
+
handleDisconnect(reason) {
|
|
6255
|
+
this.clearSubscription();
|
|
6256
|
+
this.clearRetryTimeout();
|
|
6257
|
+
this.stats.disconnectCount++;
|
|
6258
|
+
this.stats.disconnectedAt = Date.now();
|
|
6259
|
+
const willRetry = reason !== require_types.StreamDisconnectReason.UserStopped && reason !== require_types.StreamDisconnectReason.MaxRetries && this.config.retryConfig.enabled;
|
|
6260
|
+
this.emit(require_types.StreamEvent.Disconnect, {
|
|
6261
|
+
reason,
|
|
6262
|
+
willRetry,
|
|
6263
|
+
attempt: this.retryAttempt
|
|
6264
|
+
});
|
|
6265
|
+
if (willRetry) {
|
|
6266
|
+
this.updateState(require_types.StreamState.Reconnecting);
|
|
6267
|
+
this.scheduleRetry();
|
|
6268
|
+
} else this.updateState(require_types.StreamState.Stopped);
|
|
6269
|
+
}
|
|
6270
|
+
connect() {
|
|
6271
|
+
this.clearSubscription();
|
|
6272
|
+
const isReconnect = this.state === require_types.StreamState.Reconnecting;
|
|
6273
|
+
this.updateState(isReconnect ? require_types.StreamState.Reconnecting : require_types.StreamState.Connecting);
|
|
6274
|
+
try {
|
|
6275
|
+
this.subscription = this.config.streamFactory();
|
|
6276
|
+
this.subscription.on("error", (error) => {
|
|
6277
|
+
this.handleError(error);
|
|
6278
|
+
});
|
|
6279
|
+
this.subscription.on("complete", () => {
|
|
6280
|
+
this.handleDisconnect(require_types.StreamDisconnectReason.StreamEnded);
|
|
6281
|
+
});
|
|
6282
|
+
this.handleConnected(isReconnect);
|
|
6283
|
+
} catch (error) {
|
|
6284
|
+
this.handleError(error);
|
|
6285
|
+
}
|
|
6286
|
+
}
|
|
6287
|
+
/**
|
|
6288
|
+
* Extracts error message and details from an error object
|
|
6289
|
+
*/
|
|
6290
|
+
extractErrorInfo(error) {
|
|
6291
|
+
if (error && typeof error === "object" && "details" in error) return {
|
|
6292
|
+
message: error.details,
|
|
6293
|
+
details: error
|
|
6294
|
+
};
|
|
6295
|
+
return {
|
|
6296
|
+
message: error instanceof Error ? error.message : "Unknown error",
|
|
6297
|
+
details: error instanceof Error ? error.stack : error
|
|
6298
|
+
};
|
|
6299
|
+
}
|
|
6300
|
+
};
|
|
6301
|
+
|
|
6302
|
+
//#endregion
|
|
6303
|
+
Object.defineProperty(exports, 'ExplorerStreamTransformer', {
|
|
6304
|
+
enumerable: true,
|
|
6305
|
+
get: function () {
|
|
6306
|
+
return ExplorerStreamTransformer;
|
|
6307
|
+
}
|
|
6308
|
+
});
|
|
6309
|
+
Object.defineProperty(exports, 'IndexerAccountPortfolioStreamTransformer', {
|
|
6310
|
+
enumerable: true,
|
|
6311
|
+
get: function () {
|
|
6312
|
+
return IndexerAccountPortfolioStreamTransformer;
|
|
6313
|
+
}
|
|
6314
|
+
});
|
|
6315
|
+
Object.defineProperty(exports, 'IndexerAccountStreamTransformer', {
|
|
6316
|
+
enumerable: true,
|
|
6317
|
+
get: function () {
|
|
6318
|
+
return IndexerAccountStreamTransformer;
|
|
6319
|
+
}
|
|
6320
|
+
});
|
|
6321
|
+
Object.defineProperty(exports, 'IndexerArchiverStreamTransformer', {
|
|
6322
|
+
enumerable: true,
|
|
6323
|
+
get: function () {
|
|
6324
|
+
return IndexerArchiverStreamTransformer;
|
|
6325
|
+
}
|
|
6326
|
+
});
|
|
6327
|
+
Object.defineProperty(exports, 'IndexerAuctionStreamTransformer', {
|
|
6328
|
+
enumerable: true,
|
|
6329
|
+
get: function () {
|
|
6330
|
+
return IndexerAuctionStreamTransformer;
|
|
6331
|
+
}
|
|
6332
|
+
});
|
|
6333
|
+
Object.defineProperty(exports, 'IndexerCampaignTransformer', {
|
|
6334
|
+
enumerable: true,
|
|
6335
|
+
get: function () {
|
|
6336
|
+
return IndexerCampaignTransformer;
|
|
6337
|
+
}
|
|
6338
|
+
});
|
|
6339
|
+
Object.defineProperty(exports, 'IndexerDerivativeStreamTransformer', {
|
|
6340
|
+
enumerable: true,
|
|
6341
|
+
get: function () {
|
|
6342
|
+
return IndexerDerivativeStreamTransformer;
|
|
6343
|
+
}
|
|
6344
|
+
});
|
|
6345
|
+
Object.defineProperty(exports, 'IndexerGrpcAccountApi', {
|
|
6346
|
+
enumerable: true,
|
|
6347
|
+
get: function () {
|
|
6348
|
+
return IndexerGrpcAccountApi;
|
|
6349
|
+
}
|
|
6350
|
+
});
|
|
6351
|
+
Object.defineProperty(exports, 'IndexerGrpcAccountPortfolioApi', {
|
|
6352
|
+
enumerable: true,
|
|
6353
|
+
get: function () {
|
|
6354
|
+
return IndexerGrpcAccountPortfolioApi;
|
|
6355
|
+
}
|
|
6356
|
+
});
|
|
6357
|
+
Object.defineProperty(exports, 'IndexerGrpcAccountPortfolioStream', {
|
|
6358
|
+
enumerable: true,
|
|
6359
|
+
get: function () {
|
|
6360
|
+
return IndexerGrpcAccountPortfolioStream;
|
|
6361
|
+
}
|
|
6362
|
+
});
|
|
6363
|
+
Object.defineProperty(exports, 'IndexerGrpcAccountPortfolioStreamV2', {
|
|
6364
|
+
enumerable: true,
|
|
6365
|
+
get: function () {
|
|
6366
|
+
return IndexerGrpcAccountPortfolioStreamV2;
|
|
6367
|
+
}
|
|
6368
|
+
});
|
|
6369
|
+
Object.defineProperty(exports, 'IndexerGrpcAccountPortfolioTransformer', {
|
|
6370
|
+
enumerable: true,
|
|
6371
|
+
get: function () {
|
|
6372
|
+
return IndexerGrpcAccountPortfolioTransformer;
|
|
6373
|
+
}
|
|
6374
|
+
});
|
|
6375
|
+
Object.defineProperty(exports, 'IndexerGrpcAccountStream', {
|
|
6376
|
+
enumerable: true,
|
|
6377
|
+
get: function () {
|
|
6378
|
+
return IndexerGrpcAccountStream;
|
|
6379
|
+
}
|
|
6380
|
+
});
|
|
6381
|
+
Object.defineProperty(exports, 'IndexerGrpcAccountStreamV2', {
|
|
6382
|
+
enumerable: true,
|
|
6383
|
+
get: function () {
|
|
6384
|
+
return IndexerGrpcAccountStreamV2;
|
|
6385
|
+
}
|
|
6386
|
+
});
|
|
6387
|
+
Object.defineProperty(exports, 'IndexerGrpcAccountTransformer', {
|
|
6388
|
+
enumerable: true,
|
|
6389
|
+
get: function () {
|
|
6390
|
+
return IndexerGrpcAccountTransformer;
|
|
6391
|
+
}
|
|
6392
|
+
});
|
|
6393
|
+
Object.defineProperty(exports, 'IndexerGrpcArchiverApi', {
|
|
6394
|
+
enumerable: true,
|
|
6395
|
+
get: function () {
|
|
6396
|
+
return IndexerGrpcArchiverApi;
|
|
6397
|
+
}
|
|
6398
|
+
});
|
|
6399
|
+
Object.defineProperty(exports, 'IndexerGrpcArchiverStream', {
|
|
6400
|
+
enumerable: true,
|
|
6401
|
+
get: function () {
|
|
6402
|
+
return IndexerGrpcArchiverStream;
|
|
6403
|
+
}
|
|
6404
|
+
});
|
|
6405
|
+
Object.defineProperty(exports, 'IndexerGrpcArchiverStreamV2', {
|
|
6406
|
+
enumerable: true,
|
|
6407
|
+
get: function () {
|
|
6408
|
+
return IndexerGrpcArchiverStreamV2;
|
|
6409
|
+
}
|
|
6410
|
+
});
|
|
6411
|
+
Object.defineProperty(exports, 'IndexerGrpcArchiverTransformer', {
|
|
6412
|
+
enumerable: true,
|
|
6413
|
+
get: function () {
|
|
6414
|
+
return IndexerGrpcArchiverTransformer;
|
|
6415
|
+
}
|
|
6416
|
+
});
|
|
6417
|
+
Object.defineProperty(exports, 'IndexerGrpcAuctionApi', {
|
|
6418
|
+
enumerable: true,
|
|
6419
|
+
get: function () {
|
|
6420
|
+
return IndexerGrpcAuctionApi;
|
|
6421
|
+
}
|
|
6422
|
+
});
|
|
6423
|
+
Object.defineProperty(exports, 'IndexerGrpcAuctionStream', {
|
|
6424
|
+
enumerable: true,
|
|
6425
|
+
get: function () {
|
|
6426
|
+
return IndexerGrpcAuctionStream;
|
|
6427
|
+
}
|
|
6428
|
+
});
|
|
6429
|
+
Object.defineProperty(exports, 'IndexerGrpcAuctionStreamV2', {
|
|
6430
|
+
enumerable: true,
|
|
6431
|
+
get: function () {
|
|
6432
|
+
return IndexerGrpcAuctionStreamV2;
|
|
6433
|
+
}
|
|
6434
|
+
});
|
|
6435
|
+
Object.defineProperty(exports, 'IndexerGrpcAuctionTransformer', {
|
|
6436
|
+
enumerable: true,
|
|
6437
|
+
get: function () {
|
|
6438
|
+
return IndexerGrpcAuctionTransformer;
|
|
6439
|
+
}
|
|
6440
|
+
});
|
|
6441
|
+
Object.defineProperty(exports, 'IndexerGrpcCampaignApi', {
|
|
6442
|
+
enumerable: true,
|
|
6443
|
+
get: function () {
|
|
6444
|
+
return IndexerGrpcCampaignApi;
|
|
6445
|
+
}
|
|
6446
|
+
});
|
|
6447
|
+
Object.defineProperty(exports, 'IndexerGrpcDerivativeTransformer', {
|
|
6448
|
+
enumerable: true,
|
|
6449
|
+
get: function () {
|
|
6450
|
+
return IndexerGrpcDerivativeTransformer;
|
|
6451
|
+
}
|
|
6452
|
+
});
|
|
6453
|
+
Object.defineProperty(exports, 'IndexerGrpcDerivativesApi', {
|
|
6454
|
+
enumerable: true,
|
|
6455
|
+
get: function () {
|
|
6456
|
+
return IndexerGrpcDerivativesApi;
|
|
6457
|
+
}
|
|
6458
|
+
});
|
|
6459
|
+
Object.defineProperty(exports, 'IndexerGrpcDerivativesStream', {
|
|
6460
|
+
enumerable: true,
|
|
6461
|
+
get: function () {
|
|
6462
|
+
return IndexerGrpcDerivativesStream;
|
|
6463
|
+
}
|
|
6464
|
+
});
|
|
6465
|
+
Object.defineProperty(exports, 'IndexerGrpcDerivativesStreamV2', {
|
|
6466
|
+
enumerable: true,
|
|
6467
|
+
get: function () {
|
|
6468
|
+
return IndexerGrpcDerivativesStreamV2;
|
|
6469
|
+
}
|
|
6470
|
+
});
|
|
6471
|
+
Object.defineProperty(exports, 'IndexerGrpcExplorerApi', {
|
|
6472
|
+
enumerable: true,
|
|
6473
|
+
get: function () {
|
|
6474
|
+
return IndexerGrpcExplorerApi;
|
|
6475
|
+
}
|
|
6476
|
+
});
|
|
6477
|
+
Object.defineProperty(exports, 'IndexerGrpcExplorerStream', {
|
|
6478
|
+
enumerable: true,
|
|
6479
|
+
get: function () {
|
|
6480
|
+
return IndexerGrpcExplorerStream;
|
|
6481
|
+
}
|
|
6482
|
+
});
|
|
6483
|
+
Object.defineProperty(exports, 'IndexerGrpcExplorerStreamV2', {
|
|
6484
|
+
enumerable: true,
|
|
6485
|
+
get: function () {
|
|
6486
|
+
return IndexerGrpcExplorerStreamV2;
|
|
6487
|
+
}
|
|
6488
|
+
});
|
|
6489
|
+
Object.defineProperty(exports, 'IndexerGrpcExplorerTransformer', {
|
|
6490
|
+
enumerable: true,
|
|
6491
|
+
get: function () {
|
|
6492
|
+
return IndexerGrpcExplorerTransformer;
|
|
6493
|
+
}
|
|
6494
|
+
});
|
|
6495
|
+
Object.defineProperty(exports, 'IndexerGrpcInsuranceFundApi', {
|
|
6496
|
+
enumerable: true,
|
|
6497
|
+
get: function () {
|
|
6498
|
+
return IndexerGrpcInsuranceFundApi;
|
|
6499
|
+
}
|
|
6500
|
+
});
|
|
6501
|
+
Object.defineProperty(exports, 'IndexerGrpcInsuranceFundTransformer', {
|
|
6502
|
+
enumerable: true,
|
|
6503
|
+
get: function () {
|
|
6504
|
+
return IndexerGrpcInsuranceFundTransformer;
|
|
6505
|
+
}
|
|
6506
|
+
});
|
|
6507
|
+
Object.defineProperty(exports, 'IndexerGrpcMegaVaultApi', {
|
|
6508
|
+
enumerable: true,
|
|
6509
|
+
get: function () {
|
|
6510
|
+
return IndexerGrpcMegaVaultApi;
|
|
6511
|
+
}
|
|
6512
|
+
});
|
|
6513
|
+
Object.defineProperty(exports, 'IndexerGrpcMegaVaultTransformer', {
|
|
6514
|
+
enumerable: true,
|
|
6515
|
+
get: function () {
|
|
6516
|
+
return IndexerGrpcMegaVaultTransformer;
|
|
6517
|
+
}
|
|
6518
|
+
});
|
|
6519
|
+
Object.defineProperty(exports, 'IndexerGrpcMetaApi', {
|
|
6520
|
+
enumerable: true,
|
|
6521
|
+
get: function () {
|
|
6522
|
+
return IndexerGrpcMetaApi;
|
|
6523
|
+
}
|
|
6524
|
+
});
|
|
6525
|
+
Object.defineProperty(exports, 'IndexerGrpcMitoApi', {
|
|
6526
|
+
enumerable: true,
|
|
6527
|
+
get: function () {
|
|
6528
|
+
return IndexerGrpcMitoApi;
|
|
6529
|
+
}
|
|
6530
|
+
});
|
|
6531
|
+
Object.defineProperty(exports, 'IndexerGrpcMitoStream', {
|
|
6532
|
+
enumerable: true,
|
|
6533
|
+
get: function () {
|
|
6534
|
+
return IndexerGrpcMitoStream;
|
|
6535
|
+
}
|
|
6536
|
+
});
|
|
6537
|
+
Object.defineProperty(exports, 'IndexerGrpcMitoStreamTransformer', {
|
|
6538
|
+
enumerable: true,
|
|
6539
|
+
get: function () {
|
|
6540
|
+
return IndexerGrpcMitoStreamTransformer;
|
|
6541
|
+
}
|
|
6542
|
+
});
|
|
6543
|
+
Object.defineProperty(exports, 'IndexerGrpcMitoStreamV2', {
|
|
6544
|
+
enumerable: true,
|
|
6545
|
+
get: function () {
|
|
6546
|
+
return IndexerGrpcMitoStreamV2;
|
|
6547
|
+
}
|
|
6548
|
+
});
|
|
6549
|
+
Object.defineProperty(exports, 'IndexerGrpcMitoTransformer', {
|
|
6550
|
+
enumerable: true,
|
|
6551
|
+
get: function () {
|
|
6552
|
+
return IndexerGrpcMitoTransformer;
|
|
6553
|
+
}
|
|
6554
|
+
});
|
|
6555
|
+
Object.defineProperty(exports, 'IndexerGrpcOracleApi', {
|
|
6556
|
+
enumerable: true,
|
|
6557
|
+
get: function () {
|
|
6558
|
+
return IndexerGrpcOracleApi;
|
|
6559
|
+
}
|
|
6560
|
+
});
|
|
6561
|
+
Object.defineProperty(exports, 'IndexerGrpcOracleStream', {
|
|
6562
|
+
enumerable: true,
|
|
6563
|
+
get: function () {
|
|
6564
|
+
return IndexerGrpcOracleStream;
|
|
6565
|
+
}
|
|
6566
|
+
});
|
|
6567
|
+
Object.defineProperty(exports, 'IndexerGrpcOracleStreamV2', {
|
|
6568
|
+
enumerable: true,
|
|
6569
|
+
get: function () {
|
|
6570
|
+
return IndexerGrpcOracleStreamV2;
|
|
6571
|
+
}
|
|
6572
|
+
});
|
|
6573
|
+
Object.defineProperty(exports, 'IndexerGrpcOracleTransformer', {
|
|
6574
|
+
enumerable: true,
|
|
6575
|
+
get: function () {
|
|
6576
|
+
return IndexerGrpcOracleTransformer;
|
|
6577
|
+
}
|
|
6578
|
+
});
|
|
6579
|
+
Object.defineProperty(exports, 'IndexerGrpcReferralApi', {
|
|
6580
|
+
enumerable: true,
|
|
6581
|
+
get: function () {
|
|
6582
|
+
return IndexerGrpcReferralApi;
|
|
6583
|
+
}
|
|
6584
|
+
});
|
|
6585
|
+
Object.defineProperty(exports, 'IndexerGrpcReferralTransformer', {
|
|
6586
|
+
enumerable: true,
|
|
6587
|
+
get: function () {
|
|
6588
|
+
return IndexerGrpcReferralTransformer;
|
|
6589
|
+
}
|
|
6590
|
+
});
|
|
6591
|
+
Object.defineProperty(exports, 'IndexerGrpcSpotApi', {
|
|
6592
|
+
enumerable: true,
|
|
6593
|
+
get: function () {
|
|
6594
|
+
return IndexerGrpcSpotApi;
|
|
6595
|
+
}
|
|
6596
|
+
});
|
|
6597
|
+
Object.defineProperty(exports, 'IndexerGrpcSpotStream', {
|
|
6598
|
+
enumerable: true,
|
|
6599
|
+
get: function () {
|
|
6600
|
+
return IndexerGrpcSpotStream;
|
|
6601
|
+
}
|
|
6602
|
+
});
|
|
6603
|
+
Object.defineProperty(exports, 'IndexerGrpcSpotStreamV2', {
|
|
6604
|
+
enumerable: true,
|
|
6605
|
+
get: function () {
|
|
6606
|
+
return IndexerGrpcSpotStreamV2;
|
|
6607
|
+
}
|
|
5659
6608
|
});
|
|
5660
6609
|
Object.defineProperty(exports, 'IndexerGrpcSpotTransformer', {
|
|
5661
6610
|
enumerable: true,
|
|
@@ -5675,6 +6624,12 @@ Object.defineProperty(exports, 'IndexerGrpcTradingStream', {
|
|
|
5675
6624
|
return IndexerGrpcTradingStream;
|
|
5676
6625
|
}
|
|
5677
6626
|
});
|
|
6627
|
+
Object.defineProperty(exports, 'IndexerGrpcTradingStreamV2', {
|
|
6628
|
+
enumerable: true,
|
|
6629
|
+
get: function () {
|
|
6630
|
+
return IndexerGrpcTradingStreamV2;
|
|
6631
|
+
}
|
|
6632
|
+
});
|
|
5678
6633
|
Object.defineProperty(exports, 'IndexerOracleStreamTransformer', {
|
|
5679
6634
|
enumerable: true,
|
|
5680
6635
|
get: function () {
|
|
@@ -5722,4 +6677,28 @@ Object.defineProperty(exports, 'IndexerSpotStreamTransformer', {
|
|
|
5722
6677
|
get: function () {
|
|
5723
6678
|
return IndexerSpotStreamTransformer;
|
|
5724
6679
|
}
|
|
6680
|
+
});
|
|
6681
|
+
Object.defineProperty(exports, 'StreamManager', {
|
|
6682
|
+
enumerable: true,
|
|
6683
|
+
get: function () {
|
|
6684
|
+
return StreamManager;
|
|
6685
|
+
}
|
|
6686
|
+
});
|
|
6687
|
+
Object.defineProperty(exports, 'StreamManagerV2', {
|
|
6688
|
+
enumerable: true,
|
|
6689
|
+
get: function () {
|
|
6690
|
+
return StreamManagerV2;
|
|
6691
|
+
}
|
|
6692
|
+
});
|
|
6693
|
+
Object.defineProperty(exports, 'createStreamSubscription', {
|
|
6694
|
+
enumerable: true,
|
|
6695
|
+
get: function () {
|
|
6696
|
+
return createStreamSubscription;
|
|
6697
|
+
}
|
|
6698
|
+
});
|
|
6699
|
+
Object.defineProperty(exports, 'createStreamSubscriptionV2', {
|
|
6700
|
+
enumerable: true,
|
|
6701
|
+
get: function () {
|
|
6702
|
+
return createStreamSubscriptionV2;
|
|
6703
|
+
}
|
|
5725
6704
|
});
|