@nadohq/indexer-client 0.26.0 → 0.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -8
- package/dist/{IndexerBaseClient-D_xMNjhf.cjs → IndexerBaseClient-BesuTUAd.cjs} +4 -1
- package/dist/IndexerBaseClient-BesuTUAd.cjs.map +1 -0
- package/dist/IndexerBaseClient.cjs +1 -1
- package/dist/IndexerBaseClient.d.cts +2 -2
- package/dist/IndexerBaseClient.d.cts.map +1 -1
- package/dist/IndexerBaseClient.d.ts +2 -2
- package/dist/IndexerBaseClient.d.ts.map +1 -1
- package/dist/IndexerBaseClient.js +3 -0
- package/dist/IndexerBaseClient.js.map +1 -1
- package/dist/IndexerClient.cjs +1 -1
- package/dist/IndexerClient.d.cts +1 -1
- package/dist/IndexerClient.d.ts +1 -1
- package/dist/IndexerServerFailureError-Cp-nQ6BQ.d.ts +31 -0
- package/dist/IndexerServerFailureError-Cp-nQ6BQ.d.ts.map +1 -0
- package/dist/IndexerServerFailureError-qVBOC6Ru.d.cts +31 -0
- package/dist/IndexerServerFailureError-qVBOC6Ru.d.cts.map +1 -0
- package/dist/{clientTypes-CgQ-pdym.d.cts → clientTypes-C6gfQzsU.d.cts} +3 -7
- package/dist/{clientTypes-CgQ-pdym.d.cts.map → clientTypes-C6gfQzsU.d.cts.map} +1 -1
- package/dist/{clientTypes-BzpYIUbg.d.ts → clientTypes-Cke-KLUR.d.ts} +3 -7
- package/dist/{clientTypes-BzpYIUbg.d.ts.map → clientTypes-Cke-KLUR.d.ts.map} +1 -1
- package/dist/dataMappers.cjs +1 -1
- package/dist/dataMappers.d.cts +2 -2
- package/dist/dataMappers.d.ts +2 -2
- package/dist/index.cjs +8 -3
- package/dist/index.d.cts +7 -5
- package/dist/index.d.ts +7 -5
- package/dist/index.js +5 -3
- package/dist/{indexerBalanceValue-BMncrrka.d.cts → indexerBalanceValue-BBUGThDY.d.cts} +2 -2
- package/dist/{indexerBalanceValue-BMncrrka.d.cts.map → indexerBalanceValue-BBUGThDY.d.cts.map} +1 -1
- package/dist/{indexerBalanceValue-BeyJ655G.d.ts → indexerBalanceValue-dX29Cr7g.d.ts} +2 -2
- package/dist/{indexerBalanceValue-BeyJ655G.d.ts.map → indexerBalanceValue-dX29Cr7g.d.ts.map} +1 -1
- package/dist/indexerErrorCodes-BK__sFOc.d.cts +41 -0
- package/dist/indexerErrorCodes-BK__sFOc.d.cts.map +1 -0
- package/dist/indexerErrorCodes-DNHtJXxm.d.ts +41 -0
- package/dist/indexerErrorCodes-DNHtJXxm.d.ts.map +1 -0
- package/dist/{paginatedEventsTypes-B8d8yiii.d.ts → paginatedEventsTypes-BOUjVtm0.d.ts} +2 -2
- package/dist/{paginatedEventsTypes-B8d8yiii.d.ts.map → paginatedEventsTypes-BOUjVtm0.d.ts.map} +1 -1
- package/dist/{paginatedEventsTypes-rj9qNxIF.d.cts → paginatedEventsTypes-BeMZ3Cac.d.cts} +2 -2
- package/dist/{paginatedEventsTypes-rj9qNxIF.d.cts.map → paginatedEventsTypes-BeMZ3Cac.d.cts.map} +1 -1
- package/dist/{serverTypes-Dl79x4IJ.d.cts → serverTypes-E311idZv.d.cts} +28 -2
- package/dist/{serverTypes-Dl79x4IJ.d.cts.map → serverTypes-E311idZv.d.cts.map} +1 -1
- package/dist/{serverTypes-Co5rgD5o.d.ts → serverTypes-l4ceojIp.d.ts} +28 -2
- package/dist/{serverTypes-Co5rgD5o.d.ts.map → serverTypes-l4ceojIp.d.ts.map} +1 -1
- package/dist/types/IndexerServerFailureError.cjs +25 -0
- package/dist/types/IndexerServerFailureError.cjs.map +1 -0
- package/dist/types/IndexerServerFailureError.d.cts +2 -0
- package/dist/types/IndexerServerFailureError.d.ts +2 -0
- package/dist/types/IndexerServerFailureError.js +24 -0
- package/dist/types/IndexerServerFailureError.js.map +1 -0
- package/dist/types/clientTypes.d.cts +1 -1
- package/dist/types/clientTypes.d.ts +1 -1
- package/dist/types/index.cjs +6 -0
- package/dist/types/index.d.cts +6 -4
- package/dist/types/index.d.ts +6 -4
- package/dist/types/index.js +4 -1
- package/dist/types/indexerErrorCodes.cjs +35 -0
- package/dist/types/indexerErrorCodes.cjs.map +1 -0
- package/dist/types/indexerErrorCodes.d.cts +2 -0
- package/dist/types/indexerErrorCodes.d.ts +2 -0
- package/dist/types/indexerErrorCodes.js +34 -0
- package/dist/types/indexerErrorCodes.js.map +1 -0
- package/dist/types/paginatedEventsTypes.d.cts +1 -1
- package/dist/types/paginatedEventsTypes.d.ts +1 -1
- package/dist/types/serverTypes.cjs +12 -0
- package/dist/types/serverTypes.cjs.map +1 -0
- package/dist/types/serverTypes.d.cts +2 -2
- package/dist/types/serverTypes.d.ts +2 -2
- package/dist/types/serverTypes.js +11 -1
- package/dist/types/serverTypes.js.map +1 -0
- package/dist/utils/index.d.cts +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/indexerBalanceValue.d.cts +1 -1
- package/dist/utils/indexerBalanceValue.d.ts +1 -1
- package/package.json +4 -4
- package/src/IndexerBaseClient.ts +5 -0
- package/src/types/IndexerServerFailureError.ts +39 -0
- package/src/types/clientTypes.ts +1 -5
- package/src/types/index.ts +2 -0
- package/src/types/indexerErrorCodes.ts +38 -0
- package/src/types/serverTypes.ts +37 -0
- package/dist/IndexerBaseClient-D_xMNjhf.cjs.map +0 -1
- /package/dist/{index-D6CnpA_r.d.cts → index-D4ELpJXS.d.cts} +0 -0
- /package/dist/{index-DhI2LvVQ.d.ts → index-DK_kKFOF.d.ts} +0 -0
package/dist/types/index.d.ts
CHANGED
|
@@ -3,8 +3,10 @@ import { t as IndexerEventType } from "../IndexerEventType-Brm9aX8w.js";
|
|
|
3
3
|
import { t as IndexerLeaderboardRankType } from "../IndexerLeaderboardType-DAKw2tfI.js";
|
|
4
4
|
import { a as NadoTransferQuoteTx, c as NadoWithdrawCollateralV2Tx, i as NadoMatchOrdersTx, n as NadoLiquidateSubaccountTx, o as NadoTx, r as NadoMatchOrdersRfqTx, s as NadoWithdrawCollateralTx, t as NadoDepositCollateralTx } from "../NadoTx-Bd4U-zDu.js";
|
|
5
5
|
import { C as IndexerServerTx, S as IndexerServerSocialAccount, _ as IndexerServerOrder, a as IndexerServerLeaderboardContestTrack, b as IndexerServerProductSnapshot, c as IndexerServerLeaderboardTrackPosition, d as IndexerServerMarketSnapshot, f as IndexerServerMarketSnapshotInterval, g as IndexerServerOraclePrice, h as IndexerServerNlpSnapshot, i as IndexerServerLeaderboardContest, l as IndexerServerMaker, m as IndexerServerMatchEventBalances, n as IndexerServerCandlestick, o as IndexerServerLeaderboardPosition, p as IndexerServerMatchEvent, r as IndexerServerEvent, s as IndexerServerLeaderboardRegistration, t as IndexerServerBalance, u as IndexerServerMakerData, v as IndexerServerProduct, x as IndexerServerSnapshotsInterval, y as IndexerServerProductPayment } from "../serverModelTypes-BwLIAkc1.js";
|
|
6
|
-
import { $ as
|
|
7
|
-
import { $ as GetIndexerOrdersResponse, $t as IndexerSocialAccountInfo, A as GetIndexerLeaderboardRegistrationsResponse, At as IndexerEventWithTx, B as GetIndexerMultiProductFundingRatesParams, Bt as IndexerMarketSnapshot, C as GetIndexerInterestFundingPaymentsResponse, Ct as IndexerCashIncentivesEventPlatform, D as GetIndexerLeaderboardParticipantParams, Dt as IndexerEventBalanceStateSnapshot, E as GetIndexerLeaderboardParams, Et as IndexerEvent, F as GetIndexerMakerStatisticsResponse, Ft as IndexerLeaderboardParticipant, G as GetIndexerMultiProductSnapshotsResponse, Gt as IndexerOrder, H as GetIndexerMultiProductPerpPricesParams, Ht as IndexerMatchEventBalances, I as GetIndexerMarketSnapshotsParams, It as IndexerLeaderboardRegistration, J as GetIndexerNlpSnapshotsParams, Jt as IndexerPointsEpoch, K as GetIndexerMultiSubaccountSnapshotsParams, Kt as IndexerPerpBalance, L as GetIndexerMarketSnapshotsResponse, Lt as IndexerLeaderboardTrackPosition, M as GetIndexerLinkedSignerParams, Mt as IndexerFundingRateHistoryEntry, N as GetIndexerLinkedSignerResponse, Nt as IndexerLeaderboardContest, O as GetIndexerLeaderboardParticipantResponse, Ot as IndexerEventPerpStateSnapshot, P as GetIndexerMakerStatisticsParams, Pt as IndexerLeaderboardContestTrack, Q as GetIndexerOrdersParams, Qt as IndexerSnapshotsIntervalParams, R as GetIndexerMatchEventsParams, Rt as IndexerMaker, S as GetIndexerInterestFundingPaymentsParams, St as IndexerCashIncentivesEventMetadata, T as GetIndexerLeaderboardContestsResponse, Tt as IndexerCashIncentivesWalletSummary, U as GetIndexerMultiProductPerpPricesResponse, Ut as IndexerNlpSnapshot, V as GetIndexerMultiProductFundingRatesResponse, Vt as IndexerMatchEvent, W as GetIndexerMultiProductSnapshotsParams, Wt as IndexerOraclePrice, X as GetIndexerOraclePricesParams, Xt as IndexerProductSnapshot, Y as GetIndexerNlpSnapshotsResponse, Yt as IndexerProductPayment, Z as GetIndexerOraclePricesResponse, Zt as IndexerSnapshotBalance, _ as GetIndexerFastWithdrawalSignatureResponse, _n as TickerMarketType, _t as GetIndexerXPointsParams, a as GetIndexerCandlesticksParams, an as IndexerV2TradingStatus, at as GetIndexerPrivateAlphaChoiceResponse, b as GetIndexerFundingRateParams, bt as IndexerBalanceTrackedVars, c as GetIndexerCashIncentivesResponse, cn as IndexerXPointsQuest, ct as GetIndexerQuotePriceResponse, d as GetIndexerEdgeMarketSnapshotResponse, dn as ListIndexerSubaccountsParams, dt as GetIndexerSubaccountDDAParams, en as IndexerSpotBalance, et as GetIndexerPerpPricesParams, f as GetIndexerEdgeMarketSnapshotsParams, fn as ListIndexerSubaccountsResponse, ft as GetIndexerSubaccountDDAResponse, g as GetIndexerFastWithdrawalSignatureParams, gn as RevokeSocialAccountResponse, gt as GetIndexerV2TickersResponse, h as GetIndexerEventsResponse, hn as RevokeSocialAccountParams, ht as GetIndexerV2TickersParams, i as GetIndexerBacklogResponse, in as IndexerV2TickerResponse, it as GetIndexerPrivateAlphaChoiceParams, j as GetIndexerLeaderboardResponse, jt as IndexerFundingRate, k as GetIndexerLeaderboardRegistrationsParams, kt as IndexerEventSpotStateSnapshot, l as GetIndexerEdgeCandlesticksParams, ln as ListIndexerSocialAccountsParams, lt as GetIndexerReferralCodeParams, m as GetIndexerEventsParams, mn as RegisterLeaderboardResponse, mt as GetIndexerV2SymbolsResponse, n as ConnectSocialAccountParams, nn as IndexerV2MarketHours, nt as GetIndexerPointsParams, o as GetIndexerCandlesticksResponse, on as IndexerXPointsAllTime, ot as GetIndexerProductSnapshotsParams, p as GetIndexerEventsLimitType, pn as RegisterLeaderboardParams, pt as GetIndexerV2SymbolsParams, q as GetIndexerMultiSubaccountSnapshotsResponse, qt as IndexerPerpPrices, r as ConnectSocialAccountResponse, rn as IndexerV2Symbol, rt as GetIndexerPointsResponse, s as GetIndexerCashIncentivesParams, sn as IndexerXPointsEpoch, st as GetIndexerProductSnapshotsResponse, t as Candlestick, tn as IndexerSubaccountSnapshot, tt as GetIndexerPerpPricesResponse, u as GetIndexerEdgeCandlesticksResponse, un as ListIndexerSocialAccountsResponse, ut as GetIndexerReferralCodeResponse, v as GetIndexerFundingRateHistoryParams, vt as GetIndexerXPointsResponse, w as GetIndexerLeaderboardContestsParams, wt as IndexerCashIncentivesEventWallet, x as GetIndexerFundingRateResponse, xt as IndexerCashIncentivesEvent, y as GetIndexerFundingRateHistoryResponse, yt as IndexerAllTimePoints, z as GetIndexerMatchEventsResponse, zt as IndexerMakerSnapshot } from "../clientTypes-
|
|
6
|
+
import { $ as IndexerServerMatchEventsResponse, A as IndexerServerFundingRatesResponse, At as IndexerServerSocialAccountsResponse, B as IndexerServerLeaderboardRegistrationsParams, Bt as IndexerServerXPointsEpoch, C as IndexerServerFundingRate, Ct as IndexerServerQueryRequestType, D as IndexerServerFundingRateParams, Dt as IndexerServerReferralCodeResponse, E as IndexerServerFundingRateHistoryResponse, Et as IndexerServerReferralCodeParams, F as IndexerServerLeaderboardParams, Ft as IndexerServerV2Symbol, G as IndexerServerListSocialAccountsParams, H as IndexerServerLeaderboardResponse, Ht as IndexerServerXPointsQuest, I as IndexerServerLeaderboardRankParams, It as IndexerServerV2SymbolsResponse, J as IndexerServerMakerStatisticsParams, K as IndexerServerListSubaccountsParams, L as IndexerServerLeaderboardRankResponse, Lt as IndexerServerV2TickerResponse, M as IndexerServerInterestFundingResponse, Mt as IndexerServerSocialConnectResponse, N as IndexerServerLeaderboardContestsParams, Nt as IndexerServerTriggerTypeFilter, O as IndexerServerFundingRateResponse, Ot as IndexerServerRequestType, P as IndexerServerLeaderboardContestsResponse, Pt as IndexerServerV2MarketHours, Q as IndexerServerMatchEventsParams, R as IndexerServerLeaderboardRegisterParams, Rt as IndexerServerV2TickersResponse, S as IndexerServerFastWithdrawalSignatureResponse, St as IndexerServerQueryRequestByType, T as IndexerServerFundingRateHistoryParams, Tt as IndexerServerQuotePriceResponse, U as IndexerServerLinkedSignerParams, Ut as IndexerServerXPointsResponse, V as IndexerServerLeaderboardRegistrationsResponse, Vt as IndexerServerXPointsParams, W as IndexerServerLinkedSignerResponse, Wt as isIndexerServerFailureResponse, X as IndexerServerMarketSnapshotsParams, Y as IndexerServerMakerStatisticsResponse, Z as IndexerServerMarketSnapshotsResponse, _ as IndexerServerDDAResponse, _t as IndexerServerPriceResponse, a as IndexerServerAllTimePoints, at as IndexerServerNlpSnapshotsResponse, b as IndexerServerFailureResponse, bt as IndexerServerProductsParams, c as IndexerServerCandlesticksResponse, ct as IndexerServerOrdersParams, d as IndexerServerCashIncentivesEventPlatform, dt as IndexerServerPerpPricesParams, et as IndexerServerMultiProductsParams, f as IndexerServerCashIncentivesEventWallet, ft as IndexerServerPerpPricesResponse, g as IndexerServerDDAQueryParams, gt as IndexerServerPriceParams, h as IndexerServerCashIncentivesWalletSummary, ht as IndexerServerPointsResponse, i as IndexerEdgeServerMarketSnapshotsResponse, it as IndexerServerNlpSnapshotsParams, j as IndexerServerInterestFundingParams, jt as IndexerServerSocialConnectParams, k as IndexerServerFundingRatesParams, kt as IndexerServerRevokeSocialAccountParams, l as IndexerServerCashIncentivesEvent, lt as IndexerServerOrdersResponse, m as IndexerServerCashIncentivesResponse, mt as IndexerServerPointsParams, n as IndexerEdgeServerCandlesticksResponse, nt as IndexerServerMultiSubaccountSnapshotsParams, o as IndexerServerBacklogResponse, ot as IndexerServerOraclePricesParams, p as IndexerServerCashIncentivesParams, pt as IndexerServerPointsEpoch, q as IndexerServerListSubaccountsResponse, r as IndexerEdgeServerMarketSnapshotsParams, rt as IndexerServerMultiSubaccountSnapshotsResponse, s as IndexerServerCandlesticksParams, st as IndexerServerOraclePricesResponse, t as IndexerEdgeServerCandlesticksParams, tt as IndexerServerMultiProductsResponse, u as IndexerServerCashIncentivesEventMetadata, ut as IndexerServerPerpPrices, v as IndexerServerEventsParams, vt as IndexerServerPrivateAlphaChoiceParams, w as IndexerServerFundingRateHistoryEntry, wt as IndexerServerQueryResponseByType, x as IndexerServerFastWithdrawalSignatureParams, xt as IndexerServerProductsResponse, y as IndexerServerEventsResponse, yt as IndexerServerPrivateAlphaChoiceResponse, z as IndexerServerLeaderboardRegisterResponse, zt as IndexerServerXPointsAllTime } from "../serverTypes-l4ceojIp.js";
|
|
7
|
+
import { $ as GetIndexerOrdersResponse, $t as IndexerSocialAccountInfo, A as GetIndexerLeaderboardRegistrationsResponse, At as IndexerEventWithTx, B as GetIndexerMultiProductFundingRatesParams, Bt as IndexerMarketSnapshot, C as GetIndexerInterestFundingPaymentsResponse, Ct as IndexerCashIncentivesEventPlatform, D as GetIndexerLeaderboardParticipantParams, Dt as IndexerEventBalanceStateSnapshot, E as GetIndexerLeaderboardParams, Et as IndexerEvent, F as GetIndexerMakerStatisticsResponse, Ft as IndexerLeaderboardParticipant, G as GetIndexerMultiProductSnapshotsResponse, Gt as IndexerOrder, H as GetIndexerMultiProductPerpPricesParams, Ht as IndexerMatchEventBalances, I as GetIndexerMarketSnapshotsParams, It as IndexerLeaderboardRegistration, J as GetIndexerNlpSnapshotsParams, Jt as IndexerPointsEpoch, K as GetIndexerMultiSubaccountSnapshotsParams, Kt as IndexerPerpBalance, L as GetIndexerMarketSnapshotsResponse, Lt as IndexerLeaderboardTrackPosition, M as GetIndexerLinkedSignerParams, Mt as IndexerFundingRateHistoryEntry, N as GetIndexerLinkedSignerResponse, Nt as IndexerLeaderboardContest, O as GetIndexerLeaderboardParticipantResponse, Ot as IndexerEventPerpStateSnapshot, P as GetIndexerMakerStatisticsParams, Pt as IndexerLeaderboardContestTrack, Q as GetIndexerOrdersParams, Qt as IndexerSnapshotsIntervalParams, R as GetIndexerMatchEventsParams, Rt as IndexerMaker, S as GetIndexerInterestFundingPaymentsParams, St as IndexerCashIncentivesEventMetadata, T as GetIndexerLeaderboardContestsResponse, Tt as IndexerCashIncentivesWalletSummary, U as GetIndexerMultiProductPerpPricesResponse, Ut as IndexerNlpSnapshot, V as GetIndexerMultiProductFundingRatesResponse, Vt as IndexerMatchEvent, W as GetIndexerMultiProductSnapshotsParams, Wt as IndexerOraclePrice, X as GetIndexerOraclePricesParams, Xt as IndexerProductSnapshot, Y as GetIndexerNlpSnapshotsResponse, Yt as IndexerProductPayment, Z as GetIndexerOraclePricesResponse, Zt as IndexerSnapshotBalance, _ as GetIndexerFastWithdrawalSignatureResponse, _n as TickerMarketType, _t as GetIndexerXPointsParams, a as GetIndexerCandlesticksParams, an as IndexerV2TradingStatus, at as GetIndexerPrivateAlphaChoiceResponse, b as GetIndexerFundingRateParams, bt as IndexerBalanceTrackedVars, c as GetIndexerCashIncentivesResponse, cn as IndexerXPointsQuest, ct as GetIndexerQuotePriceResponse, d as GetIndexerEdgeMarketSnapshotResponse, dn as ListIndexerSubaccountsParams, dt as GetIndexerSubaccountDDAParams, en as IndexerSpotBalance, et as GetIndexerPerpPricesParams, f as GetIndexerEdgeMarketSnapshotsParams, fn as ListIndexerSubaccountsResponse, ft as GetIndexerSubaccountDDAResponse, g as GetIndexerFastWithdrawalSignatureParams, gn as RevokeSocialAccountResponse, gt as GetIndexerV2TickersResponse, h as GetIndexerEventsResponse, hn as RevokeSocialAccountParams, ht as GetIndexerV2TickersParams, i as GetIndexerBacklogResponse, in as IndexerV2TickerResponse, it as GetIndexerPrivateAlphaChoiceParams, j as GetIndexerLeaderboardResponse, jt as IndexerFundingRate, k as GetIndexerLeaderboardRegistrationsParams, kt as IndexerEventSpotStateSnapshot, l as GetIndexerEdgeCandlesticksParams, ln as ListIndexerSocialAccountsParams, lt as GetIndexerReferralCodeParams, m as GetIndexerEventsParams, mn as RegisterLeaderboardResponse, mt as GetIndexerV2SymbolsResponse, n as ConnectSocialAccountParams, nn as IndexerV2MarketHours, nt as GetIndexerPointsParams, o as GetIndexerCandlesticksResponse, on as IndexerXPointsAllTime, ot as GetIndexerProductSnapshotsParams, p as GetIndexerEventsLimitType, pn as RegisterLeaderboardParams, pt as GetIndexerV2SymbolsParams, q as GetIndexerMultiSubaccountSnapshotsResponse, qt as IndexerPerpPrices, r as ConnectSocialAccountResponse, rn as IndexerV2Symbol, rt as GetIndexerPointsResponse, s as GetIndexerCashIncentivesParams, sn as IndexerXPointsEpoch, st as GetIndexerProductSnapshotsResponse, t as Candlestick, tn as IndexerSubaccountSnapshot, tt as GetIndexerPerpPricesResponse, u as GetIndexerEdgeCandlesticksResponse, un as ListIndexerSocialAccountsResponse, ut as GetIndexerReferralCodeResponse, v as GetIndexerFundingRateHistoryParams, vt as GetIndexerXPointsResponse, w as GetIndexerLeaderboardContestsParams, wt as IndexerCashIncentivesEventWallet, x as GetIndexerFundingRateResponse, xt as IndexerCashIncentivesEvent, y as GetIndexerFundingRateHistoryResponse, yt as IndexerAllTimePoints, z as GetIndexerMatchEventsResponse, zt as IndexerMakerSnapshot } from "../clientTypes-Cke-KLUR.js";
|
|
8
8
|
import { t as CollateralEventType } from "../collateralEventType-s-WbBniE.js";
|
|
9
|
-
import {
|
|
10
|
-
|
|
9
|
+
import { n as IndexerErrorCode, t as INDEXER_ERROR_CODES } from "../indexerErrorCodes-DNHtJXxm.js";
|
|
10
|
+
import { t as IndexerServerFailureError } from "../IndexerServerFailureError-Cp-nQ6BQ.js";
|
|
11
|
+
import { C as IndexerSettlementEvent, S as IndexerPaginationParams, T as WithPaginationMeta, _ as GetIndexerSubaccountSettlementEventsResponse, a as GetIndexerPaginatedOrdersParams, b as IndexerNlpEvent, c as GetIndexerSubaccountCollateralEventsResponse, d as GetIndexerSubaccountLiquidationEventsResponse, f as GetIndexerSubaccountMatchEventParams, g as GetIndexerSubaccountSettlementEventsParams, h as GetIndexerSubaccountNlpEventsResponse, i as GetIndexerPaginatedLeaderboardResponse, l as GetIndexerSubaccountInterestFundingPaymentsParams, m as GetIndexerSubaccountNlpEventsParams, n as GetIndexerPaginatedInterestFundingPaymentsResponse, o as GetIndexerPaginatedOrdersResponse, p as GetIndexerSubaccountMatchEventsResponse, r as GetIndexerPaginatedLeaderboardParams, s as GetIndexerSubaccountCollateralEventsParams, t as BaseIndexerPaginatedEvent, u as GetIndexerSubaccountLiquidationEventsParams, v as IndexerCollateralEvent, w as PaginatedIndexerEventsResponse, x as IndexerPaginationMeta, y as IndexerLiquidationEvent } from "../paginatedEventsTypes-BOUjVtm0.js";
|
|
12
|
+
export { BaseIndexerPaginatedEvent, Candlestick, CandlestickPeriod, CollateralEventType, ConnectSocialAccountParams, ConnectSocialAccountResponse, GetIndexerBacklogResponse, GetIndexerCandlesticksParams, GetIndexerCandlesticksResponse, GetIndexerCashIncentivesParams, GetIndexerCashIncentivesResponse, GetIndexerEdgeCandlesticksParams, GetIndexerEdgeCandlesticksResponse, GetIndexerEdgeMarketSnapshotResponse, GetIndexerEdgeMarketSnapshotsParams, GetIndexerEventsLimitType, GetIndexerEventsParams, GetIndexerEventsResponse, GetIndexerFastWithdrawalSignatureParams, GetIndexerFastWithdrawalSignatureResponse, GetIndexerFundingRateHistoryParams, GetIndexerFundingRateHistoryResponse, GetIndexerFundingRateParams, GetIndexerFundingRateResponse, GetIndexerInterestFundingPaymentsParams, GetIndexerInterestFundingPaymentsResponse, GetIndexerLeaderboardContestsParams, GetIndexerLeaderboardContestsResponse, GetIndexerLeaderboardParams, GetIndexerLeaderboardParticipantParams, GetIndexerLeaderboardParticipantResponse, GetIndexerLeaderboardRegistrationsParams, GetIndexerLeaderboardRegistrationsResponse, GetIndexerLeaderboardResponse, GetIndexerLinkedSignerParams, GetIndexerLinkedSignerResponse, GetIndexerMakerStatisticsParams, GetIndexerMakerStatisticsResponse, GetIndexerMarketSnapshotsParams, GetIndexerMarketSnapshotsResponse, GetIndexerMatchEventsParams, GetIndexerMatchEventsResponse, GetIndexerMultiProductFundingRatesParams, GetIndexerMultiProductFundingRatesResponse, GetIndexerMultiProductPerpPricesParams, GetIndexerMultiProductPerpPricesResponse, GetIndexerMultiProductSnapshotsParams, GetIndexerMultiProductSnapshotsResponse, GetIndexerMultiSubaccountSnapshotsParams, GetIndexerMultiSubaccountSnapshotsResponse, GetIndexerNlpSnapshotsParams, GetIndexerNlpSnapshotsResponse, GetIndexerOraclePricesParams, GetIndexerOraclePricesResponse, GetIndexerOrdersParams, GetIndexerOrdersResponse, GetIndexerPaginatedInterestFundingPaymentsResponse, GetIndexerPaginatedLeaderboardParams, GetIndexerPaginatedLeaderboardResponse, GetIndexerPaginatedOrdersParams, GetIndexerPaginatedOrdersResponse, GetIndexerPerpPricesParams, GetIndexerPerpPricesResponse, GetIndexerPointsParams, GetIndexerPointsResponse, GetIndexerPrivateAlphaChoiceParams, GetIndexerPrivateAlphaChoiceResponse, GetIndexerProductSnapshotsParams, GetIndexerProductSnapshotsResponse, GetIndexerQuotePriceResponse, GetIndexerReferralCodeParams, GetIndexerReferralCodeResponse, GetIndexerSubaccountCollateralEventsParams, GetIndexerSubaccountCollateralEventsResponse, GetIndexerSubaccountDDAParams, GetIndexerSubaccountDDAResponse, GetIndexerSubaccountInterestFundingPaymentsParams, GetIndexerSubaccountLiquidationEventsParams, GetIndexerSubaccountLiquidationEventsResponse, GetIndexerSubaccountMatchEventParams, GetIndexerSubaccountMatchEventsResponse, GetIndexerSubaccountNlpEventsParams, GetIndexerSubaccountNlpEventsResponse, GetIndexerSubaccountSettlementEventsParams, GetIndexerSubaccountSettlementEventsResponse, GetIndexerV2SymbolsParams, GetIndexerV2SymbolsResponse, GetIndexerV2TickersParams, GetIndexerV2TickersResponse, GetIndexerXPointsParams, GetIndexerXPointsResponse, INDEXER_ERROR_CODES, IndexerAllTimePoints, IndexerBalanceTrackedVars, IndexerCashIncentivesEvent, IndexerCashIncentivesEventMetadata, IndexerCashIncentivesEventPlatform, IndexerCashIncentivesEventWallet, IndexerCashIncentivesWalletSummary, IndexerCollateralEvent, IndexerEdgeServerCandlesticksParams, IndexerEdgeServerCandlesticksResponse, IndexerEdgeServerMarketSnapshotsParams, IndexerEdgeServerMarketSnapshotsResponse, IndexerErrorCode, IndexerEvent, IndexerEventBalanceStateSnapshot, IndexerEventPerpStateSnapshot, IndexerEventSpotStateSnapshot, IndexerEventType, IndexerEventWithTx, IndexerFundingRate, IndexerFundingRateHistoryEntry, IndexerLeaderboardContest, IndexerLeaderboardContestTrack, IndexerLeaderboardParticipant, IndexerLeaderboardRankType, IndexerLeaderboardRegistration, IndexerLeaderboardTrackPosition, IndexerLiquidationEvent, IndexerMaker, IndexerMakerSnapshot, IndexerMarketSnapshot, IndexerMatchEvent, IndexerMatchEventBalances, IndexerNlpEvent, IndexerNlpSnapshot, IndexerOraclePrice, IndexerOrder, IndexerPaginationMeta, IndexerPaginationParams, IndexerPerpBalance, IndexerPerpPrices, IndexerPointsEpoch, IndexerProductPayment, IndexerProductSnapshot, IndexerServerAllTimePoints, IndexerServerBacklogResponse, IndexerServerBalance, IndexerServerCandlestick, IndexerServerCandlesticksParams, IndexerServerCandlesticksResponse, IndexerServerCashIncentivesEvent, IndexerServerCashIncentivesEventMetadata, IndexerServerCashIncentivesEventPlatform, IndexerServerCashIncentivesEventWallet, IndexerServerCashIncentivesParams, IndexerServerCashIncentivesResponse, IndexerServerCashIncentivesWalletSummary, IndexerServerDDAQueryParams, IndexerServerDDAResponse, IndexerServerEvent, IndexerServerEventsParams, IndexerServerEventsResponse, IndexerServerFailureError, IndexerServerFailureResponse, IndexerServerFastWithdrawalSignatureParams, IndexerServerFastWithdrawalSignatureResponse, IndexerServerFundingRate, IndexerServerFundingRateHistoryEntry, IndexerServerFundingRateHistoryParams, IndexerServerFundingRateHistoryResponse, IndexerServerFundingRateParams, IndexerServerFundingRateResponse, IndexerServerFundingRatesParams, IndexerServerFundingRatesResponse, IndexerServerInterestFundingParams, IndexerServerInterestFundingResponse, IndexerServerLeaderboardContest, IndexerServerLeaderboardContestTrack, IndexerServerLeaderboardContestsParams, IndexerServerLeaderboardContestsResponse, IndexerServerLeaderboardParams, IndexerServerLeaderboardPosition, IndexerServerLeaderboardRankParams, IndexerServerLeaderboardRankResponse, IndexerServerLeaderboardRegisterParams, IndexerServerLeaderboardRegisterResponse, IndexerServerLeaderboardRegistration, IndexerServerLeaderboardRegistrationsParams, IndexerServerLeaderboardRegistrationsResponse, IndexerServerLeaderboardResponse, IndexerServerLeaderboardTrackPosition, IndexerServerLinkedSignerParams, IndexerServerLinkedSignerResponse, IndexerServerListSocialAccountsParams, IndexerServerListSubaccountsParams, IndexerServerListSubaccountsResponse, IndexerServerMaker, IndexerServerMakerData, IndexerServerMakerStatisticsParams, IndexerServerMakerStatisticsResponse, IndexerServerMarketSnapshot, IndexerServerMarketSnapshotInterval, IndexerServerMarketSnapshotsParams, IndexerServerMarketSnapshotsResponse, IndexerServerMatchEvent, IndexerServerMatchEventBalances, IndexerServerMatchEventsParams, IndexerServerMatchEventsResponse, IndexerServerMultiProductsParams, IndexerServerMultiProductsResponse, IndexerServerMultiSubaccountSnapshotsParams, IndexerServerMultiSubaccountSnapshotsResponse, IndexerServerNlpSnapshot, IndexerServerNlpSnapshotsParams, IndexerServerNlpSnapshotsResponse, IndexerServerOraclePrice, IndexerServerOraclePricesParams, IndexerServerOraclePricesResponse, IndexerServerOrder, IndexerServerOrdersParams, IndexerServerOrdersResponse, IndexerServerPerpPrices, IndexerServerPerpPricesParams, IndexerServerPerpPricesResponse, IndexerServerPointsEpoch, IndexerServerPointsParams, IndexerServerPointsResponse, IndexerServerPriceParams, IndexerServerPriceResponse, IndexerServerPrivateAlphaChoiceParams, IndexerServerPrivateAlphaChoiceResponse, IndexerServerProduct, IndexerServerProductPayment, IndexerServerProductSnapshot, IndexerServerProductsParams, IndexerServerProductsResponse, IndexerServerQueryRequestByType, IndexerServerQueryRequestType, IndexerServerQueryResponseByType, IndexerServerQuotePriceResponse, IndexerServerReferralCodeParams, IndexerServerReferralCodeResponse, IndexerServerRequestType, IndexerServerRevokeSocialAccountParams, IndexerServerSnapshotsInterval, IndexerServerSocialAccount, IndexerServerSocialAccountsResponse, IndexerServerSocialConnectParams, IndexerServerSocialConnectResponse, IndexerServerTriggerTypeFilter, IndexerServerTx, IndexerServerV2MarketHours, IndexerServerV2Symbol, IndexerServerV2SymbolsResponse, IndexerServerV2TickerResponse, IndexerServerV2TickersResponse, IndexerServerXPointsAllTime, IndexerServerXPointsEpoch, IndexerServerXPointsParams, IndexerServerXPointsQuest, IndexerServerXPointsResponse, IndexerSettlementEvent, IndexerSnapshotBalance, IndexerSnapshotsIntervalParams, IndexerSocialAccountInfo, IndexerSpotBalance, IndexerSubaccountSnapshot, IndexerV2MarketHours, IndexerV2Symbol, IndexerV2TickerResponse, IndexerV2TradingStatus, IndexerXPointsAllTime, IndexerXPointsEpoch, IndexerXPointsQuest, ListIndexerSocialAccountsParams, ListIndexerSocialAccountsResponse, ListIndexerSubaccountsParams, ListIndexerSubaccountsResponse, NadoDepositCollateralTx, NadoLiquidateSubaccountTx, NadoMatchOrdersRfqTx, NadoMatchOrdersTx, NadoTransferQuoteTx, NadoTx, NadoWithdrawCollateralTx, NadoWithdrawCollateralV2Tx, PaginatedIndexerEventsResponse, RegisterLeaderboardParams, RegisterLeaderboardResponse, RevokeSocialAccountParams, RevokeSocialAccountResponse, TickerMarketType, WithPaginationMeta, isIndexerServerFailureResponse };
|
package/dist/types/index.js
CHANGED
|
@@ -1,2 +1,5 @@
|
|
|
1
1
|
import { CandlestickPeriod } from "./CandlestickPeriod.js";
|
|
2
|
-
|
|
2
|
+
import { INDEXER_ERROR_CODES } from "./indexerErrorCodes.js";
|
|
3
|
+
import { IndexerServerFailureError } from "./IndexerServerFailureError.js";
|
|
4
|
+
import { isIndexerServerFailureResponse } from "./serverTypes.js";
|
|
5
|
+
export { CandlestickPeriod, INDEXER_ERROR_CODES, IndexerServerFailureError, isIndexerServerFailureResponse };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
require("../IndexerBaseClient-BesuTUAd.cjs");
|
|
3
|
+
//#region src/types/indexerErrorCodes.ts
|
|
4
|
+
/**
|
|
5
|
+
* Numeric error codes returned by the indexer service API. Codes shared across all Nado backend
|
|
6
|
+
* services (see {@link NADO_ERROR_CODES}) are inlined via spread; indexer-specific codes are in
|
|
7
|
+
* the 3xxx range and come from the backend's `ResponseError` enum (see `nado-utils/src/error.rs`).
|
|
8
|
+
*
|
|
9
|
+
* The indexer failure envelope is returned on the v1 query routes (see
|
|
10
|
+
* {@link IndexerServerFailureResponse}); the v2 routes return REST-style HTTP errors without an
|
|
11
|
+
* `error_code` field.
|
|
12
|
+
*/
|
|
13
|
+
const INDEXER_ERROR_CODES = {
|
|
14
|
+
...require("@nadohq/shared").NADO_ERROR_CODES,
|
|
15
|
+
/** digests cannot be combined with subaccount/product_ids filters. */
|
|
16
|
+
DIGESTS_NOT_ALLOWED: 3e3,
|
|
17
|
+
/** Too many digests provided for the given limit. */
|
|
18
|
+
DIGESTS_EXCEED_LIMIT: 3001,
|
|
19
|
+
/** subaccount parameter is required for this query. */
|
|
20
|
+
MISSING_SUBACCOUNT: 3002,
|
|
21
|
+
/** Invalid max_timestamp / granularity / count interval. */
|
|
22
|
+
INVALID_INTERVAL: 3003,
|
|
23
|
+
/** Withdrawal transaction not found at the given index. */
|
|
24
|
+
INVALID_WITHDRAWAL_IDX: 3004,
|
|
25
|
+
/** Not enough fast-withdrawal signatures for the transaction. */
|
|
26
|
+
NOT_ENOUGH_FAST_WITHDRAWAL_SIGNATURES: 3005,
|
|
27
|
+
/** subaccounts parameter is required for this query. */
|
|
28
|
+
MISSING_SUBACCOUNTS: 3006,
|
|
29
|
+
/** Too many subaccounts provided. */
|
|
30
|
+
SUBACCOUNTS_LIMIT_EXCEEDED: 3007
|
|
31
|
+
};
|
|
32
|
+
//#endregion
|
|
33
|
+
exports.INDEXER_ERROR_CODES = INDEXER_ERROR_CODES;
|
|
34
|
+
|
|
35
|
+
//# sourceMappingURL=indexerErrorCodes.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"indexerErrorCodes.cjs","names":["NADO_ERROR_CODES"],"sources":["../../src/types/indexerErrorCodes.ts"],"sourcesContent":["import { NADO_ERROR_CODES } from '@nadohq/shared';\n\n/**\n * Numeric error codes returned by the indexer service API. Codes shared across all Nado backend\n * services (see {@link NADO_ERROR_CODES}) are inlined via spread; indexer-specific codes are in\n * the 3xxx range and come from the backend's `ResponseError` enum (see `nado-utils/src/error.rs`).\n *\n * The indexer failure envelope is returned on the v1 query routes (see\n * {@link IndexerServerFailureResponse}); the v2 routes return REST-style HTTP errors without an\n * `error_code` field.\n */\nexport const INDEXER_ERROR_CODES = {\n ...NADO_ERROR_CODES,\n\n // *** Indexer errors (3xxx) ***\n /** digests cannot be combined with subaccount/product_ids filters. */\n DIGESTS_NOT_ALLOWED: 3000,\n /** Too many digests provided for the given limit. */\n DIGESTS_EXCEED_LIMIT: 3001,\n /** subaccount parameter is required for this query. */\n MISSING_SUBACCOUNT: 3002,\n /** Invalid max_timestamp / granularity / count interval. */\n INVALID_INTERVAL: 3003,\n /** Withdrawal transaction not found at the given index. */\n INVALID_WITHDRAWAL_IDX: 3004,\n /** Not enough fast-withdrawal signatures for the transaction. */\n NOT_ENOUGH_FAST_WITHDRAWAL_SIGNATURES: 3005,\n /** subaccounts parameter is required for this query. */\n MISSING_SUBACCOUNTS: 3006,\n /** Too many subaccounts provided. */\n SUBACCOUNTS_LIMIT_EXCEEDED: 3007,\n} as const;\n\n/**\n * Union of all known indexer service API error codes.\n */\nexport type IndexerErrorCode =\n (typeof INDEXER_ERROR_CODES)[keyof typeof INDEXER_ERROR_CODES];\n"],"mappings":";;;;;;;;;;;;AAWA,MAAa,sBAAsB;CACjC,2BAAGA,EAAAA;;CAIH,qBAAqB;;CAErB,sBAAsB;;CAEtB,oBAAoB;;CAEpB,kBAAkB;;CAElB,wBAAwB;;CAExB,uCAAuC;;CAEvC,qBAAqB;;CAErB,4BAA4B;AAC9B"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { NADO_ERROR_CODES } from "@nadohq/shared";
|
|
2
|
+
//#region src/types/indexerErrorCodes.ts
|
|
3
|
+
/**
|
|
4
|
+
* Numeric error codes returned by the indexer service API. Codes shared across all Nado backend
|
|
5
|
+
* services (see {@link NADO_ERROR_CODES}) are inlined via spread; indexer-specific codes are in
|
|
6
|
+
* the 3xxx range and come from the backend's `ResponseError` enum (see `nado-utils/src/error.rs`).
|
|
7
|
+
*
|
|
8
|
+
* The indexer failure envelope is returned on the v1 query routes (see
|
|
9
|
+
* {@link IndexerServerFailureResponse}); the v2 routes return REST-style HTTP errors without an
|
|
10
|
+
* `error_code` field.
|
|
11
|
+
*/
|
|
12
|
+
const INDEXER_ERROR_CODES = {
|
|
13
|
+
...NADO_ERROR_CODES,
|
|
14
|
+
/** digests cannot be combined with subaccount/product_ids filters. */
|
|
15
|
+
DIGESTS_NOT_ALLOWED: 3e3,
|
|
16
|
+
/** Too many digests provided for the given limit. */
|
|
17
|
+
DIGESTS_EXCEED_LIMIT: 3001,
|
|
18
|
+
/** subaccount parameter is required for this query. */
|
|
19
|
+
MISSING_SUBACCOUNT: 3002,
|
|
20
|
+
/** Invalid max_timestamp / granularity / count interval. */
|
|
21
|
+
INVALID_INTERVAL: 3003,
|
|
22
|
+
/** Withdrawal transaction not found at the given index. */
|
|
23
|
+
INVALID_WITHDRAWAL_IDX: 3004,
|
|
24
|
+
/** Not enough fast-withdrawal signatures for the transaction. */
|
|
25
|
+
NOT_ENOUGH_FAST_WITHDRAWAL_SIGNATURES: 3005,
|
|
26
|
+
/** subaccounts parameter is required for this query. */
|
|
27
|
+
MISSING_SUBACCOUNTS: 3006,
|
|
28
|
+
/** Too many subaccounts provided. */
|
|
29
|
+
SUBACCOUNTS_LIMIT_EXCEEDED: 3007
|
|
30
|
+
};
|
|
31
|
+
//#endregion
|
|
32
|
+
export { INDEXER_ERROR_CODES };
|
|
33
|
+
|
|
34
|
+
//# sourceMappingURL=indexerErrorCodes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"indexerErrorCodes.js","names":[],"sources":["../../src/types/indexerErrorCodes.ts"],"sourcesContent":["import { NADO_ERROR_CODES } from '@nadohq/shared';\n\n/**\n * Numeric error codes returned by the indexer service API. Codes shared across all Nado backend\n * services (see {@link NADO_ERROR_CODES}) are inlined via spread; indexer-specific codes are in\n * the 3xxx range and come from the backend's `ResponseError` enum (see `nado-utils/src/error.rs`).\n *\n * The indexer failure envelope is returned on the v1 query routes (see\n * {@link IndexerServerFailureResponse}); the v2 routes return REST-style HTTP errors without an\n * `error_code` field.\n */\nexport const INDEXER_ERROR_CODES = {\n ...NADO_ERROR_CODES,\n\n // *** Indexer errors (3xxx) ***\n /** digests cannot be combined with subaccount/product_ids filters. */\n DIGESTS_NOT_ALLOWED: 3000,\n /** Too many digests provided for the given limit. */\n DIGESTS_EXCEED_LIMIT: 3001,\n /** subaccount parameter is required for this query. */\n MISSING_SUBACCOUNT: 3002,\n /** Invalid max_timestamp / granularity / count interval. */\n INVALID_INTERVAL: 3003,\n /** Withdrawal transaction not found at the given index. */\n INVALID_WITHDRAWAL_IDX: 3004,\n /** Not enough fast-withdrawal signatures for the transaction. */\n NOT_ENOUGH_FAST_WITHDRAWAL_SIGNATURES: 3005,\n /** subaccounts parameter is required for this query. */\n MISSING_SUBACCOUNTS: 3006,\n /** Too many subaccounts provided. */\n SUBACCOUNTS_LIMIT_EXCEEDED: 3007,\n} as const;\n\n/**\n * Union of all known indexer service API error codes.\n */\nexport type IndexerErrorCode =\n (typeof INDEXER_ERROR_CODES)[keyof typeof INDEXER_ERROR_CODES];\n"],"mappings":";;;;;;;;;;;AAWA,MAAa,sBAAsB;CACjC,GAAG;;CAIH,qBAAqB;;CAErB,sBAAsB;;CAEtB,oBAAoB;;CAEpB,kBAAkB;;CAElB,wBAAwB;;CAExB,uCAAuC;;CAEvC,qBAAqB;;CAErB,4BAA4B;AAC9B"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { C as IndexerSettlementEvent, S as IndexerPaginationParams, T as WithPaginationMeta, _ as GetIndexerSubaccountSettlementEventsResponse, a as GetIndexerPaginatedOrdersParams, b as IndexerNlpEvent, c as GetIndexerSubaccountCollateralEventsResponse, d as GetIndexerSubaccountLiquidationEventsResponse, f as GetIndexerSubaccountMatchEventParams, g as GetIndexerSubaccountSettlementEventsParams, h as GetIndexerSubaccountNlpEventsResponse, i as GetIndexerPaginatedLeaderboardResponse, l as GetIndexerSubaccountInterestFundingPaymentsParams, m as GetIndexerSubaccountNlpEventsParams, n as GetIndexerPaginatedInterestFundingPaymentsResponse, o as GetIndexerPaginatedOrdersResponse, p as GetIndexerSubaccountMatchEventsResponse, r as GetIndexerPaginatedLeaderboardParams, s as GetIndexerSubaccountCollateralEventsParams, t as BaseIndexerPaginatedEvent, u as GetIndexerSubaccountLiquidationEventsParams, v as IndexerCollateralEvent, w as PaginatedIndexerEventsResponse, x as IndexerPaginationMeta, y as IndexerLiquidationEvent } from "../paginatedEventsTypes-
|
|
1
|
+
import { C as IndexerSettlementEvent, S as IndexerPaginationParams, T as WithPaginationMeta, _ as GetIndexerSubaccountSettlementEventsResponse, a as GetIndexerPaginatedOrdersParams, b as IndexerNlpEvent, c as GetIndexerSubaccountCollateralEventsResponse, d as GetIndexerSubaccountLiquidationEventsResponse, f as GetIndexerSubaccountMatchEventParams, g as GetIndexerSubaccountSettlementEventsParams, h as GetIndexerSubaccountNlpEventsResponse, i as GetIndexerPaginatedLeaderboardResponse, l as GetIndexerSubaccountInterestFundingPaymentsParams, m as GetIndexerSubaccountNlpEventsParams, n as GetIndexerPaginatedInterestFundingPaymentsResponse, o as GetIndexerPaginatedOrdersResponse, p as GetIndexerSubaccountMatchEventsResponse, r as GetIndexerPaginatedLeaderboardParams, s as GetIndexerSubaccountCollateralEventsParams, t as BaseIndexerPaginatedEvent, u as GetIndexerSubaccountLiquidationEventsParams, v as IndexerCollateralEvent, w as PaginatedIndexerEventsResponse, x as IndexerPaginationMeta, y as IndexerLiquidationEvent } from "../paginatedEventsTypes-BeMZ3Cac.cjs";
|
|
2
2
|
export { BaseIndexerPaginatedEvent, GetIndexerPaginatedInterestFundingPaymentsResponse, GetIndexerPaginatedLeaderboardParams, GetIndexerPaginatedLeaderboardResponse, GetIndexerPaginatedOrdersParams, GetIndexerPaginatedOrdersResponse, GetIndexerSubaccountCollateralEventsParams, GetIndexerSubaccountCollateralEventsResponse, GetIndexerSubaccountInterestFundingPaymentsParams, GetIndexerSubaccountLiquidationEventsParams, GetIndexerSubaccountLiquidationEventsResponse, GetIndexerSubaccountMatchEventParams, GetIndexerSubaccountMatchEventsResponse, GetIndexerSubaccountNlpEventsParams, GetIndexerSubaccountNlpEventsResponse, GetIndexerSubaccountSettlementEventsParams, GetIndexerSubaccountSettlementEventsResponse, IndexerCollateralEvent, IndexerLiquidationEvent, IndexerNlpEvent, IndexerPaginationMeta, IndexerPaginationParams, IndexerSettlementEvent, PaginatedIndexerEventsResponse, WithPaginationMeta };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { C as IndexerSettlementEvent, S as IndexerPaginationParams, T as WithPaginationMeta, _ as GetIndexerSubaccountSettlementEventsResponse, a as GetIndexerPaginatedOrdersParams, b as IndexerNlpEvent, c as GetIndexerSubaccountCollateralEventsResponse, d as GetIndexerSubaccountLiquidationEventsResponse, f as GetIndexerSubaccountMatchEventParams, g as GetIndexerSubaccountSettlementEventsParams, h as GetIndexerSubaccountNlpEventsResponse, i as GetIndexerPaginatedLeaderboardResponse, l as GetIndexerSubaccountInterestFundingPaymentsParams, m as GetIndexerSubaccountNlpEventsParams, n as GetIndexerPaginatedInterestFundingPaymentsResponse, o as GetIndexerPaginatedOrdersResponse, p as GetIndexerSubaccountMatchEventsResponse, r as GetIndexerPaginatedLeaderboardParams, s as GetIndexerSubaccountCollateralEventsParams, t as BaseIndexerPaginatedEvent, u as GetIndexerSubaccountLiquidationEventsParams, v as IndexerCollateralEvent, w as PaginatedIndexerEventsResponse, x as IndexerPaginationMeta, y as IndexerLiquidationEvent } from "../paginatedEventsTypes-
|
|
1
|
+
import { C as IndexerSettlementEvent, S as IndexerPaginationParams, T as WithPaginationMeta, _ as GetIndexerSubaccountSettlementEventsResponse, a as GetIndexerPaginatedOrdersParams, b as IndexerNlpEvent, c as GetIndexerSubaccountCollateralEventsResponse, d as GetIndexerSubaccountLiquidationEventsResponse, f as GetIndexerSubaccountMatchEventParams, g as GetIndexerSubaccountSettlementEventsParams, h as GetIndexerSubaccountNlpEventsResponse, i as GetIndexerPaginatedLeaderboardResponse, l as GetIndexerSubaccountInterestFundingPaymentsParams, m as GetIndexerSubaccountNlpEventsParams, n as GetIndexerPaginatedInterestFundingPaymentsResponse, o as GetIndexerPaginatedOrdersResponse, p as GetIndexerSubaccountMatchEventsResponse, r as GetIndexerPaginatedLeaderboardParams, s as GetIndexerSubaccountCollateralEventsParams, t as BaseIndexerPaginatedEvent, u as GetIndexerSubaccountLiquidationEventsParams, v as IndexerCollateralEvent, w as PaginatedIndexerEventsResponse, x as IndexerPaginationMeta, y as IndexerLiquidationEvent } from "../paginatedEventsTypes-BOUjVtm0.js";
|
|
2
2
|
export { BaseIndexerPaginatedEvent, GetIndexerPaginatedInterestFundingPaymentsResponse, GetIndexerPaginatedLeaderboardParams, GetIndexerPaginatedLeaderboardResponse, GetIndexerPaginatedOrdersParams, GetIndexerPaginatedOrdersResponse, GetIndexerSubaccountCollateralEventsParams, GetIndexerSubaccountCollateralEventsResponse, GetIndexerSubaccountInterestFundingPaymentsParams, GetIndexerSubaccountLiquidationEventsParams, GetIndexerSubaccountLiquidationEventsResponse, GetIndexerSubaccountMatchEventParams, GetIndexerSubaccountMatchEventsResponse, GetIndexerSubaccountNlpEventsParams, GetIndexerSubaccountNlpEventsResponse, GetIndexerSubaccountSettlementEventsParams, GetIndexerSubaccountSettlementEventsResponse, IndexerCollateralEvent, IndexerLiquidationEvent, IndexerNlpEvent, IndexerPaginationMeta, IndexerPaginationParams, IndexerSettlementEvent, PaginatedIndexerEventsResponse, WithPaginationMeta };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
//#region src/types/serverTypes.ts
|
|
3
|
+
/**
|
|
4
|
+
* Narrows an unknown response body to the indexer service API failure envelope.
|
|
5
|
+
*/
|
|
6
|
+
function isIndexerServerFailureResponse(data) {
|
|
7
|
+
return typeof data === "object" && data !== null && data.status === "failure";
|
|
8
|
+
}
|
|
9
|
+
//#endregion
|
|
10
|
+
exports.isIndexerServerFailureResponse = isIndexerServerFailureResponse;
|
|
11
|
+
|
|
12
|
+
//# sourceMappingURL=serverTypes.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"serverTypes.cjs","names":[],"sources":["../../src/types/serverTypes.ts"],"sourcesContent":["import {\n EIP712LeaderboardAuthenticationValues,\n EIP712SocialAuthenticationValues,\n SignedTx,\n} from '@nadohq/shared';\nimport { IndexerEventType } from './IndexerEventType';\nimport { IndexerLeaderboardRankType } from './IndexerLeaderboardType';\nimport { NadoWithdrawCollateralTx, NadoWithdrawCollateralV2Tx } from './NadoTx';\nimport {\n IndexerServerCandlestick,\n IndexerServerEvent,\n IndexerServerLeaderboardContest,\n IndexerServerLeaderboardPosition,\n IndexerServerLeaderboardRegistration,\n IndexerServerMaker,\n IndexerServerMarketSnapshot,\n IndexerServerMarketSnapshotInterval,\n IndexerServerMatchEvent,\n IndexerServerNlpSnapshot,\n IndexerServerOraclePrice,\n IndexerServerOrder,\n IndexerServerProductPayment,\n IndexerServerProductSnapshot,\n IndexerServerSnapshotsInterval,\n IndexerServerSocialAccount,\n IndexerServerTx,\n} from './serverModelTypes';\n\n/**\n * Params\n */\n\nexport interface IndexerServerListSubaccountsParams {\n // Inclusive, defaults to 0\n start?: number;\n // Defaults to 100\n limit?: number;\n address?: string;\n}\n\nexport interface IndexerServerMultiSubaccountSnapshotsParams {\n // Subaccount hex identifiers\n subaccounts: string[];\n timestamps: number[];\n // If not given, will return both isolated & non-iso balances\n isolated?: boolean;\n}\n\nexport interface IndexerServerReferralCodeParams {\n subaccount: string;\n}\n\nexport interface IndexerServerFundingRateParams {\n product_id: number;\n}\n\nexport interface IndexerServerFundingRatesParams {\n product_ids: number[];\n}\n\nexport interface IndexerServerFundingRateHistoryParams {\n product_id: number;\n start_time?: number | string;\n end_time?: number | string;\n // Max number of rates to return. Defaults to 100, max 1000.\n limit?: number;\n}\n\nexport interface IndexerServerPriceParams {\n product_id: number;\n}\n\nexport interface IndexerServerPerpPricesParams {\n product_ids: number[];\n}\n\nexport interface IndexerServerOraclePricesParams {\n product_ids: number[];\n}\n\nexport interface IndexerServerCandlesticksParams {\n product_id: number;\n granularity: number;\n // Seconds\n max_time?: number;\n limit: number;\n}\n\nexport type IndexerEdgeServerCandlesticksParams =\n IndexerServerCandlesticksParams;\n\nexport interface IndexerServerProductsParams {\n product_id: number;\n max_time?: number;\n limit: number;\n // submission_idx for pagination, inclusive\n idx?: string;\n}\n\nexport interface IndexerServerMultiProductsParams {\n product_ids: number[];\n max_time: number[];\n}\n\nexport interface IndexerServerEventsParams {\n subaccounts?: string[];\n product_ids?: number[];\n // If not given, will return both isolated & non-iso events\n isolated?: boolean;\n event_types?: IndexerEventType[];\n // Descending order for idx (time), defaults to true\n desc?: boolean;\n // submission_idx for pagination, inclusive\n idx?: string;\n max_time?: number;\n limit?:\n | {\n raw: number;\n }\n | {\n txs: number;\n };\n}\n\nexport type IndexerServerTriggerTypeFilter =\n | 'none'\n | 'price_trigger'\n | 'time_trigger';\n\nexport interface IndexerServerOrdersParams {\n subaccounts?: string[];\n product_ids?: number[];\n trigger_types?: IndexerServerTriggerTypeFilter[];\n digests?: string[];\n max_time?: number;\n limit?: number;\n // If not given, will return both isolated & non-iso orders\n isolated?: boolean;\n // submission_idx for pagination, inclusive\n idx?: string;\n}\n\nexport interface IndexerServerMatchEventsParams {\n subaccounts?: string[];\n product_ids?: number[];\n // If not given, will return both isolated & non-iso events\n isolated?: boolean;\n max_time?: number;\n limit: number;\n // submission_idx for pagination, inclusive\n idx?: string;\n}\n\nexport interface IndexerServerLinkedSignerParams {\n subaccount: string;\n}\n\nexport interface IndexerServerMarketSnapshotsParams {\n interval: IndexerServerMarketSnapshotInterval;\n // Defaults to all\n product_ids?: number[];\n}\n\nexport interface IndexerEdgeServerMarketSnapshotsParams {\n interval: IndexerServerMarketSnapshotInterval;\n}\n\nexport interface IndexerServerInterestFundingParams {\n subaccount: string;\n product_ids: number[];\n // If not given, defaults to latest\n max_idx?: string;\n max_time?: number;\n limit: number;\n}\n\nexport interface IndexerServerMakerStatisticsParams {\n product_id: number;\n epoch: number;\n interval: number;\n}\n\nexport interface IndexerServerLeaderboardParams {\n contest_id: number;\n rank_type?: IndexerLeaderboardRankType;\n start?: number | string;\n limit?: number | string;\n order?: 'ASC' | 'DESC';\n}\n\nexport interface IndexerServerLeaderboardRankParams {\n subaccount: string;\n contest_ids: number[];\n}\n\nexport interface IndexerServerLeaderboardContestsParams {\n contest_ids?: number[];\n active?: boolean;\n}\n\nexport interface IndexerServerLeaderboardRegistrationsParams {\n subaccount: string;\n contest_ids?: number[];\n active?: boolean;\n}\n\nexport interface IndexerServerLeaderboardRegisterParams {\n update_registration: SignedTx<EIP712LeaderboardAuthenticationValues>;\n}\n\nexport interface IndexerServerSocialConnectParams {\n update_social_account: SignedTx<EIP712SocialAuthenticationValues>;\n}\n\nexport interface IndexerServerListSocialAccountsParams {\n address: string;\n}\n\nexport type IndexerServerRevokeSocialAccountParams =\n IndexerServerSocialConnectParams;\n\nexport interface IndexerServerFastWithdrawalSignatureParams {\n /**\n * The submission index of the WithdrawCollateral tx to be used for fast withdraw.\n */\n idx: number | string;\n}\n\nexport interface IndexerServerNlpSnapshotsParams {\n interval: IndexerServerSnapshotsInterval;\n}\n\nexport interface IndexerServerDDAQueryParams {\n subaccount: string;\n}\n\nexport interface IndexerServerPrivateAlphaChoiceParams {\n address: string;\n}\n\nexport interface IndexerServerPointsParams {\n address: string;\n}\n\nexport interface IndexerServerXPointsParams {\n address: string;\n}\n\nexport interface IndexerServerCashIncentivesParams {\n wallet_address: string;\n}\n\n// Request\nexport interface IndexerServerQueryRequestByType {\n account_snapshots: IndexerServerMultiSubaccountSnapshotsParams;\n backlog: Record<string, never>;\n candlesticks: IndexerServerCandlesticksParams;\n direct_deposit_address: IndexerServerDDAQueryParams;\n edge_candlesticks: IndexerEdgeServerCandlesticksParams;\n edge_market_snapshots: IndexerEdgeServerMarketSnapshotsParams;\n events: IndexerServerEventsParams;\n fast_withdrawal_signature: IndexerServerFastWithdrawalSignatureParams;\n funding_rate: IndexerServerFundingRateParams;\n funding_rate_history: IndexerServerFundingRateHistoryParams;\n funding_rates: IndexerServerFundingRatesParams;\n interest_and_funding: IndexerServerInterestFundingParams;\n leaderboard: IndexerServerLeaderboardParams;\n leaderboard_contests: IndexerServerLeaderboardContestsParams;\n leaderboard_rank: IndexerServerLeaderboardRankParams;\n leaderboard_register: IndexerServerLeaderboardRegisterParams;\n leaderboard_registrations: IndexerServerLeaderboardRegistrationsParams;\n linked_signer_rate_limit: IndexerServerLinkedSignerParams;\n maker_statistics: IndexerServerMakerStatisticsParams;\n market_snapshots: IndexerServerMarketSnapshotsParams;\n matches: IndexerServerMatchEventsParams;\n oracle_price: IndexerServerOraclePricesParams;\n orders: IndexerServerOrdersParams;\n perp_prices: IndexerServerPerpPricesParams;\n price: IndexerServerPriceParams;\n product_snapshots: IndexerServerMultiProductsParams;\n products: IndexerServerProductsParams;\n referral_code: IndexerServerReferralCodeParams;\n subaccounts: IndexerServerListSubaccountsParams;\n quote_price: Record<string, never>;\n nlp_snapshots: IndexerServerNlpSnapshotsParams;\n private_alpha_choice: IndexerServerPrivateAlphaChoiceParams;\n nado_points: IndexerServerPointsParams;\n nado_xpoints: IndexerServerXPointsParams;\n cash_incentives: IndexerServerCashIncentivesParams;\n social_connect: IndexerServerSocialConnectParams;\n list_social_accounts: IndexerServerListSocialAccountsParams;\n revoke_social_account: IndexerServerRevokeSocialAccountParams;\n}\n\nexport type IndexerServerQueryRequestType =\n keyof IndexerServerQueryRequestByType;\n\n/**\n * Responses\n */\n\nexport interface IndexerServerListSubaccountsResponse {\n subaccounts: {\n id: string;\n // Hex of subaccount bytes\n subaccount: string;\n // UNIX timestamp in seconds\n created_at: string;\n isolated: boolean;\n }[];\n}\n\nexport interface IndexerServerMultiSubaccountSnapshotsResponse {\n // Map of subaccount hex -> timestamp requested -> latest events corresponding to each product\n snapshots: Record<string, Record<string, IndexerServerEvent[]>>;\n}\n\nexport interface IndexerServerReferralCodeResponse {\n referral_code: string | null;\n}\n\nexport interface IndexerServerFundingRate {\n product_id: number;\n funding_rate_x18: string;\n update_time: number;\n}\n\nexport type IndexerServerFundingRateResponse = IndexerServerFundingRate;\n\n// Map of productId -> IndexerServerFundingRate\nexport type IndexerServerFundingRatesResponse = Record<\n string,\n IndexerServerFundingRate\n>;\n\nexport interface IndexerServerFundingRateHistoryEntry {\n product_id: number;\n // Epoch time in seconds of the settlement tick this funding rate was recorded at.\n timestamp: string;\n // Realized hourly funding rate at this tick, multiplied by 10^18 (% = rate * 100).\n funding_rate_x18: string;\n}\n\nexport interface IndexerServerFundingRateHistoryResponse {\n // Always ascending by timestamp.\n funding_rates: IndexerServerFundingRateHistoryEntry[];\n}\n\nexport interface IndexerServerPerpPrices {\n product_id: number;\n index_price_x18: string;\n mark_price_x18: string;\n update_time: number;\n}\n\nexport type IndexerServerPriceResponse = IndexerServerPerpPrices;\n\n// Map of productId -> IndexerServerPerpPrices\nexport type IndexerServerPerpPricesResponse = Record<\n string,\n IndexerServerPerpPrices\n>;\n\nexport interface IndexerServerOraclePricesResponse {\n prices: IndexerServerOraclePrice[];\n}\n\nexport interface IndexerServerCandlesticksResponse {\n candlesticks: IndexerServerCandlestick[];\n}\n\nexport type IndexerEdgeServerCandlesticksResponse =\n IndexerServerCandlesticksResponse;\n\nexport interface IndexerServerProductsResponse {\n products: IndexerServerProductSnapshot[];\n txs: IndexerServerTx[];\n}\n\n// Map of timestamp -> (productID -> IndexerServerProductSnapshot)\nexport type IndexerServerMultiProductsResponse = Record<\n string,\n Record<string, IndexerServerProductSnapshot>\n>;\n\nexport interface IndexerServerEventsResponse {\n events: IndexerServerEvent[];\n txs: IndexerServerTx[];\n}\n\nexport interface IndexerServerOrdersResponse {\n orders: IndexerServerOrder[];\n}\n\nexport interface IndexerServerMatchEventsResponse {\n matches: IndexerServerMatchEvent[];\n txs: IndexerServerTx[];\n}\n\nexport interface IndexerServerQuotePriceResponse {\n price_x18: string;\n}\n\nexport interface IndexerServerLinkedSignerResponse {\n total_tx_limit: string;\n remaining_tx: string;\n wait_time: string;\n signer: string;\n}\n\nexport interface IndexerServerMarketSnapshotsResponse {\n snapshots: IndexerServerMarketSnapshot[];\n}\n\nexport interface IndexerEdgeServerMarketSnapshotsResponse {\n snapshots: Record<number, IndexerServerMarketSnapshot[]>;\n}\n\nexport interface IndexerServerInterestFundingResponse {\n interest_payments: IndexerServerProductPayment[];\n funding_payments: IndexerServerProductPayment[];\n next_idx: string;\n}\n\nexport interface IndexerServerMakerStatisticsResponse {\n reward_coefficient: string;\n makers: IndexerServerMaker[];\n}\n\nexport interface IndexerServerLeaderboardResponse {\n positions: IndexerServerLeaderboardPosition[];\n}\n\nexport interface IndexerServerLeaderboardRegistrationsResponse {\n registrations: IndexerServerLeaderboardRegistration[];\n}\n\nexport type IndexerServerLeaderboardRegisterResponse =\n IndexerServerLeaderboardRegistrationsResponse;\n\nexport interface IndexerServerLeaderboardRankResponse {\n // If the subaccount is not eligible for a given contest, it would not be included in the response.\n // contestId -> IndexerServerLeaderboardPosition\n positions: Record<string, IndexerServerLeaderboardPosition>;\n}\n\nexport interface IndexerServerLeaderboardContestsResponse {\n contests: IndexerServerLeaderboardContest[];\n}\n\nexport interface IndexerServerFastWithdrawalSignatureResponse {\n idx: string;\n tx: NadoWithdrawCollateralTx['withdraw_collateral'];\n // Present only for `WithdrawCollateralV2` withdrawals.\n tx_v2?: NadoWithdrawCollateralV2Tx['withdraw_collateral_v2'];\n tx_bytes: string;\n signatures: string[];\n}\n\nexport interface IndexerServerNlpSnapshotsResponse {\n snapshots: IndexerServerNlpSnapshot[];\n}\n\nexport interface IndexerServerDDAResponse {\n v1_address: string;\n}\n\nexport interface IndexerServerBacklogResponse {\n // Total number of transactions stored in the indexer DB\n total_txs: string;\n // Current nSubmissions value from the chain (i.e., number of processed txs)\n total_submissions: string;\n // Number of unprocessed transactions (total_txs - total_submissions)\n backlog_size: string;\n // UNIX timestamp (in seconds) of when the data was last updated\n updated_at: string;\n // Estimated time in seconds (float) to clear the entire backlog (null if unavailable)\n backlog_eta_in_seconds: string | null;\n // Current submission rate in transactions per second (float) (null if unavailable)\n txs_per_second: string | null;\n}\n\nexport interface IndexerServerPrivateAlphaChoiceResponse {\n points: string;\n fee_refund: string;\n nft_eligibility: boolean;\n}\n\nexport interface IndexerServerPointsEpoch {\n epoch: number;\n description: string;\n start_time: string;\n end_time: string;\n total_points: string;\n points: string;\n rank: number;\n tier: number;\n}\n\nexport interface IndexerServerAllTimePoints {\n points: string;\n rank: number;\n tier: number;\n}\n\nexport interface IndexerServerPointsResponse {\n points_per_epoch: IndexerServerPointsEpoch[];\n all_time_points: IndexerServerAllTimePoints;\n}\n\nexport interface IndexerServerXPointsQuest {\n quest_type: string;\n points: string;\n}\n\nexport interface IndexerServerXPointsEpoch {\n epoch: number;\n description: string;\n start_time: string;\n end_time: string;\n total_points: string;\n rank: number;\n quests: IndexerServerXPointsQuest[];\n}\n\nexport interface IndexerServerXPointsAllTime {\n total_points: string;\n rank: number;\n quests: IndexerServerXPointsQuest[];\n}\n\nexport interface IndexerServerXPointsResponse {\n points_per_epoch: IndexerServerXPointsEpoch[];\n all_time_points: IndexerServerXPointsAllTime;\n}\n\nexport interface IndexerServerCashIncentivesEventMetadata {\n event_id: number;\n description: string;\n // UNIX timestamp in seconds\n epoch_start: string;\n // UNIX timestamp in seconds\n epoch_end: string;\n // x18 string\n max_volume: string;\n // x18 string\n max_reward: string;\n // x18 string\n min_volume: string;\n // x18 string\n min_reward: string;\n}\n\nexport interface IndexerServerCashIncentivesEventPlatform {\n // x18 string\n platform_volume: string;\n // x18 string\n unlocked_reward: string;\n}\n\nexport interface IndexerServerCashIncentivesEventWallet {\n // x18 string\n reward: string;\n}\n\nexport interface IndexerServerCashIncentivesEvent {\n metadata: IndexerServerCashIncentivesEventMetadata;\n platform: IndexerServerCashIncentivesEventPlatform;\n wallet: IndexerServerCashIncentivesEventWallet;\n}\n\nexport interface IndexerServerCashIncentivesWalletSummary {\n // x18 string\n total_reward: string;\n // x18 string\n claimable_reward: string;\n}\n\nexport interface IndexerServerCashIncentivesResponse {\n events: IndexerServerCashIncentivesEvent[];\n wallet_summary: IndexerServerCashIncentivesWalletSummary;\n}\n\nexport interface IndexerServerSocialConnectResponse {\n url: string;\n}\n\nexport interface IndexerServerSocialAccountsResponse {\n accounts: IndexerServerSocialAccount[];\n}\n\n// Response\nexport interface IndexerServerQueryResponseByType {\n account_snapshots: IndexerServerMultiSubaccountSnapshotsResponse;\n backlog: IndexerServerBacklogResponse;\n candlesticks: IndexerServerCandlesticksResponse;\n direct_deposit_address: IndexerServerDDAResponse;\n edge_candlesticks: IndexerEdgeServerCandlesticksResponse;\n edge_market_snapshots: IndexerEdgeServerMarketSnapshotsResponse;\n events: IndexerServerEventsResponse;\n fast_withdrawal_signature: IndexerServerFastWithdrawalSignatureResponse;\n funding_rate: IndexerServerFundingRateResponse;\n funding_rate_history: IndexerServerFundingRateHistoryResponse;\n funding_rates: IndexerServerFundingRatesResponse;\n interest_and_funding: IndexerServerInterestFundingResponse;\n leaderboard: IndexerServerLeaderboardResponse;\n leaderboard_contests: IndexerServerLeaderboardContestsResponse;\n leaderboard_rank: IndexerServerLeaderboardRankResponse;\n leaderboard_register: IndexerServerLeaderboardRegisterResponse;\n leaderboard_registrations: IndexerServerLeaderboardRegistrationsResponse;\n linked_signer_rate_limit: IndexerServerLinkedSignerResponse;\n maker_statistics: IndexerServerMakerStatisticsResponse;\n market_snapshots: IndexerServerMarketSnapshotsResponse;\n matches: IndexerServerMatchEventsResponse;\n oracle_price: IndexerServerOraclePricesResponse;\n orders: IndexerServerOrdersResponse;\n perp_prices: IndexerServerPerpPricesResponse;\n price: IndexerServerPriceResponse;\n product_snapshots: IndexerServerMultiProductsResponse;\n products: IndexerServerProductsResponse;\n referral_code: IndexerServerReferralCodeResponse;\n subaccounts: IndexerServerListSubaccountsResponse;\n quote_price: IndexerServerQuotePriceResponse;\n nlp_snapshots: IndexerServerNlpSnapshotsResponse;\n private_alpha_choice: IndexerServerPrivateAlphaChoiceResponse;\n nado_points: IndexerServerPointsResponse;\n nado_xpoints: IndexerServerXPointsResponse;\n cash_incentives: IndexerServerCashIncentivesResponse;\n social_connect: IndexerServerSocialConnectResponse;\n list_social_accounts: IndexerServerSocialAccountsResponse;\n revoke_social_account: IndexerServerSocialAccountsResponse;\n}\n\n/**\n * V2 API Types\n */\n\n/**\n * Individual ticker data from v2 indexer endpoint (server format)\n */\nexport interface IndexerServerV2TickerResponse {\n product_id: number;\n ticker_id: string;\n base_currency: string;\n quote_currency: string;\n last_price: number;\n base_volume: number;\n quote_volume: number;\n price_change_percent_24h: number;\n}\n\n/**\n * Response from v2 tickers endpoint (server format)\n * Maps ticker IDs to their respective ticker data\n */\nexport type IndexerServerV2TickersResponse = Record<\n string,\n IndexerServerV2TickerResponse\n>;\n\n/**\n * Market hours data from v2 symbols endpoint (server format)\n */\nexport interface IndexerServerV2MarketHours {\n is_open: boolean;\n reason: string | null;\n next_close: string | null;\n next_open: string | null;\n}\n\n/**\n * Individual symbol data from v2 indexer endpoint (server format)\n */\nexport interface IndexerServerV2Symbol {\n type: string;\n product_id: number;\n symbol: string;\n price_increment_x18: string;\n size_increment: string;\n min_size: string;\n maker_fee_rate_x18: string;\n taker_fee_rate_x18: string;\n long_weight_initial_x18: string;\n long_weight_maintenance_x18: string;\n /**\n * Defined only for perp markets with a max OI cap\n */\n max_open_interest_x18: string | null;\n /**\n * Defined only for xStocks spot markets\n */\n exchange_rate_x18: string | null;\n trading_status: string;\n isolated_only: boolean;\n market_hours: IndexerServerV2MarketHours | null;\n /**\n * Boost tier for products with rewards boosts. Null for non-boosted products.\n * 0 = none, 1 = taker 4x / maker 4x, 2 = taker 3x / maker 4x\n */\n boost_type: number | null;\n /**\n * Taker rewards multiplier. Null for non-boosted products.\n */\n taker_multiplier: number | null;\n /**\n * Maker rewards multiplier. Null for non-boosted products.\n */\n maker_multiplier: number | null;\n}\n\n/**\n * Response from v2 symbols endpoint (server format)\n * Maps symbols to their respective data\n */\nexport type IndexerServerV2SymbolsResponse = Record<\n string,\n IndexerServerV2Symbol\n>;\n\n/**\n * Wire `request_type` the indexer echoes on failure envelopes. The indexer's failure envelope is\n * keyed by route (`<verb>_<query_type>`), mirroring the engine and trigger services. Kept as a\n * `${string}_${string}` template to avoid enumerating the full set of v1 query types declared\n * above.\n */\nexport type IndexerServerRequestType = `${string}_${string}`;\n\n/**\n * Failure envelope returned by the indexer service API. Mirrors the failure shape used by the\n * engine and trigger services: a `status: 'failure'` discriminant plus an `error`/`error_code`\n * pair and the originating `request_type`. A response missing this envelope shape (e.g. a\n * malformed body, or a non-JSON response) is a transport-level error, not a domain error.\n *\n * The v2 REST endpoints do not return this envelope — they use plain HTTP error responses\n * without an `error_code` field.\n */\nexport interface IndexerServerFailureResponse {\n status: 'failure';\n error: string;\n error_code: number;\n request_type: IndexerServerRequestType;\n}\n\n/**\n * Narrows an unknown response body to the indexer service API failure envelope.\n */\nexport function isIndexerServerFailureResponse(\n data: unknown,\n): data is IndexerServerFailureResponse {\n return (\n typeof data === 'object' &&\n data !== null &&\n (data as Record<string, unknown>).status === 'failure'\n );\n}\n"],"mappings":";;;;;AA0uBA,SAAgB,+BACd,MACsC;CACtC,OACE,OAAO,SAAS,YAChB,SAAS,QACR,KAAiC,WAAW;AAEjD"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
export { IndexerEdgeServerCandlesticksParams, IndexerEdgeServerCandlesticksResponse, IndexerEdgeServerMarketSnapshotsParams, IndexerEdgeServerMarketSnapshotsResponse, IndexerServerAllTimePoints, IndexerServerBacklogResponse, IndexerServerCandlesticksParams, IndexerServerCandlesticksResponse, IndexerServerCashIncentivesEvent, IndexerServerCashIncentivesEventMetadata, IndexerServerCashIncentivesEventPlatform, IndexerServerCashIncentivesEventWallet, IndexerServerCashIncentivesParams, IndexerServerCashIncentivesResponse, IndexerServerCashIncentivesWalletSummary, IndexerServerDDAQueryParams, IndexerServerDDAResponse, IndexerServerEventsParams, IndexerServerEventsResponse, IndexerServerFastWithdrawalSignatureParams, IndexerServerFastWithdrawalSignatureResponse, IndexerServerFundingRate, IndexerServerFundingRateHistoryEntry, IndexerServerFundingRateHistoryParams, IndexerServerFundingRateHistoryResponse, IndexerServerFundingRateParams, IndexerServerFundingRateResponse, IndexerServerFundingRatesParams, IndexerServerFundingRatesResponse, IndexerServerInterestFundingParams, IndexerServerInterestFundingResponse, IndexerServerLeaderboardContestsParams, IndexerServerLeaderboardContestsResponse, IndexerServerLeaderboardParams, IndexerServerLeaderboardRankParams, IndexerServerLeaderboardRankResponse, IndexerServerLeaderboardRegisterParams, IndexerServerLeaderboardRegisterResponse, IndexerServerLeaderboardRegistrationsParams, IndexerServerLeaderboardRegistrationsResponse, IndexerServerLeaderboardResponse, IndexerServerLinkedSignerParams, IndexerServerLinkedSignerResponse, IndexerServerListSocialAccountsParams, IndexerServerListSubaccountsParams, IndexerServerListSubaccountsResponse, IndexerServerMakerStatisticsParams, IndexerServerMakerStatisticsResponse, IndexerServerMarketSnapshotsParams, IndexerServerMarketSnapshotsResponse, IndexerServerMatchEventsParams, IndexerServerMatchEventsResponse, IndexerServerMultiProductsParams, IndexerServerMultiProductsResponse, IndexerServerMultiSubaccountSnapshotsParams, IndexerServerMultiSubaccountSnapshotsResponse, IndexerServerNlpSnapshotsParams, IndexerServerNlpSnapshotsResponse, IndexerServerOraclePricesParams, IndexerServerOraclePricesResponse, IndexerServerOrdersParams, IndexerServerOrdersResponse, IndexerServerPerpPrices, IndexerServerPerpPricesParams, IndexerServerPerpPricesResponse, IndexerServerPointsEpoch, IndexerServerPointsParams, IndexerServerPointsResponse, IndexerServerPriceParams, IndexerServerPriceResponse, IndexerServerPrivateAlphaChoiceParams, IndexerServerPrivateAlphaChoiceResponse, IndexerServerProductsParams, IndexerServerProductsResponse, IndexerServerQueryRequestByType, IndexerServerQueryRequestType, IndexerServerQueryResponseByType, IndexerServerQuotePriceResponse, IndexerServerReferralCodeParams, IndexerServerReferralCodeResponse, IndexerServerRevokeSocialAccountParams, IndexerServerSocialAccountsResponse, IndexerServerSocialConnectParams, IndexerServerSocialConnectResponse, IndexerServerTriggerTypeFilter, IndexerServerV2MarketHours, IndexerServerV2Symbol, IndexerServerV2SymbolsResponse, IndexerServerV2TickerResponse, IndexerServerV2TickersResponse, IndexerServerXPointsAllTime, IndexerServerXPointsEpoch, IndexerServerXPointsParams, IndexerServerXPointsQuest, IndexerServerXPointsResponse };
|
|
1
|
+
import { $ as IndexerServerMatchEventsResponse, A as IndexerServerFundingRatesResponse, At as IndexerServerSocialAccountsResponse, B as IndexerServerLeaderboardRegistrationsParams, Bt as IndexerServerXPointsEpoch, C as IndexerServerFundingRate, Ct as IndexerServerQueryRequestType, D as IndexerServerFundingRateParams, Dt as IndexerServerReferralCodeResponse, E as IndexerServerFundingRateHistoryResponse, Et as IndexerServerReferralCodeParams, F as IndexerServerLeaderboardParams, Ft as IndexerServerV2Symbol, G as IndexerServerListSocialAccountsParams, H as IndexerServerLeaderboardResponse, Ht as IndexerServerXPointsQuest, I as IndexerServerLeaderboardRankParams, It as IndexerServerV2SymbolsResponse, J as IndexerServerMakerStatisticsParams, K as IndexerServerListSubaccountsParams, L as IndexerServerLeaderboardRankResponse, Lt as IndexerServerV2TickerResponse, M as IndexerServerInterestFundingResponse, Mt as IndexerServerSocialConnectResponse, N as IndexerServerLeaderboardContestsParams, Nt as IndexerServerTriggerTypeFilter, O as IndexerServerFundingRateResponse, Ot as IndexerServerRequestType, P as IndexerServerLeaderboardContestsResponse, Pt as IndexerServerV2MarketHours, Q as IndexerServerMatchEventsParams, R as IndexerServerLeaderboardRegisterParams, Rt as IndexerServerV2TickersResponse, S as IndexerServerFastWithdrawalSignatureResponse, St as IndexerServerQueryRequestByType, T as IndexerServerFundingRateHistoryParams, Tt as IndexerServerQuotePriceResponse, U as IndexerServerLinkedSignerParams, Ut as IndexerServerXPointsResponse, V as IndexerServerLeaderboardRegistrationsResponse, Vt as IndexerServerXPointsParams, W as IndexerServerLinkedSignerResponse, Wt as isIndexerServerFailureResponse, X as IndexerServerMarketSnapshotsParams, Y as IndexerServerMakerStatisticsResponse, Z as IndexerServerMarketSnapshotsResponse, _ as IndexerServerDDAResponse, _t as IndexerServerPriceResponse, a as IndexerServerAllTimePoints, at as IndexerServerNlpSnapshotsResponse, b as IndexerServerFailureResponse, bt as IndexerServerProductsParams, c as IndexerServerCandlesticksResponse, ct as IndexerServerOrdersParams, d as IndexerServerCashIncentivesEventPlatform, dt as IndexerServerPerpPricesParams, et as IndexerServerMultiProductsParams, f as IndexerServerCashIncentivesEventWallet, ft as IndexerServerPerpPricesResponse, g as IndexerServerDDAQueryParams, gt as IndexerServerPriceParams, h as IndexerServerCashIncentivesWalletSummary, ht as IndexerServerPointsResponse, i as IndexerEdgeServerMarketSnapshotsResponse, it as IndexerServerNlpSnapshotsParams, j as IndexerServerInterestFundingParams, jt as IndexerServerSocialConnectParams, k as IndexerServerFundingRatesParams, kt as IndexerServerRevokeSocialAccountParams, l as IndexerServerCashIncentivesEvent, lt as IndexerServerOrdersResponse, m as IndexerServerCashIncentivesResponse, mt as IndexerServerPointsParams, n as IndexerEdgeServerCandlesticksResponse, nt as IndexerServerMultiSubaccountSnapshotsParams, o as IndexerServerBacklogResponse, ot as IndexerServerOraclePricesParams, p as IndexerServerCashIncentivesParams, pt as IndexerServerPointsEpoch, q as IndexerServerListSubaccountsResponse, r as IndexerEdgeServerMarketSnapshotsParams, rt as IndexerServerMultiSubaccountSnapshotsResponse, s as IndexerServerCandlesticksParams, st as IndexerServerOraclePricesResponse, t as IndexerEdgeServerCandlesticksParams, tt as IndexerServerMultiProductsResponse, u as IndexerServerCashIncentivesEventMetadata, ut as IndexerServerPerpPrices, v as IndexerServerEventsParams, vt as IndexerServerPrivateAlphaChoiceParams, w as IndexerServerFundingRateHistoryEntry, wt as IndexerServerQueryResponseByType, x as IndexerServerFastWithdrawalSignatureParams, xt as IndexerServerProductsResponse, y as IndexerServerEventsResponse, yt as IndexerServerPrivateAlphaChoiceResponse, z as IndexerServerLeaderboardRegisterResponse, zt as IndexerServerXPointsAllTime } from "../serverTypes-E311idZv.cjs";
|
|
2
|
+
export { IndexerEdgeServerCandlesticksParams, IndexerEdgeServerCandlesticksResponse, IndexerEdgeServerMarketSnapshotsParams, IndexerEdgeServerMarketSnapshotsResponse, IndexerServerAllTimePoints, IndexerServerBacklogResponse, IndexerServerCandlesticksParams, IndexerServerCandlesticksResponse, IndexerServerCashIncentivesEvent, IndexerServerCashIncentivesEventMetadata, IndexerServerCashIncentivesEventPlatform, IndexerServerCashIncentivesEventWallet, IndexerServerCashIncentivesParams, IndexerServerCashIncentivesResponse, IndexerServerCashIncentivesWalletSummary, IndexerServerDDAQueryParams, IndexerServerDDAResponse, IndexerServerEventsParams, IndexerServerEventsResponse, IndexerServerFailureResponse, IndexerServerFastWithdrawalSignatureParams, IndexerServerFastWithdrawalSignatureResponse, IndexerServerFundingRate, IndexerServerFundingRateHistoryEntry, IndexerServerFundingRateHistoryParams, IndexerServerFundingRateHistoryResponse, IndexerServerFundingRateParams, IndexerServerFundingRateResponse, IndexerServerFundingRatesParams, IndexerServerFundingRatesResponse, IndexerServerInterestFundingParams, IndexerServerInterestFundingResponse, IndexerServerLeaderboardContestsParams, IndexerServerLeaderboardContestsResponse, IndexerServerLeaderboardParams, IndexerServerLeaderboardRankParams, IndexerServerLeaderboardRankResponse, IndexerServerLeaderboardRegisterParams, IndexerServerLeaderboardRegisterResponse, IndexerServerLeaderboardRegistrationsParams, IndexerServerLeaderboardRegistrationsResponse, IndexerServerLeaderboardResponse, IndexerServerLinkedSignerParams, IndexerServerLinkedSignerResponse, IndexerServerListSocialAccountsParams, IndexerServerListSubaccountsParams, IndexerServerListSubaccountsResponse, IndexerServerMakerStatisticsParams, IndexerServerMakerStatisticsResponse, IndexerServerMarketSnapshotsParams, IndexerServerMarketSnapshotsResponse, IndexerServerMatchEventsParams, IndexerServerMatchEventsResponse, IndexerServerMultiProductsParams, IndexerServerMultiProductsResponse, IndexerServerMultiSubaccountSnapshotsParams, IndexerServerMultiSubaccountSnapshotsResponse, IndexerServerNlpSnapshotsParams, IndexerServerNlpSnapshotsResponse, IndexerServerOraclePricesParams, IndexerServerOraclePricesResponse, IndexerServerOrdersParams, IndexerServerOrdersResponse, IndexerServerPerpPrices, IndexerServerPerpPricesParams, IndexerServerPerpPricesResponse, IndexerServerPointsEpoch, IndexerServerPointsParams, IndexerServerPointsResponse, IndexerServerPriceParams, IndexerServerPriceResponse, IndexerServerPrivateAlphaChoiceParams, IndexerServerPrivateAlphaChoiceResponse, IndexerServerProductsParams, IndexerServerProductsResponse, IndexerServerQueryRequestByType, IndexerServerQueryRequestType, IndexerServerQueryResponseByType, IndexerServerQuotePriceResponse, IndexerServerReferralCodeParams, IndexerServerReferralCodeResponse, IndexerServerRequestType, IndexerServerRevokeSocialAccountParams, IndexerServerSocialAccountsResponse, IndexerServerSocialConnectParams, IndexerServerSocialConnectResponse, IndexerServerTriggerTypeFilter, IndexerServerV2MarketHours, IndexerServerV2Symbol, IndexerServerV2SymbolsResponse, IndexerServerV2TickerResponse, IndexerServerV2TickersResponse, IndexerServerXPointsAllTime, IndexerServerXPointsEpoch, IndexerServerXPointsParams, IndexerServerXPointsQuest, IndexerServerXPointsResponse, isIndexerServerFailureResponse };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
export { IndexerEdgeServerCandlesticksParams, IndexerEdgeServerCandlesticksResponse, IndexerEdgeServerMarketSnapshotsParams, IndexerEdgeServerMarketSnapshotsResponse, IndexerServerAllTimePoints, IndexerServerBacklogResponse, IndexerServerCandlesticksParams, IndexerServerCandlesticksResponse, IndexerServerCashIncentivesEvent, IndexerServerCashIncentivesEventMetadata, IndexerServerCashIncentivesEventPlatform, IndexerServerCashIncentivesEventWallet, IndexerServerCashIncentivesParams, IndexerServerCashIncentivesResponse, IndexerServerCashIncentivesWalletSummary, IndexerServerDDAQueryParams, IndexerServerDDAResponse, IndexerServerEventsParams, IndexerServerEventsResponse, IndexerServerFastWithdrawalSignatureParams, IndexerServerFastWithdrawalSignatureResponse, IndexerServerFundingRate, IndexerServerFundingRateHistoryEntry, IndexerServerFundingRateHistoryParams, IndexerServerFundingRateHistoryResponse, IndexerServerFundingRateParams, IndexerServerFundingRateResponse, IndexerServerFundingRatesParams, IndexerServerFundingRatesResponse, IndexerServerInterestFundingParams, IndexerServerInterestFundingResponse, IndexerServerLeaderboardContestsParams, IndexerServerLeaderboardContestsResponse, IndexerServerLeaderboardParams, IndexerServerLeaderboardRankParams, IndexerServerLeaderboardRankResponse, IndexerServerLeaderboardRegisterParams, IndexerServerLeaderboardRegisterResponse, IndexerServerLeaderboardRegistrationsParams, IndexerServerLeaderboardRegistrationsResponse, IndexerServerLeaderboardResponse, IndexerServerLinkedSignerParams, IndexerServerLinkedSignerResponse, IndexerServerListSocialAccountsParams, IndexerServerListSubaccountsParams, IndexerServerListSubaccountsResponse, IndexerServerMakerStatisticsParams, IndexerServerMakerStatisticsResponse, IndexerServerMarketSnapshotsParams, IndexerServerMarketSnapshotsResponse, IndexerServerMatchEventsParams, IndexerServerMatchEventsResponse, IndexerServerMultiProductsParams, IndexerServerMultiProductsResponse, IndexerServerMultiSubaccountSnapshotsParams, IndexerServerMultiSubaccountSnapshotsResponse, IndexerServerNlpSnapshotsParams, IndexerServerNlpSnapshotsResponse, IndexerServerOraclePricesParams, IndexerServerOraclePricesResponse, IndexerServerOrdersParams, IndexerServerOrdersResponse, IndexerServerPerpPrices, IndexerServerPerpPricesParams, IndexerServerPerpPricesResponse, IndexerServerPointsEpoch, IndexerServerPointsParams, IndexerServerPointsResponse, IndexerServerPriceParams, IndexerServerPriceResponse, IndexerServerPrivateAlphaChoiceParams, IndexerServerPrivateAlphaChoiceResponse, IndexerServerProductsParams, IndexerServerProductsResponse, IndexerServerQueryRequestByType, IndexerServerQueryRequestType, IndexerServerQueryResponseByType, IndexerServerQuotePriceResponse, IndexerServerReferralCodeParams, IndexerServerReferralCodeResponse, IndexerServerRevokeSocialAccountParams, IndexerServerSocialAccountsResponse, IndexerServerSocialConnectParams, IndexerServerSocialConnectResponse, IndexerServerTriggerTypeFilter, IndexerServerV2MarketHours, IndexerServerV2Symbol, IndexerServerV2SymbolsResponse, IndexerServerV2TickerResponse, IndexerServerV2TickersResponse, IndexerServerXPointsAllTime, IndexerServerXPointsEpoch, IndexerServerXPointsParams, IndexerServerXPointsQuest, IndexerServerXPointsResponse };
|
|
1
|
+
import { $ as IndexerServerMatchEventsResponse, A as IndexerServerFundingRatesResponse, At as IndexerServerSocialAccountsResponse, B as IndexerServerLeaderboardRegistrationsParams, Bt as IndexerServerXPointsEpoch, C as IndexerServerFundingRate, Ct as IndexerServerQueryRequestType, D as IndexerServerFundingRateParams, Dt as IndexerServerReferralCodeResponse, E as IndexerServerFundingRateHistoryResponse, Et as IndexerServerReferralCodeParams, F as IndexerServerLeaderboardParams, Ft as IndexerServerV2Symbol, G as IndexerServerListSocialAccountsParams, H as IndexerServerLeaderboardResponse, Ht as IndexerServerXPointsQuest, I as IndexerServerLeaderboardRankParams, It as IndexerServerV2SymbolsResponse, J as IndexerServerMakerStatisticsParams, K as IndexerServerListSubaccountsParams, L as IndexerServerLeaderboardRankResponse, Lt as IndexerServerV2TickerResponse, M as IndexerServerInterestFundingResponse, Mt as IndexerServerSocialConnectResponse, N as IndexerServerLeaderboardContestsParams, Nt as IndexerServerTriggerTypeFilter, O as IndexerServerFundingRateResponse, Ot as IndexerServerRequestType, P as IndexerServerLeaderboardContestsResponse, Pt as IndexerServerV2MarketHours, Q as IndexerServerMatchEventsParams, R as IndexerServerLeaderboardRegisterParams, Rt as IndexerServerV2TickersResponse, S as IndexerServerFastWithdrawalSignatureResponse, St as IndexerServerQueryRequestByType, T as IndexerServerFundingRateHistoryParams, Tt as IndexerServerQuotePriceResponse, U as IndexerServerLinkedSignerParams, Ut as IndexerServerXPointsResponse, V as IndexerServerLeaderboardRegistrationsResponse, Vt as IndexerServerXPointsParams, W as IndexerServerLinkedSignerResponse, Wt as isIndexerServerFailureResponse, X as IndexerServerMarketSnapshotsParams, Y as IndexerServerMakerStatisticsResponse, Z as IndexerServerMarketSnapshotsResponse, _ as IndexerServerDDAResponse, _t as IndexerServerPriceResponse, a as IndexerServerAllTimePoints, at as IndexerServerNlpSnapshotsResponse, b as IndexerServerFailureResponse, bt as IndexerServerProductsParams, c as IndexerServerCandlesticksResponse, ct as IndexerServerOrdersParams, d as IndexerServerCashIncentivesEventPlatform, dt as IndexerServerPerpPricesParams, et as IndexerServerMultiProductsParams, f as IndexerServerCashIncentivesEventWallet, ft as IndexerServerPerpPricesResponse, g as IndexerServerDDAQueryParams, gt as IndexerServerPriceParams, h as IndexerServerCashIncentivesWalletSummary, ht as IndexerServerPointsResponse, i as IndexerEdgeServerMarketSnapshotsResponse, it as IndexerServerNlpSnapshotsParams, j as IndexerServerInterestFundingParams, jt as IndexerServerSocialConnectParams, k as IndexerServerFundingRatesParams, kt as IndexerServerRevokeSocialAccountParams, l as IndexerServerCashIncentivesEvent, lt as IndexerServerOrdersResponse, m as IndexerServerCashIncentivesResponse, mt as IndexerServerPointsParams, n as IndexerEdgeServerCandlesticksResponse, nt as IndexerServerMultiSubaccountSnapshotsParams, o as IndexerServerBacklogResponse, ot as IndexerServerOraclePricesParams, p as IndexerServerCashIncentivesParams, pt as IndexerServerPointsEpoch, q as IndexerServerListSubaccountsResponse, r as IndexerEdgeServerMarketSnapshotsParams, rt as IndexerServerMultiSubaccountSnapshotsResponse, s as IndexerServerCandlesticksParams, st as IndexerServerOraclePricesResponse, t as IndexerEdgeServerCandlesticksParams, tt as IndexerServerMultiProductsResponse, u as IndexerServerCashIncentivesEventMetadata, ut as IndexerServerPerpPrices, v as IndexerServerEventsParams, vt as IndexerServerPrivateAlphaChoiceParams, w as IndexerServerFundingRateHistoryEntry, wt as IndexerServerQueryResponseByType, x as IndexerServerFastWithdrawalSignatureParams, xt as IndexerServerProductsResponse, y as IndexerServerEventsResponse, yt as IndexerServerPrivateAlphaChoiceResponse, z as IndexerServerLeaderboardRegisterResponse, zt as IndexerServerXPointsAllTime } from "../serverTypes-l4ceojIp.js";
|
|
2
|
+
export { IndexerEdgeServerCandlesticksParams, IndexerEdgeServerCandlesticksResponse, IndexerEdgeServerMarketSnapshotsParams, IndexerEdgeServerMarketSnapshotsResponse, IndexerServerAllTimePoints, IndexerServerBacklogResponse, IndexerServerCandlesticksParams, IndexerServerCandlesticksResponse, IndexerServerCashIncentivesEvent, IndexerServerCashIncentivesEventMetadata, IndexerServerCashIncentivesEventPlatform, IndexerServerCashIncentivesEventWallet, IndexerServerCashIncentivesParams, IndexerServerCashIncentivesResponse, IndexerServerCashIncentivesWalletSummary, IndexerServerDDAQueryParams, IndexerServerDDAResponse, IndexerServerEventsParams, IndexerServerEventsResponse, IndexerServerFailureResponse, IndexerServerFastWithdrawalSignatureParams, IndexerServerFastWithdrawalSignatureResponse, IndexerServerFundingRate, IndexerServerFundingRateHistoryEntry, IndexerServerFundingRateHistoryParams, IndexerServerFundingRateHistoryResponse, IndexerServerFundingRateParams, IndexerServerFundingRateResponse, IndexerServerFundingRatesParams, IndexerServerFundingRatesResponse, IndexerServerInterestFundingParams, IndexerServerInterestFundingResponse, IndexerServerLeaderboardContestsParams, IndexerServerLeaderboardContestsResponse, IndexerServerLeaderboardParams, IndexerServerLeaderboardRankParams, IndexerServerLeaderboardRankResponse, IndexerServerLeaderboardRegisterParams, IndexerServerLeaderboardRegisterResponse, IndexerServerLeaderboardRegistrationsParams, IndexerServerLeaderboardRegistrationsResponse, IndexerServerLeaderboardResponse, IndexerServerLinkedSignerParams, IndexerServerLinkedSignerResponse, IndexerServerListSocialAccountsParams, IndexerServerListSubaccountsParams, IndexerServerListSubaccountsResponse, IndexerServerMakerStatisticsParams, IndexerServerMakerStatisticsResponse, IndexerServerMarketSnapshotsParams, IndexerServerMarketSnapshotsResponse, IndexerServerMatchEventsParams, IndexerServerMatchEventsResponse, IndexerServerMultiProductsParams, IndexerServerMultiProductsResponse, IndexerServerMultiSubaccountSnapshotsParams, IndexerServerMultiSubaccountSnapshotsResponse, IndexerServerNlpSnapshotsParams, IndexerServerNlpSnapshotsResponse, IndexerServerOraclePricesParams, IndexerServerOraclePricesResponse, IndexerServerOrdersParams, IndexerServerOrdersResponse, IndexerServerPerpPrices, IndexerServerPerpPricesParams, IndexerServerPerpPricesResponse, IndexerServerPointsEpoch, IndexerServerPointsParams, IndexerServerPointsResponse, IndexerServerPriceParams, IndexerServerPriceResponse, IndexerServerPrivateAlphaChoiceParams, IndexerServerPrivateAlphaChoiceResponse, IndexerServerProductsParams, IndexerServerProductsResponse, IndexerServerQueryRequestByType, IndexerServerQueryRequestType, IndexerServerQueryResponseByType, IndexerServerQuotePriceResponse, IndexerServerReferralCodeParams, IndexerServerReferralCodeResponse, IndexerServerRequestType, IndexerServerRevokeSocialAccountParams, IndexerServerSocialAccountsResponse, IndexerServerSocialConnectParams, IndexerServerSocialConnectResponse, IndexerServerTriggerTypeFilter, IndexerServerV2MarketHours, IndexerServerV2Symbol, IndexerServerV2SymbolsResponse, IndexerServerV2TickerResponse, IndexerServerV2TickersResponse, IndexerServerXPointsAllTime, IndexerServerXPointsEpoch, IndexerServerXPointsParams, IndexerServerXPointsQuest, IndexerServerXPointsResponse, isIndexerServerFailureResponse };
|
|
@@ -1 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
//#region src/types/serverTypes.ts
|
|
2
|
+
/**
|
|
3
|
+
* Narrows an unknown response body to the indexer service API failure envelope.
|
|
4
|
+
*/
|
|
5
|
+
function isIndexerServerFailureResponse(data) {
|
|
6
|
+
return typeof data === "object" && data !== null && data.status === "failure";
|
|
7
|
+
}
|
|
8
|
+
//#endregion
|
|
9
|
+
export { isIndexerServerFailureResponse };
|
|
10
|
+
|
|
11
|
+
//# sourceMappingURL=serverTypes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"serverTypes.js","names":[],"sources":["../../src/types/serverTypes.ts"],"sourcesContent":["import {\n EIP712LeaderboardAuthenticationValues,\n EIP712SocialAuthenticationValues,\n SignedTx,\n} from '@nadohq/shared';\nimport { IndexerEventType } from './IndexerEventType';\nimport { IndexerLeaderboardRankType } from './IndexerLeaderboardType';\nimport { NadoWithdrawCollateralTx, NadoWithdrawCollateralV2Tx } from './NadoTx';\nimport {\n IndexerServerCandlestick,\n IndexerServerEvent,\n IndexerServerLeaderboardContest,\n IndexerServerLeaderboardPosition,\n IndexerServerLeaderboardRegistration,\n IndexerServerMaker,\n IndexerServerMarketSnapshot,\n IndexerServerMarketSnapshotInterval,\n IndexerServerMatchEvent,\n IndexerServerNlpSnapshot,\n IndexerServerOraclePrice,\n IndexerServerOrder,\n IndexerServerProductPayment,\n IndexerServerProductSnapshot,\n IndexerServerSnapshotsInterval,\n IndexerServerSocialAccount,\n IndexerServerTx,\n} from './serverModelTypes';\n\n/**\n * Params\n */\n\nexport interface IndexerServerListSubaccountsParams {\n // Inclusive, defaults to 0\n start?: number;\n // Defaults to 100\n limit?: number;\n address?: string;\n}\n\nexport interface IndexerServerMultiSubaccountSnapshotsParams {\n // Subaccount hex identifiers\n subaccounts: string[];\n timestamps: number[];\n // If not given, will return both isolated & non-iso balances\n isolated?: boolean;\n}\n\nexport interface IndexerServerReferralCodeParams {\n subaccount: string;\n}\n\nexport interface IndexerServerFundingRateParams {\n product_id: number;\n}\n\nexport interface IndexerServerFundingRatesParams {\n product_ids: number[];\n}\n\nexport interface IndexerServerFundingRateHistoryParams {\n product_id: number;\n start_time?: number | string;\n end_time?: number | string;\n // Max number of rates to return. Defaults to 100, max 1000.\n limit?: number;\n}\n\nexport interface IndexerServerPriceParams {\n product_id: number;\n}\n\nexport interface IndexerServerPerpPricesParams {\n product_ids: number[];\n}\n\nexport interface IndexerServerOraclePricesParams {\n product_ids: number[];\n}\n\nexport interface IndexerServerCandlesticksParams {\n product_id: number;\n granularity: number;\n // Seconds\n max_time?: number;\n limit: number;\n}\n\nexport type IndexerEdgeServerCandlesticksParams =\n IndexerServerCandlesticksParams;\n\nexport interface IndexerServerProductsParams {\n product_id: number;\n max_time?: number;\n limit: number;\n // submission_idx for pagination, inclusive\n idx?: string;\n}\n\nexport interface IndexerServerMultiProductsParams {\n product_ids: number[];\n max_time: number[];\n}\n\nexport interface IndexerServerEventsParams {\n subaccounts?: string[];\n product_ids?: number[];\n // If not given, will return both isolated & non-iso events\n isolated?: boolean;\n event_types?: IndexerEventType[];\n // Descending order for idx (time), defaults to true\n desc?: boolean;\n // submission_idx for pagination, inclusive\n idx?: string;\n max_time?: number;\n limit?:\n | {\n raw: number;\n }\n | {\n txs: number;\n };\n}\n\nexport type IndexerServerTriggerTypeFilter =\n | 'none'\n | 'price_trigger'\n | 'time_trigger';\n\nexport interface IndexerServerOrdersParams {\n subaccounts?: string[];\n product_ids?: number[];\n trigger_types?: IndexerServerTriggerTypeFilter[];\n digests?: string[];\n max_time?: number;\n limit?: number;\n // If not given, will return both isolated & non-iso orders\n isolated?: boolean;\n // submission_idx for pagination, inclusive\n idx?: string;\n}\n\nexport interface IndexerServerMatchEventsParams {\n subaccounts?: string[];\n product_ids?: number[];\n // If not given, will return both isolated & non-iso events\n isolated?: boolean;\n max_time?: number;\n limit: number;\n // submission_idx for pagination, inclusive\n idx?: string;\n}\n\nexport interface IndexerServerLinkedSignerParams {\n subaccount: string;\n}\n\nexport interface IndexerServerMarketSnapshotsParams {\n interval: IndexerServerMarketSnapshotInterval;\n // Defaults to all\n product_ids?: number[];\n}\n\nexport interface IndexerEdgeServerMarketSnapshotsParams {\n interval: IndexerServerMarketSnapshotInterval;\n}\n\nexport interface IndexerServerInterestFundingParams {\n subaccount: string;\n product_ids: number[];\n // If not given, defaults to latest\n max_idx?: string;\n max_time?: number;\n limit: number;\n}\n\nexport interface IndexerServerMakerStatisticsParams {\n product_id: number;\n epoch: number;\n interval: number;\n}\n\nexport interface IndexerServerLeaderboardParams {\n contest_id: number;\n rank_type?: IndexerLeaderboardRankType;\n start?: number | string;\n limit?: number | string;\n order?: 'ASC' | 'DESC';\n}\n\nexport interface IndexerServerLeaderboardRankParams {\n subaccount: string;\n contest_ids: number[];\n}\n\nexport interface IndexerServerLeaderboardContestsParams {\n contest_ids?: number[];\n active?: boolean;\n}\n\nexport interface IndexerServerLeaderboardRegistrationsParams {\n subaccount: string;\n contest_ids?: number[];\n active?: boolean;\n}\n\nexport interface IndexerServerLeaderboardRegisterParams {\n update_registration: SignedTx<EIP712LeaderboardAuthenticationValues>;\n}\n\nexport interface IndexerServerSocialConnectParams {\n update_social_account: SignedTx<EIP712SocialAuthenticationValues>;\n}\n\nexport interface IndexerServerListSocialAccountsParams {\n address: string;\n}\n\nexport type IndexerServerRevokeSocialAccountParams =\n IndexerServerSocialConnectParams;\n\nexport interface IndexerServerFastWithdrawalSignatureParams {\n /**\n * The submission index of the WithdrawCollateral tx to be used for fast withdraw.\n */\n idx: number | string;\n}\n\nexport interface IndexerServerNlpSnapshotsParams {\n interval: IndexerServerSnapshotsInterval;\n}\n\nexport interface IndexerServerDDAQueryParams {\n subaccount: string;\n}\n\nexport interface IndexerServerPrivateAlphaChoiceParams {\n address: string;\n}\n\nexport interface IndexerServerPointsParams {\n address: string;\n}\n\nexport interface IndexerServerXPointsParams {\n address: string;\n}\n\nexport interface IndexerServerCashIncentivesParams {\n wallet_address: string;\n}\n\n// Request\nexport interface IndexerServerQueryRequestByType {\n account_snapshots: IndexerServerMultiSubaccountSnapshotsParams;\n backlog: Record<string, never>;\n candlesticks: IndexerServerCandlesticksParams;\n direct_deposit_address: IndexerServerDDAQueryParams;\n edge_candlesticks: IndexerEdgeServerCandlesticksParams;\n edge_market_snapshots: IndexerEdgeServerMarketSnapshotsParams;\n events: IndexerServerEventsParams;\n fast_withdrawal_signature: IndexerServerFastWithdrawalSignatureParams;\n funding_rate: IndexerServerFundingRateParams;\n funding_rate_history: IndexerServerFundingRateHistoryParams;\n funding_rates: IndexerServerFundingRatesParams;\n interest_and_funding: IndexerServerInterestFundingParams;\n leaderboard: IndexerServerLeaderboardParams;\n leaderboard_contests: IndexerServerLeaderboardContestsParams;\n leaderboard_rank: IndexerServerLeaderboardRankParams;\n leaderboard_register: IndexerServerLeaderboardRegisterParams;\n leaderboard_registrations: IndexerServerLeaderboardRegistrationsParams;\n linked_signer_rate_limit: IndexerServerLinkedSignerParams;\n maker_statistics: IndexerServerMakerStatisticsParams;\n market_snapshots: IndexerServerMarketSnapshotsParams;\n matches: IndexerServerMatchEventsParams;\n oracle_price: IndexerServerOraclePricesParams;\n orders: IndexerServerOrdersParams;\n perp_prices: IndexerServerPerpPricesParams;\n price: IndexerServerPriceParams;\n product_snapshots: IndexerServerMultiProductsParams;\n products: IndexerServerProductsParams;\n referral_code: IndexerServerReferralCodeParams;\n subaccounts: IndexerServerListSubaccountsParams;\n quote_price: Record<string, never>;\n nlp_snapshots: IndexerServerNlpSnapshotsParams;\n private_alpha_choice: IndexerServerPrivateAlphaChoiceParams;\n nado_points: IndexerServerPointsParams;\n nado_xpoints: IndexerServerXPointsParams;\n cash_incentives: IndexerServerCashIncentivesParams;\n social_connect: IndexerServerSocialConnectParams;\n list_social_accounts: IndexerServerListSocialAccountsParams;\n revoke_social_account: IndexerServerRevokeSocialAccountParams;\n}\n\nexport type IndexerServerQueryRequestType =\n keyof IndexerServerQueryRequestByType;\n\n/**\n * Responses\n */\n\nexport interface IndexerServerListSubaccountsResponse {\n subaccounts: {\n id: string;\n // Hex of subaccount bytes\n subaccount: string;\n // UNIX timestamp in seconds\n created_at: string;\n isolated: boolean;\n }[];\n}\n\nexport interface IndexerServerMultiSubaccountSnapshotsResponse {\n // Map of subaccount hex -> timestamp requested -> latest events corresponding to each product\n snapshots: Record<string, Record<string, IndexerServerEvent[]>>;\n}\n\nexport interface IndexerServerReferralCodeResponse {\n referral_code: string | null;\n}\n\nexport interface IndexerServerFundingRate {\n product_id: number;\n funding_rate_x18: string;\n update_time: number;\n}\n\nexport type IndexerServerFundingRateResponse = IndexerServerFundingRate;\n\n// Map of productId -> IndexerServerFundingRate\nexport type IndexerServerFundingRatesResponse = Record<\n string,\n IndexerServerFundingRate\n>;\n\nexport interface IndexerServerFundingRateHistoryEntry {\n product_id: number;\n // Epoch time in seconds of the settlement tick this funding rate was recorded at.\n timestamp: string;\n // Realized hourly funding rate at this tick, multiplied by 10^18 (% = rate * 100).\n funding_rate_x18: string;\n}\n\nexport interface IndexerServerFundingRateHistoryResponse {\n // Always ascending by timestamp.\n funding_rates: IndexerServerFundingRateHistoryEntry[];\n}\n\nexport interface IndexerServerPerpPrices {\n product_id: number;\n index_price_x18: string;\n mark_price_x18: string;\n update_time: number;\n}\n\nexport type IndexerServerPriceResponse = IndexerServerPerpPrices;\n\n// Map of productId -> IndexerServerPerpPrices\nexport type IndexerServerPerpPricesResponse = Record<\n string,\n IndexerServerPerpPrices\n>;\n\nexport interface IndexerServerOraclePricesResponse {\n prices: IndexerServerOraclePrice[];\n}\n\nexport interface IndexerServerCandlesticksResponse {\n candlesticks: IndexerServerCandlestick[];\n}\n\nexport type IndexerEdgeServerCandlesticksResponse =\n IndexerServerCandlesticksResponse;\n\nexport interface IndexerServerProductsResponse {\n products: IndexerServerProductSnapshot[];\n txs: IndexerServerTx[];\n}\n\n// Map of timestamp -> (productID -> IndexerServerProductSnapshot)\nexport type IndexerServerMultiProductsResponse = Record<\n string,\n Record<string, IndexerServerProductSnapshot>\n>;\n\nexport interface IndexerServerEventsResponse {\n events: IndexerServerEvent[];\n txs: IndexerServerTx[];\n}\n\nexport interface IndexerServerOrdersResponse {\n orders: IndexerServerOrder[];\n}\n\nexport interface IndexerServerMatchEventsResponse {\n matches: IndexerServerMatchEvent[];\n txs: IndexerServerTx[];\n}\n\nexport interface IndexerServerQuotePriceResponse {\n price_x18: string;\n}\n\nexport interface IndexerServerLinkedSignerResponse {\n total_tx_limit: string;\n remaining_tx: string;\n wait_time: string;\n signer: string;\n}\n\nexport interface IndexerServerMarketSnapshotsResponse {\n snapshots: IndexerServerMarketSnapshot[];\n}\n\nexport interface IndexerEdgeServerMarketSnapshotsResponse {\n snapshots: Record<number, IndexerServerMarketSnapshot[]>;\n}\n\nexport interface IndexerServerInterestFundingResponse {\n interest_payments: IndexerServerProductPayment[];\n funding_payments: IndexerServerProductPayment[];\n next_idx: string;\n}\n\nexport interface IndexerServerMakerStatisticsResponse {\n reward_coefficient: string;\n makers: IndexerServerMaker[];\n}\n\nexport interface IndexerServerLeaderboardResponse {\n positions: IndexerServerLeaderboardPosition[];\n}\n\nexport interface IndexerServerLeaderboardRegistrationsResponse {\n registrations: IndexerServerLeaderboardRegistration[];\n}\n\nexport type IndexerServerLeaderboardRegisterResponse =\n IndexerServerLeaderboardRegistrationsResponse;\n\nexport interface IndexerServerLeaderboardRankResponse {\n // If the subaccount is not eligible for a given contest, it would not be included in the response.\n // contestId -> IndexerServerLeaderboardPosition\n positions: Record<string, IndexerServerLeaderboardPosition>;\n}\n\nexport interface IndexerServerLeaderboardContestsResponse {\n contests: IndexerServerLeaderboardContest[];\n}\n\nexport interface IndexerServerFastWithdrawalSignatureResponse {\n idx: string;\n tx: NadoWithdrawCollateralTx['withdraw_collateral'];\n // Present only for `WithdrawCollateralV2` withdrawals.\n tx_v2?: NadoWithdrawCollateralV2Tx['withdraw_collateral_v2'];\n tx_bytes: string;\n signatures: string[];\n}\n\nexport interface IndexerServerNlpSnapshotsResponse {\n snapshots: IndexerServerNlpSnapshot[];\n}\n\nexport interface IndexerServerDDAResponse {\n v1_address: string;\n}\n\nexport interface IndexerServerBacklogResponse {\n // Total number of transactions stored in the indexer DB\n total_txs: string;\n // Current nSubmissions value from the chain (i.e., number of processed txs)\n total_submissions: string;\n // Number of unprocessed transactions (total_txs - total_submissions)\n backlog_size: string;\n // UNIX timestamp (in seconds) of when the data was last updated\n updated_at: string;\n // Estimated time in seconds (float) to clear the entire backlog (null if unavailable)\n backlog_eta_in_seconds: string | null;\n // Current submission rate in transactions per second (float) (null if unavailable)\n txs_per_second: string | null;\n}\n\nexport interface IndexerServerPrivateAlphaChoiceResponse {\n points: string;\n fee_refund: string;\n nft_eligibility: boolean;\n}\n\nexport interface IndexerServerPointsEpoch {\n epoch: number;\n description: string;\n start_time: string;\n end_time: string;\n total_points: string;\n points: string;\n rank: number;\n tier: number;\n}\n\nexport interface IndexerServerAllTimePoints {\n points: string;\n rank: number;\n tier: number;\n}\n\nexport interface IndexerServerPointsResponse {\n points_per_epoch: IndexerServerPointsEpoch[];\n all_time_points: IndexerServerAllTimePoints;\n}\n\nexport interface IndexerServerXPointsQuest {\n quest_type: string;\n points: string;\n}\n\nexport interface IndexerServerXPointsEpoch {\n epoch: number;\n description: string;\n start_time: string;\n end_time: string;\n total_points: string;\n rank: number;\n quests: IndexerServerXPointsQuest[];\n}\n\nexport interface IndexerServerXPointsAllTime {\n total_points: string;\n rank: number;\n quests: IndexerServerXPointsQuest[];\n}\n\nexport interface IndexerServerXPointsResponse {\n points_per_epoch: IndexerServerXPointsEpoch[];\n all_time_points: IndexerServerXPointsAllTime;\n}\n\nexport interface IndexerServerCashIncentivesEventMetadata {\n event_id: number;\n description: string;\n // UNIX timestamp in seconds\n epoch_start: string;\n // UNIX timestamp in seconds\n epoch_end: string;\n // x18 string\n max_volume: string;\n // x18 string\n max_reward: string;\n // x18 string\n min_volume: string;\n // x18 string\n min_reward: string;\n}\n\nexport interface IndexerServerCashIncentivesEventPlatform {\n // x18 string\n platform_volume: string;\n // x18 string\n unlocked_reward: string;\n}\n\nexport interface IndexerServerCashIncentivesEventWallet {\n // x18 string\n reward: string;\n}\n\nexport interface IndexerServerCashIncentivesEvent {\n metadata: IndexerServerCashIncentivesEventMetadata;\n platform: IndexerServerCashIncentivesEventPlatform;\n wallet: IndexerServerCashIncentivesEventWallet;\n}\n\nexport interface IndexerServerCashIncentivesWalletSummary {\n // x18 string\n total_reward: string;\n // x18 string\n claimable_reward: string;\n}\n\nexport interface IndexerServerCashIncentivesResponse {\n events: IndexerServerCashIncentivesEvent[];\n wallet_summary: IndexerServerCashIncentivesWalletSummary;\n}\n\nexport interface IndexerServerSocialConnectResponse {\n url: string;\n}\n\nexport interface IndexerServerSocialAccountsResponse {\n accounts: IndexerServerSocialAccount[];\n}\n\n// Response\nexport interface IndexerServerQueryResponseByType {\n account_snapshots: IndexerServerMultiSubaccountSnapshotsResponse;\n backlog: IndexerServerBacklogResponse;\n candlesticks: IndexerServerCandlesticksResponse;\n direct_deposit_address: IndexerServerDDAResponse;\n edge_candlesticks: IndexerEdgeServerCandlesticksResponse;\n edge_market_snapshots: IndexerEdgeServerMarketSnapshotsResponse;\n events: IndexerServerEventsResponse;\n fast_withdrawal_signature: IndexerServerFastWithdrawalSignatureResponse;\n funding_rate: IndexerServerFundingRateResponse;\n funding_rate_history: IndexerServerFundingRateHistoryResponse;\n funding_rates: IndexerServerFundingRatesResponse;\n interest_and_funding: IndexerServerInterestFundingResponse;\n leaderboard: IndexerServerLeaderboardResponse;\n leaderboard_contests: IndexerServerLeaderboardContestsResponse;\n leaderboard_rank: IndexerServerLeaderboardRankResponse;\n leaderboard_register: IndexerServerLeaderboardRegisterResponse;\n leaderboard_registrations: IndexerServerLeaderboardRegistrationsResponse;\n linked_signer_rate_limit: IndexerServerLinkedSignerResponse;\n maker_statistics: IndexerServerMakerStatisticsResponse;\n market_snapshots: IndexerServerMarketSnapshotsResponse;\n matches: IndexerServerMatchEventsResponse;\n oracle_price: IndexerServerOraclePricesResponse;\n orders: IndexerServerOrdersResponse;\n perp_prices: IndexerServerPerpPricesResponse;\n price: IndexerServerPriceResponse;\n product_snapshots: IndexerServerMultiProductsResponse;\n products: IndexerServerProductsResponse;\n referral_code: IndexerServerReferralCodeResponse;\n subaccounts: IndexerServerListSubaccountsResponse;\n quote_price: IndexerServerQuotePriceResponse;\n nlp_snapshots: IndexerServerNlpSnapshotsResponse;\n private_alpha_choice: IndexerServerPrivateAlphaChoiceResponse;\n nado_points: IndexerServerPointsResponse;\n nado_xpoints: IndexerServerXPointsResponse;\n cash_incentives: IndexerServerCashIncentivesResponse;\n social_connect: IndexerServerSocialConnectResponse;\n list_social_accounts: IndexerServerSocialAccountsResponse;\n revoke_social_account: IndexerServerSocialAccountsResponse;\n}\n\n/**\n * V2 API Types\n */\n\n/**\n * Individual ticker data from v2 indexer endpoint (server format)\n */\nexport interface IndexerServerV2TickerResponse {\n product_id: number;\n ticker_id: string;\n base_currency: string;\n quote_currency: string;\n last_price: number;\n base_volume: number;\n quote_volume: number;\n price_change_percent_24h: number;\n}\n\n/**\n * Response from v2 tickers endpoint (server format)\n * Maps ticker IDs to their respective ticker data\n */\nexport type IndexerServerV2TickersResponse = Record<\n string,\n IndexerServerV2TickerResponse\n>;\n\n/**\n * Market hours data from v2 symbols endpoint (server format)\n */\nexport interface IndexerServerV2MarketHours {\n is_open: boolean;\n reason: string | null;\n next_close: string | null;\n next_open: string | null;\n}\n\n/**\n * Individual symbol data from v2 indexer endpoint (server format)\n */\nexport interface IndexerServerV2Symbol {\n type: string;\n product_id: number;\n symbol: string;\n price_increment_x18: string;\n size_increment: string;\n min_size: string;\n maker_fee_rate_x18: string;\n taker_fee_rate_x18: string;\n long_weight_initial_x18: string;\n long_weight_maintenance_x18: string;\n /**\n * Defined only for perp markets with a max OI cap\n */\n max_open_interest_x18: string | null;\n /**\n * Defined only for xStocks spot markets\n */\n exchange_rate_x18: string | null;\n trading_status: string;\n isolated_only: boolean;\n market_hours: IndexerServerV2MarketHours | null;\n /**\n * Boost tier for products with rewards boosts. Null for non-boosted products.\n * 0 = none, 1 = taker 4x / maker 4x, 2 = taker 3x / maker 4x\n */\n boost_type: number | null;\n /**\n * Taker rewards multiplier. Null for non-boosted products.\n */\n taker_multiplier: number | null;\n /**\n * Maker rewards multiplier. Null for non-boosted products.\n */\n maker_multiplier: number | null;\n}\n\n/**\n * Response from v2 symbols endpoint (server format)\n * Maps symbols to their respective data\n */\nexport type IndexerServerV2SymbolsResponse = Record<\n string,\n IndexerServerV2Symbol\n>;\n\n/**\n * Wire `request_type` the indexer echoes on failure envelopes. The indexer's failure envelope is\n * keyed by route (`<verb>_<query_type>`), mirroring the engine and trigger services. Kept as a\n * `${string}_${string}` template to avoid enumerating the full set of v1 query types declared\n * above.\n */\nexport type IndexerServerRequestType = `${string}_${string}`;\n\n/**\n * Failure envelope returned by the indexer service API. Mirrors the failure shape used by the\n * engine and trigger services: a `status: 'failure'` discriminant plus an `error`/`error_code`\n * pair and the originating `request_type`. A response missing this envelope shape (e.g. a\n * malformed body, or a non-JSON response) is a transport-level error, not a domain error.\n *\n * The v2 REST endpoints do not return this envelope — they use plain HTTP error responses\n * without an `error_code` field.\n */\nexport interface IndexerServerFailureResponse {\n status: 'failure';\n error: string;\n error_code: number;\n request_type: IndexerServerRequestType;\n}\n\n/**\n * Narrows an unknown response body to the indexer service API failure envelope.\n */\nexport function isIndexerServerFailureResponse(\n data: unknown,\n): data is IndexerServerFailureResponse {\n return (\n typeof data === 'object' &&\n data !== null &&\n (data as Record<string, unknown>).status === 'failure'\n );\n}\n"],"mappings":";;;;AA0uBA,SAAgB,+BACd,MACsC;CACtC,OACE,OAAO,SAAS,YAChB,SAAS,QACR,KAAiC,WAAW;AAEjD"}
|
package/dist/utils/index.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as calcIndexerPerpBalanceValue, r as calcIndexerSpotBalanceValue, t as calcIndexerPerpBalanceNotionalValue } from "../indexerBalanceValue-
|
|
1
|
+
import { n as calcIndexerPerpBalanceValue, r as calcIndexerSpotBalanceValue, t as calcIndexerPerpBalanceNotionalValue } from "../indexerBalanceValue-BBUGThDY.cjs";
|
|
2
2
|
export { calcIndexerPerpBalanceNotionalValue, calcIndexerPerpBalanceValue, calcIndexerSpotBalanceValue };
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as calcIndexerPerpBalanceValue, r as calcIndexerSpotBalanceValue, t as calcIndexerPerpBalanceNotionalValue } from "../indexerBalanceValue-
|
|
1
|
+
import { n as calcIndexerPerpBalanceValue, r as calcIndexerSpotBalanceValue, t as calcIndexerPerpBalanceNotionalValue } from "../indexerBalanceValue-dX29Cr7g.js";
|
|
2
2
|
export { calcIndexerPerpBalanceNotionalValue, calcIndexerPerpBalanceValue, calcIndexerSpotBalanceValue };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as calcIndexerPerpBalanceValue, r as calcIndexerSpotBalanceValue, t as calcIndexerPerpBalanceNotionalValue } from "../indexerBalanceValue-
|
|
1
|
+
import { n as calcIndexerPerpBalanceValue, r as calcIndexerSpotBalanceValue, t as calcIndexerPerpBalanceNotionalValue } from "../indexerBalanceValue-BBUGThDY.cjs";
|
|
2
2
|
export { calcIndexerPerpBalanceNotionalValue, calcIndexerPerpBalanceValue, calcIndexerSpotBalanceValue };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as calcIndexerPerpBalanceValue, r as calcIndexerSpotBalanceValue, t as calcIndexerPerpBalanceNotionalValue } from "../indexerBalanceValue-
|
|
1
|
+
import { n as calcIndexerPerpBalanceValue, r as calcIndexerSpotBalanceValue, t as calcIndexerPerpBalanceNotionalValue } from "../indexerBalanceValue-dX29Cr7g.js";
|
|
2
2
|
export { calcIndexerPerpBalanceNotionalValue, calcIndexerPerpBalanceValue, calcIndexerSpotBalanceValue };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nadohq/indexer-client",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.28.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"description": "HTTP client for the Nado indexer — historical data, events, and analytics queries",
|
|
@@ -41,8 +41,8 @@
|
|
|
41
41
|
"module": "./dist/index.js",
|
|
42
42
|
"types": "./dist/index.d.ts",
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@nadohq/engine-client": "^0.
|
|
45
|
-
"@nadohq/shared": "^0.
|
|
44
|
+
"@nadohq/engine-client": "^0.28.0",
|
|
45
|
+
"@nadohq/shared": "^0.28.0",
|
|
46
46
|
"axios": "1.16.1",
|
|
47
47
|
"ts-mixer": "6.0.4"
|
|
48
48
|
},
|
|
@@ -54,5 +54,5 @@
|
|
|
54
54
|
"bignumber.js": "11.1.1",
|
|
55
55
|
"viem": "2.52.0"
|
|
56
56
|
},
|
|
57
|
-
"gitHead": "
|
|
57
|
+
"gitHead": "12206fb18e68e917ce03051727dc7a97f401dd27"
|
|
58
58
|
}
|
package/src/IndexerBaseClient.ts
CHANGED
|
@@ -118,6 +118,7 @@ import {
|
|
|
118
118
|
IndexerMatchEvent,
|
|
119
119
|
IndexerOraclePrice,
|
|
120
120
|
IndexerServerEventsParams,
|
|
121
|
+
IndexerServerFailureError,
|
|
121
122
|
IndexerServerQueryRequestByType,
|
|
122
123
|
IndexerServerQueryRequestType,
|
|
123
124
|
IndexerServerQueryResponseByType,
|
|
@@ -125,6 +126,7 @@ import {
|
|
|
125
126
|
IndexerServerV2TickersResponse,
|
|
126
127
|
IndexerSnapshotBalance,
|
|
127
128
|
IndexerSubaccountSnapshot,
|
|
129
|
+
isIndexerServerFailureResponse,
|
|
128
130
|
ListIndexerSocialAccountsParams,
|
|
129
131
|
ListIndexerSocialAccountsResponse,
|
|
130
132
|
ListIndexerSubaccountsParams,
|
|
@@ -1190,6 +1192,9 @@ export class IndexerBaseClient {
|
|
|
1190
1192
|
}
|
|
1191
1193
|
|
|
1192
1194
|
private checkResponseStatus(response: AxiosResponse) {
|
|
1195
|
+
if (isIndexerServerFailureResponse(response.data)) {
|
|
1196
|
+
throw new IndexerServerFailureError(response.data, response.status);
|
|
1197
|
+
}
|
|
1193
1198
|
if (response.status !== 200 || !response.data) {
|
|
1194
1199
|
throw Error(
|
|
1195
1200
|
`Unexpected response from server: ${response.status} ${response.statusText}`,
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import {
|
|
2
|
+
IndexerServerFailureResponse,
|
|
3
|
+
IndexerServerRequestType,
|
|
4
|
+
} from './serverTypes';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Error thrown when the indexer service API returns a failure envelope (see
|
|
8
|
+
* {@link IndexerServerFailureResponse}), either as a non-2xx HTTP response or a 2xx response
|
|
9
|
+
* with `status: 'failure'`. The numeric error code is exposed directly on {@link errorCode} for
|
|
10
|
+
* comparison against {@link INDEXER_ERROR_CODES}.
|
|
11
|
+
*
|
|
12
|
+
* The v2 REST endpoints do not return a failure envelope — they use plain HTTP error responses
|
|
13
|
+
* without an `error_code` field, so this error is only thrown for the v1 query routes.
|
|
14
|
+
*/
|
|
15
|
+
export class IndexerServerFailureError extends Error {
|
|
16
|
+
/**
|
|
17
|
+
* HTTP status code of the response, e.g. `400` for a malformed request.
|
|
18
|
+
*/
|
|
19
|
+
readonly httpStatus: number;
|
|
20
|
+
/**
|
|
21
|
+
* Numeric indexer service API error code, see {@link INDEXER_ERROR_CODES}.
|
|
22
|
+
*/
|
|
23
|
+
readonly errorCode: number;
|
|
24
|
+
/**
|
|
25
|
+
* The request type that failed, e.g. `query_leaderboard_register`.
|
|
26
|
+
*/
|
|
27
|
+
readonly requestType: IndexerServerRequestType;
|
|
28
|
+
|
|
29
|
+
constructor(
|
|
30
|
+
readonly responseData: IndexerServerFailureResponse,
|
|
31
|
+
httpStatus: number,
|
|
32
|
+
) {
|
|
33
|
+
super(`${responseData.error_code}: ${responseData.error}`);
|
|
34
|
+
this.name = 'IndexerServerFailureError';
|
|
35
|
+
this.httpStatus = httpStatus;
|
|
36
|
+
this.errorCode = responseData.error_code;
|
|
37
|
+
this.requestType = responseData.request_type;
|
|
38
|
+
}
|
|
39
|
+
}
|
package/src/types/clientTypes.ts
CHANGED
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
PerpBalance,
|
|
6
6
|
PerpMarket,
|
|
7
7
|
ProductEngineType,
|
|
8
|
+
SignatureParams,
|
|
8
9
|
SpotBalance,
|
|
9
10
|
SpotMarket,
|
|
10
11
|
Subaccount,
|
|
@@ -658,11 +659,6 @@ export interface GetIndexerLeaderboardParticipantResponse {
|
|
|
658
659
|
participant: Record<string, IndexerLeaderboardParticipant>;
|
|
659
660
|
}
|
|
660
661
|
|
|
661
|
-
interface SignatureParams {
|
|
662
|
-
verifyingAddr: string;
|
|
663
|
-
chainId: number;
|
|
664
|
-
}
|
|
665
|
-
|
|
666
662
|
export interface GetIndexerLeaderboardRegistrationsParams {
|
|
667
663
|
subaccount: Subaccount;
|
|
668
664
|
/** Filter by contest IDs. Omit to return all. */
|
package/src/types/index.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
export * from './CandlestickPeriod';
|
|
2
2
|
export * from './clientTypes';
|
|
3
3
|
export * from './collateralEventType';
|
|
4
|
+
export * from './indexerErrorCodes';
|
|
4
5
|
export * from './IndexerEventType';
|
|
5
6
|
export * from './IndexerLeaderboardType';
|
|
7
|
+
export * from './IndexerServerFailureError';
|
|
6
8
|
export * from './NadoTx';
|
|
7
9
|
export * from './paginatedEventsTypes';
|
|
8
10
|
export * from './serverModelTypes';
|