@nadohq/indexer-client 0.1.0-alpha.2 → 0.1.0-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/IndexerBaseClient.cjs +71 -55
- package/dist/IndexerBaseClient.cjs.map +1 -1
- package/dist/IndexerBaseClient.d.cts +7 -3
- package/dist/IndexerBaseClient.d.ts +7 -3
- package/dist/IndexerBaseClient.js +22 -7
- package/dist/IndexerBaseClient.js.map +1 -1
- package/dist/IndexerClient.cjs +16 -16
- package/dist/IndexerClient.cjs.map +1 -1
- package/dist/IndexerClient.d.cts +2 -3
- package/dist/IndexerClient.d.ts +2 -3
- package/dist/IndexerClient.js +2 -2
- package/dist/IndexerClient.js.map +1 -1
- package/dist/dataMappers.cjs +105 -108
- package/dist/dataMappers.cjs.map +1 -1
- package/dist/dataMappers.d.cts +1 -2
- package/dist/dataMappers.d.ts +1 -2
- package/dist/dataMappers.js +7 -10
- package/dist/dataMappers.js.map +1 -1
- package/dist/endpoints.cjs +2 -2
- package/dist/endpoints.cjs.map +1 -1
- package/dist/endpoints.d.cts +1 -1
- package/dist/endpoints.d.ts +1 -1
- package/dist/endpoints.js +2 -2
- package/dist/endpoints.js.map +1 -1
- package/dist/index.d.cts +3 -4
- package/dist/index.d.ts +3 -4
- package/dist/types/clientTypes.cjs.map +1 -1
- package/dist/types/clientTypes.d.cts +8 -7
- package/dist/types/clientTypes.d.ts +8 -7
- package/dist/types/index.d.cts +3 -4
- package/dist/types/index.d.ts +3 -4
- package/dist/types/paginatedEventsTypes.cjs.map +1 -1
- package/dist/types/paginatedEventsTypes.d.cts +1 -2
- package/dist/types/paginatedEventsTypes.d.ts +1 -2
- package/dist/types/serverModelTypes.cjs.map +1 -1
- package/dist/types/serverModelTypes.d.cts +2 -1
- package/dist/types/serverModelTypes.d.ts +2 -1
- package/dist/types/serverTypes.cjs.map +1 -1
- package/dist/types/serverTypes.d.cts +10 -2
- package/dist/types/serverTypes.d.ts +10 -2
- package/dist/utils/index.d.cts +2 -3
- package/dist/utils/index.d.ts +2 -3
- package/dist/utils/indexerBalanceValue.cjs.map +1 -1
- package/dist/utils/indexerBalanceValue.d.cts +2 -3
- package/dist/utils/indexerBalanceValue.d.ts +2 -3
- package/dist/utils/indexerBalanceValue.js.map +1 -1
- package/package.json +4 -5
- package/src/IndexerBaseClient.ts +32 -11
- package/src/IndexerClient.ts +2 -2
- package/src/dataMappers.ts +8 -11
- package/src/endpoints.ts +2 -2
- package/src/types/clientTypes.ts +12 -8
- package/src/types/paginatedEventsTypes.ts +1 -2
- package/src/types/serverModelTypes.ts +2 -1
- package/src/types/serverTypes.ts +11 -1
- package/src/utils/indexerBalanceValue.ts +1 -1
package/dist/endpoints.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// src/endpoints.ts
|
|
2
2
|
var INDEXER_CLIENT_ENDPOINTS = {
|
|
3
3
|
local: "http://localhost:8000/indexer",
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
arbitrum: "https://archive.prod.vertexprotocol.com/v1",
|
|
5
|
+
inkTestnet: "https://archive.test.nado-backend.xyz/v1"
|
|
6
6
|
};
|
|
7
7
|
export {
|
|
8
8
|
INDEXER_CLIENT_ENDPOINTS
|
package/dist/endpoints.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/endpoints.ts"],"sourcesContent":["import { ChainEnv } from '@nadohq/
|
|
1
|
+
{"version":3,"sources":["../src/endpoints.ts"],"sourcesContent":["import { ChainEnv } from '@nadohq/shared';\n\nexport const INDEXER_CLIENT_ENDPOINTS: Record<ChainEnv, string> = {\n local: 'http://localhost:8000/indexer',\n arbitrum: 'https://archive.prod.vertexprotocol.com/v1',\n inkTestnet: 'https://archive.test.nado-backend.xyz/v1',\n};\n"],"mappings":";AAEO,IAAM,2BAAqD;AAAA,EAChE,OAAO;AAAA,EACP,UAAU;AAAA,EACV,YAAY;AACd;","names":[]}
|
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { Candlestick, GetIndexerBacklogResponse, GetIndexerCandlesticksParams, GetIndexerCandlesticksResponse, GetIndexerEdgeCandlesticksParams, GetIndexerEdgeCandlesticksResponse, GetIndexerEdgeMarketSnapshotResponse, GetIndexerEdgeMarketSnapshotsParams, GetIndexerEventsLimitType, GetIndexerEventsParams, GetIndexerEventsResponse, GetIndexerFastWithdrawalSignatureParams, GetIndexerFastWithdrawalSignatureResponse, GetIndexerFundingRateParams, GetIndexerFundingRateResponse, GetIndexerInterestFundingPaymentsParams, GetIndexerInterestFundingPaymentsResponse, GetIndexerLeaderboardContestsParams, GetIndexerLeaderboardContestsResponse, GetIndexerLeaderboardParams, GetIndexerLeaderboardParticipantParams, GetIndexerLeaderboardParticipantResponse, GetIndexerLeaderboardRegistrationParams, GetIndexerLeaderboardRegistrationResponse, GetIndexerLeaderboardResponse, GetIndexerLinkedSignerParams, GetIndexerLinkedSignerResponse, GetIndexerMakerStatisticsParams, GetIndexerMakerStatisticsResponse, GetIndexerMarketSnapshotsParams, GetIndexerMarketSnapshotsResponse, GetIndexerMatchEventsParams, GetIndexerMatchEventsResponse, GetIndexerMultiProductFundingRatesParams, GetIndexerMultiProductFundingRatesResponse, GetIndexerMultiProductPerpPricesParams, GetIndexerMultiProductPerpPricesResponse, GetIndexerMultiProductSnapshotsParams, GetIndexerMultiProductSnapshotsResponse, GetIndexerMultiSubaccountSnapshotsParams, GetIndexerMultiSubaccountSnapshotsResponse, GetIndexerNlpSnapshotsParams, GetIndexerNlpSnapshotsResponse, GetIndexerOraclePricesParams, GetIndexerOraclePricesResponse, GetIndexerOrdersParams, GetIndexerOrdersResponse, GetIndexerPerpPricesParams, GetIndexerPerpPricesResponse, GetIndexerProductSnapshotsParams, GetIndexerProductSnapshotsResponse, GetIndexerQuotePriceResponse, GetIndexerReferralCodeParams, GetIndexerReferralCodeResponse, IndexerBalanceTrackedVars, IndexerEvent, IndexerEventBalanceStateSnapshot, IndexerEventPerpStateSnapshot, IndexerEventSpotStateSnapshot, IndexerEventWithTx, IndexerFundingRate, IndexerLeaderboardContest, IndexerLeaderboardParticipant, IndexerLeaderboardRegistration, IndexerMaker, IndexerMakerSnapshot, IndexerMarketSnapshot, IndexerMatchEvent, IndexerMatchEventBalances, IndexerNlpSnapshot, IndexerOraclePrice, IndexerOrder, IndexerPerpBalance, IndexerPerpPrices, IndexerProductPayment, IndexerProductSnapshot, IndexerSnapshotBalance, IndexerSnapshotsIntervalParams, IndexerSpotBalance, IndexerSubaccountSnapshot, ListIndexerSubaccountsParams, ListIndexerSubaccountsResponse, UpdateIndexerLeaderboardRegistrationParams, UpdateIndexerLeaderboardRegistrationResponse } from './types/clientTypes.cjs';
|
|
1
|
+
export { Candlestick, GetIndexerBacklogResponse, GetIndexerCandlesticksParams, GetIndexerCandlesticksResponse, GetIndexerEdgeCandlesticksParams, GetIndexerEdgeCandlesticksResponse, GetIndexerEdgeMarketSnapshotResponse, GetIndexerEdgeMarketSnapshotsParams, GetIndexerEventsLimitType, GetIndexerEventsParams, GetIndexerEventsResponse, GetIndexerFastWithdrawalSignatureParams, GetIndexerFastWithdrawalSignatureResponse, GetIndexerFundingRateParams, GetIndexerFundingRateResponse, GetIndexerInterestFundingPaymentsParams, GetIndexerInterestFundingPaymentsResponse, GetIndexerLeaderboardContestsParams, GetIndexerLeaderboardContestsResponse, GetIndexerLeaderboardParams, GetIndexerLeaderboardParticipantParams, GetIndexerLeaderboardParticipantResponse, GetIndexerLeaderboardRegistrationParams, GetIndexerLeaderboardRegistrationResponse, GetIndexerLeaderboardResponse, GetIndexerLinkedSignerParams, GetIndexerLinkedSignerResponse, GetIndexerMakerStatisticsParams, GetIndexerMakerStatisticsResponse, GetIndexerMarketSnapshotsParams, GetIndexerMarketSnapshotsResponse, GetIndexerMatchEventsParams, GetIndexerMatchEventsResponse, GetIndexerMultiProductFundingRatesParams, GetIndexerMultiProductFundingRatesResponse, GetIndexerMultiProductPerpPricesParams, GetIndexerMultiProductPerpPricesResponse, GetIndexerMultiProductSnapshotsParams, GetIndexerMultiProductSnapshotsResponse, GetIndexerMultiSubaccountSnapshotsParams, GetIndexerMultiSubaccountSnapshotsResponse, GetIndexerNlpSnapshotsParams, GetIndexerNlpSnapshotsResponse, GetIndexerOraclePricesParams, GetIndexerOraclePricesResponse, GetIndexerOrdersParams, GetIndexerOrdersResponse, GetIndexerPerpPricesParams, GetIndexerPerpPricesResponse, GetIndexerProductSnapshotsParams, GetIndexerProductSnapshotsResponse, GetIndexerQuotePriceResponse, GetIndexerReferralCodeParams, GetIndexerReferralCodeResponse, GetIndexerSubaccountDDAParams, GetIndexerSubaccountDDAResponse, IndexerBalanceTrackedVars, IndexerEvent, IndexerEventBalanceStateSnapshot, IndexerEventPerpStateSnapshot, IndexerEventSpotStateSnapshot, IndexerEventWithTx, IndexerFundingRate, IndexerLeaderboardContest, IndexerLeaderboardParticipant, IndexerLeaderboardRegistration, IndexerMaker, IndexerMakerSnapshot, IndexerMarketSnapshot, IndexerMatchEvent, IndexerMatchEventBalances, IndexerNlpSnapshot, IndexerOraclePrice, IndexerOrder, IndexerPerpBalance, IndexerPerpPrices, IndexerProductPayment, IndexerProductSnapshot, IndexerSnapshotBalance, IndexerSnapshotsIntervalParams, IndexerSpotBalance, IndexerSubaccountSnapshot, ListIndexerSubaccountsParams, ListIndexerSubaccountsResponse, UpdateIndexerLeaderboardRegistrationParams, UpdateIndexerLeaderboardRegistrationResponse } from './types/clientTypes.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 } from './types/paginatedEventsTypes.cjs';
|
|
3
|
-
export { IndexerEdgeServerCandlesticksParams, IndexerEdgeServerCandlesticksResponse, IndexerEdgeServerMarketSnapshotsParams, IndexerEdgeServerMarketSnapshotsResponse, IndexerServerBacklogResponse, IndexerServerCandlesticksParams, IndexerServerCandlesticksResponse, IndexerServerEventsParams, IndexerServerEventsResponse, IndexerServerFastWithdrawalSignatureParams, IndexerServerFastWithdrawalSignatureResponse, IndexerServerFundingRate, IndexerServerFundingRateParams, IndexerServerFundingRateResponse, IndexerServerFundingRatesParams, IndexerServerFundingRatesResponse, IndexerServerInterestFundingParams, IndexerServerInterestFundingResponse, IndexerServerLeaderboardContestsParams, IndexerServerLeaderboardContestsResponse, IndexerServerLeaderboardParams, IndexerServerLeaderboardRankParams, IndexerServerLeaderboardRankResponse, IndexerServerLeaderboardRegistrationParams, IndexerServerLeaderboardRegistrationResponse, IndexerServerLeaderboardResponse, IndexerServerLinkedSignerParams, IndexerServerLinkedSignerResponse, IndexerServerListSubaccountsParams, IndexerServerListSubaccountsResponse, IndexerServerMakerStatisticsParams, IndexerServerMakerStatisticsResponse, IndexerServerMarketSnapshotsParams, IndexerServerMarketSnapshotsResponse, IndexerServerMatchEventsParams, IndexerServerMatchEventsResponse, IndexerServerMultiProductsParams, IndexerServerMultiProductsResponse, IndexerServerMultiSubaccountSnapshotsParams, IndexerServerMultiSubaccountSnapshotsResponse, IndexerServerNlpSnapshotsParams, IndexerServerNlpSnapshotsResponse, IndexerServerOraclePricesParams, IndexerServerOraclePricesResponse, IndexerServerOrdersParams, IndexerServerOrdersResponse, IndexerServerPerpPrices, IndexerServerPerpPricesParams, IndexerServerPerpPricesResponse, IndexerServerPriceParams, IndexerServerPriceResponse, IndexerServerProductsParams, IndexerServerProductsResponse, IndexerServerQueryRequestByType, IndexerServerQueryRequestType, IndexerServerQueryResponseByType, IndexerServerReferralCodeParams, IndexerServerReferralCodeResponse, IndexerServerUsdcPriceResponse } from './types/serverTypes.cjs';
|
|
3
|
+
export { IndexerEdgeServerCandlesticksParams, IndexerEdgeServerCandlesticksResponse, IndexerEdgeServerMarketSnapshotsParams, IndexerEdgeServerMarketSnapshotsResponse, IndexerServerBacklogResponse, IndexerServerCandlesticksParams, IndexerServerCandlesticksResponse, IndexerServerDDAQueryParams, IndexerServerDDAResponse, IndexerServerEventsParams, IndexerServerEventsResponse, IndexerServerFastWithdrawalSignatureParams, IndexerServerFastWithdrawalSignatureResponse, IndexerServerFundingRate, IndexerServerFundingRateParams, IndexerServerFundingRateResponse, IndexerServerFundingRatesParams, IndexerServerFundingRatesResponse, IndexerServerInterestFundingParams, IndexerServerInterestFundingResponse, IndexerServerLeaderboardContestsParams, IndexerServerLeaderboardContestsResponse, IndexerServerLeaderboardParams, IndexerServerLeaderboardRankParams, IndexerServerLeaderboardRankResponse, IndexerServerLeaderboardRegistrationParams, IndexerServerLeaderboardRegistrationResponse, IndexerServerLeaderboardResponse, IndexerServerLinkedSignerParams, IndexerServerLinkedSignerResponse, IndexerServerListSubaccountsParams, IndexerServerListSubaccountsResponse, IndexerServerMakerStatisticsParams, IndexerServerMakerStatisticsResponse, IndexerServerMarketSnapshotsParams, IndexerServerMarketSnapshotsResponse, IndexerServerMatchEventsParams, IndexerServerMatchEventsResponse, IndexerServerMultiProductsParams, IndexerServerMultiProductsResponse, IndexerServerMultiSubaccountSnapshotsParams, IndexerServerMultiSubaccountSnapshotsResponse, IndexerServerNlpSnapshotsParams, IndexerServerNlpSnapshotsResponse, IndexerServerOraclePricesParams, IndexerServerOraclePricesResponse, IndexerServerOrdersParams, IndexerServerOrdersResponse, IndexerServerPerpPrices, IndexerServerPerpPricesParams, IndexerServerPerpPricesResponse, IndexerServerPriceParams, IndexerServerPriceResponse, IndexerServerProductsParams, IndexerServerProductsResponse, IndexerServerQueryRequestByType, IndexerServerQueryRequestType, IndexerServerQueryResponseByType, IndexerServerReferralCodeParams, IndexerServerReferralCodeResponse, IndexerServerUsdcPriceResponse } from './types/serverTypes.cjs';
|
|
4
4
|
export { IndexerServerBalance, IndexerServerCandlestick, IndexerServerEvent, IndexerServerLeaderboardContest, IndexerServerLeaderboardPosition, IndexerServerLeaderboardRegistration, IndexerServerMaker, IndexerServerMakerData, IndexerServerMarketSnapshot, IndexerServerMarketSnapshotInterval, IndexerServerMatchEvent, IndexerServerMatchEventBalances, IndexerServerNlpSnapshot, IndexerServerOraclePrice, IndexerServerOrder, IndexerServerProduct, IndexerServerProductPayment, IndexerServerProductSnapshot, IndexerServerSnapshotsInterval, IndexerServerTx } from './types/serverModelTypes.cjs';
|
|
5
5
|
export { CandlestickPeriod } from './types/CandlestickPeriod.cjs';
|
|
6
6
|
export { IndexerEventType } from './types/IndexerEventType.cjs';
|
|
@@ -10,8 +10,7 @@ export { NadoDepositCollateralTx, NadoLiquidateSubaccountTx, NadoMatchOrdersRfqT
|
|
|
10
10
|
export { IndexerClient } from './IndexerClient.cjs';
|
|
11
11
|
export { INDEXER_CLIENT_ENDPOINTS } from './endpoints.cjs';
|
|
12
12
|
export { calcIndexerPerpBalanceNotionalValue, calcIndexerPerpBalanceValue, calcIndexerSpotBalanceValue } from './utils/indexerBalanceValue.cjs';
|
|
13
|
-
import '@nadohq/
|
|
14
|
-
import '@nadohq/utils';
|
|
13
|
+
import '@nadohq/shared';
|
|
15
14
|
import 'viem';
|
|
16
15
|
import '@nadohq/engine-client';
|
|
17
16
|
import './IndexerBaseClient.cjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { Candlestick, GetIndexerBacklogResponse, GetIndexerCandlesticksParams, GetIndexerCandlesticksResponse, GetIndexerEdgeCandlesticksParams, GetIndexerEdgeCandlesticksResponse, GetIndexerEdgeMarketSnapshotResponse, GetIndexerEdgeMarketSnapshotsParams, GetIndexerEventsLimitType, GetIndexerEventsParams, GetIndexerEventsResponse, GetIndexerFastWithdrawalSignatureParams, GetIndexerFastWithdrawalSignatureResponse, GetIndexerFundingRateParams, GetIndexerFundingRateResponse, GetIndexerInterestFundingPaymentsParams, GetIndexerInterestFundingPaymentsResponse, GetIndexerLeaderboardContestsParams, GetIndexerLeaderboardContestsResponse, GetIndexerLeaderboardParams, GetIndexerLeaderboardParticipantParams, GetIndexerLeaderboardParticipantResponse, GetIndexerLeaderboardRegistrationParams, GetIndexerLeaderboardRegistrationResponse, GetIndexerLeaderboardResponse, GetIndexerLinkedSignerParams, GetIndexerLinkedSignerResponse, GetIndexerMakerStatisticsParams, GetIndexerMakerStatisticsResponse, GetIndexerMarketSnapshotsParams, GetIndexerMarketSnapshotsResponse, GetIndexerMatchEventsParams, GetIndexerMatchEventsResponse, GetIndexerMultiProductFundingRatesParams, GetIndexerMultiProductFundingRatesResponse, GetIndexerMultiProductPerpPricesParams, GetIndexerMultiProductPerpPricesResponse, GetIndexerMultiProductSnapshotsParams, GetIndexerMultiProductSnapshotsResponse, GetIndexerMultiSubaccountSnapshotsParams, GetIndexerMultiSubaccountSnapshotsResponse, GetIndexerNlpSnapshotsParams, GetIndexerNlpSnapshotsResponse, GetIndexerOraclePricesParams, GetIndexerOraclePricesResponse, GetIndexerOrdersParams, GetIndexerOrdersResponse, GetIndexerPerpPricesParams, GetIndexerPerpPricesResponse, GetIndexerProductSnapshotsParams, GetIndexerProductSnapshotsResponse, GetIndexerQuotePriceResponse, GetIndexerReferralCodeParams, GetIndexerReferralCodeResponse, IndexerBalanceTrackedVars, IndexerEvent, IndexerEventBalanceStateSnapshot, IndexerEventPerpStateSnapshot, IndexerEventSpotStateSnapshot, IndexerEventWithTx, IndexerFundingRate, IndexerLeaderboardContest, IndexerLeaderboardParticipant, IndexerLeaderboardRegistration, IndexerMaker, IndexerMakerSnapshot, IndexerMarketSnapshot, IndexerMatchEvent, IndexerMatchEventBalances, IndexerNlpSnapshot, IndexerOraclePrice, IndexerOrder, IndexerPerpBalance, IndexerPerpPrices, IndexerProductPayment, IndexerProductSnapshot, IndexerSnapshotBalance, IndexerSnapshotsIntervalParams, IndexerSpotBalance, IndexerSubaccountSnapshot, ListIndexerSubaccountsParams, ListIndexerSubaccountsResponse, UpdateIndexerLeaderboardRegistrationParams, UpdateIndexerLeaderboardRegistrationResponse } from './types/clientTypes.js';
|
|
1
|
+
export { Candlestick, GetIndexerBacklogResponse, GetIndexerCandlesticksParams, GetIndexerCandlesticksResponse, GetIndexerEdgeCandlesticksParams, GetIndexerEdgeCandlesticksResponse, GetIndexerEdgeMarketSnapshotResponse, GetIndexerEdgeMarketSnapshotsParams, GetIndexerEventsLimitType, GetIndexerEventsParams, GetIndexerEventsResponse, GetIndexerFastWithdrawalSignatureParams, GetIndexerFastWithdrawalSignatureResponse, GetIndexerFundingRateParams, GetIndexerFundingRateResponse, GetIndexerInterestFundingPaymentsParams, GetIndexerInterestFundingPaymentsResponse, GetIndexerLeaderboardContestsParams, GetIndexerLeaderboardContestsResponse, GetIndexerLeaderboardParams, GetIndexerLeaderboardParticipantParams, GetIndexerLeaderboardParticipantResponse, GetIndexerLeaderboardRegistrationParams, GetIndexerLeaderboardRegistrationResponse, GetIndexerLeaderboardResponse, GetIndexerLinkedSignerParams, GetIndexerLinkedSignerResponse, GetIndexerMakerStatisticsParams, GetIndexerMakerStatisticsResponse, GetIndexerMarketSnapshotsParams, GetIndexerMarketSnapshotsResponse, GetIndexerMatchEventsParams, GetIndexerMatchEventsResponse, GetIndexerMultiProductFundingRatesParams, GetIndexerMultiProductFundingRatesResponse, GetIndexerMultiProductPerpPricesParams, GetIndexerMultiProductPerpPricesResponse, GetIndexerMultiProductSnapshotsParams, GetIndexerMultiProductSnapshotsResponse, GetIndexerMultiSubaccountSnapshotsParams, GetIndexerMultiSubaccountSnapshotsResponse, GetIndexerNlpSnapshotsParams, GetIndexerNlpSnapshotsResponse, GetIndexerOraclePricesParams, GetIndexerOraclePricesResponse, GetIndexerOrdersParams, GetIndexerOrdersResponse, GetIndexerPerpPricesParams, GetIndexerPerpPricesResponse, GetIndexerProductSnapshotsParams, GetIndexerProductSnapshotsResponse, GetIndexerQuotePriceResponse, GetIndexerReferralCodeParams, GetIndexerReferralCodeResponse, GetIndexerSubaccountDDAParams, GetIndexerSubaccountDDAResponse, IndexerBalanceTrackedVars, IndexerEvent, IndexerEventBalanceStateSnapshot, IndexerEventPerpStateSnapshot, IndexerEventSpotStateSnapshot, IndexerEventWithTx, IndexerFundingRate, IndexerLeaderboardContest, IndexerLeaderboardParticipant, IndexerLeaderboardRegistration, IndexerMaker, IndexerMakerSnapshot, IndexerMarketSnapshot, IndexerMatchEvent, IndexerMatchEventBalances, IndexerNlpSnapshot, IndexerOraclePrice, IndexerOrder, IndexerPerpBalance, IndexerPerpPrices, IndexerProductPayment, IndexerProductSnapshot, IndexerSnapshotBalance, IndexerSnapshotsIntervalParams, IndexerSpotBalance, IndexerSubaccountSnapshot, ListIndexerSubaccountsParams, ListIndexerSubaccountsResponse, UpdateIndexerLeaderboardRegistrationParams, UpdateIndexerLeaderboardRegistrationResponse } from './types/clientTypes.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 } from './types/paginatedEventsTypes.js';
|
|
3
|
-
export { IndexerEdgeServerCandlesticksParams, IndexerEdgeServerCandlesticksResponse, IndexerEdgeServerMarketSnapshotsParams, IndexerEdgeServerMarketSnapshotsResponse, IndexerServerBacklogResponse, IndexerServerCandlesticksParams, IndexerServerCandlesticksResponse, IndexerServerEventsParams, IndexerServerEventsResponse, IndexerServerFastWithdrawalSignatureParams, IndexerServerFastWithdrawalSignatureResponse, IndexerServerFundingRate, IndexerServerFundingRateParams, IndexerServerFundingRateResponse, IndexerServerFundingRatesParams, IndexerServerFundingRatesResponse, IndexerServerInterestFundingParams, IndexerServerInterestFundingResponse, IndexerServerLeaderboardContestsParams, IndexerServerLeaderboardContestsResponse, IndexerServerLeaderboardParams, IndexerServerLeaderboardRankParams, IndexerServerLeaderboardRankResponse, IndexerServerLeaderboardRegistrationParams, IndexerServerLeaderboardRegistrationResponse, IndexerServerLeaderboardResponse, IndexerServerLinkedSignerParams, IndexerServerLinkedSignerResponse, IndexerServerListSubaccountsParams, IndexerServerListSubaccountsResponse, IndexerServerMakerStatisticsParams, IndexerServerMakerStatisticsResponse, IndexerServerMarketSnapshotsParams, IndexerServerMarketSnapshotsResponse, IndexerServerMatchEventsParams, IndexerServerMatchEventsResponse, IndexerServerMultiProductsParams, IndexerServerMultiProductsResponse, IndexerServerMultiSubaccountSnapshotsParams, IndexerServerMultiSubaccountSnapshotsResponse, IndexerServerNlpSnapshotsParams, IndexerServerNlpSnapshotsResponse, IndexerServerOraclePricesParams, IndexerServerOraclePricesResponse, IndexerServerOrdersParams, IndexerServerOrdersResponse, IndexerServerPerpPrices, IndexerServerPerpPricesParams, IndexerServerPerpPricesResponse, IndexerServerPriceParams, IndexerServerPriceResponse, IndexerServerProductsParams, IndexerServerProductsResponse, IndexerServerQueryRequestByType, IndexerServerQueryRequestType, IndexerServerQueryResponseByType, IndexerServerReferralCodeParams, IndexerServerReferralCodeResponse, IndexerServerUsdcPriceResponse } from './types/serverTypes.js';
|
|
3
|
+
export { IndexerEdgeServerCandlesticksParams, IndexerEdgeServerCandlesticksResponse, IndexerEdgeServerMarketSnapshotsParams, IndexerEdgeServerMarketSnapshotsResponse, IndexerServerBacklogResponse, IndexerServerCandlesticksParams, IndexerServerCandlesticksResponse, IndexerServerDDAQueryParams, IndexerServerDDAResponse, IndexerServerEventsParams, IndexerServerEventsResponse, IndexerServerFastWithdrawalSignatureParams, IndexerServerFastWithdrawalSignatureResponse, IndexerServerFundingRate, IndexerServerFundingRateParams, IndexerServerFundingRateResponse, IndexerServerFundingRatesParams, IndexerServerFundingRatesResponse, IndexerServerInterestFundingParams, IndexerServerInterestFundingResponse, IndexerServerLeaderboardContestsParams, IndexerServerLeaderboardContestsResponse, IndexerServerLeaderboardParams, IndexerServerLeaderboardRankParams, IndexerServerLeaderboardRankResponse, IndexerServerLeaderboardRegistrationParams, IndexerServerLeaderboardRegistrationResponse, IndexerServerLeaderboardResponse, IndexerServerLinkedSignerParams, IndexerServerLinkedSignerResponse, IndexerServerListSubaccountsParams, IndexerServerListSubaccountsResponse, IndexerServerMakerStatisticsParams, IndexerServerMakerStatisticsResponse, IndexerServerMarketSnapshotsParams, IndexerServerMarketSnapshotsResponse, IndexerServerMatchEventsParams, IndexerServerMatchEventsResponse, IndexerServerMultiProductsParams, IndexerServerMultiProductsResponse, IndexerServerMultiSubaccountSnapshotsParams, IndexerServerMultiSubaccountSnapshotsResponse, IndexerServerNlpSnapshotsParams, IndexerServerNlpSnapshotsResponse, IndexerServerOraclePricesParams, IndexerServerOraclePricesResponse, IndexerServerOrdersParams, IndexerServerOrdersResponse, IndexerServerPerpPrices, IndexerServerPerpPricesParams, IndexerServerPerpPricesResponse, IndexerServerPriceParams, IndexerServerPriceResponse, IndexerServerProductsParams, IndexerServerProductsResponse, IndexerServerQueryRequestByType, IndexerServerQueryRequestType, IndexerServerQueryResponseByType, IndexerServerReferralCodeParams, IndexerServerReferralCodeResponse, IndexerServerUsdcPriceResponse } from './types/serverTypes.js';
|
|
4
4
|
export { IndexerServerBalance, IndexerServerCandlestick, IndexerServerEvent, IndexerServerLeaderboardContest, IndexerServerLeaderboardPosition, IndexerServerLeaderboardRegistration, IndexerServerMaker, IndexerServerMakerData, IndexerServerMarketSnapshot, IndexerServerMarketSnapshotInterval, IndexerServerMatchEvent, IndexerServerMatchEventBalances, IndexerServerNlpSnapshot, IndexerServerOraclePrice, IndexerServerOrder, IndexerServerProduct, IndexerServerProductPayment, IndexerServerProductSnapshot, IndexerServerSnapshotsInterval, IndexerServerTx } from './types/serverModelTypes.js';
|
|
5
5
|
export { CandlestickPeriod } from './types/CandlestickPeriod.js';
|
|
6
6
|
export { IndexerEventType } from './types/IndexerEventType.js';
|
|
@@ -10,8 +10,7 @@ export { NadoDepositCollateralTx, NadoLiquidateSubaccountTx, NadoMatchOrdersRfqT
|
|
|
10
10
|
export { IndexerClient } from './IndexerClient.js';
|
|
11
11
|
export { INDEXER_CLIENT_ENDPOINTS } from './endpoints.js';
|
|
12
12
|
export { calcIndexerPerpBalanceNotionalValue, calcIndexerPerpBalanceValue, calcIndexerSpotBalanceValue } from './utils/indexerBalanceValue.js';
|
|
13
|
-
import '@nadohq/
|
|
14
|
-
import '@nadohq/utils';
|
|
13
|
+
import '@nadohq/shared';
|
|
15
14
|
import 'viem';
|
|
16
15
|
import '@nadohq/engine-client';
|
|
17
16
|
import './IndexerBaseClient.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/types/clientTypes.ts"],"sourcesContent":["import {\n EIP712OrderValues,\n Market,\n OrderExpirationType,\n PerpBalance,\n PerpMarket,\n ProductEngineType,\n SpotBalance,\n SpotMarket,\n Subaccount,\n} from '@nadohq/contracts';\nimport { BigDecimal } from '@nadohq/utils';\nimport { Hex } from 'viem';\nimport { CandlestickPeriod } from './CandlestickPeriod';\nimport { IndexerEventType } from './IndexerEventType';\nimport { IndexerLeaderboardRankType } from './IndexerLeaderboardType';\nimport {\n IndexerServerFastWithdrawalSignatureParams,\n IndexerServerListSubaccountsParams,\n} from './serverTypes';\nimport { NadoTx, NadoWithdrawCollateralTx } from './NadoTx';\n\n/**\n * Base types\n */\n\nexport type IndexerSpotBalance = Omit<SpotBalance, 'healthContributions'>;\n\nexport type IndexerPerpBalance = Omit<PerpBalance, 'healthContributions'>;\n\nexport interface IndexerEventSpotStateSnapshot {\n type: ProductEngineType.SPOT;\n preBalance: IndexerSpotBalance;\n postBalance: IndexerSpotBalance;\n market: SpotMarket;\n}\n\nexport interface IndexerEventPerpStateSnapshot {\n type: ProductEngineType.PERP;\n preBalance: IndexerPerpBalance;\n postBalance: IndexerPerpBalance;\n market: PerpMarket;\n}\n\nexport type IndexerEventBalanceStateSnapshot =\n | IndexerEventSpotStateSnapshot\n | IndexerEventPerpStateSnapshot;\n\nexport interface IndexerBalanceTrackedVars {\n netInterestUnrealized: BigDecimal;\n netInterestCumulative: BigDecimal;\n netFundingUnrealized: BigDecimal;\n netFundingCumulative: BigDecimal;\n netEntryUnrealized: BigDecimal;\n netEntryCumulative: BigDecimal;\n}\n\nexport interface IndexerEvent<\n TStateType extends\n IndexerEventBalanceStateSnapshot = IndexerEventBalanceStateSnapshot,\n> {\n subaccount: string;\n isolated: boolean;\n // The product ID associated with the isolated perp market. This is only used when productId === QUOTE_PRODUCT_ID and isolated === true\n isolatedProductId: number | null;\n productId: number;\n submissionIndex: string;\n eventType: IndexerEventType;\n state: TStateType;\n trackedVars: IndexerBalanceTrackedVars;\n}\n\nexport interface IndexerEventWithTx<\n TStateType extends\n IndexerEventBalanceStateSnapshot = IndexerEventBalanceStateSnapshot,\n> extends IndexerEvent<TStateType> {\n timestamp: BigDecimal;\n tx: NadoTx;\n}\n\n/**\n * List subaccounts\n */\n\nexport type ListIndexerSubaccountsParams = IndexerServerListSubaccountsParams;\n\nexport type ListIndexerSubaccountsResponse = ({\n hexId: string;\n} & Subaccount)[];\n\n/**\n * Subaccount snapshots\n */\n\nexport interface GetIndexerMultiSubaccountSnapshotsParams {\n subaccounts: Subaccount[];\n // A series of timestamps for which to return a summary of each subaccount\n timestamps: number[];\n // If not given, will return both isolated & non-iso balances\n isolated?: boolean;\n}\n\nexport type IndexerSnapshotBalance<\n TStateType extends\n IndexerEventBalanceStateSnapshot = IndexerEventBalanceStateSnapshot,\n> = IndexerEvent<TStateType>;\n\nexport interface IndexerSubaccountSnapshot {\n timestamp: BigDecimal;\n balances: IndexerSnapshotBalance[];\n}\n\nexport interface GetIndexerMultiSubaccountSnapshotsResponse {\n // Utility for retrieving a subaccount's hex ID, in the same order as the request params\n subaccountHexIds: string[];\n // Map of subaccount hex -> timestamp requested -> summary for that time\n snapshots: Record<string, Record<string, IndexerSubaccountSnapshot>>;\n}\n\n/**\n * Perp prices\n */\n\nexport interface GetIndexerPerpPricesParams {\n productId: number;\n}\n\nexport interface IndexerPerpPrices {\n productId: number;\n indexPrice: BigDecimal;\n markPrice: BigDecimal;\n // Seconds\n updateTime: BigDecimal;\n}\n\nexport type GetIndexerPerpPricesResponse = IndexerPerpPrices;\n\nexport interface GetIndexerMultiProductPerpPricesParams {\n productIds: number[];\n}\n\n// Map of productId -> IndexerPerpPrices\nexport type GetIndexerMultiProductPerpPricesResponse = Record<\n number,\n IndexerPerpPrices\n>;\n\n/**\n * Oracle prices\n */\n\nexport interface GetIndexerOraclePricesParams {\n productIds: number[];\n}\n\nexport interface IndexerOraclePrice {\n productId: number;\n oraclePrice: BigDecimal;\n // Seconds\n updateTime: BigDecimal;\n}\n\nexport type GetIndexerOraclePricesResponse = IndexerOraclePrice[];\n\n/**\n * Funding rates\n */\n\nexport interface GetIndexerFundingRateParams {\n productId: number;\n}\n\nexport interface IndexerFundingRate {\n productId: number;\n fundingRate: BigDecimal;\n // Seconds\n updateTime: BigDecimal;\n}\n\nexport type GetIndexerFundingRateResponse = IndexerFundingRate;\n\nexport interface GetIndexerMultiProductFundingRatesParams {\n productIds: number[];\n}\n\n// Map of productId -> IndexerFundingRate\nexport type GetIndexerMultiProductFundingRatesResponse = Record<\n number,\n IndexerFundingRate\n>;\n\n/**\n * Candlesticks\n */\n\nexport interface GetIndexerCandlesticksParams {\n productId: number;\n period: CandlestickPeriod;\n // Seconds\n maxTimeInclusive?: number;\n limit: number;\n}\n\n// Semi-Tradingview compatible bars\nexport interface Candlestick {\n // In SECONDS, for TV compat, this needs to be in millis\n time: BigDecimal;\n open: BigDecimal;\n high: BigDecimal;\n low: BigDecimal;\n close: BigDecimal;\n volume: BigDecimal;\n}\n\nexport type GetIndexerCandlesticksResponse = Candlestick[];\n\nexport type GetIndexerEdgeCandlesticksResponse = GetIndexerCandlesticksResponse;\n\nexport type GetIndexerEdgeCandlesticksParams = GetIndexerCandlesticksParams;\n\n/**\n * Product snapshots\n */\n\nexport interface GetIndexerProductSnapshotsParams {\n // Max submission index, inclusive\n startCursor?: string;\n productId: number;\n maxTimestampInclusive?: number;\n limit: number;\n}\n\nexport interface IndexerProductSnapshot extends Market {\n submissionIndex: string;\n}\n\nexport type GetIndexerProductSnapshotsResponse = IndexerProductSnapshot[];\n\nexport interface GetIndexerMultiProductSnapshotsParams {\n productIds: number[];\n maxTimestampInclusive?: number[];\n}\n\n// Map of timestamp -> (productId -> IndexerProductSnapshot)\nexport type GetIndexerMultiProductSnapshotsResponse = Record<\n string,\n Record<number, IndexerProductSnapshot>\n>;\n\nexport interface IndexerSnapshotsIntervalParams {\n /** Currently accepts all integers, in seconds */\n granularity: number;\n /**\n * Optional upper bound for snapshot timestamps (in seconds).\n * Without this, snapshots will default to align with last UTC midnight,\n * which can make \"Last 24h\" metrics inaccurate.\n */\n maxTimeInclusive?: number;\n limit: number;\n}\n\n/**\n * Market snapshots\n */\n\nexport interface GetIndexerMarketSnapshotsParams\n extends IndexerSnapshotsIntervalParams {\n // Defaults to all\n productIds?: number[];\n}\n\nexport interface IndexerMarketSnapshot {\n timestamp: BigDecimal;\n cumulativeUsers: BigDecimal;\n dailyActiveUsers: BigDecimal;\n tvl: BigDecimal;\n cumulativeVolumes: Record<number, BigDecimal>;\n cumulativeTakerFees: Record<number, BigDecimal>;\n cumulativeSequencerFees: Record<number, BigDecimal>;\n cumulativeMakerFees: Record<number, BigDecimal>;\n cumulativeTrades: Record<number, BigDecimal>;\n cumulativeLiquidationAmounts: Record<number, BigDecimal>;\n openInterestsQuote: Record<number, BigDecimal>;\n totalDeposits: Record<number, BigDecimal>;\n totalBorrows: Record<number, BigDecimal>;\n fundingRates: Record<number, BigDecimal>;\n depositRates: Record<number, BigDecimal>;\n borrowRates: Record<number, BigDecimal>;\n cumulativeTradeSizes: Record<number, BigDecimal>;\n cumulativeInflows: Record<number, BigDecimal>;\n cumulativeOutflows: Record<number, BigDecimal>;\n oraclePrices: Record<number, BigDecimal>;\n}\n\nexport type GetIndexerMarketSnapshotsResponse = IndexerMarketSnapshot[];\n\nexport type GetIndexerEdgeMarketSnapshotsParams =\n IndexerSnapshotsIntervalParams;\n\n// Map of chain id -> IndexerMarketSnapshot[]\nexport type GetIndexerEdgeMarketSnapshotResponse = Record<\n number,\n IndexerMarketSnapshot[]\n>;\n\n/**\n * Events\n */\n\n// There can be multiple events per tx, this allows a limit depending on usecase\nexport type GetIndexerEventsLimitType = 'events' | 'txs';\n\nexport interface GetIndexerEventsParams {\n // Max submission index, inclusive\n startCursor?: string;\n subaccount?: Subaccount;\n productIds?: number[];\n // If not given, will return both isolated & non-iso events\n isolated?: boolean;\n eventTypes?: IndexerEventType[];\n maxTimestampInclusive?: number;\n // Descending order for idx (time), defaults to true\n desc?: boolean;\n limit?: {\n type: GetIndexerEventsLimitType;\n value: number;\n };\n}\n\nexport type GetIndexerEventsResponse = IndexerEventWithTx[];\n\n/**\n * Historical orders\n */\n\nexport interface GetIndexerOrdersParams {\n // Max submission index, inclusive\n startCursor?: string;\n subaccount?: Subaccount;\n minTimestampInclusive?: number;\n maxTimestampInclusive?: number;\n limit?: number;\n productIds?: number[];\n // If not given, will return both isolated & non-iso orders\n isolated?: boolean;\n digests?: string[];\n}\n\nexport interface IndexerOrder {\n digest: string;\n subaccount: string;\n isolated: boolean;\n productId: number;\n submissionIndex: string;\n amount: BigDecimal;\n price: BigDecimal;\n // This includes the order type\n rawExpiration: BigDecimal;\n isReduceOnly: boolean;\n orderType: OrderExpirationType;\n expiration: number;\n nonce: BigDecimal;\n // Derived from the nonce\n recvTimeSeconds: number;\n // Fill amounts\n baseFilled: BigDecimal;\n // Includes fee\n quoteFilled: BigDecimal;\n // Includes sequencer fee\n totalFee: BigDecimal;\n}\n\nexport type GetIndexerOrdersResponse = IndexerOrder[];\n\n/**\n * Match events\n */\n\nexport interface GetIndexerMatchEventsParams {\n // When not given, will return all maker events\n subaccount?: Subaccount;\n productIds?: number[];\n // If not given, will return both isolated & non-iso events\n isolated?: boolean;\n maxTimestampInclusive?: number;\n limit: number;\n // Max submission index, inclusive\n startCursor?: string;\n}\n\n// There are 2 balance states per match event if the match is in a spot market, but only one if the match is in a perp market\nexport interface IndexerMatchEventBalances {\n base: IndexerSpotBalance | IndexerPerpBalance;\n quote?: IndexerSpotBalance;\n}\n\nexport interface IndexerMatchEvent extends Subaccount {\n productId: number;\n digest: string;\n isolated: boolean;\n order: EIP712OrderValues;\n baseFilled: BigDecimal;\n quoteFilled: BigDecimal;\n // Includes sequencer fee\n totalFee: BigDecimal;\n sequencerFee: BigDecimal;\n cumulativeBaseFilled: BigDecimal;\n cumulativeQuoteFilled: BigDecimal;\n cumulativeFee: BigDecimal;\n submissionIndex: string;\n timestamp: BigDecimal;\n // Tracked vars for the balance BEFORE this match event occurred\n preEventTrackedVars: Pick<\n IndexerBalanceTrackedVars,\n 'netEntryCumulative' | 'netEntryUnrealized'\n >;\n preBalances: IndexerMatchEventBalances;\n postBalances: IndexerMatchEventBalances;\n tx: NadoTx;\n}\n\nexport type GetIndexerMatchEventsResponse = IndexerMatchEvent[];\n\n/**\n * Quote price\n */\n\nexport interface GetIndexerQuotePriceResponse {\n price: BigDecimal;\n}\n\n/**\n * Linked Signer\n */\n\nexport interface GetIndexerLinkedSignerParams {\n subaccount: Subaccount;\n}\n\nexport interface GetIndexerLinkedSignerResponse {\n totalTxLimit: BigDecimal;\n remainingTxs: BigDecimal;\n // If remainingTxs is 0, this is the time until the next link signer tx can be sent\n waitTimeUntilNextTx: BigDecimal;\n // If zero address, none is configured\n signer: string;\n}\n\n/**\n * Interest / funding payments\n */\n\nexport interface GetIndexerInterestFundingPaymentsParams {\n subaccount: Subaccount;\n productIds: number[];\n maxTimestampInclusive?: number;\n limit: number;\n // Max submission index, inclusive\n startCursor?: string;\n}\n\nexport interface IndexerProductPayment {\n productId: number;\n submissionIndex: string;\n timestamp: BigDecimal;\n paymentAmount: BigDecimal;\n // For spots: previous spot balance at the moment of payment (exclusive of `paymentAmount`).\n // For perps: previous perp balance at the moment of payment + amount of perps locked in LPs (exclusive of `paymentAmount`).\n balanceAmount: BigDecimal;\n // Represents the annually interest rate for spots and annually funding rate for perps.\n annualPaymentRate: BigDecimal;\n oraclePrice: BigDecimal;\n isolated: boolean;\n // The product ID associated with the isolated perp market. This is only used when product_id === QUOTE_PRODUCT_ID and isolated === true\n isolatedProductId: number | null;\n}\n\nexport interface GetIndexerInterestFundingPaymentsResponse {\n interestPayments: IndexerProductPayment[];\n fundingPayments: IndexerProductPayment[];\n nextCursor: string | null;\n}\n\n/**\n * Referral code\n */\n\nexport interface GetIndexerReferralCodeParams {\n subaccount: Subaccount;\n}\n\nexport interface GetIndexerReferralCodeResponse {\n referralCode: string | null;\n}\n\n/**\n * Maker stats\n */\n\nexport interface GetIndexerMakerStatisticsParams {\n productId: number;\n epoch: number;\n interval: number;\n}\n\nexport interface IndexerMakerSnapshot {\n timestamp: BigDecimal;\n makerFee: BigDecimal;\n uptime: BigDecimal;\n sumQMin: BigDecimal;\n qScore: BigDecimal;\n makerShare: BigDecimal;\n expectedMakerReward: BigDecimal;\n}\n\nexport interface IndexerMaker {\n address: string;\n snapshots: IndexerMakerSnapshot[];\n}\n\nexport interface GetIndexerMakerStatisticsResponse {\n rewardCoefficient: BigDecimal;\n makers: IndexerMaker[];\n}\n\n/**\n * Leaderboards\n */\n\nexport interface GetIndexerLeaderboardParams {\n contestId: number;\n rankType: IndexerLeaderboardRankType;\n // Min rank inclusive\n startCursor?: string;\n limit?: number;\n}\n\nexport interface IndexerLeaderboardParticipant {\n subaccount: Subaccount;\n contestId: number;\n pnl: BigDecimal;\n pnlRank: BigDecimal;\n percentRoi: BigDecimal;\n roiRank: BigDecimal;\n // Float indicating the ending account value at the time the snapshot was taken i.e: at updateTime\n accountValue: BigDecimal;\n // Float indicating the trading volume at the time the snapshot was taken i.e: at updateTime.\n // Null for contests that have no volume requirement.\n volume?: BigDecimal;\n // Seconds\n updateTime: BigDecimal;\n}\n\nexport interface GetIndexerLeaderboardResponse {\n participants: IndexerLeaderboardParticipant[];\n}\n\nexport interface GetIndexerLeaderboardParticipantParams {\n contestIds: number[];\n subaccount: Subaccount;\n}\n\nexport interface GetIndexerLeaderboardParticipantResponse {\n // If the subaccount is not eligible for a given contest, it would not be included in the response.\n // contestId -> IndexerLeaderboardParticipant\n participant: Record<string, IndexerLeaderboardParticipant>;\n}\n\ninterface LeaderboardSignatureParams {\n // endpoint address\n verifyingAddr: string;\n chainId: number;\n}\n\nexport interface GetIndexerLeaderboardRegistrationParams extends Subaccount {\n contestId: number;\n}\n\nexport interface UpdateIndexerLeaderboardRegistrationParams\n extends GetIndexerLeaderboardRegistrationParams {\n updateRegistration: LeaderboardSignatureParams;\n // In millis, defaults to 90s in the future\n recvTime?: BigDecimal;\n}\n\nexport interface IndexerLeaderboardRegistration {\n subaccount: Subaccount;\n contestId: number;\n // Seconds\n updateTime: BigDecimal;\n}\n\nexport interface GetIndexerLeaderboardRegistrationResponse {\n // For non-tiered contests, null if the user is not registered for the provided contestId.\n // For tiered contests (i.e., related contests), null if the user is not registered for any of the contests in the tier group.\n registration: IndexerLeaderboardRegistration | null;\n}\n\nexport type UpdateIndexerLeaderboardRegistrationResponse =\n GetIndexerLeaderboardRegistrationResponse;\n\nexport interface GetIndexerLeaderboardContestsParams {\n contestIds: number[];\n}\n\nexport interface IndexerLeaderboardContest {\n contestId: number;\n // NOTE: Start / End times are ignored when `period` is non-zero.\n // Start time in seconds\n startTime: BigDecimal;\n // End time in seconds\n endTime: BigDecimal;\n // Contest duration in seconds; when set to 0, contest duration is [startTime,endTime];\n // Otherwise, contest runs indefinitely in the interval [lastUpdated - period, lastUpdated] if active;\n period: BigDecimal;\n // Last updated time in Seconds\n lastUpdated: BigDecimal;\n totalParticipants: BigDecimal;\n // Float indicating the min account value required to be eligible for this contest e.g: 250.0\n minRequiredAccountValue: BigDecimal;\n // Float indicating the min trading volume required to be eligible for this contest e.g: 1000.0\n minRequiredVolume: BigDecimal;\n // For market-specific contests, only the volume from these products will be counted.\n requiredProductIds: number[];\n active: boolean;\n}\n\nexport interface GetIndexerLeaderboardContestsResponse {\n contests: IndexerLeaderboardContest[];\n}\n\nexport type GetIndexerFastWithdrawalSignatureParams =\n IndexerServerFastWithdrawalSignatureParams;\n\nexport interface GetIndexerFastWithdrawalSignatureResponse {\n idx: bigint;\n tx: NadoWithdrawCollateralTx['withdraw_collateral'];\n txBytes: Hex;\n signatures: Hex[];\n}\n\n/**\n * NLP\n */\n\nexport type GetIndexerNlpSnapshotsParams = IndexerSnapshotsIntervalParams;\n\nexport interface IndexerNlpSnapshot {\n submissionIndex: string;\n timestamp: BigDecimal;\n // Total volume traded by the NLP, in terms of the primary quote\n cumulativeVolume: BigDecimal;\n cumulativeTrades: BigDecimal;\n cumulativeMintAmountUsdc: BigDecimal;\n cumulativeBurnAmountUsdc: BigDecimal;\n cumulativePnl: BigDecimal;\n tvl: BigDecimal;\n oraclePrice: BigDecimal;\n depositors: BigDecimal;\n}\n\nexport interface GetIndexerNlpSnapshotsResponse {\n snapshots: IndexerNlpSnapshot[];\n}\n\nexport interface GetIndexerBacklogResponse {\n // Total number of transactions stored in the indexer DB\n totalTxs: BigDecimal;\n // Current nSubmissions value from the chain (i.e., number of processed txs)\n totalSubmissions: BigDecimal;\n // Number of unprocessed transactions (totalTxs - totalSubmissions)\n backlogSize: BigDecimal;\n // UNIX timestamp (in seconds) of when the data was last updated\n updatedAt: BigDecimal;\n // Estimated time in seconds (float) to clear the entire backlog (null if unavailable)\n backlogEtaInSeconds: BigDecimal | null;\n // Current submission rate in transactions per second (float) (null if unavailable)\n txsPerSecond: BigDecimal | null;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/types/clientTypes.ts"],"sourcesContent":["import {\n EIP712OrderValues,\n Market,\n OrderAppendix,\n PerpBalance,\n PerpMarket,\n ProductEngineType,\n SpotBalance,\n SpotMarket,\n Subaccount,\n} from '@nadohq/shared';\nimport { BigDecimal } from '@nadohq/shared';\nimport { Hex } from 'viem';\nimport { CandlestickPeriod } from './CandlestickPeriod';\nimport { IndexerEventType } from './IndexerEventType';\nimport { IndexerLeaderboardRankType } from './IndexerLeaderboardType';\nimport { NadoTx, NadoWithdrawCollateralTx } from './NadoTx';\nimport {\n IndexerServerFastWithdrawalSignatureParams,\n IndexerServerListSubaccountsParams,\n} from './serverTypes';\n\n/**\n * Base types\n */\n\nexport type IndexerSpotBalance = Omit<SpotBalance, 'healthContributions'>;\n\nexport type IndexerPerpBalance = Omit<PerpBalance, 'healthContributions'>;\n\nexport interface IndexerEventSpotStateSnapshot {\n type: ProductEngineType.SPOT;\n preBalance: IndexerSpotBalance;\n postBalance: IndexerSpotBalance;\n market: SpotMarket;\n}\n\nexport interface IndexerEventPerpStateSnapshot {\n type: ProductEngineType.PERP;\n preBalance: IndexerPerpBalance;\n postBalance: IndexerPerpBalance;\n market: PerpMarket;\n}\n\nexport type IndexerEventBalanceStateSnapshot =\n | IndexerEventSpotStateSnapshot\n | IndexerEventPerpStateSnapshot;\n\nexport interface IndexerBalanceTrackedVars {\n netInterestUnrealized: BigDecimal;\n netInterestCumulative: BigDecimal;\n netFundingUnrealized: BigDecimal;\n netFundingCumulative: BigDecimal;\n netEntryUnrealized: BigDecimal;\n netEntryCumulative: BigDecimal;\n}\n\nexport interface IndexerEvent<\n TStateType extends\n IndexerEventBalanceStateSnapshot = IndexerEventBalanceStateSnapshot,\n> {\n subaccount: string;\n isolated: boolean;\n // The product ID associated with the isolated perp market. This is only used when productId === QUOTE_PRODUCT_ID and isolated === true\n isolatedProductId: number | null;\n productId: number;\n submissionIndex: string;\n eventType: IndexerEventType;\n state: TStateType;\n trackedVars: IndexerBalanceTrackedVars;\n}\n\nexport interface IndexerEventWithTx<\n TStateType extends\n IndexerEventBalanceStateSnapshot = IndexerEventBalanceStateSnapshot,\n> extends IndexerEvent<TStateType> {\n timestamp: BigDecimal;\n tx: NadoTx;\n}\n\n/**\n * List subaccounts\n */\n\nexport type ListIndexerSubaccountsParams = IndexerServerListSubaccountsParams;\n\nexport type ListIndexerSubaccountsResponse = ({\n hexId: string;\n} & Subaccount)[];\n\n/**\n * Subaccount snapshots\n */\n\nexport interface GetIndexerMultiSubaccountSnapshotsParams {\n subaccounts: Subaccount[];\n // A series of timestamps for which to return a summary of each subaccount\n timestamps: number[];\n // If not given, will return both isolated & non-iso balances\n isolated?: boolean;\n}\n\nexport type IndexerSnapshotBalance<\n TStateType extends\n IndexerEventBalanceStateSnapshot = IndexerEventBalanceStateSnapshot,\n> = IndexerEvent<TStateType>;\n\nexport interface IndexerSubaccountSnapshot {\n timestamp: BigDecimal;\n balances: IndexerSnapshotBalance[];\n}\n\nexport interface GetIndexerMultiSubaccountSnapshotsResponse {\n // Utility for retrieving a subaccount's hex ID, in the same order as the request params\n subaccountHexIds: string[];\n // Map of subaccount hex -> timestamp requested -> summary for that time\n snapshots: Record<string, Record<string, IndexerSubaccountSnapshot>>;\n}\n\n/**\n * Perp prices\n */\n\nexport interface GetIndexerPerpPricesParams {\n productId: number;\n}\n\nexport interface IndexerPerpPrices {\n productId: number;\n indexPrice: BigDecimal;\n markPrice: BigDecimal;\n // Seconds\n updateTime: BigDecimal;\n}\n\nexport type GetIndexerPerpPricesResponse = IndexerPerpPrices;\n\nexport interface GetIndexerMultiProductPerpPricesParams {\n productIds: number[];\n}\n\n// Map of productId -> IndexerPerpPrices\nexport type GetIndexerMultiProductPerpPricesResponse = Record<\n number,\n IndexerPerpPrices\n>;\n\n/**\n * Oracle prices\n */\n\nexport interface GetIndexerOraclePricesParams {\n productIds: number[];\n}\n\nexport interface IndexerOraclePrice {\n productId: number;\n oraclePrice: BigDecimal;\n // Seconds\n updateTime: BigDecimal;\n}\n\nexport type GetIndexerOraclePricesResponse = IndexerOraclePrice[];\n\n/**\n * Funding rates\n */\n\nexport interface GetIndexerFundingRateParams {\n productId: number;\n}\n\nexport interface IndexerFundingRate {\n productId: number;\n fundingRate: BigDecimal;\n // Seconds\n updateTime: BigDecimal;\n}\n\nexport type GetIndexerFundingRateResponse = IndexerFundingRate;\n\nexport interface GetIndexerMultiProductFundingRatesParams {\n productIds: number[];\n}\n\n// Map of productId -> IndexerFundingRate\nexport type GetIndexerMultiProductFundingRatesResponse = Record<\n number,\n IndexerFundingRate\n>;\n\n/**\n * Candlesticks\n */\n\nexport interface GetIndexerCandlesticksParams {\n productId: number;\n period: CandlestickPeriod;\n // Seconds\n maxTimeInclusive?: number;\n limit: number;\n}\n\n// Semi-Tradingview compatible bars\nexport interface Candlestick {\n // In SECONDS, for TV compat, this needs to be in millis\n time: BigDecimal;\n open: BigDecimal;\n high: BigDecimal;\n low: BigDecimal;\n close: BigDecimal;\n volume: BigDecimal;\n}\n\nexport type GetIndexerCandlesticksResponse = Candlestick[];\n\nexport type GetIndexerEdgeCandlesticksResponse = GetIndexerCandlesticksResponse;\n\nexport type GetIndexerEdgeCandlesticksParams = GetIndexerCandlesticksParams;\n\n/**\n * Product snapshots\n */\n\nexport interface GetIndexerProductSnapshotsParams {\n // Max submission index, inclusive\n startCursor?: string;\n productId: number;\n maxTimestampInclusive?: number;\n limit: number;\n}\n\nexport interface IndexerProductSnapshot extends Market {\n submissionIndex: string;\n}\n\nexport type GetIndexerProductSnapshotsResponse = IndexerProductSnapshot[];\n\nexport interface GetIndexerMultiProductSnapshotsParams {\n productIds: number[];\n maxTimestampInclusive?: number[];\n}\n\n// Map of timestamp -> (productId -> IndexerProductSnapshot)\nexport type GetIndexerMultiProductSnapshotsResponse = Record<\n string,\n Record<number, IndexerProductSnapshot>\n>;\n\nexport interface IndexerSnapshotsIntervalParams {\n /** Currently accepts all integers, in seconds */\n granularity: number;\n /**\n * Optional upper bound for snapshot timestamps (in seconds).\n * Without this, snapshots will default to align with last UTC midnight,\n * which can make \"Last 24h\" metrics inaccurate.\n */\n maxTimeInclusive?: number;\n limit: number;\n}\n\n/**\n * Market snapshots\n */\n\nexport interface GetIndexerMarketSnapshotsParams\n extends IndexerSnapshotsIntervalParams {\n // Defaults to all\n productIds?: number[];\n}\n\nexport interface IndexerMarketSnapshot {\n timestamp: BigDecimal;\n cumulativeUsers: BigDecimal;\n dailyActiveUsers: BigDecimal;\n tvl: BigDecimal;\n cumulativeVolumes: Record<number, BigDecimal>;\n cumulativeTakerFees: Record<number, BigDecimal>;\n cumulativeSequencerFees: Record<number, BigDecimal>;\n cumulativeMakerFees: Record<number, BigDecimal>;\n cumulativeTrades: Record<number, BigDecimal>;\n cumulativeLiquidationAmounts: Record<number, BigDecimal>;\n openInterestsQuote: Record<number, BigDecimal>;\n totalDeposits: Record<number, BigDecimal>;\n totalBorrows: Record<number, BigDecimal>;\n fundingRates: Record<number, BigDecimal>;\n depositRates: Record<number, BigDecimal>;\n borrowRates: Record<number, BigDecimal>;\n cumulativeTradeSizes: Record<number, BigDecimal>;\n cumulativeInflows: Record<number, BigDecimal>;\n cumulativeOutflows: Record<number, BigDecimal>;\n oraclePrices: Record<number, BigDecimal>;\n}\n\nexport type GetIndexerMarketSnapshotsResponse = IndexerMarketSnapshot[];\n\nexport type GetIndexerEdgeMarketSnapshotsParams =\n IndexerSnapshotsIntervalParams;\n\n// Map of chain id -> IndexerMarketSnapshot[]\nexport type GetIndexerEdgeMarketSnapshotResponse = Record<\n number,\n IndexerMarketSnapshot[]\n>;\n\n/**\n * Events\n */\n\n// There can be multiple events per tx, this allows a limit depending on usecase\nexport type GetIndexerEventsLimitType = 'events' | 'txs';\n\nexport interface GetIndexerEventsParams {\n // Max submission index, inclusive\n startCursor?: string;\n subaccount?: Subaccount;\n productIds?: number[];\n // If not given, will return both isolated & non-iso events\n isolated?: boolean;\n eventTypes?: IndexerEventType[];\n maxTimestampInclusive?: number;\n // Descending order for idx (time), defaults to true\n desc?: boolean;\n limit?: {\n type: GetIndexerEventsLimitType;\n value: number;\n };\n}\n\nexport type GetIndexerEventsResponse = IndexerEventWithTx[];\n\n/**\n * Historical orders\n */\n\nexport interface GetIndexerOrdersParams {\n // Max submission index, inclusive\n startCursor?: string;\n subaccount?: Subaccount;\n minTimestampInclusive?: number;\n maxTimestampInclusive?: number;\n limit?: number;\n productIds?: number[];\n // If not given, will return both isolated & non-iso orders\n isolated?: boolean;\n digests?: string[];\n}\n\nexport interface IndexerOrder {\n digest: string;\n subaccount: string;\n isolated: boolean;\n productId: number;\n submissionIndex: string;\n amount: BigDecimal;\n price: BigDecimal;\n expiration: number;\n // Order metadata from appendix\n appendix: OrderAppendix;\n nonce: BigDecimal;\n // Derived from the nonce\n recvTimeSeconds: number;\n // Fill amounts\n baseFilled: BigDecimal;\n // Includes fee\n quoteFilled: BigDecimal;\n // Includes sequencer fee\n totalFee: BigDecimal;\n}\n\nexport type GetIndexerOrdersResponse = IndexerOrder[];\n\n/**\n * Match events\n */\n\nexport interface GetIndexerMatchEventsParams {\n // When not given, will return all maker events\n subaccount?: Subaccount;\n productIds?: number[];\n // If not given, will return both isolated & non-iso events\n isolated?: boolean;\n maxTimestampInclusive?: number;\n limit: number;\n // Max submission index, inclusive\n startCursor?: string;\n}\n\n// There are 2 balance states per match event if the match is in a spot market, but only one if the match is in a perp market\nexport interface IndexerMatchEventBalances {\n base: IndexerSpotBalance | IndexerPerpBalance;\n quote?: IndexerSpotBalance;\n}\n\nexport interface IndexerMatchEvent extends Subaccount {\n productId: number;\n digest: string;\n isolated: boolean;\n order: EIP712OrderValues;\n baseFilled: BigDecimal;\n quoteFilled: BigDecimal;\n // Includes sequencer fee\n totalFee: BigDecimal;\n sequencerFee: BigDecimal;\n cumulativeBaseFilled: BigDecimal;\n cumulativeQuoteFilled: BigDecimal;\n cumulativeFee: BigDecimal;\n submissionIndex: string;\n timestamp: BigDecimal;\n // Tracked vars for the balance BEFORE this match event occurred\n preEventTrackedVars: Pick<\n IndexerBalanceTrackedVars,\n 'netEntryCumulative' | 'netEntryUnrealized'\n >;\n preBalances: IndexerMatchEventBalances;\n postBalances: IndexerMatchEventBalances;\n tx: NadoTx;\n}\n\nexport type GetIndexerMatchEventsResponse = IndexerMatchEvent[];\n\n/**\n * Quote price\n */\n\nexport interface GetIndexerQuotePriceResponse {\n price: BigDecimal;\n}\n\n/**\n * Linked Signer\n */\n\nexport interface GetIndexerLinkedSignerParams {\n subaccount: Subaccount;\n}\n\nexport interface GetIndexerLinkedSignerResponse {\n totalTxLimit: BigDecimal;\n remainingTxs: BigDecimal;\n // If remainingTxs is 0, this is the time until the next link signer tx can be sent\n waitTimeUntilNextTx: BigDecimal;\n // If zero address, none is configured\n signer: string;\n}\n\n/**\n * Interest / funding payments\n */\n\nexport interface GetIndexerInterestFundingPaymentsParams {\n subaccount: Subaccount;\n productIds: number[];\n maxTimestampInclusive?: number;\n limit: number;\n // Max submission index, inclusive\n startCursor?: string;\n}\n\nexport interface IndexerProductPayment {\n productId: number;\n submissionIndex: string;\n timestamp: BigDecimal;\n paymentAmount: BigDecimal;\n // For spots: previous spot balance at the moment of payment (exclusive of `paymentAmount`).\n // For perps: previous perp balance at the moment of payment + amount of perps locked in LPs (exclusive of `paymentAmount`).\n balanceAmount: BigDecimal;\n // Represents the annually interest rate for spots and annually funding rate for perps.\n annualPaymentRate: BigDecimal;\n oraclePrice: BigDecimal;\n isolated: boolean;\n // The product ID associated with the isolated perp market. This is only used when product_id === QUOTE_PRODUCT_ID and isolated === true\n isolatedProductId: number | null;\n}\n\nexport interface GetIndexerInterestFundingPaymentsResponse {\n interestPayments: IndexerProductPayment[];\n fundingPayments: IndexerProductPayment[];\n nextCursor: string | null;\n}\n\n/**\n * Referral code\n */\n\nexport interface GetIndexerReferralCodeParams {\n subaccount: Subaccount;\n}\n\nexport interface GetIndexerReferralCodeResponse {\n referralCode: string | null;\n}\n\n/**\n * Maker stats\n */\n\nexport interface GetIndexerMakerStatisticsParams {\n productId: number;\n epoch: number;\n interval: number;\n}\n\nexport interface IndexerMakerSnapshot {\n timestamp: BigDecimal;\n makerFee: BigDecimal;\n uptime: BigDecimal;\n sumQMin: BigDecimal;\n qScore: BigDecimal;\n makerShare: BigDecimal;\n expectedMakerReward: BigDecimal;\n}\n\nexport interface IndexerMaker {\n address: string;\n snapshots: IndexerMakerSnapshot[];\n}\n\nexport interface GetIndexerMakerStatisticsResponse {\n rewardCoefficient: BigDecimal;\n makers: IndexerMaker[];\n}\n\n/**\n * Leaderboards\n */\n\nexport interface GetIndexerLeaderboardParams {\n contestId: number;\n rankType: IndexerLeaderboardRankType;\n // Min rank inclusive\n startCursor?: string;\n limit?: number;\n}\n\nexport interface IndexerLeaderboardParticipant {\n subaccount: Subaccount;\n contestId: number;\n pnl: BigDecimal;\n pnlRank: BigDecimal;\n percentRoi: BigDecimal;\n roiRank: BigDecimal;\n // Float indicating the ending account value at the time the snapshot was taken i.e: at updateTime\n accountValue: BigDecimal;\n // Float indicating the trading volume at the time the snapshot was taken i.e: at updateTime.\n // Null for contests that have no volume requirement.\n volume?: BigDecimal;\n // Seconds\n updateTime: BigDecimal;\n}\n\nexport interface GetIndexerLeaderboardResponse {\n participants: IndexerLeaderboardParticipant[];\n}\n\nexport interface GetIndexerLeaderboardParticipantParams {\n contestIds: number[];\n subaccount: Subaccount;\n}\n\nexport interface GetIndexerLeaderboardParticipantResponse {\n // If the subaccount is not eligible for a given contest, it would not be included in the response.\n // contestId -> IndexerLeaderboardParticipant\n participant: Record<string, IndexerLeaderboardParticipant>;\n}\n\ninterface LeaderboardSignatureParams {\n // endpoint address\n verifyingAddr: string;\n chainId: number;\n}\n\nexport interface GetIndexerLeaderboardRegistrationParams extends Subaccount {\n contestId: number;\n}\n\nexport interface UpdateIndexerLeaderboardRegistrationParams\n extends GetIndexerLeaderboardRegistrationParams {\n updateRegistration: LeaderboardSignatureParams;\n // In millis, defaults to 90s in the future\n recvTime?: BigDecimal;\n}\n\nexport interface IndexerLeaderboardRegistration {\n subaccount: Subaccount;\n contestId: number;\n // Seconds\n updateTime: BigDecimal;\n}\n\nexport interface GetIndexerLeaderboardRegistrationResponse {\n // For non-tiered contests, null if the user is not registered for the provided contestId.\n // For tiered contests (i.e., related contests), null if the user is not registered for any of the contests in the tier group.\n registration: IndexerLeaderboardRegistration | null;\n}\n\nexport type UpdateIndexerLeaderboardRegistrationResponse =\n GetIndexerLeaderboardRegistrationResponse;\n\nexport interface GetIndexerLeaderboardContestsParams {\n contestIds: number[];\n}\n\nexport interface IndexerLeaderboardContest {\n contestId: number;\n // NOTE: Start / End times are ignored when `period` is non-zero.\n // Start time in seconds\n startTime: BigDecimal;\n // End time in seconds\n endTime: BigDecimal;\n // Contest duration in seconds; when set to 0, contest duration is [startTime,endTime];\n // Otherwise, contest runs indefinitely in the interval [lastUpdated - period, lastUpdated] if active;\n period: BigDecimal;\n // Last updated time in Seconds\n lastUpdated: BigDecimal;\n totalParticipants: BigDecimal;\n // Float indicating the min account value required to be eligible for this contest e.g: 250.0\n minRequiredAccountValue: BigDecimal;\n // Float indicating the min trading volume required to be eligible for this contest e.g: 1000.0\n minRequiredVolume: BigDecimal;\n // For market-specific contests, only the volume from these products will be counted.\n requiredProductIds: number[];\n active: boolean;\n}\n\nexport interface GetIndexerLeaderboardContestsResponse {\n contests: IndexerLeaderboardContest[];\n}\n\nexport type GetIndexerFastWithdrawalSignatureParams =\n IndexerServerFastWithdrawalSignatureParams;\n\nexport interface GetIndexerFastWithdrawalSignatureResponse {\n idx: bigint;\n tx: NadoWithdrawCollateralTx['withdraw_collateral'];\n txBytes: Hex;\n signatures: Hex[];\n}\n\n/**\n * NLP\n */\n\nexport type GetIndexerNlpSnapshotsParams = IndexerSnapshotsIntervalParams;\n\nexport interface IndexerNlpSnapshot {\n submissionIndex: string;\n timestamp: BigDecimal;\n // Total volume traded by the NLP, in terms of the primary quote\n cumulativeVolume: BigDecimal;\n cumulativeTrades: BigDecimal;\n cumulativeMintAmountUsdc: BigDecimal;\n cumulativeBurnAmountUsdc: BigDecimal;\n cumulativePnl: BigDecimal;\n tvl: BigDecimal;\n oraclePrice: BigDecimal;\n depositors: BigDecimal;\n}\n\nexport interface GetIndexerNlpSnapshotsResponse {\n snapshots: IndexerNlpSnapshot[];\n}\n\nexport interface GetIndexerBacklogResponse {\n // Total number of transactions stored in the indexer DB\n totalTxs: BigDecimal;\n // Current nSubmissions value from the chain (i.e., number of processed txs)\n totalSubmissions: BigDecimal;\n // Number of unprocessed transactions (totalTxs - totalSubmissions)\n backlogSize: BigDecimal;\n // UNIX timestamp (in seconds) of when the data was last updated\n updatedAt: BigDecimal;\n // Estimated time in seconds (float) to clear the entire backlog (null if unavailable)\n backlogEtaInSeconds: BigDecimal | null;\n // Current submission rate in transactions per second (float) (null if unavailable)\n txsPerSecond: BigDecimal | null;\n}\n\nexport type GetIndexerSubaccountDDAParams = Subaccount;\n\nexport interface GetIndexerSubaccountDDAResponse {\n address: string;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { Subaccount, ProductEngineType, SpotBalance, SpotMarket, PerpBalance, PerpMarket, Market,
|
|
2
|
-
import { BigDecimal } from '@nadohq/utils';
|
|
1
|
+
import { Subaccount, BigDecimal, ProductEngineType, SpotBalance, SpotMarket, PerpBalance, PerpMarket, Market, OrderAppendix, EIP712OrderValues } from '@nadohq/shared';
|
|
3
2
|
import { Hex } from 'viem';
|
|
4
3
|
import { CandlestickPeriod } from './CandlestickPeriod.cjs';
|
|
5
4
|
import { IndexerEventType } from './IndexerEventType.cjs';
|
|
6
5
|
import { IndexerLeaderboardRankType } from './IndexerLeaderboardType.cjs';
|
|
7
|
-
import { IndexerServerListSubaccountsParams, IndexerServerFastWithdrawalSignatureParams } from './serverTypes.cjs';
|
|
8
6
|
import { NadoTx, NadoWithdrawCollateralTx } from './NadoTx.cjs';
|
|
7
|
+
import { IndexerServerListSubaccountsParams, IndexerServerFastWithdrawalSignatureParams } from './serverTypes.cjs';
|
|
9
8
|
import './serverModelTypes.cjs';
|
|
10
9
|
import '@nadohq/engine-client';
|
|
11
10
|
|
|
@@ -237,10 +236,8 @@ interface IndexerOrder {
|
|
|
237
236
|
submissionIndex: string;
|
|
238
237
|
amount: BigDecimal;
|
|
239
238
|
price: BigDecimal;
|
|
240
|
-
rawExpiration: BigDecimal;
|
|
241
|
-
isReduceOnly: boolean;
|
|
242
|
-
orderType: OrderExpirationType;
|
|
243
239
|
expiration: number;
|
|
240
|
+
appendix: OrderAppendix;
|
|
244
241
|
nonce: BigDecimal;
|
|
245
242
|
recvTimeSeconds: number;
|
|
246
243
|
baseFilled: BigDecimal;
|
|
@@ -463,5 +460,9 @@ interface GetIndexerBacklogResponse {
|
|
|
463
460
|
backlogEtaInSeconds: BigDecimal | null;
|
|
464
461
|
txsPerSecond: BigDecimal | null;
|
|
465
462
|
}
|
|
463
|
+
type GetIndexerSubaccountDDAParams = Subaccount;
|
|
464
|
+
interface GetIndexerSubaccountDDAResponse {
|
|
465
|
+
address: string;
|
|
466
|
+
}
|
|
466
467
|
|
|
467
|
-
export type { Candlestick, GetIndexerBacklogResponse, GetIndexerCandlesticksParams, GetIndexerCandlesticksResponse, GetIndexerEdgeCandlesticksParams, GetIndexerEdgeCandlesticksResponse, GetIndexerEdgeMarketSnapshotResponse, GetIndexerEdgeMarketSnapshotsParams, GetIndexerEventsLimitType, GetIndexerEventsParams, GetIndexerEventsResponse, GetIndexerFastWithdrawalSignatureParams, GetIndexerFastWithdrawalSignatureResponse, GetIndexerFundingRateParams, GetIndexerFundingRateResponse, GetIndexerInterestFundingPaymentsParams, GetIndexerInterestFundingPaymentsResponse, GetIndexerLeaderboardContestsParams, GetIndexerLeaderboardContestsResponse, GetIndexerLeaderboardParams, GetIndexerLeaderboardParticipantParams, GetIndexerLeaderboardParticipantResponse, GetIndexerLeaderboardRegistrationParams, GetIndexerLeaderboardRegistrationResponse, GetIndexerLeaderboardResponse, GetIndexerLinkedSignerParams, GetIndexerLinkedSignerResponse, GetIndexerMakerStatisticsParams, GetIndexerMakerStatisticsResponse, GetIndexerMarketSnapshotsParams, GetIndexerMarketSnapshotsResponse, GetIndexerMatchEventsParams, GetIndexerMatchEventsResponse, GetIndexerMultiProductFundingRatesParams, GetIndexerMultiProductFundingRatesResponse, GetIndexerMultiProductPerpPricesParams, GetIndexerMultiProductPerpPricesResponse, GetIndexerMultiProductSnapshotsParams, GetIndexerMultiProductSnapshotsResponse, GetIndexerMultiSubaccountSnapshotsParams, GetIndexerMultiSubaccountSnapshotsResponse, GetIndexerNlpSnapshotsParams, GetIndexerNlpSnapshotsResponse, GetIndexerOraclePricesParams, GetIndexerOraclePricesResponse, GetIndexerOrdersParams, GetIndexerOrdersResponse, GetIndexerPerpPricesParams, GetIndexerPerpPricesResponse, GetIndexerProductSnapshotsParams, GetIndexerProductSnapshotsResponse, GetIndexerQuotePriceResponse, GetIndexerReferralCodeParams, GetIndexerReferralCodeResponse, IndexerBalanceTrackedVars, IndexerEvent, IndexerEventBalanceStateSnapshot, IndexerEventPerpStateSnapshot, IndexerEventSpotStateSnapshot, IndexerEventWithTx, IndexerFundingRate, IndexerLeaderboardContest, IndexerLeaderboardParticipant, IndexerLeaderboardRegistration, IndexerMaker, IndexerMakerSnapshot, IndexerMarketSnapshot, IndexerMatchEvent, IndexerMatchEventBalances, IndexerNlpSnapshot, IndexerOraclePrice, IndexerOrder, IndexerPerpBalance, IndexerPerpPrices, IndexerProductPayment, IndexerProductSnapshot, IndexerSnapshotBalance, IndexerSnapshotsIntervalParams, IndexerSpotBalance, IndexerSubaccountSnapshot, ListIndexerSubaccountsParams, ListIndexerSubaccountsResponse, UpdateIndexerLeaderboardRegistrationParams, UpdateIndexerLeaderboardRegistrationResponse };
|
|
468
|
+
export type { Candlestick, GetIndexerBacklogResponse, GetIndexerCandlesticksParams, GetIndexerCandlesticksResponse, GetIndexerEdgeCandlesticksParams, GetIndexerEdgeCandlesticksResponse, GetIndexerEdgeMarketSnapshotResponse, GetIndexerEdgeMarketSnapshotsParams, GetIndexerEventsLimitType, GetIndexerEventsParams, GetIndexerEventsResponse, GetIndexerFastWithdrawalSignatureParams, GetIndexerFastWithdrawalSignatureResponse, GetIndexerFundingRateParams, GetIndexerFundingRateResponse, GetIndexerInterestFundingPaymentsParams, GetIndexerInterestFundingPaymentsResponse, GetIndexerLeaderboardContestsParams, GetIndexerLeaderboardContestsResponse, GetIndexerLeaderboardParams, GetIndexerLeaderboardParticipantParams, GetIndexerLeaderboardParticipantResponse, GetIndexerLeaderboardRegistrationParams, GetIndexerLeaderboardRegistrationResponse, GetIndexerLeaderboardResponse, GetIndexerLinkedSignerParams, GetIndexerLinkedSignerResponse, GetIndexerMakerStatisticsParams, GetIndexerMakerStatisticsResponse, GetIndexerMarketSnapshotsParams, GetIndexerMarketSnapshotsResponse, GetIndexerMatchEventsParams, GetIndexerMatchEventsResponse, GetIndexerMultiProductFundingRatesParams, GetIndexerMultiProductFundingRatesResponse, GetIndexerMultiProductPerpPricesParams, GetIndexerMultiProductPerpPricesResponse, GetIndexerMultiProductSnapshotsParams, GetIndexerMultiProductSnapshotsResponse, GetIndexerMultiSubaccountSnapshotsParams, GetIndexerMultiSubaccountSnapshotsResponse, GetIndexerNlpSnapshotsParams, GetIndexerNlpSnapshotsResponse, GetIndexerOraclePricesParams, GetIndexerOraclePricesResponse, GetIndexerOrdersParams, GetIndexerOrdersResponse, GetIndexerPerpPricesParams, GetIndexerPerpPricesResponse, GetIndexerProductSnapshotsParams, GetIndexerProductSnapshotsResponse, GetIndexerQuotePriceResponse, GetIndexerReferralCodeParams, GetIndexerReferralCodeResponse, GetIndexerSubaccountDDAParams, GetIndexerSubaccountDDAResponse, IndexerBalanceTrackedVars, IndexerEvent, IndexerEventBalanceStateSnapshot, IndexerEventPerpStateSnapshot, IndexerEventSpotStateSnapshot, IndexerEventWithTx, IndexerFundingRate, IndexerLeaderboardContest, IndexerLeaderboardParticipant, IndexerLeaderboardRegistration, IndexerMaker, IndexerMakerSnapshot, IndexerMarketSnapshot, IndexerMatchEvent, IndexerMatchEventBalances, IndexerNlpSnapshot, IndexerOraclePrice, IndexerOrder, IndexerPerpBalance, IndexerPerpPrices, IndexerProductPayment, IndexerProductSnapshot, IndexerSnapshotBalance, IndexerSnapshotsIntervalParams, IndexerSpotBalance, IndexerSubaccountSnapshot, ListIndexerSubaccountsParams, ListIndexerSubaccountsResponse, UpdateIndexerLeaderboardRegistrationParams, UpdateIndexerLeaderboardRegistrationResponse };
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { Subaccount, ProductEngineType, SpotBalance, SpotMarket, PerpBalance, PerpMarket, Market,
|
|
2
|
-
import { BigDecimal } from '@nadohq/utils';
|
|
1
|
+
import { Subaccount, BigDecimal, ProductEngineType, SpotBalance, SpotMarket, PerpBalance, PerpMarket, Market, OrderAppendix, EIP712OrderValues } from '@nadohq/shared';
|
|
3
2
|
import { Hex } from 'viem';
|
|
4
3
|
import { CandlestickPeriod } from './CandlestickPeriod.js';
|
|
5
4
|
import { IndexerEventType } from './IndexerEventType.js';
|
|
6
5
|
import { IndexerLeaderboardRankType } from './IndexerLeaderboardType.js';
|
|
7
|
-
import { IndexerServerListSubaccountsParams, IndexerServerFastWithdrawalSignatureParams } from './serverTypes.js';
|
|
8
6
|
import { NadoTx, NadoWithdrawCollateralTx } from './NadoTx.js';
|
|
7
|
+
import { IndexerServerListSubaccountsParams, IndexerServerFastWithdrawalSignatureParams } from './serverTypes.js';
|
|
9
8
|
import './serverModelTypes.js';
|
|
10
9
|
import '@nadohq/engine-client';
|
|
11
10
|
|
|
@@ -237,10 +236,8 @@ interface IndexerOrder {
|
|
|
237
236
|
submissionIndex: string;
|
|
238
237
|
amount: BigDecimal;
|
|
239
238
|
price: BigDecimal;
|
|
240
|
-
rawExpiration: BigDecimal;
|
|
241
|
-
isReduceOnly: boolean;
|
|
242
|
-
orderType: OrderExpirationType;
|
|
243
239
|
expiration: number;
|
|
240
|
+
appendix: OrderAppendix;
|
|
244
241
|
nonce: BigDecimal;
|
|
245
242
|
recvTimeSeconds: number;
|
|
246
243
|
baseFilled: BigDecimal;
|
|
@@ -463,5 +460,9 @@ interface GetIndexerBacklogResponse {
|
|
|
463
460
|
backlogEtaInSeconds: BigDecimal | null;
|
|
464
461
|
txsPerSecond: BigDecimal | null;
|
|
465
462
|
}
|
|
463
|
+
type GetIndexerSubaccountDDAParams = Subaccount;
|
|
464
|
+
interface GetIndexerSubaccountDDAResponse {
|
|
465
|
+
address: string;
|
|
466
|
+
}
|
|
466
467
|
|
|
467
|
-
export type { Candlestick, GetIndexerBacklogResponse, GetIndexerCandlesticksParams, GetIndexerCandlesticksResponse, GetIndexerEdgeCandlesticksParams, GetIndexerEdgeCandlesticksResponse, GetIndexerEdgeMarketSnapshotResponse, GetIndexerEdgeMarketSnapshotsParams, GetIndexerEventsLimitType, GetIndexerEventsParams, GetIndexerEventsResponse, GetIndexerFastWithdrawalSignatureParams, GetIndexerFastWithdrawalSignatureResponse, GetIndexerFundingRateParams, GetIndexerFundingRateResponse, GetIndexerInterestFundingPaymentsParams, GetIndexerInterestFundingPaymentsResponse, GetIndexerLeaderboardContestsParams, GetIndexerLeaderboardContestsResponse, GetIndexerLeaderboardParams, GetIndexerLeaderboardParticipantParams, GetIndexerLeaderboardParticipantResponse, GetIndexerLeaderboardRegistrationParams, GetIndexerLeaderboardRegistrationResponse, GetIndexerLeaderboardResponse, GetIndexerLinkedSignerParams, GetIndexerLinkedSignerResponse, GetIndexerMakerStatisticsParams, GetIndexerMakerStatisticsResponse, GetIndexerMarketSnapshotsParams, GetIndexerMarketSnapshotsResponse, GetIndexerMatchEventsParams, GetIndexerMatchEventsResponse, GetIndexerMultiProductFundingRatesParams, GetIndexerMultiProductFundingRatesResponse, GetIndexerMultiProductPerpPricesParams, GetIndexerMultiProductPerpPricesResponse, GetIndexerMultiProductSnapshotsParams, GetIndexerMultiProductSnapshotsResponse, GetIndexerMultiSubaccountSnapshotsParams, GetIndexerMultiSubaccountSnapshotsResponse, GetIndexerNlpSnapshotsParams, GetIndexerNlpSnapshotsResponse, GetIndexerOraclePricesParams, GetIndexerOraclePricesResponse, GetIndexerOrdersParams, GetIndexerOrdersResponse, GetIndexerPerpPricesParams, GetIndexerPerpPricesResponse, GetIndexerProductSnapshotsParams, GetIndexerProductSnapshotsResponse, GetIndexerQuotePriceResponse, GetIndexerReferralCodeParams, GetIndexerReferralCodeResponse, IndexerBalanceTrackedVars, IndexerEvent, IndexerEventBalanceStateSnapshot, IndexerEventPerpStateSnapshot, IndexerEventSpotStateSnapshot, IndexerEventWithTx, IndexerFundingRate, IndexerLeaderboardContest, IndexerLeaderboardParticipant, IndexerLeaderboardRegistration, IndexerMaker, IndexerMakerSnapshot, IndexerMarketSnapshot, IndexerMatchEvent, IndexerMatchEventBalances, IndexerNlpSnapshot, IndexerOraclePrice, IndexerOrder, IndexerPerpBalance, IndexerPerpPrices, IndexerProductPayment, IndexerProductSnapshot, IndexerSnapshotBalance, IndexerSnapshotsIntervalParams, IndexerSpotBalance, IndexerSubaccountSnapshot, ListIndexerSubaccountsParams, ListIndexerSubaccountsResponse, UpdateIndexerLeaderboardRegistrationParams, UpdateIndexerLeaderboardRegistrationResponse };
|
|
468
|
+
export type { Candlestick, GetIndexerBacklogResponse, GetIndexerCandlesticksParams, GetIndexerCandlesticksResponse, GetIndexerEdgeCandlesticksParams, GetIndexerEdgeCandlesticksResponse, GetIndexerEdgeMarketSnapshotResponse, GetIndexerEdgeMarketSnapshotsParams, GetIndexerEventsLimitType, GetIndexerEventsParams, GetIndexerEventsResponse, GetIndexerFastWithdrawalSignatureParams, GetIndexerFastWithdrawalSignatureResponse, GetIndexerFundingRateParams, GetIndexerFundingRateResponse, GetIndexerInterestFundingPaymentsParams, GetIndexerInterestFundingPaymentsResponse, GetIndexerLeaderboardContestsParams, GetIndexerLeaderboardContestsResponse, GetIndexerLeaderboardParams, GetIndexerLeaderboardParticipantParams, GetIndexerLeaderboardParticipantResponse, GetIndexerLeaderboardRegistrationParams, GetIndexerLeaderboardRegistrationResponse, GetIndexerLeaderboardResponse, GetIndexerLinkedSignerParams, GetIndexerLinkedSignerResponse, GetIndexerMakerStatisticsParams, GetIndexerMakerStatisticsResponse, GetIndexerMarketSnapshotsParams, GetIndexerMarketSnapshotsResponse, GetIndexerMatchEventsParams, GetIndexerMatchEventsResponse, GetIndexerMultiProductFundingRatesParams, GetIndexerMultiProductFundingRatesResponse, GetIndexerMultiProductPerpPricesParams, GetIndexerMultiProductPerpPricesResponse, GetIndexerMultiProductSnapshotsParams, GetIndexerMultiProductSnapshotsResponse, GetIndexerMultiSubaccountSnapshotsParams, GetIndexerMultiSubaccountSnapshotsResponse, GetIndexerNlpSnapshotsParams, GetIndexerNlpSnapshotsResponse, GetIndexerOraclePricesParams, GetIndexerOraclePricesResponse, GetIndexerOrdersParams, GetIndexerOrdersResponse, GetIndexerPerpPricesParams, GetIndexerPerpPricesResponse, GetIndexerProductSnapshotsParams, GetIndexerProductSnapshotsResponse, GetIndexerQuotePriceResponse, GetIndexerReferralCodeParams, GetIndexerReferralCodeResponse, GetIndexerSubaccountDDAParams, GetIndexerSubaccountDDAResponse, IndexerBalanceTrackedVars, IndexerEvent, IndexerEventBalanceStateSnapshot, IndexerEventPerpStateSnapshot, IndexerEventSpotStateSnapshot, IndexerEventWithTx, IndexerFundingRate, IndexerLeaderboardContest, IndexerLeaderboardParticipant, IndexerLeaderboardRegistration, IndexerMaker, IndexerMakerSnapshot, IndexerMarketSnapshot, IndexerMatchEvent, IndexerMatchEventBalances, IndexerNlpSnapshot, IndexerOraclePrice, IndexerOrder, IndexerPerpBalance, IndexerPerpPrices, IndexerProductPayment, IndexerProductSnapshot, IndexerSnapshotBalance, IndexerSnapshotsIntervalParams, IndexerSpotBalance, IndexerSubaccountSnapshot, ListIndexerSubaccountsParams, ListIndexerSubaccountsResponse, UpdateIndexerLeaderboardRegistrationParams, UpdateIndexerLeaderboardRegistrationResponse };
|
package/dist/types/index.d.cts
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
export { Candlestick, GetIndexerBacklogResponse, GetIndexerCandlesticksParams, GetIndexerCandlesticksResponse, GetIndexerEdgeCandlesticksParams, GetIndexerEdgeCandlesticksResponse, GetIndexerEdgeMarketSnapshotResponse, GetIndexerEdgeMarketSnapshotsParams, GetIndexerEventsLimitType, GetIndexerEventsParams, GetIndexerEventsResponse, GetIndexerFastWithdrawalSignatureParams, GetIndexerFastWithdrawalSignatureResponse, GetIndexerFundingRateParams, GetIndexerFundingRateResponse, GetIndexerInterestFundingPaymentsParams, GetIndexerInterestFundingPaymentsResponse, GetIndexerLeaderboardContestsParams, GetIndexerLeaderboardContestsResponse, GetIndexerLeaderboardParams, GetIndexerLeaderboardParticipantParams, GetIndexerLeaderboardParticipantResponse, GetIndexerLeaderboardRegistrationParams, GetIndexerLeaderboardRegistrationResponse, GetIndexerLeaderboardResponse, GetIndexerLinkedSignerParams, GetIndexerLinkedSignerResponse, GetIndexerMakerStatisticsParams, GetIndexerMakerStatisticsResponse, GetIndexerMarketSnapshotsParams, GetIndexerMarketSnapshotsResponse, GetIndexerMatchEventsParams, GetIndexerMatchEventsResponse, GetIndexerMultiProductFundingRatesParams, GetIndexerMultiProductFundingRatesResponse, GetIndexerMultiProductPerpPricesParams, GetIndexerMultiProductPerpPricesResponse, GetIndexerMultiProductSnapshotsParams, GetIndexerMultiProductSnapshotsResponse, GetIndexerMultiSubaccountSnapshotsParams, GetIndexerMultiSubaccountSnapshotsResponse, GetIndexerNlpSnapshotsParams, GetIndexerNlpSnapshotsResponse, GetIndexerOraclePricesParams, GetIndexerOraclePricesResponse, GetIndexerOrdersParams, GetIndexerOrdersResponse, GetIndexerPerpPricesParams, GetIndexerPerpPricesResponse, GetIndexerProductSnapshotsParams, GetIndexerProductSnapshotsResponse, GetIndexerQuotePriceResponse, GetIndexerReferralCodeParams, GetIndexerReferralCodeResponse, IndexerBalanceTrackedVars, IndexerEvent, IndexerEventBalanceStateSnapshot, IndexerEventPerpStateSnapshot, IndexerEventSpotStateSnapshot, IndexerEventWithTx, IndexerFundingRate, IndexerLeaderboardContest, IndexerLeaderboardParticipant, IndexerLeaderboardRegistration, IndexerMaker, IndexerMakerSnapshot, IndexerMarketSnapshot, IndexerMatchEvent, IndexerMatchEventBalances, IndexerNlpSnapshot, IndexerOraclePrice, IndexerOrder, IndexerPerpBalance, IndexerPerpPrices, IndexerProductPayment, IndexerProductSnapshot, IndexerSnapshotBalance, IndexerSnapshotsIntervalParams, IndexerSpotBalance, IndexerSubaccountSnapshot, ListIndexerSubaccountsParams, ListIndexerSubaccountsResponse, UpdateIndexerLeaderboardRegistrationParams, UpdateIndexerLeaderboardRegistrationResponse } from './clientTypes.cjs';
|
|
1
|
+
export { Candlestick, GetIndexerBacklogResponse, GetIndexerCandlesticksParams, GetIndexerCandlesticksResponse, GetIndexerEdgeCandlesticksParams, GetIndexerEdgeCandlesticksResponse, GetIndexerEdgeMarketSnapshotResponse, GetIndexerEdgeMarketSnapshotsParams, GetIndexerEventsLimitType, GetIndexerEventsParams, GetIndexerEventsResponse, GetIndexerFastWithdrawalSignatureParams, GetIndexerFastWithdrawalSignatureResponse, GetIndexerFundingRateParams, GetIndexerFundingRateResponse, GetIndexerInterestFundingPaymentsParams, GetIndexerInterestFundingPaymentsResponse, GetIndexerLeaderboardContestsParams, GetIndexerLeaderboardContestsResponse, GetIndexerLeaderboardParams, GetIndexerLeaderboardParticipantParams, GetIndexerLeaderboardParticipantResponse, GetIndexerLeaderboardRegistrationParams, GetIndexerLeaderboardRegistrationResponse, GetIndexerLeaderboardResponse, GetIndexerLinkedSignerParams, GetIndexerLinkedSignerResponse, GetIndexerMakerStatisticsParams, GetIndexerMakerStatisticsResponse, GetIndexerMarketSnapshotsParams, GetIndexerMarketSnapshotsResponse, GetIndexerMatchEventsParams, GetIndexerMatchEventsResponse, GetIndexerMultiProductFundingRatesParams, GetIndexerMultiProductFundingRatesResponse, GetIndexerMultiProductPerpPricesParams, GetIndexerMultiProductPerpPricesResponse, GetIndexerMultiProductSnapshotsParams, GetIndexerMultiProductSnapshotsResponse, GetIndexerMultiSubaccountSnapshotsParams, GetIndexerMultiSubaccountSnapshotsResponse, GetIndexerNlpSnapshotsParams, GetIndexerNlpSnapshotsResponse, GetIndexerOraclePricesParams, GetIndexerOraclePricesResponse, GetIndexerOrdersParams, GetIndexerOrdersResponse, GetIndexerPerpPricesParams, GetIndexerPerpPricesResponse, GetIndexerProductSnapshotsParams, GetIndexerProductSnapshotsResponse, GetIndexerQuotePriceResponse, GetIndexerReferralCodeParams, GetIndexerReferralCodeResponse, GetIndexerSubaccountDDAParams, GetIndexerSubaccountDDAResponse, IndexerBalanceTrackedVars, IndexerEvent, IndexerEventBalanceStateSnapshot, IndexerEventPerpStateSnapshot, IndexerEventSpotStateSnapshot, IndexerEventWithTx, IndexerFundingRate, IndexerLeaderboardContest, IndexerLeaderboardParticipant, IndexerLeaderboardRegistration, IndexerMaker, IndexerMakerSnapshot, IndexerMarketSnapshot, IndexerMatchEvent, IndexerMatchEventBalances, IndexerNlpSnapshot, IndexerOraclePrice, IndexerOrder, IndexerPerpBalance, IndexerPerpPrices, IndexerProductPayment, IndexerProductSnapshot, IndexerSnapshotBalance, IndexerSnapshotsIntervalParams, IndexerSpotBalance, IndexerSubaccountSnapshot, ListIndexerSubaccountsParams, ListIndexerSubaccountsResponse, UpdateIndexerLeaderboardRegistrationParams, UpdateIndexerLeaderboardRegistrationResponse } from './clientTypes.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 } from './paginatedEventsTypes.cjs';
|
|
3
|
-
export { IndexerEdgeServerCandlesticksParams, IndexerEdgeServerCandlesticksResponse, IndexerEdgeServerMarketSnapshotsParams, IndexerEdgeServerMarketSnapshotsResponse, IndexerServerBacklogResponse, IndexerServerCandlesticksParams, IndexerServerCandlesticksResponse, IndexerServerEventsParams, IndexerServerEventsResponse, IndexerServerFastWithdrawalSignatureParams, IndexerServerFastWithdrawalSignatureResponse, IndexerServerFundingRate, IndexerServerFundingRateParams, IndexerServerFundingRateResponse, IndexerServerFundingRatesParams, IndexerServerFundingRatesResponse, IndexerServerInterestFundingParams, IndexerServerInterestFundingResponse, IndexerServerLeaderboardContestsParams, IndexerServerLeaderboardContestsResponse, IndexerServerLeaderboardParams, IndexerServerLeaderboardRankParams, IndexerServerLeaderboardRankResponse, IndexerServerLeaderboardRegistrationParams, IndexerServerLeaderboardRegistrationResponse, IndexerServerLeaderboardResponse, IndexerServerLinkedSignerParams, IndexerServerLinkedSignerResponse, IndexerServerListSubaccountsParams, IndexerServerListSubaccountsResponse, IndexerServerMakerStatisticsParams, IndexerServerMakerStatisticsResponse, IndexerServerMarketSnapshotsParams, IndexerServerMarketSnapshotsResponse, IndexerServerMatchEventsParams, IndexerServerMatchEventsResponse, IndexerServerMultiProductsParams, IndexerServerMultiProductsResponse, IndexerServerMultiSubaccountSnapshotsParams, IndexerServerMultiSubaccountSnapshotsResponse, IndexerServerNlpSnapshotsParams, IndexerServerNlpSnapshotsResponse, IndexerServerOraclePricesParams, IndexerServerOraclePricesResponse, IndexerServerOrdersParams, IndexerServerOrdersResponse, IndexerServerPerpPrices, IndexerServerPerpPricesParams, IndexerServerPerpPricesResponse, IndexerServerPriceParams, IndexerServerPriceResponse, IndexerServerProductsParams, IndexerServerProductsResponse, IndexerServerQueryRequestByType, IndexerServerQueryRequestType, IndexerServerQueryResponseByType, IndexerServerReferralCodeParams, IndexerServerReferralCodeResponse, IndexerServerUsdcPriceResponse } from './serverTypes.cjs';
|
|
3
|
+
export { IndexerEdgeServerCandlesticksParams, IndexerEdgeServerCandlesticksResponse, IndexerEdgeServerMarketSnapshotsParams, IndexerEdgeServerMarketSnapshotsResponse, IndexerServerBacklogResponse, IndexerServerCandlesticksParams, IndexerServerCandlesticksResponse, IndexerServerDDAQueryParams, IndexerServerDDAResponse, IndexerServerEventsParams, IndexerServerEventsResponse, IndexerServerFastWithdrawalSignatureParams, IndexerServerFastWithdrawalSignatureResponse, IndexerServerFundingRate, IndexerServerFundingRateParams, IndexerServerFundingRateResponse, IndexerServerFundingRatesParams, IndexerServerFundingRatesResponse, IndexerServerInterestFundingParams, IndexerServerInterestFundingResponse, IndexerServerLeaderboardContestsParams, IndexerServerLeaderboardContestsResponse, IndexerServerLeaderboardParams, IndexerServerLeaderboardRankParams, IndexerServerLeaderboardRankResponse, IndexerServerLeaderboardRegistrationParams, IndexerServerLeaderboardRegistrationResponse, IndexerServerLeaderboardResponse, IndexerServerLinkedSignerParams, IndexerServerLinkedSignerResponse, IndexerServerListSubaccountsParams, IndexerServerListSubaccountsResponse, IndexerServerMakerStatisticsParams, IndexerServerMakerStatisticsResponse, IndexerServerMarketSnapshotsParams, IndexerServerMarketSnapshotsResponse, IndexerServerMatchEventsParams, IndexerServerMatchEventsResponse, IndexerServerMultiProductsParams, IndexerServerMultiProductsResponse, IndexerServerMultiSubaccountSnapshotsParams, IndexerServerMultiSubaccountSnapshotsResponse, IndexerServerNlpSnapshotsParams, IndexerServerNlpSnapshotsResponse, IndexerServerOraclePricesParams, IndexerServerOraclePricesResponse, IndexerServerOrdersParams, IndexerServerOrdersResponse, IndexerServerPerpPrices, IndexerServerPerpPricesParams, IndexerServerPerpPricesResponse, IndexerServerPriceParams, IndexerServerPriceResponse, IndexerServerProductsParams, IndexerServerProductsResponse, IndexerServerQueryRequestByType, IndexerServerQueryRequestType, IndexerServerQueryResponseByType, IndexerServerReferralCodeParams, IndexerServerReferralCodeResponse, IndexerServerUsdcPriceResponse } from './serverTypes.cjs';
|
|
4
4
|
export { IndexerServerBalance, IndexerServerCandlestick, IndexerServerEvent, IndexerServerLeaderboardContest, IndexerServerLeaderboardPosition, IndexerServerLeaderboardRegistration, IndexerServerMaker, IndexerServerMakerData, IndexerServerMarketSnapshot, IndexerServerMarketSnapshotInterval, IndexerServerMatchEvent, IndexerServerMatchEventBalances, IndexerServerNlpSnapshot, IndexerServerOraclePrice, IndexerServerOrder, IndexerServerProduct, IndexerServerProductPayment, IndexerServerProductSnapshot, IndexerServerSnapshotsInterval, IndexerServerTx } from './serverModelTypes.cjs';
|
|
5
5
|
export { CandlestickPeriod } from './CandlestickPeriod.cjs';
|
|
6
6
|
export { IndexerEventType } from './IndexerEventType.cjs';
|
|
7
7
|
export { IndexerLeaderboardRankType } from './IndexerLeaderboardType.cjs';
|
|
8
8
|
export { CollateralEventType } from './collateralEventType.cjs';
|
|
9
9
|
export { NadoDepositCollateralTx, NadoLiquidateSubaccountTx, NadoMatchOrdersRfqTx, NadoMatchOrdersTx, NadoTransferQuoteTx, NadoTx, NadoWithdrawCollateralTx } from './NadoTx.cjs';
|
|
10
|
-
import '@nadohq/
|
|
11
|
-
import '@nadohq/utils';
|
|
10
|
+
import '@nadohq/shared';
|
|
12
11
|
import 'viem';
|
|
13
12
|
import '@nadohq/engine-client';
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
export { Candlestick, GetIndexerBacklogResponse, GetIndexerCandlesticksParams, GetIndexerCandlesticksResponse, GetIndexerEdgeCandlesticksParams, GetIndexerEdgeCandlesticksResponse, GetIndexerEdgeMarketSnapshotResponse, GetIndexerEdgeMarketSnapshotsParams, GetIndexerEventsLimitType, GetIndexerEventsParams, GetIndexerEventsResponse, GetIndexerFastWithdrawalSignatureParams, GetIndexerFastWithdrawalSignatureResponse, GetIndexerFundingRateParams, GetIndexerFundingRateResponse, GetIndexerInterestFundingPaymentsParams, GetIndexerInterestFundingPaymentsResponse, GetIndexerLeaderboardContestsParams, GetIndexerLeaderboardContestsResponse, GetIndexerLeaderboardParams, GetIndexerLeaderboardParticipantParams, GetIndexerLeaderboardParticipantResponse, GetIndexerLeaderboardRegistrationParams, GetIndexerLeaderboardRegistrationResponse, GetIndexerLeaderboardResponse, GetIndexerLinkedSignerParams, GetIndexerLinkedSignerResponse, GetIndexerMakerStatisticsParams, GetIndexerMakerStatisticsResponse, GetIndexerMarketSnapshotsParams, GetIndexerMarketSnapshotsResponse, GetIndexerMatchEventsParams, GetIndexerMatchEventsResponse, GetIndexerMultiProductFundingRatesParams, GetIndexerMultiProductFundingRatesResponse, GetIndexerMultiProductPerpPricesParams, GetIndexerMultiProductPerpPricesResponse, GetIndexerMultiProductSnapshotsParams, GetIndexerMultiProductSnapshotsResponse, GetIndexerMultiSubaccountSnapshotsParams, GetIndexerMultiSubaccountSnapshotsResponse, GetIndexerNlpSnapshotsParams, GetIndexerNlpSnapshotsResponse, GetIndexerOraclePricesParams, GetIndexerOraclePricesResponse, GetIndexerOrdersParams, GetIndexerOrdersResponse, GetIndexerPerpPricesParams, GetIndexerPerpPricesResponse, GetIndexerProductSnapshotsParams, GetIndexerProductSnapshotsResponse, GetIndexerQuotePriceResponse, GetIndexerReferralCodeParams, GetIndexerReferralCodeResponse, IndexerBalanceTrackedVars, IndexerEvent, IndexerEventBalanceStateSnapshot, IndexerEventPerpStateSnapshot, IndexerEventSpotStateSnapshot, IndexerEventWithTx, IndexerFundingRate, IndexerLeaderboardContest, IndexerLeaderboardParticipant, IndexerLeaderboardRegistration, IndexerMaker, IndexerMakerSnapshot, IndexerMarketSnapshot, IndexerMatchEvent, IndexerMatchEventBalances, IndexerNlpSnapshot, IndexerOraclePrice, IndexerOrder, IndexerPerpBalance, IndexerPerpPrices, IndexerProductPayment, IndexerProductSnapshot, IndexerSnapshotBalance, IndexerSnapshotsIntervalParams, IndexerSpotBalance, IndexerSubaccountSnapshot, ListIndexerSubaccountsParams, ListIndexerSubaccountsResponse, UpdateIndexerLeaderboardRegistrationParams, UpdateIndexerLeaderboardRegistrationResponse } from './clientTypes.js';
|
|
1
|
+
export { Candlestick, GetIndexerBacklogResponse, GetIndexerCandlesticksParams, GetIndexerCandlesticksResponse, GetIndexerEdgeCandlesticksParams, GetIndexerEdgeCandlesticksResponse, GetIndexerEdgeMarketSnapshotResponse, GetIndexerEdgeMarketSnapshotsParams, GetIndexerEventsLimitType, GetIndexerEventsParams, GetIndexerEventsResponse, GetIndexerFastWithdrawalSignatureParams, GetIndexerFastWithdrawalSignatureResponse, GetIndexerFundingRateParams, GetIndexerFundingRateResponse, GetIndexerInterestFundingPaymentsParams, GetIndexerInterestFundingPaymentsResponse, GetIndexerLeaderboardContestsParams, GetIndexerLeaderboardContestsResponse, GetIndexerLeaderboardParams, GetIndexerLeaderboardParticipantParams, GetIndexerLeaderboardParticipantResponse, GetIndexerLeaderboardRegistrationParams, GetIndexerLeaderboardRegistrationResponse, GetIndexerLeaderboardResponse, GetIndexerLinkedSignerParams, GetIndexerLinkedSignerResponse, GetIndexerMakerStatisticsParams, GetIndexerMakerStatisticsResponse, GetIndexerMarketSnapshotsParams, GetIndexerMarketSnapshotsResponse, GetIndexerMatchEventsParams, GetIndexerMatchEventsResponse, GetIndexerMultiProductFundingRatesParams, GetIndexerMultiProductFundingRatesResponse, GetIndexerMultiProductPerpPricesParams, GetIndexerMultiProductPerpPricesResponse, GetIndexerMultiProductSnapshotsParams, GetIndexerMultiProductSnapshotsResponse, GetIndexerMultiSubaccountSnapshotsParams, GetIndexerMultiSubaccountSnapshotsResponse, GetIndexerNlpSnapshotsParams, GetIndexerNlpSnapshotsResponse, GetIndexerOraclePricesParams, GetIndexerOraclePricesResponse, GetIndexerOrdersParams, GetIndexerOrdersResponse, GetIndexerPerpPricesParams, GetIndexerPerpPricesResponse, GetIndexerProductSnapshotsParams, GetIndexerProductSnapshotsResponse, GetIndexerQuotePriceResponse, GetIndexerReferralCodeParams, GetIndexerReferralCodeResponse, GetIndexerSubaccountDDAParams, GetIndexerSubaccountDDAResponse, IndexerBalanceTrackedVars, IndexerEvent, IndexerEventBalanceStateSnapshot, IndexerEventPerpStateSnapshot, IndexerEventSpotStateSnapshot, IndexerEventWithTx, IndexerFundingRate, IndexerLeaderboardContest, IndexerLeaderboardParticipant, IndexerLeaderboardRegistration, IndexerMaker, IndexerMakerSnapshot, IndexerMarketSnapshot, IndexerMatchEvent, IndexerMatchEventBalances, IndexerNlpSnapshot, IndexerOraclePrice, IndexerOrder, IndexerPerpBalance, IndexerPerpPrices, IndexerProductPayment, IndexerProductSnapshot, IndexerSnapshotBalance, IndexerSnapshotsIntervalParams, IndexerSpotBalance, IndexerSubaccountSnapshot, ListIndexerSubaccountsParams, ListIndexerSubaccountsResponse, UpdateIndexerLeaderboardRegistrationParams, UpdateIndexerLeaderboardRegistrationResponse } from './clientTypes.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 } from './paginatedEventsTypes.js';
|
|
3
|
-
export { IndexerEdgeServerCandlesticksParams, IndexerEdgeServerCandlesticksResponse, IndexerEdgeServerMarketSnapshotsParams, IndexerEdgeServerMarketSnapshotsResponse, IndexerServerBacklogResponse, IndexerServerCandlesticksParams, IndexerServerCandlesticksResponse, IndexerServerEventsParams, IndexerServerEventsResponse, IndexerServerFastWithdrawalSignatureParams, IndexerServerFastWithdrawalSignatureResponse, IndexerServerFundingRate, IndexerServerFundingRateParams, IndexerServerFundingRateResponse, IndexerServerFundingRatesParams, IndexerServerFundingRatesResponse, IndexerServerInterestFundingParams, IndexerServerInterestFundingResponse, IndexerServerLeaderboardContestsParams, IndexerServerLeaderboardContestsResponse, IndexerServerLeaderboardParams, IndexerServerLeaderboardRankParams, IndexerServerLeaderboardRankResponse, IndexerServerLeaderboardRegistrationParams, IndexerServerLeaderboardRegistrationResponse, IndexerServerLeaderboardResponse, IndexerServerLinkedSignerParams, IndexerServerLinkedSignerResponse, IndexerServerListSubaccountsParams, IndexerServerListSubaccountsResponse, IndexerServerMakerStatisticsParams, IndexerServerMakerStatisticsResponse, IndexerServerMarketSnapshotsParams, IndexerServerMarketSnapshotsResponse, IndexerServerMatchEventsParams, IndexerServerMatchEventsResponse, IndexerServerMultiProductsParams, IndexerServerMultiProductsResponse, IndexerServerMultiSubaccountSnapshotsParams, IndexerServerMultiSubaccountSnapshotsResponse, IndexerServerNlpSnapshotsParams, IndexerServerNlpSnapshotsResponse, IndexerServerOraclePricesParams, IndexerServerOraclePricesResponse, IndexerServerOrdersParams, IndexerServerOrdersResponse, IndexerServerPerpPrices, IndexerServerPerpPricesParams, IndexerServerPerpPricesResponse, IndexerServerPriceParams, IndexerServerPriceResponse, IndexerServerProductsParams, IndexerServerProductsResponse, IndexerServerQueryRequestByType, IndexerServerQueryRequestType, IndexerServerQueryResponseByType, IndexerServerReferralCodeParams, IndexerServerReferralCodeResponse, IndexerServerUsdcPriceResponse } from './serverTypes.js';
|
|
3
|
+
export { IndexerEdgeServerCandlesticksParams, IndexerEdgeServerCandlesticksResponse, IndexerEdgeServerMarketSnapshotsParams, IndexerEdgeServerMarketSnapshotsResponse, IndexerServerBacklogResponse, IndexerServerCandlesticksParams, IndexerServerCandlesticksResponse, IndexerServerDDAQueryParams, IndexerServerDDAResponse, IndexerServerEventsParams, IndexerServerEventsResponse, IndexerServerFastWithdrawalSignatureParams, IndexerServerFastWithdrawalSignatureResponse, IndexerServerFundingRate, IndexerServerFundingRateParams, IndexerServerFundingRateResponse, IndexerServerFundingRatesParams, IndexerServerFundingRatesResponse, IndexerServerInterestFundingParams, IndexerServerInterestFundingResponse, IndexerServerLeaderboardContestsParams, IndexerServerLeaderboardContestsResponse, IndexerServerLeaderboardParams, IndexerServerLeaderboardRankParams, IndexerServerLeaderboardRankResponse, IndexerServerLeaderboardRegistrationParams, IndexerServerLeaderboardRegistrationResponse, IndexerServerLeaderboardResponse, IndexerServerLinkedSignerParams, IndexerServerLinkedSignerResponse, IndexerServerListSubaccountsParams, IndexerServerListSubaccountsResponse, IndexerServerMakerStatisticsParams, IndexerServerMakerStatisticsResponse, IndexerServerMarketSnapshotsParams, IndexerServerMarketSnapshotsResponse, IndexerServerMatchEventsParams, IndexerServerMatchEventsResponse, IndexerServerMultiProductsParams, IndexerServerMultiProductsResponse, IndexerServerMultiSubaccountSnapshotsParams, IndexerServerMultiSubaccountSnapshotsResponse, IndexerServerNlpSnapshotsParams, IndexerServerNlpSnapshotsResponse, IndexerServerOraclePricesParams, IndexerServerOraclePricesResponse, IndexerServerOrdersParams, IndexerServerOrdersResponse, IndexerServerPerpPrices, IndexerServerPerpPricesParams, IndexerServerPerpPricesResponse, IndexerServerPriceParams, IndexerServerPriceResponse, IndexerServerProductsParams, IndexerServerProductsResponse, IndexerServerQueryRequestByType, IndexerServerQueryRequestType, IndexerServerQueryResponseByType, IndexerServerReferralCodeParams, IndexerServerReferralCodeResponse, IndexerServerUsdcPriceResponse } from './serverTypes.js';
|
|
4
4
|
export { IndexerServerBalance, IndexerServerCandlestick, IndexerServerEvent, IndexerServerLeaderboardContest, IndexerServerLeaderboardPosition, IndexerServerLeaderboardRegistration, IndexerServerMaker, IndexerServerMakerData, IndexerServerMarketSnapshot, IndexerServerMarketSnapshotInterval, IndexerServerMatchEvent, IndexerServerMatchEventBalances, IndexerServerNlpSnapshot, IndexerServerOraclePrice, IndexerServerOrder, IndexerServerProduct, IndexerServerProductPayment, IndexerServerProductSnapshot, IndexerServerSnapshotsInterval, IndexerServerTx } from './serverModelTypes.js';
|
|
5
5
|
export { CandlestickPeriod } from './CandlestickPeriod.js';
|
|
6
6
|
export { IndexerEventType } from './IndexerEventType.js';
|
|
7
7
|
export { IndexerLeaderboardRankType } from './IndexerLeaderboardType.js';
|
|
8
8
|
export { CollateralEventType } from './collateralEventType.js';
|
|
9
9
|
export { NadoDepositCollateralTx, NadoLiquidateSubaccountTx, NadoMatchOrdersRfqTx, NadoMatchOrdersTx, NadoTransferQuoteTx, NadoTx, NadoWithdrawCollateralTx } from './NadoTx.js';
|
|
10
|
-
import '@nadohq/
|
|
11
|
-
import '@nadohq/utils';
|
|
10
|
+
import '@nadohq/shared';
|
|
12
11
|
import 'viem';
|
|
13
12
|
import '@nadohq/engine-client';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/types/paginatedEventsTypes.ts"],"sourcesContent":["import { Subaccount } from '@nadohq/
|
|
1
|
+
{"version":3,"sources":["../../src/types/paginatedEventsTypes.ts"],"sourcesContent":["import { BigDecimal, Subaccount } from '@nadohq/shared';\nimport {\n GetIndexerInterestFundingPaymentsParams,\n GetIndexerInterestFundingPaymentsResponse,\n GetIndexerLeaderboardParams,\n GetIndexerLeaderboardResponse,\n GetIndexerMatchEventsParams,\n GetIndexerOrdersParams,\n IndexerEventBalanceStateSnapshot,\n IndexerEventPerpStateSnapshot,\n IndexerEventSpotStateSnapshot,\n IndexerEventWithTx,\n IndexerMatchEvent,\n IndexerOrder,\n} from './clientTypes';\nimport { CollateralEventType } from './collateralEventType';\nimport { NadoTx } from './NadoTx';\n\nexport interface IndexerPaginationParams {\n limit: number;\n // Retrieves events inclusive of this start cursor\n startCursor?: string;\n}\n\nexport interface IndexerPaginationMeta {\n hasMore: boolean;\n nextCursor?: string;\n}\n\nexport type WithPaginationMeta = { meta: IndexerPaginationMeta };\n\ntype BaseSubaccountPaginationParams = Subaccount &\n IndexerPaginationParams & {\n /**\n * If provided, only events with a timestamp in seconds <= this value will be returned\n * Specifying `startCursor` will supercede this value\n */\n maxTimestampInclusive?: number;\n };\n\nexport interface BaseIndexerPaginatedEvent extends Subaccount {\n timestamp: BigDecimal;\n submissionIndex: string;\n tx: NadoTx;\n}\n\nexport interface PaginatedIndexerEventsResponse<\n T extends BaseIndexerPaginatedEvent,\n> extends WithPaginationMeta {\n events: T[];\n}\n\n/**\n * Collateral\n */\n\nexport interface GetIndexerSubaccountCollateralEventsParams\n extends BaseSubaccountPaginationParams {\n eventTypes?: CollateralEventType[];\n // If not given, will return both isolated & non-iso events\n isolated?: boolean;\n}\n\nexport interface IndexerCollateralEvent extends BaseIndexerPaginatedEvent {\n eventType: CollateralEventType;\n // Positive for deposits, negative for withdrawals\n amount: BigDecimal;\n // The collateral balance after the event\n newAmount: BigDecimal;\n snapshot: IndexerEventSpotStateSnapshot;\n}\n\nexport type GetIndexerSubaccountCollateralEventsResponse =\n PaginatedIndexerEventsResponse<IndexerCollateralEvent>;\n\n/**\n * NLP\n */\nexport type GetIndexerSubaccountNlpEventsParams =\n BaseSubaccountPaginationParams;\n\nexport interface IndexerNlpEvent extends BaseIndexerPaginatedEvent {\n nlpDelta: BigDecimal;\n primaryQuoteDelta: BigDecimal;\n}\n\nexport type GetIndexerSubaccountNlpEventsResponse =\n PaginatedIndexerEventsResponse<IndexerNlpEvent>;\n\n/**\n * Match events\n */\n\nexport type GetIndexerSubaccountMatchEventParams =\n BaseSubaccountPaginationParams &\n Pick<GetIndexerMatchEventsParams, 'productIds' | 'isolated'>;\n\nexport type GetIndexerSubaccountMatchEventsResponse =\n PaginatedIndexerEventsResponse<IndexerMatchEvent>;\n\n/**\n * Orders\n */\n\nexport type GetIndexerPaginatedOrdersParams = BaseSubaccountPaginationParams &\n Pick<GetIndexerOrdersParams, 'productIds' | 'isolated'>;\n\nexport interface GetIndexerPaginatedOrdersResponse {\n orders: IndexerOrder[];\n meta: IndexerPaginationMeta;\n}\n\n/**\n * Liquidations\n */\n\nexport type GetIndexerSubaccountLiquidationEventsParams =\n BaseSubaccountPaginationParams;\n\ntype WithIndexerEvent<\n TData,\n TStateType extends IndexerEventBalanceStateSnapshot,\n> = TData & {\n indexerEvent: IndexerEventWithTx<TStateType>;\n};\n\nexport interface IndexerLiquidationEvent extends BaseIndexerPaginatedEvent {\n // Either spot or perp will then be liquidated if the subaccount maint. health is below 0\n // Both spot & perp can be liquidated in the same event from a spread liquidation\n spot?: WithIndexerEvent<\n {\n // The original balance that was liquidated\n // ex. if it was originally a short, amount is negative, but the net delta from the liquidation is positive\n amountLiquidated: BigDecimal;\n },\n IndexerEventSpotStateSnapshot\n >;\n perp?: WithIndexerEvent<\n {\n // The original balance that was liquidated\n // ex. if it was originally a short, amount is negative, but the net delta from the liquidation is positive\n amountLiquidated: BigDecimal;\n },\n IndexerEventPerpStateSnapshot\n >;\n // Quote delta for the subaccount\n // Only the SPOT QUOTE payment made for the liquidation. Does not include the perp vQuote balance change\n quote: WithIndexerEvent<\n {\n balanceDelta: BigDecimal;\n },\n IndexerEventSpotStateSnapshot\n >;\n}\n\nexport type GetIndexerSubaccountLiquidationEventsResponse =\n PaginatedIndexerEventsResponse<IndexerLiquidationEvent>;\n\n/**\n * Settlement\n */\n\nexport type GetIndexerSubaccountSettlementEventsParams =\n BaseSubaccountPaginationParams;\n\nexport interface IndexerSettlementEvent extends BaseIndexerPaginatedEvent {\n // Quote delta for the subaccount being settled\n quoteDelta: BigDecimal;\n snapshot: IndexerEventPerpStateSnapshot;\n isolated: boolean;\n}\n\nexport type GetIndexerSubaccountSettlementEventsResponse =\n PaginatedIndexerEventsResponse<IndexerSettlementEvent>;\n\n/**\n * Interest / Funding\n */\n\nexport type GetIndexerSubaccountInterestFundingPaymentsParams =\n BaseSubaccountPaginationParams &\n Pick<GetIndexerInterestFundingPaymentsParams, 'productIds' | 'startCursor'>;\n\nexport interface GetIndexerPaginatedInterestFundingPaymentsResponse\n extends GetIndexerInterestFundingPaymentsResponse {\n meta: IndexerPaginationMeta;\n}\n\nexport type GetIndexerPaginatedLeaderboardParams = IndexerPaginationParams &\n Pick<GetIndexerLeaderboardParams, 'contestId' | 'rankType'>;\n\nexport type GetIndexerPaginatedLeaderboardResponse = WithPaginationMeta &\n GetIndexerLeaderboardResponse;\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { GetIndexerMatchEventsParams, IndexerMatchEvent, IndexerEventSpotStateSnapshot, GetIndexerOrdersParams, IndexerOrder, IndexerEventPerpStateSnapshot, IndexerEventBalanceStateSnapshot, IndexerEventWithTx, GetIndexerInterestFundingPaymentsParams, GetIndexerInterestFundingPaymentsResponse, GetIndexerLeaderboardParams, GetIndexerLeaderboardResponse } from './clientTypes.cjs';
|
|
2
|
-
import { Subaccount } from '@nadohq/
|
|
3
|
-
import { BigDecimal } from '@nadohq/utils';
|
|
2
|
+
import { Subaccount, BigDecimal } from '@nadohq/shared';
|
|
4
3
|
import { CollateralEventType } from './collateralEventType.cjs';
|
|
5
4
|
import { NadoTx } from './NadoTx.cjs';
|
|
6
5
|
import './serverTypes.cjs';
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { GetIndexerMatchEventsParams, IndexerMatchEvent, IndexerEventSpotStateSnapshot, GetIndexerOrdersParams, IndexerOrder, IndexerEventPerpStateSnapshot, IndexerEventBalanceStateSnapshot, IndexerEventWithTx, GetIndexerInterestFundingPaymentsParams, GetIndexerInterestFundingPaymentsResponse, GetIndexerLeaderboardParams, GetIndexerLeaderboardResponse } from './clientTypes.js';
|
|
2
|
-
import { Subaccount } from '@nadohq/
|
|
3
|
-
import { BigDecimal } from '@nadohq/utils';
|
|
2
|
+
import { Subaccount, BigDecimal } from '@nadohq/shared';
|
|
4
3
|
import { CollateralEventType } from './collateralEventType.js';
|
|
5
4
|
import { NadoTx } from './NadoTx.js';
|
|
6
5
|
import './serverTypes.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/types/serverModelTypes.ts"],"sourcesContent":["import { EIP712OrderValues } from '@nadohq/
|
|
1
|
+
{"version":3,"sources":["../../src/types/serverModelTypes.ts"],"sourcesContent":["import { EIP712OrderValues } from '@nadohq/shared';\nimport {\n EngineServerPerpBalance,\n EngineServerPerpProduct,\n EngineServerSpotBalance,\n EngineServerSpotProduct,\n} from '@nadohq/engine-client';\nimport { IndexerEventType } from './IndexerEventType';\nimport { NadoTx } from './NadoTx';\n\nexport interface IndexerServerSnapshotsInterval {\n count: number;\n // Currently accepts any granularity, time distance (in seconds) between data points\n granularity: number;\n max_time?: string;\n}\n\nexport type IndexerServerProduct =\n | {\n spot: EngineServerSpotProduct;\n }\n | {\n perp: EngineServerPerpProduct;\n };\n\nexport type IndexerServerBalance =\n | {\n spot: EngineServerSpotBalance;\n }\n | {\n perp: EngineServerPerpBalance;\n };\n\n/**\n * Candlesticks\n */\n\nexport interface IndexerServerCandlestick {\n product_id: number;\n granularity: string;\n submission_idx: string;\n timestamp: string;\n open_x18: string;\n high_x18: string;\n low_x18: string;\n close_x18: string;\n volume: string;\n}\n\n/**\n * Product snapshots\n */\n\nexport interface IndexerServerProductSnapshot {\n product_id: number;\n submission_idx: string;\n product: IndexerServerProduct;\n}\n\n/**\n * Base Events\n */\n\nexport interface IndexerServerEvent {\n subaccount: string;\n isolated: boolean;\n // The product ID associated with the isolated perp market. This is only used when product_id === QUOTE_PRODUCT_ID and isolated === true\n isolated_product_id: number | null;\n product_id: number;\n submission_idx: string;\n event_type: IndexerEventType;\n pre_balance: IndexerServerBalance;\n post_balance: IndexerServerBalance;\n product: IndexerServerProduct;\n net_interest_unrealized: string;\n net_interest_cumulative: string;\n net_funding_unrealized: string;\n net_funding_cumulative: string;\n net_entry_unrealized: string;\n net_entry_cumulative: string;\n}\n\nexport interface IndexerServerTx {\n submission_idx: string;\n timestamp: string;\n tx: NadoTx;\n}\n\n/**\n * Orders\n */\n\nexport interface IndexerServerOrder {\n digest: string;\n isolated: boolean;\n subaccount: string;\n product_id: number;\n submission_idx: string;\n amount: string;\n price_x18: string;\n expiration: string;\n appendix: string;\n nonce: string;\n base_filled: string;\n // Includes fee\n quote_filled: string;\n // Includes sequencer fee\n fee: string;\n}\n\n/**\n * Match events\n */\n\nexport interface IndexerServerMatchEvent {\n digest: string;\n isolated: boolean;\n order: EIP712OrderValues;\n base_filled: string;\n // Includes fee\n quote_filled: string;\n // Includes sequencer fee\n fee: string;\n sequencer_fee: string;\n cumulative_fee: string;\n cumulative_base_filled: string;\n cumulative_quote_filled: string;\n submission_idx: string;\n net_entry_unrealized: string;\n net_entry_cumulative: string;\n pre_balance: IndexerServerMatchEventBalances;\n post_balance: IndexerServerMatchEventBalances;\n}\n\nexport interface IndexerServerMatchEventBalances {\n base: IndexerServerBalance;\n // Quote is defined if 0 is included in `product_ids` and the match event is a spot event\n quote?: IndexerServerBalance;\n}\n\n/**\n * Oracle price\n */\n\nexport interface IndexerServerOraclePrice {\n product_id: number;\n oracle_price_x18: string;\n update_time: number;\n}\n\n/**\n * Market snapshots\n */\n\nexport interface IndexerServerMarketSnapshotInterval {\n count: number;\n // Currently accepts any granularity, time distance (in seconds) between data points\n granularity: number;\n max_time?: string;\n}\n\nexport interface IndexerServerMarketSnapshot {\n timestamp: string;\n cumulative_users: string;\n daily_active_users: string;\n tvl: string;\n // Keyed by product ID -> decimal value in string (i.e. no decimal adjustment) necessary\n // Backend serializes hashmaps with string keys\n cumulative_volumes: Record<string, string>;\n cumulative_taker_fees: Record<string, string>;\n cumulative_sequencer_fees: Record<string, string>;\n cumulative_maker_fees: Record<string, string>;\n cumulative_trades: Record<string, string>;\n cumulative_liquidation_amounts: Record<string, string>;\n open_interests: Record<string, string>;\n total_deposits: Record<string, string>;\n total_borrows: Record<string, string>;\n funding_rates: Record<string, string>;\n deposit_rates: Record<string, string>;\n borrow_rates: Record<string, string>;\n cumulative_trade_sizes: Record<string, string>;\n cumulative_inflows: Record<string, string>;\n cumulative_outflows: Record<string, string>;\n oracle_prices: Record<string, string>;\n}\n\n/**\n * Interest / funding\n */\n\nexport interface IndexerServerProductPayment {\n product_id: number;\n idx: string;\n timestamp: string;\n amount: string;\n balance_amount: string;\n rate_x18: string;\n oracle_price_x18: string;\n isolated: boolean;\n isolated_product_id: number | null;\n}\n\n/**\n * Maker stats\n */\n\nexport interface IndexerServerMakerData {\n timestamp: string;\n maker_fee: string;\n uptime: string;\n sum_q_min: string;\n q_score: string;\n maker_share: string;\n expected_maker_reward: string;\n}\n\nexport interface IndexerServerMaker {\n address: string;\n data: IndexerServerMakerData[];\n}\n\n/**\n * Leaderboard\n */\n\nexport interface IndexerServerLeaderboardPosition {\n subaccount: string;\n contest_id: number;\n pnl: string;\n pnl_rank: string;\n roi: string;\n roi_rank: string;\n account_value: string;\n volume?: string;\n update_time: string;\n}\n\nexport interface IndexerServerLeaderboardContest {\n contest_id: number;\n start_time: string;\n end_time: string;\n timeframe: string;\n count: string;\n threshold: string;\n volume_threshold: string;\n product_ids: number[];\n last_updated: string;\n active: boolean;\n}\n\nexport interface IndexerServerLeaderboardRegistration {\n subaccount: string;\n contest_id: number;\n update_time: string;\n}\n\n/**\n * NLP\n */\n\nexport interface IndexerServerNlpSnapshot {\n cumulative_burn_usdc: string;\n cumulative_mint_usdc: string;\n cumulative_pnl: string;\n cumulative_trades: string;\n cumulative_volume: string;\n depositors: string;\n oracle_price_x18: string;\n submission_idx: string;\n timestamp: string;\n tvl: string;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EIP712OrderValues } from '@nadohq/
|
|
1
|
+
import { EIP712OrderValues } from '@nadohq/shared';
|
|
2
2
|
import { EngineServerSpotBalance, EngineServerPerpBalance, EngineServerSpotProduct, EngineServerPerpProduct } from '@nadohq/engine-client';
|
|
3
3
|
import { IndexerEventType } from './IndexerEventType.cjs';
|
|
4
4
|
import { NadoTx } from './NadoTx.cjs';
|
|
@@ -77,6 +77,7 @@ interface IndexerServerOrder {
|
|
|
77
77
|
amount: string;
|
|
78
78
|
price_x18: string;
|
|
79
79
|
expiration: string;
|
|
80
|
+
appendix: string;
|
|
80
81
|
nonce: string;
|
|
81
82
|
base_filled: string;
|
|
82
83
|
quote_filled: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EIP712OrderValues } from '@nadohq/
|
|
1
|
+
import { EIP712OrderValues } from '@nadohq/shared';
|
|
2
2
|
import { EngineServerSpotBalance, EngineServerPerpBalance, EngineServerSpotProduct, EngineServerPerpProduct } from '@nadohq/engine-client';
|
|
3
3
|
import { IndexerEventType } from './IndexerEventType.js';
|
|
4
4
|
import { NadoTx } from './NadoTx.js';
|
|
@@ -77,6 +77,7 @@ interface IndexerServerOrder {
|
|
|
77
77
|
amount: string;
|
|
78
78
|
price_x18: string;
|
|
79
79
|
expiration: string;
|
|
80
|
+
appendix: string;
|
|
80
81
|
nonce: string;
|
|
81
82
|
base_filled: string;
|
|
82
83
|
quote_filled: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/types/serverTypes.ts"],"sourcesContent":["import {\n EIP712LeaderboardAuthenticationValues,\n SignedTx,\n} from '@nadohq/contracts';\nimport { IndexerEventType } from './IndexerEventType';\nimport { IndexerLeaderboardRankType } from './IndexerLeaderboardType';\nimport { NadoWithdrawCollateralTx } from './NadoTx';\nimport {\n IndexerServerCandlestick,\n IndexerServerEvent,\n IndexerServerLeaderboardContest,\n IndexerServerLeaderboardPosition,\n IndexerServerLeaderboardRegistration,\n IndexerServerMaker,\n IndexerServerMarketSnapshot,\n IndexerServerMarketSnapshotInterval,\n IndexerServerMatchEvent,\n IndexerServerOraclePrice,\n IndexerServerOrder,\n IndexerServerProductPayment,\n IndexerServerProductSnapshot,\n IndexerServerSnapshotsInterval,\n IndexerServerTx,\n IndexerServerNlpSnapshot,\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 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 subaccount?: 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 interface IndexerServerOrdersParams {\n subaccount?: string;\n product_ids?: number[];\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 subaccount?: 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}\n\nexport interface IndexerServerLeaderboardRankParams {\n subaccount: string;\n contest_ids: number[];\n}\n\nexport interface IndexerServerLeaderboardContestsParams {\n contest_ids: number[];\n}\n\nexport interface IndexerServerLeaderboardRegistrationParams {\n subaccount: string;\n contest_id: number;\n update_registration: SignedTx<EIP712LeaderboardAuthenticationValues> | null;\n}\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\n// Request\nexport interface IndexerServerQueryRequestByType {\n account_snapshots: IndexerServerMultiSubaccountSnapshotsParams;\n backlog: Record<string, never>;\n candlesticks: IndexerServerCandlesticksParams;\n edge_candlesticks: IndexerEdgeServerCandlesticksParams;\n edge_market_snapshots: IndexerEdgeServerMarketSnapshotsParams;\n events: IndexerServerEventsParams;\n fast_withdrawal_signature: IndexerServerFastWithdrawalSignatureParams;\n funding_rate: IndexerServerFundingRateParams;\n funding_rates: IndexerServerFundingRatesParams;\n interest_and_funding: IndexerServerInterestFundingParams;\n leaderboard: IndexerServerLeaderboardParams;\n leaderboard_contests: IndexerServerLeaderboardContestsParams;\n leaderboard_rank: IndexerServerLeaderboardRankParams;\n leaderboard_registration: IndexerServerLeaderboardRegistrationParams;\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 usdc_price: Record<string, never>;\n nlp_snapshots: IndexerServerNlpSnapshotsParams;\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 }[];\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 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 IndexerServerUsdcPriceResponse {\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 IndexerServerLeaderboardRegistrationResponse {\n // For non-tiered contests, null if the user is not registered for the provided contestId.\n // For tiered contests (i.e., related contests), null if the user is not registered for any of the contests in the tier group.\n registration: IndexerServerLeaderboardRegistration | null;\n}\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 tx_bytes: string;\n signatures: string[];\n}\n\nexport interface IndexerServerNlpSnapshotsResponse {\n snapshots: IndexerServerNlpSnapshot[];\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\n// Response\nexport interface IndexerServerQueryResponseByType {\n account_snapshots: IndexerServerMultiSubaccountSnapshotsResponse;\n backlog: IndexerServerBacklogResponse;\n candlesticks: IndexerServerCandlesticksResponse;\n edge_candlesticks: IndexerEdgeServerCandlesticksResponse;\n edge_market_snapshots: IndexerEdgeServerMarketSnapshotsResponse;\n events: IndexerServerEventsResponse;\n fast_withdrawal_signature: IndexerServerFastWithdrawalSignatureResponse;\n funding_rate: IndexerServerFundingRateResponse;\n funding_rates: IndexerServerFundingRatesResponse;\n interest_and_funding: IndexerServerInterestFundingResponse;\n leaderboard: IndexerServerLeaderboardResponse;\n leaderboard_contests: IndexerServerLeaderboardContestsResponse;\n leaderboard_rank: IndexerServerLeaderboardRankResponse;\n leaderboard_registration: IndexerServerLeaderboardRegistrationResponse;\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 usdc_price: IndexerServerUsdcPriceResponse;\n nlp_snapshots: IndexerServerNlpSnapshotsResponse;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/types/serverTypes.ts"],"sourcesContent":["import {\n EIP712LeaderboardAuthenticationValues,\n SignedTx,\n} from '@nadohq/shared';\nimport { IndexerEventType } from './IndexerEventType';\nimport { IndexerLeaderboardRankType } from './IndexerLeaderboardType';\nimport { NadoWithdrawCollateralTx } from './NadoTx';\nimport {\n IndexerServerCandlestick,\n IndexerServerEvent,\n IndexerServerLeaderboardContest,\n IndexerServerLeaderboardPosition,\n IndexerServerLeaderboardRegistration,\n IndexerServerMaker,\n IndexerServerMarketSnapshot,\n IndexerServerMarketSnapshotInterval,\n IndexerServerMatchEvent,\n IndexerServerOraclePrice,\n IndexerServerOrder,\n IndexerServerProductPayment,\n IndexerServerProductSnapshot,\n IndexerServerSnapshotsInterval,\n IndexerServerTx,\n IndexerServerNlpSnapshot,\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 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 subaccount?: 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 interface IndexerServerOrdersParams {\n subaccount?: string;\n product_ids?: number[];\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 subaccount?: 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}\n\nexport interface IndexerServerLeaderboardRankParams {\n subaccount: string;\n contest_ids: number[];\n}\n\nexport interface IndexerServerLeaderboardContestsParams {\n contest_ids: number[];\n}\n\nexport interface IndexerServerLeaderboardRegistrationParams {\n subaccount: string;\n contest_id: number;\n update_registration: SignedTx<EIP712LeaderboardAuthenticationValues> | null;\n}\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\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_rates: IndexerServerFundingRatesParams;\n interest_and_funding: IndexerServerInterestFundingParams;\n leaderboard: IndexerServerLeaderboardParams;\n leaderboard_contests: IndexerServerLeaderboardContestsParams;\n leaderboard_rank: IndexerServerLeaderboardRankParams;\n leaderboard_registration: IndexerServerLeaderboardRegistrationParams;\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 usdc_price: Record<string, never>;\n nlp_snapshots: IndexerServerNlpSnapshotsParams;\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 }[];\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 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 IndexerServerUsdcPriceResponse {\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 IndexerServerLeaderboardRegistrationResponse {\n // For non-tiered contests, null if the user is not registered for the provided contestId.\n // For tiered contests (i.e., related contests), null if the user is not registered for any of the contests in the tier group.\n registration: IndexerServerLeaderboardRegistration | null;\n}\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 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\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_rates: IndexerServerFundingRatesResponse;\n interest_and_funding: IndexerServerInterestFundingResponse;\n leaderboard: IndexerServerLeaderboardResponse;\n leaderboard_contests: IndexerServerLeaderboardContestsResponse;\n leaderboard_rank: IndexerServerLeaderboardRankResponse;\n leaderboard_registration: IndexerServerLeaderboardRegistrationResponse;\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 usdc_price: IndexerServerUsdcPriceResponse;\n nlp_snapshots: IndexerServerNlpSnapshotsResponse;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|