@nadohq/indexer-client 0.6.0 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/dist/IndexerBaseClient.cjs +102 -27
  2. package/dist/IndexerBaseClient.cjs.map +1 -1
  3. package/dist/IndexerBaseClient.d.cts +29 -7
  4. package/dist/IndexerBaseClient.d.ts +29 -7
  5. package/dist/IndexerBaseClient.js +102 -27
  6. package/dist/IndexerBaseClient.js.map +1 -1
  7. package/dist/IndexerClient.cjs +6 -1
  8. package/dist/IndexerClient.cjs.map +1 -1
  9. package/dist/IndexerClient.js +6 -1
  10. package/dist/IndexerClient.js.map +1 -1
  11. package/dist/dataMappers.cjs +26 -12
  12. package/dist/dataMappers.cjs.map +1 -1
  13. package/dist/dataMappers.js +26 -12
  14. package/dist/dataMappers.js.map +1 -1
  15. package/dist/index.d.cts +3 -3
  16. package/dist/index.d.ts +3 -3
  17. package/dist/types/IndexerLeaderboardType.cjs.map +1 -1
  18. package/dist/types/IndexerLeaderboardType.d.cts +9 -1
  19. package/dist/types/IndexerLeaderboardType.d.ts +9 -1
  20. package/dist/types/clientTypes.cjs.map +1 -1
  21. package/dist/types/clientTypes.d.cts +64 -18
  22. package/dist/types/clientTypes.d.ts +64 -18
  23. package/dist/types/index.d.cts +3 -3
  24. package/dist/types/index.d.ts +3 -3
  25. package/dist/types/serverModelTypes.cjs.map +1 -1
  26. package/dist/types/serverModelTypes.d.cts +25 -10
  27. package/dist/types/serverModelTypes.d.ts +25 -10
  28. package/dist/types/serverTypes.cjs.map +1 -1
  29. package/dist/types/serverTypes.d.cts +38 -11
  30. package/dist/types/serverTypes.d.ts +38 -11
  31. package/package.json +4 -4
  32. package/src/IndexerBaseClient.ts +132 -36
  33. package/src/IndexerClient.ts +13 -5
  34. package/src/dataMappers.ts +26 -10
  35. package/src/types/IndexerLeaderboardType.ts +14 -2
  36. package/src/types/clientTypes.ts +78 -30
  37. package/src/types/serverModelTypes.ts +29 -9
  38. package/src/types/serverTypes.ts +46 -10
@@ -1 +1 @@
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 BigNumber from 'bignumber.js';\nimport { Address, 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 IndexerServerTriggerTypeFilter,\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: BigNumber;\n netInterestCumulative: BigNumber;\n netFundingUnrealized: BigNumber;\n netFundingCumulative: BigNumber;\n netEntryUnrealized: BigNumber;\n netEntryCumulative: BigNumber;\n quoteVolumeCumulative: BigNumber;\n}\n\nexport interface IndexerEvent<\n TStateType extends IndexerEventBalanceStateSnapshot =\n 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 IndexerEventBalanceStateSnapshot =\n IndexerEventBalanceStateSnapshot,\n> extends IndexerEvent<TStateType> {\n timestamp: BigNumber;\n tx: NadoTx;\n}\n\n/**\n * List subaccounts\n */\n\nexport type ListIndexerSubaccountsParams = IndexerServerListSubaccountsParams;\n\nexport type ListIndexerSubaccountsResponse = ({\n hexId: string;\n // Unix timestamp in seconds\n createdAt: number;\n isolated: boolean;\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 IndexerEventBalanceStateSnapshot =\n IndexerEventBalanceStateSnapshot,\n> = IndexerEvent<TStateType>;\n\nexport interface IndexerSubaccountSnapshot {\n timestamp: BigNumber;\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: BigNumber;\n markPrice: BigNumber;\n // Seconds\n updateTime: BigNumber;\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: BigNumber;\n // Seconds\n updateTime: BigNumber;\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: BigNumber;\n // Seconds\n updateTime: BigNumber;\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: BigNumber;\n open: BigNumber;\n high: BigNumber;\n low: BigNumber;\n close: BigNumber;\n volume: BigNumber;\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 extends IndexerSnapshotsIntervalParams {\n // Defaults to all\n productIds?: number[];\n}\n\nexport interface IndexerMarketSnapshot {\n timestamp: BigNumber;\n cumulativeUsers: BigNumber;\n dailyActiveUsers: BigNumber;\n tvl: BigNumber;\n cumulativeVolumes: Record<number, BigNumber>;\n cumulativeTakerFees: Record<number, BigNumber>;\n cumulativeSequencerFees: Record<number, BigNumber>;\n cumulativeMakerFees: Record<number, BigNumber>;\n cumulativeTrades: Record<number, BigNumber>;\n cumulativeLiquidationAmounts: Record<number, BigNumber>;\n openInterestsQuote: Record<number, BigNumber>;\n totalDeposits: Record<number, BigNumber>;\n totalBorrows: Record<number, BigNumber>;\n fundingRates: Record<number, BigNumber>;\n depositRates: Record<number, BigNumber>;\n borrowRates: Record<number, BigNumber>;\n cumulativeTradeSizes: Record<number, BigNumber>;\n cumulativeInflows: Record<number, BigNumber>;\n cumulativeOutflows: Record<number, BigNumber>;\n oraclePrices: Record<number, BigNumber>;\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 subaccounts?: 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 subaccounts?: Subaccount[];\n minTimestampInclusive?: number;\n maxTimestampInclusive?: number;\n limit?: number;\n productIds?: number[];\n triggerTypes?: IndexerServerTriggerTypeFilter[];\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 productId: number;\n submissionIndex: string;\n lastFillSubmissionIndex: string;\n amount: BigNumber;\n price: BigNumber;\n expiration: number;\n // Order metadata from appendix\n appendix: OrderAppendix;\n nonce: BigNumber;\n isolated: boolean;\n // Derived from the nonce\n recvTimeSeconds: number;\n // Fill amounts\n baseFilled: BigNumber;\n // Includes fee\n quoteFilled: BigNumber;\n // Includes sequencer fee\n totalFee: BigNumber;\n builderFee: BigNumber;\n realizedPnl: BigNumber;\n // Signed closed amount (positive for longs, negative for shorts)\n closedAmount: BigNumber;\n // Cumulative realized entry price for the closed amount on an order\n closedNetEntry: BigNumber;\n // Total isolated margin on the position before the close. Only present for isolated margin orders; null for cross-margin orders\n preCloseMargin: BigNumber | null;\n // Unix timestamp (seconds) of the first fill on the order\n firstFillTimestamp: BigNumber;\n // Unix timestamp (seconds) of the last fill on the order\n lastFillTimestamp: BigNumber;\n /** Balances before the order was filled */\n preBalances: IndexerMatchEventBalances;\n /** Balances after the order was filled */\n postBalances: IndexerMatchEventBalances;\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 subaccounts?: 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: BigNumber;\n quoteFilled: BigNumber;\n // Includes sequencer fee\n totalFee: BigNumber;\n sequencerFee: BigNumber;\n builderFee: BigNumber;\n cumulativeBaseFilled: BigNumber;\n cumulativeQuoteFilled: BigNumber;\n cumulativeFee: BigNumber;\n submissionIndex: string;\n timestamp: BigNumber;\n isTaker: boolean;\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 realizedPnl: BigNumber;\n // Signed closed amount (positive for longs, negative for shorts)\n closedAmount: BigNumber;\n // Realized entry price for the closed amount on this match (x18). Represents the total quote value at which the closed portion of the position was originally entered.\n closedNetEntry: BigNumber;\n // Margin allocated to the closed amount on this match (x18). Only present for isolated margin orders; null for cross-margin orders.\n margin: BigNumber | null;\n}\n\nexport type GetIndexerMatchEventsResponse = IndexerMatchEvent[];\n\n/**\n * Quote price\n */\n\nexport interface GetIndexerQuotePriceResponse {\n price: BigNumber;\n}\n\n/**\n * Linked Signer\n */\n\nexport interface GetIndexerLinkedSignerParams {\n subaccount: Subaccount;\n}\n\nexport interface GetIndexerLinkedSignerResponse {\n totalTxLimit: BigNumber;\n remainingTxs: BigNumber;\n // If remainingTxs is 0, this is the time until the next link signer tx can be sent\n waitTimeUntilNextTx: BigNumber;\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: BigNumber;\n paymentAmount: BigNumber;\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: BigNumber;\n // Represents the annually interest rate for spots and annually funding rate for perps.\n annualPaymentRate: BigNumber;\n oraclePrice: BigNumber;\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: BigNumber;\n makerFee: BigNumber;\n uptime: BigNumber;\n sumQMin: BigNumber;\n qScore: BigNumber;\n makerShare: BigNumber;\n expectedMakerReward: BigNumber;\n}\n\nexport interface IndexerMaker {\n address: string;\n snapshots: IndexerMakerSnapshot[];\n}\n\nexport interface GetIndexerMakerStatisticsResponse {\n rewardCoefficient: BigNumber;\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: BigNumber;\n pnlRank: BigNumber;\n percentRoi: BigNumber;\n roiRank: BigNumber;\n // Float indicating the ending account value at the time the snapshot was taken i.e: at updateTime\n accountValue: BigNumber;\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?: BigNumber;\n // Seconds\n updateTime: BigNumber;\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 extends GetIndexerLeaderboardRegistrationParams {\n updateRegistration: LeaderboardSignatureParams;\n // In millis, defaults to 90s in the future\n recvTime?: BigNumber;\n}\n\nexport interface IndexerLeaderboardRegistration {\n subaccount: Subaccount;\n contestId: number;\n // Seconds\n updateTime: BigNumber;\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: BigNumber;\n // End time in seconds\n endTime: BigNumber;\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: BigNumber;\n // Last updated time in Seconds\n lastUpdated: BigNumber;\n totalParticipants: BigNumber;\n // Float indicating the min account value required to be eligible for this contest e.g: 250.0\n minRequiredAccountValue: BigNumber;\n // Float indicating the min trading volume required to be eligible for this contest e.g: 1000.0\n minRequiredVolume: BigNumber;\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: BigNumber;\n // Total volume traded by the NLP, in terms of the primary quote\n cumulativeVolume: BigNumber;\n cumulativeTrades: BigNumber;\n cumulativeMintAmountQuote: BigNumber;\n cumulativeBurnAmountQuote: BigNumber;\n cumulativePnl: BigNumber;\n tvl: BigNumber;\n oraclePrice: BigNumber;\n depositors: BigNumber;\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: BigNumber;\n // Current nSubmissions value from the chain (i.e., number of processed txs)\n totalSubmissions: BigNumber;\n // Number of unprocessed transactions (totalTxs - totalSubmissions)\n backlogSize: BigNumber;\n // UNIX timestamp (in seconds) of when the data was last updated\n updatedAt: BigNumber;\n // Estimated time in seconds (float) to clear the entire backlog (null if unavailable)\n backlogEtaInSeconds: BigNumber | null;\n // Current submission rate in transactions per second (float) (null if unavailable)\n txsPerSecond: BigNumber | null;\n}\n\nexport interface GetIndexerSubaccountDDAParams {\n subaccount: Subaccount;\n}\n\nexport interface GetIndexerSubaccountDDAResponse {\n address: Address;\n}\n\n/**\n * Private Alpha Choice\n */\n\nexport interface GetIndexerPrivateAlphaChoiceParams {\n address: Address;\n}\n\nexport interface GetIndexerPrivateAlphaChoiceResponse {\n points: BigNumber;\n feeRefund: BigNumber;\n nftEligibility: boolean;\n}\n\n/**\n * Nado Points\n */\n\nexport interface GetIndexerPointsParams {\n address: Address;\n}\n\nexport interface IndexerPointsEpoch {\n epoch: number;\n description: string;\n /** Unix timestamp in seconds */\n startTime: BigNumber;\n /** Unix timestamp in seconds */\n endTime: BigNumber;\n totalPoints: BigNumber;\n points: BigNumber;\n rank: number;\n tier: number;\n}\n\nexport interface IndexerAllTimePoints {\n points: BigNumber;\n rank: number;\n tier: number;\n}\n\nexport interface GetIndexerPointsResponse {\n pointsPerEpoch: IndexerPointsEpoch[];\n allTimePoints: IndexerAllTimePoints;\n}\n\n/**\n * V2 Tickers\n */\n\n/**\n * Market type for ticker filtering\n */\nexport type TickerMarketType = 'spot' | 'perp';\n\n/**\n * Parameters for querying v2 tickers endpoint\n */\nexport interface GetIndexerV2TickersParams {\n /**\n * Filter tickers by market type (spot or perp)\n * @example 'spot'\n * @example 'perp'\n */\n market?: TickerMarketType;\n /**\n * Whether to include edge products\n * @default false\n */\n edge?: boolean;\n}\n\n/**\n * Individual ticker data from v2 endpoint\n */\nexport interface IndexerV2TickerResponse {\n /** Unique product identifier */\n productId: number;\n /** Unique ticker identifier */\n tickerId: string;\n /** Base currency symbol */\n baseCurrency: string;\n /** Quote currency symbol */\n quoteCurrency: string;\n /** Last traded price */\n lastPrice: number;\n /** 24h trading volume in base currency */\n baseVolume: number;\n /** 24h trading volume in quote currency */\n quoteVolume: number;\n /** 24h price change percentage */\n priceChangePercent24h: number;\n}\n\n/**\n * Response from v2 tickers endpoint\n * Maps ticker IDs to their respective ticker data\n */\nexport type GetIndexerV2TickersResponse = Record<\n string,\n IndexerV2TickerResponse\n>;\n\n/**\n * Parameters for querying v2 symbols endpoint\n */\nexport interface GetIndexerV2SymbolsParams {\n /**\n * Filter by product type\n * @example 'spot'\n * @example 'perp'\n */\n productType?: 'spot' | 'perp';\n /**\n * Comma-separated list of product IDs to filter by\n * @example '2,4,42'\n */\n productIds?: string;\n}\n\n/**\n * Market hours information for a product\n */\nexport interface IndexerV2MarketHours {\n /** Whether the market is currently in its regular trading session */\n isOpen: boolean;\n /** Why the market is closed: \"weekend\" or \"holiday\". Null when open. */\n reason: string | null;\n /** ISO 8601 UTC timestamp of the next session close. Null when closed. */\n nextClose: string | null;\n /** ISO 8601 UTC timestamp of the next session open. Null when no upcoming open. */\n nextOpen: string | null;\n}\n\nexport type IndexerV2TradingStatus =\n // Normal trading, all order types accepted\n | 'live'\n // Only post-only orders accepted (taker orders rejected)\n | 'post_only'\n // Only reduce-only orders accepted; used when a market is being delisted\n | 'reduce_only'\n // No new positions can be opened; only orders that reduce existing positions are accepted. Used during periods of low activity (e.g. weekends, holidays)\n | 'soft_reduce_only'\n // No orders accepted\n | 'not_tradable';\n\n/**\n * Individual symbol data from v2 endpoint\n */\nexport interface IndexerV2Symbol {\n /** Product type: \"spot\" or \"perp\" */\n type: string;\n /** Unique product identifier */\n productId: number;\n /** Trading symbol (e.g., \"BTC-PERP\", \"WETH\") */\n symbol: string;\n /** Minimum price increment */\n priceIncrement: BigNumber;\n /** Minimum order size increment (base denominated) */\n sizeIncrement: string;\n /** Minimum order size (USDT0 denominated) */\n minSize: string;\n /** Default maker fee rate (negative = rebate) */\n makerFeeRate: BigNumber;\n /** Default taker fee rate */\n takerFeeRate: BigNumber;\n /** Initial margin weight for long positions */\n longWeightInitial: BigNumber;\n /** Maintenance margin weight for long positions */\n longWeightMaintenance: BigNumber;\n /** Maximum open interest cap. Null if uncapped. */\n maxOpenInterest: BigNumber | null;\n /** Current trading status */\n tradingStatus: IndexerV2TradingStatus;\n /** Whether the market only accepts isolated margin orders */\n isolatedOnly: boolean;\n /** Market hours information. Null for 24/7 markets. */\n marketHours: IndexerV2MarketHours | null;\n}\n\n/**\n * Response from v2 symbols endpoint\n * Maps symbols to their respective data\n */\nexport type GetIndexerV2SymbolsResponse = Record<string, IndexerV2Symbol>;\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 BigNumber from 'bignumber.js';\nimport { Address, 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 IndexerServerTriggerTypeFilter,\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: BigNumber;\n netInterestCumulative: BigNumber;\n netFundingUnrealized: BigNumber;\n netFundingCumulative: BigNumber;\n netEntryUnrealized: BigNumber;\n netEntryCumulative: BigNumber;\n quoteVolumeCumulative: BigNumber;\n}\n\nexport interface IndexerEvent<\n TStateType extends IndexerEventBalanceStateSnapshot =\n 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 IndexerEventBalanceStateSnapshot =\n IndexerEventBalanceStateSnapshot,\n> extends IndexerEvent<TStateType> {\n timestamp: BigNumber;\n tx: NadoTx;\n}\n\n/**\n * List subaccounts\n */\n\nexport type ListIndexerSubaccountsParams = IndexerServerListSubaccountsParams;\n\nexport type ListIndexerSubaccountsResponse = ({\n hexId: string;\n // Unix timestamp in seconds\n createdAt: number;\n isolated: boolean;\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 IndexerEventBalanceStateSnapshot =\n IndexerEventBalanceStateSnapshot,\n> = IndexerEvent<TStateType>;\n\nexport interface IndexerSubaccountSnapshot {\n timestamp: BigNumber;\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: BigNumber;\n markPrice: BigNumber;\n // Seconds\n updateTime: BigNumber;\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: BigNumber;\n // Seconds\n updateTime: BigNumber;\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: BigNumber;\n // Seconds\n updateTime: BigNumber;\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: BigNumber;\n open: BigNumber;\n high: BigNumber;\n low: BigNumber;\n close: BigNumber;\n volume: BigNumber;\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 extends IndexerSnapshotsIntervalParams {\n // Defaults to all\n productIds?: number[];\n}\n\nexport interface IndexerMarketSnapshot {\n timestamp: BigNumber;\n cumulativeUsers: BigNumber;\n dailyActiveUsers: BigNumber;\n tvl: BigNumber;\n cumulativeVolumes: Record<number, BigNumber>;\n cumulativeTakerFees: Record<number, BigNumber>;\n cumulativeSequencerFees: Record<number, BigNumber>;\n cumulativeMakerFees: Record<number, BigNumber>;\n cumulativeTrades: Record<number, BigNumber>;\n cumulativeLiquidationAmounts: Record<number, BigNumber>;\n openInterestsQuote: Record<number, BigNumber>;\n totalDeposits: Record<number, BigNumber>;\n totalBorrows: Record<number, BigNumber>;\n fundingRates: Record<number, BigNumber>;\n depositRates: Record<number, BigNumber>;\n borrowRates: Record<number, BigNumber>;\n cumulativeTradeSizes: Record<number, BigNumber>;\n cumulativeInflows: Record<number, BigNumber>;\n cumulativeOutflows: Record<number, BigNumber>;\n oraclePrices: Record<number, BigNumber>;\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 subaccounts?: 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 subaccounts?: Subaccount[];\n minTimestampInclusive?: number;\n maxTimestampInclusive?: number;\n limit?: number;\n productIds?: number[];\n triggerTypes?: IndexerServerTriggerTypeFilter[];\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 productId: number;\n submissionIndex: string;\n lastFillSubmissionIndex: string;\n amount: BigNumber;\n price: BigNumber;\n expiration: number;\n // Order metadata from appendix\n appendix: OrderAppendix;\n nonce: BigNumber;\n isolated: boolean;\n // Derived from the nonce\n recvTimeSeconds: number;\n // Fill amounts\n baseFilled: BigNumber;\n // Includes fee\n quoteFilled: BigNumber;\n // Includes sequencer fee\n totalFee: BigNumber;\n builderFee: BigNumber;\n realizedPnl: BigNumber;\n // Signed closed amount (positive for longs, negative for shorts)\n closedAmount: BigNumber;\n // Cumulative realized entry price for the closed amount on an order\n closedNetEntry: BigNumber;\n // Total isolated margin on the position before the close. Only present for isolated margin orders; null for cross-margin orders\n preCloseMargin: BigNumber | null;\n // Unix timestamp (seconds) of the first fill on the order\n firstFillTimestamp: BigNumber;\n // Unix timestamp (seconds) of the last fill on the order\n lastFillTimestamp: BigNumber;\n /** Balances before the order was filled */\n preBalances: IndexerMatchEventBalances;\n /** Balances after the order was filled */\n postBalances: IndexerMatchEventBalances;\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 subaccounts?: 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: BigNumber;\n quoteFilled: BigNumber;\n // Includes sequencer fee\n totalFee: BigNumber;\n sequencerFee: BigNumber;\n builderFee: BigNumber;\n cumulativeBaseFilled: BigNumber;\n cumulativeQuoteFilled: BigNumber;\n cumulativeFee: BigNumber;\n submissionIndex: string;\n timestamp: BigNumber;\n isTaker: boolean;\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 realizedPnl: BigNumber;\n // Signed closed amount (positive for longs, negative for shorts)\n closedAmount: BigNumber;\n // Realized entry price for the closed amount on this match (x18). Represents the total quote value at which the closed portion of the position was originally entered.\n closedNetEntry: BigNumber;\n // Margin allocated to the closed amount on this match (x18). Only present for isolated margin orders; null for cross-margin orders.\n margin: BigNumber | null;\n}\n\nexport type GetIndexerMatchEventsResponse = IndexerMatchEvent[];\n\n/**\n * Quote price\n */\n\nexport interface GetIndexerQuotePriceResponse {\n price: BigNumber;\n}\n\n/**\n * Linked Signer\n */\n\nexport interface GetIndexerLinkedSignerParams {\n subaccount: Subaccount;\n}\n\nexport interface GetIndexerLinkedSignerResponse {\n totalTxLimit: BigNumber;\n remainingTxs: BigNumber;\n // If remainingTxs is 0, this is the time until the next link signer tx can be sent\n waitTimeUntilNextTx: BigNumber;\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: BigNumber;\n paymentAmount: BigNumber;\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: BigNumber;\n // Represents the annually interest rate for spots and annually funding rate for perps.\n annualPaymentRate: BigNumber;\n oraclePrice: BigNumber;\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: BigNumber;\n makerFee: BigNumber;\n uptime: BigNumber;\n sumQMin: BigNumber;\n qScore: BigNumber;\n makerShare: BigNumber;\n expectedMakerReward: BigNumber;\n}\n\nexport interface IndexerMaker {\n address: string;\n snapshots: IndexerMakerSnapshot[];\n}\n\nexport interface GetIndexerMakerStatisticsResponse {\n rewardCoefficient: BigNumber;\n makers: IndexerMaker[];\n}\n\n/**\n * Leaderboards\n */\n\nexport interface GetIndexerLeaderboardParams {\n contestId: number;\n /**\n * The ranking metric to query by.\n * Optional for single-track contests (auto-selects the only track).\n * Required for multi-track contests — omitting it returns an error.\n */\n rankType?: IndexerLeaderboardRankType;\n // Min rank inclusive\n startCursor?: string;\n limit?: number;\n /** Sort order. Defaults to `'DESC'`. */\n order?: 'ASC' | 'DESC';\n}\n\nexport interface IndexerSocialAccountInfo {\n provider: 'twitter';\n username: string;\n displayName: string;\n profileImageUrl: string;\n}\n\nexport interface IndexerLeaderboardTrackPosition {\n value: BigNumber;\n rank: BigNumber;\n qualificationStatus: 'qualified' | 'insufficient_account_value';\n}\n\nexport interface IndexerLeaderboardParticipant {\n subaccount: Subaccount;\n contestId: number;\n // Float indicating the ending account value at the time the snapshot was taken i.e: at updateTime\n accountValue: BigNumber;\n // Seconds\n updateTime: BigNumber;\n tracks: Partial<\n Record<IndexerLeaderboardRankType, IndexerLeaderboardTrackPosition>\n >;\n socialAccounts: IndexerSocialAccountInfo[];\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 SignatureParams {\n verifyingAddr: string;\n chainId: number;\n}\n\nexport interface GetIndexerLeaderboardRegistrationsParams {\n subaccount: Subaccount;\n contestIds: number[];\n /** Filter to active contests only. Defaults to `true`. */\n active?: boolean;\n}\n\nexport interface RegisterLeaderboardParams extends Subaccount, SignatureParams {\n contestIds: number[];\n /** In millis, defaults to 90s in the future. */\n recvTime?: BigNumber;\n}\n\nexport interface IndexerLeaderboardRegistration {\n subaccount: Subaccount;\n contestId: number;\n // Seconds\n updateTime: BigNumber;\n}\n\nexport interface GetIndexerLeaderboardRegistrationsResponse {\n registrations: IndexerLeaderboardRegistration[];\n}\n\nexport type RegisterLeaderboardResponse =\n GetIndexerLeaderboardRegistrationsResponse;\n\nexport interface GetIndexerLeaderboardContestsParams {\n contestIds: number[];\n /** Filter to active contests only. Defaults to `true`. Pass `false` to include inactive contests. */\n active?: boolean;\n}\n\nexport interface IndexerLeaderboardContestTrack {\n trackId: number;\n rankType: IndexerLeaderboardRankType;\n sortOrder: 'ASC' | 'DESC';\n // Float indicating the min account value required to qualify for this track e.g: 250.0\n minRequiredAccountValue: BigNumber;\n}\n\nexport interface IndexerLeaderboardContest {\n contestId: number;\n // Start time in seconds\n startTime: BigNumber;\n // End time in seconds\n endTime: BigNumber;\n // Last updated time in seconds\n lastUpdated: BigNumber;\n totalParticipants: BigNumber;\n // For market-specific contests, only the volume from these products will be counted.\n requiredProductIds: number[];\n active: boolean;\n title: string;\n description: string;\n tracks: IndexerLeaderboardContestTrack[];\n}\n\nexport interface GetIndexerLeaderboardContestsResponse {\n contests: IndexerLeaderboardContest[];\n}\n\n/**\n * Social Accounts\n */\n\nexport interface ConnectSocialAccountParams\n extends Subaccount, SignatureParams {\n provider: 'twitter';\n /** In millis, defaults to 90s in the future. */\n recvTime?: BigNumber;\n}\n\nexport interface ConnectSocialAccountResponse {\n url: string;\n}\n\nexport interface ListIndexerSocialAccountsParams {\n address: Address;\n}\n\nexport interface ListIndexerSocialAccountsResponse {\n accounts: IndexerSocialAccountInfo[];\n}\n\nexport type RevokeSocialAccountParams = ConnectSocialAccountParams;\nexport type RevokeSocialAccountResponse = ListIndexerSocialAccountsResponse;\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: BigNumber;\n // Total volume traded by the NLP, in terms of the primary quote\n cumulativeVolume: BigNumber;\n cumulativeTrades: BigNumber;\n cumulativeMintAmountQuote: BigNumber;\n cumulativeBurnAmountQuote: BigNumber;\n cumulativePnl: BigNumber;\n tvl: BigNumber;\n oraclePrice: BigNumber;\n depositors: BigNumber;\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: BigNumber;\n // Current nSubmissions value from the chain (i.e., number of processed txs)\n totalSubmissions: BigNumber;\n // Number of unprocessed transactions (totalTxs - totalSubmissions)\n backlogSize: BigNumber;\n // UNIX timestamp (in seconds) of when the data was last updated\n updatedAt: BigNumber;\n // Estimated time in seconds (float) to clear the entire backlog (null if unavailable)\n backlogEtaInSeconds: BigNumber | null;\n // Current submission rate in transactions per second (float) (null if unavailable)\n txsPerSecond: BigNumber | null;\n}\n\nexport interface GetIndexerSubaccountDDAParams {\n subaccount: Subaccount;\n}\n\nexport interface GetIndexerSubaccountDDAResponse {\n address: Address;\n}\n\n/**\n * Private Alpha Choice\n */\n\nexport interface GetIndexerPrivateAlphaChoiceParams {\n address: Address;\n}\n\nexport interface GetIndexerPrivateAlphaChoiceResponse {\n points: BigNumber;\n feeRefund: BigNumber;\n nftEligibility: boolean;\n}\n\n/**\n * Nado Points\n */\n\nexport interface GetIndexerPointsParams {\n address: Address;\n}\n\nexport interface IndexerPointsEpoch {\n epoch: number;\n description: string;\n /** Unix timestamp in seconds */\n startTime: BigNumber;\n /** Unix timestamp in seconds */\n endTime: BigNumber;\n totalPoints: BigNumber;\n points: BigNumber;\n rank: number;\n tier: number;\n}\n\nexport interface IndexerAllTimePoints {\n points: BigNumber;\n rank: number;\n tier: number;\n}\n\nexport interface GetIndexerPointsResponse {\n pointsPerEpoch: IndexerPointsEpoch[];\n allTimePoints: IndexerAllTimePoints;\n}\n\n/**\n * V2 Tickers\n */\n\n/**\n * Market type for ticker filtering\n */\nexport type TickerMarketType = 'spot' | 'perp';\n\n/**\n * Parameters for querying v2 tickers endpoint\n */\nexport interface GetIndexerV2TickersParams {\n /**\n * Filter tickers by market type (spot or perp)\n * @example 'spot'\n * @example 'perp'\n */\n market?: TickerMarketType;\n /**\n * Whether to include edge products\n * @default false\n */\n edge?: boolean;\n}\n\n/**\n * Individual ticker data from v2 endpoint\n */\nexport interface IndexerV2TickerResponse {\n /** Unique product identifier */\n productId: number;\n /** Unique ticker identifier */\n tickerId: string;\n /** Base currency symbol */\n baseCurrency: string;\n /** Quote currency symbol */\n quoteCurrency: string;\n /** Last traded price */\n lastPrice: number;\n /** 24h trading volume in base currency */\n baseVolume: number;\n /** 24h trading volume in quote currency */\n quoteVolume: number;\n /** 24h price change percentage */\n priceChangePercent24h: number;\n}\n\n/**\n * Response from v2 tickers endpoint\n * Maps ticker IDs to their respective ticker data\n */\nexport type GetIndexerV2TickersResponse = Record<\n string,\n IndexerV2TickerResponse\n>;\n\n/**\n * Parameters for querying v2 symbols endpoint\n */\nexport interface GetIndexerV2SymbolsParams {\n /**\n * Filter by product type\n * @example 'spot'\n * @example 'perp'\n */\n productType?: 'spot' | 'perp';\n /**\n * Comma-separated list of product IDs to filter by\n * @example '2,4,42'\n */\n productIds?: string;\n}\n\n/**\n * Market hours information for a product\n */\nexport interface IndexerV2MarketHours {\n /** Whether the market is currently in its regular trading session */\n isOpen: boolean;\n /** Why the market is closed: \"weekend\" or \"holiday\". Null when open. */\n reason: string | null;\n /** ISO 8601 UTC timestamp of the next session close. Null when closed. */\n nextClose: string | null;\n /** ISO 8601 UTC timestamp of the next session open. Null when no upcoming open. */\n nextOpen: string | null;\n}\n\nexport type IndexerV2TradingStatus =\n // Normal trading, all order types accepted\n | 'live'\n // Only post-only orders accepted (taker orders rejected)\n | 'post_only'\n // Only reduce-only orders accepted; used when a market is being delisted\n | 'reduce_only'\n // No new positions can be opened; only orders that reduce existing positions are accepted. Used during periods of low activity (e.g. weekends, holidays)\n | 'soft_reduce_only'\n // No orders accepted\n | 'not_tradable';\n\n/**\n * Individual symbol data from v2 endpoint\n */\nexport interface IndexerV2Symbol {\n /** Product type: \"spot\" or \"perp\" */\n type: string;\n /** Unique product identifier */\n productId: number;\n /** Trading symbol (e.g., \"BTC-PERP\", \"WETH\") */\n symbol: string;\n /** Minimum price increment */\n priceIncrement: BigNumber;\n /** Minimum order size increment (base denominated) */\n sizeIncrement: string;\n /** Minimum order size (USDT0 denominated) */\n minSize: string;\n /** Default maker fee rate (negative = rebate) */\n makerFeeRate: BigNumber;\n /** Default taker fee rate */\n takerFeeRate: BigNumber;\n /** Initial margin weight for long positions */\n longWeightInitial: BigNumber;\n /** Maintenance margin weight for long positions */\n longWeightMaintenance: BigNumber;\n /** Maximum open interest cap. Null if uncapped. */\n maxOpenInterest: BigNumber | null;\n /** Current trading status */\n tradingStatus: IndexerV2TradingStatus;\n /** Whether the market only accepts isolated margin orders */\n isolatedOnly: boolean;\n /** Market hours information. Null for 24/7 markets. */\n marketHours: IndexerV2MarketHours | null;\n}\n\n/**\n * Response from v2 symbols endpoint\n * Maps symbols to their respective data\n */\nexport type GetIndexerV2SymbolsResponse = Record<string, IndexerV2Symbol>;\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
@@ -386,20 +386,35 @@ interface GetIndexerMakerStatisticsResponse {
386
386
  */
387
387
  interface GetIndexerLeaderboardParams {
388
388
  contestId: number;
389
- rankType: IndexerLeaderboardRankType;
389
+ /**
390
+ * The ranking metric to query by.
391
+ * Optional for single-track contests (auto-selects the only track).
392
+ * Required for multi-track contests — omitting it returns an error.
393
+ */
394
+ rankType?: IndexerLeaderboardRankType;
390
395
  startCursor?: string;
391
396
  limit?: number;
397
+ /** Sort order. Defaults to `'DESC'`. */
398
+ order?: 'ASC' | 'DESC';
399
+ }
400
+ interface IndexerSocialAccountInfo {
401
+ provider: 'twitter';
402
+ username: string;
403
+ displayName: string;
404
+ profileImageUrl: string;
405
+ }
406
+ interface IndexerLeaderboardTrackPosition {
407
+ value: BigNumber;
408
+ rank: BigNumber;
409
+ qualificationStatus: 'qualified' | 'insufficient_account_value';
392
410
  }
393
411
  interface IndexerLeaderboardParticipant {
394
412
  subaccount: Subaccount;
395
413
  contestId: number;
396
- pnl: BigNumber;
397
- pnlRank: BigNumber;
398
- percentRoi: BigNumber;
399
- roiRank: BigNumber;
400
414
  accountValue: BigNumber;
401
- volume?: BigNumber;
402
415
  updateTime: BigNumber;
416
+ tracks: Partial<Record<IndexerLeaderboardRankType, IndexerLeaderboardTrackPosition>>;
417
+ socialAccounts: IndexerSocialAccountInfo[];
403
418
  }
404
419
  interface GetIndexerLeaderboardResponse {
405
420
  participants: IndexerLeaderboardParticipant[];
@@ -411,15 +426,19 @@ interface GetIndexerLeaderboardParticipantParams {
411
426
  interface GetIndexerLeaderboardParticipantResponse {
412
427
  participant: Record<string, IndexerLeaderboardParticipant>;
413
428
  }
414
- interface LeaderboardSignatureParams {
429
+ interface SignatureParams {
415
430
  verifyingAddr: string;
416
431
  chainId: number;
417
432
  }
418
- interface GetIndexerLeaderboardRegistrationParams extends Subaccount {
419
- contestId: number;
433
+ interface GetIndexerLeaderboardRegistrationsParams {
434
+ subaccount: Subaccount;
435
+ contestIds: number[];
436
+ /** Filter to active contests only. Defaults to `true`. */
437
+ active?: boolean;
420
438
  }
421
- interface UpdateIndexerLeaderboardRegistrationParams extends GetIndexerLeaderboardRegistrationParams {
422
- updateRegistration: LeaderboardSignatureParams;
439
+ interface RegisterLeaderboardParams extends Subaccount, SignatureParams {
440
+ contestIds: number[];
441
+ /** In millis, defaults to 90s in the future. */
423
442
  recvTime?: BigNumber;
424
443
  }
425
444
  interface IndexerLeaderboardRegistration {
@@ -427,28 +446,55 @@ interface IndexerLeaderboardRegistration {
427
446
  contestId: number;
428
447
  updateTime: BigNumber;
429
448
  }
430
- interface GetIndexerLeaderboardRegistrationResponse {
431
- registration: IndexerLeaderboardRegistration | null;
449
+ interface GetIndexerLeaderboardRegistrationsResponse {
450
+ registrations: IndexerLeaderboardRegistration[];
432
451
  }
433
- type UpdateIndexerLeaderboardRegistrationResponse = GetIndexerLeaderboardRegistrationResponse;
452
+ type RegisterLeaderboardResponse = GetIndexerLeaderboardRegistrationsResponse;
434
453
  interface GetIndexerLeaderboardContestsParams {
435
454
  contestIds: number[];
455
+ /** Filter to active contests only. Defaults to `true`. Pass `false` to include inactive contests. */
456
+ active?: boolean;
457
+ }
458
+ interface IndexerLeaderboardContestTrack {
459
+ trackId: number;
460
+ rankType: IndexerLeaderboardRankType;
461
+ sortOrder: 'ASC' | 'DESC';
462
+ minRequiredAccountValue: BigNumber;
436
463
  }
437
464
  interface IndexerLeaderboardContest {
438
465
  contestId: number;
439
466
  startTime: BigNumber;
440
467
  endTime: BigNumber;
441
- period: BigNumber;
442
468
  lastUpdated: BigNumber;
443
469
  totalParticipants: BigNumber;
444
- minRequiredAccountValue: BigNumber;
445
- minRequiredVolume: BigNumber;
446
470
  requiredProductIds: number[];
447
471
  active: boolean;
472
+ title: string;
473
+ description: string;
474
+ tracks: IndexerLeaderboardContestTrack[];
448
475
  }
449
476
  interface GetIndexerLeaderboardContestsResponse {
450
477
  contests: IndexerLeaderboardContest[];
451
478
  }
479
+ /**
480
+ * Social Accounts
481
+ */
482
+ interface ConnectSocialAccountParams extends Subaccount, SignatureParams {
483
+ provider: 'twitter';
484
+ /** In millis, defaults to 90s in the future. */
485
+ recvTime?: BigNumber;
486
+ }
487
+ interface ConnectSocialAccountResponse {
488
+ url: string;
489
+ }
490
+ interface ListIndexerSocialAccountsParams {
491
+ address: Address;
492
+ }
493
+ interface ListIndexerSocialAccountsResponse {
494
+ accounts: IndexerSocialAccountInfo[];
495
+ }
496
+ type RevokeSocialAccountParams = ConnectSocialAccountParams;
497
+ type RevokeSocialAccountResponse = ListIndexerSocialAccountsResponse;
452
498
  type GetIndexerFastWithdrawalSignatureParams = IndexerServerFastWithdrawalSignatureParams;
453
499
  interface GetIndexerFastWithdrawalSignatureResponse {
454
500
  idx: bigint;
@@ -645,4 +691,4 @@ interface IndexerV2Symbol {
645
691
  */
646
692
  type GetIndexerV2SymbolsResponse = Record<string, IndexerV2Symbol>;
647
693
 
648
- 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, GetIndexerPointsParams, GetIndexerPointsResponse, GetIndexerPrivateAlphaChoiceParams, GetIndexerPrivateAlphaChoiceResponse, GetIndexerProductSnapshotsParams, GetIndexerProductSnapshotsResponse, GetIndexerQuotePriceResponse, GetIndexerReferralCodeParams, GetIndexerReferralCodeResponse, GetIndexerSubaccountDDAParams, GetIndexerSubaccountDDAResponse, GetIndexerV2SymbolsParams, GetIndexerV2SymbolsResponse, GetIndexerV2TickersParams, GetIndexerV2TickersResponse, IndexerAllTimePoints, IndexerBalanceTrackedVars, IndexerEvent, IndexerEventBalanceStateSnapshot, IndexerEventPerpStateSnapshot, IndexerEventSpotStateSnapshot, IndexerEventWithTx, IndexerFundingRate, IndexerLeaderboardContest, IndexerLeaderboardParticipant, IndexerLeaderboardRegistration, IndexerMaker, IndexerMakerSnapshot, IndexerMarketSnapshot, IndexerMatchEvent, IndexerMatchEventBalances, IndexerNlpSnapshot, IndexerOraclePrice, IndexerOrder, IndexerPerpBalance, IndexerPerpPrices, IndexerPointsEpoch, IndexerProductPayment, IndexerProductSnapshot, IndexerSnapshotBalance, IndexerSnapshotsIntervalParams, IndexerSpotBalance, IndexerSubaccountSnapshot, IndexerV2MarketHours, IndexerV2Symbol, IndexerV2TickerResponse, IndexerV2TradingStatus, ListIndexerSubaccountsParams, ListIndexerSubaccountsResponse, TickerMarketType, UpdateIndexerLeaderboardRegistrationParams, UpdateIndexerLeaderboardRegistrationResponse };
694
+ export type { Candlestick, ConnectSocialAccountParams, ConnectSocialAccountResponse, GetIndexerBacklogResponse, GetIndexerCandlesticksParams, GetIndexerCandlesticksResponse, GetIndexerEdgeCandlesticksParams, GetIndexerEdgeCandlesticksResponse, GetIndexerEdgeMarketSnapshotResponse, GetIndexerEdgeMarketSnapshotsParams, GetIndexerEventsLimitType, GetIndexerEventsParams, GetIndexerEventsResponse, GetIndexerFastWithdrawalSignatureParams, GetIndexerFastWithdrawalSignatureResponse, GetIndexerFundingRateParams, GetIndexerFundingRateResponse, GetIndexerInterestFundingPaymentsParams, GetIndexerInterestFundingPaymentsResponse, GetIndexerLeaderboardContestsParams, GetIndexerLeaderboardContestsResponse, GetIndexerLeaderboardParams, GetIndexerLeaderboardParticipantParams, GetIndexerLeaderboardParticipantResponse, GetIndexerLeaderboardRegistrationsParams, GetIndexerLeaderboardRegistrationsResponse, GetIndexerLeaderboardResponse, GetIndexerLinkedSignerParams, GetIndexerLinkedSignerResponse, GetIndexerMakerStatisticsParams, GetIndexerMakerStatisticsResponse, GetIndexerMarketSnapshotsParams, GetIndexerMarketSnapshotsResponse, GetIndexerMatchEventsParams, GetIndexerMatchEventsResponse, GetIndexerMultiProductFundingRatesParams, GetIndexerMultiProductFundingRatesResponse, GetIndexerMultiProductPerpPricesParams, GetIndexerMultiProductPerpPricesResponse, GetIndexerMultiProductSnapshotsParams, GetIndexerMultiProductSnapshotsResponse, GetIndexerMultiSubaccountSnapshotsParams, GetIndexerMultiSubaccountSnapshotsResponse, GetIndexerNlpSnapshotsParams, GetIndexerNlpSnapshotsResponse, GetIndexerOraclePricesParams, GetIndexerOraclePricesResponse, GetIndexerOrdersParams, GetIndexerOrdersResponse, GetIndexerPerpPricesParams, GetIndexerPerpPricesResponse, GetIndexerPointsParams, GetIndexerPointsResponse, GetIndexerPrivateAlphaChoiceParams, GetIndexerPrivateAlphaChoiceResponse, GetIndexerProductSnapshotsParams, GetIndexerProductSnapshotsResponse, GetIndexerQuotePriceResponse, GetIndexerReferralCodeParams, GetIndexerReferralCodeResponse, GetIndexerSubaccountDDAParams, GetIndexerSubaccountDDAResponse, GetIndexerV2SymbolsParams, GetIndexerV2SymbolsResponse, GetIndexerV2TickersParams, GetIndexerV2TickersResponse, IndexerAllTimePoints, IndexerBalanceTrackedVars, IndexerEvent, IndexerEventBalanceStateSnapshot, IndexerEventPerpStateSnapshot, IndexerEventSpotStateSnapshot, IndexerEventWithTx, IndexerFundingRate, IndexerLeaderboardContest, IndexerLeaderboardContestTrack, IndexerLeaderboardParticipant, IndexerLeaderboardRegistration, IndexerLeaderboardTrackPosition, IndexerMaker, IndexerMakerSnapshot, IndexerMarketSnapshot, IndexerMatchEvent, IndexerMatchEventBalances, IndexerNlpSnapshot, IndexerOraclePrice, IndexerOrder, IndexerPerpBalance, IndexerPerpPrices, IndexerPointsEpoch, IndexerProductPayment, IndexerProductSnapshot, IndexerSnapshotBalance, IndexerSnapshotsIntervalParams, IndexerSocialAccountInfo, IndexerSpotBalance, IndexerSubaccountSnapshot, IndexerV2MarketHours, IndexerV2Symbol, IndexerV2TickerResponse, IndexerV2TradingStatus, ListIndexerSocialAccountsParams, ListIndexerSocialAccountsResponse, ListIndexerSubaccountsParams, ListIndexerSubaccountsResponse, RegisterLeaderboardParams, RegisterLeaderboardResponse, RevokeSocialAccountParams, RevokeSocialAccountResponse, TickerMarketType };
@@ -386,20 +386,35 @@ interface GetIndexerMakerStatisticsResponse {
386
386
  */
387
387
  interface GetIndexerLeaderboardParams {
388
388
  contestId: number;
389
- rankType: IndexerLeaderboardRankType;
389
+ /**
390
+ * The ranking metric to query by.
391
+ * Optional for single-track contests (auto-selects the only track).
392
+ * Required for multi-track contests — omitting it returns an error.
393
+ */
394
+ rankType?: IndexerLeaderboardRankType;
390
395
  startCursor?: string;
391
396
  limit?: number;
397
+ /** Sort order. Defaults to `'DESC'`. */
398
+ order?: 'ASC' | 'DESC';
399
+ }
400
+ interface IndexerSocialAccountInfo {
401
+ provider: 'twitter';
402
+ username: string;
403
+ displayName: string;
404
+ profileImageUrl: string;
405
+ }
406
+ interface IndexerLeaderboardTrackPosition {
407
+ value: BigNumber;
408
+ rank: BigNumber;
409
+ qualificationStatus: 'qualified' | 'insufficient_account_value';
392
410
  }
393
411
  interface IndexerLeaderboardParticipant {
394
412
  subaccount: Subaccount;
395
413
  contestId: number;
396
- pnl: BigNumber;
397
- pnlRank: BigNumber;
398
- percentRoi: BigNumber;
399
- roiRank: BigNumber;
400
414
  accountValue: BigNumber;
401
- volume?: BigNumber;
402
415
  updateTime: BigNumber;
416
+ tracks: Partial<Record<IndexerLeaderboardRankType, IndexerLeaderboardTrackPosition>>;
417
+ socialAccounts: IndexerSocialAccountInfo[];
403
418
  }
404
419
  interface GetIndexerLeaderboardResponse {
405
420
  participants: IndexerLeaderboardParticipant[];
@@ -411,15 +426,19 @@ interface GetIndexerLeaderboardParticipantParams {
411
426
  interface GetIndexerLeaderboardParticipantResponse {
412
427
  participant: Record<string, IndexerLeaderboardParticipant>;
413
428
  }
414
- interface LeaderboardSignatureParams {
429
+ interface SignatureParams {
415
430
  verifyingAddr: string;
416
431
  chainId: number;
417
432
  }
418
- interface GetIndexerLeaderboardRegistrationParams extends Subaccount {
419
- contestId: number;
433
+ interface GetIndexerLeaderboardRegistrationsParams {
434
+ subaccount: Subaccount;
435
+ contestIds: number[];
436
+ /** Filter to active contests only. Defaults to `true`. */
437
+ active?: boolean;
420
438
  }
421
- interface UpdateIndexerLeaderboardRegistrationParams extends GetIndexerLeaderboardRegistrationParams {
422
- updateRegistration: LeaderboardSignatureParams;
439
+ interface RegisterLeaderboardParams extends Subaccount, SignatureParams {
440
+ contestIds: number[];
441
+ /** In millis, defaults to 90s in the future. */
423
442
  recvTime?: BigNumber;
424
443
  }
425
444
  interface IndexerLeaderboardRegistration {
@@ -427,28 +446,55 @@ interface IndexerLeaderboardRegistration {
427
446
  contestId: number;
428
447
  updateTime: BigNumber;
429
448
  }
430
- interface GetIndexerLeaderboardRegistrationResponse {
431
- registration: IndexerLeaderboardRegistration | null;
449
+ interface GetIndexerLeaderboardRegistrationsResponse {
450
+ registrations: IndexerLeaderboardRegistration[];
432
451
  }
433
- type UpdateIndexerLeaderboardRegistrationResponse = GetIndexerLeaderboardRegistrationResponse;
452
+ type RegisterLeaderboardResponse = GetIndexerLeaderboardRegistrationsResponse;
434
453
  interface GetIndexerLeaderboardContestsParams {
435
454
  contestIds: number[];
455
+ /** Filter to active contests only. Defaults to `true`. Pass `false` to include inactive contests. */
456
+ active?: boolean;
457
+ }
458
+ interface IndexerLeaderboardContestTrack {
459
+ trackId: number;
460
+ rankType: IndexerLeaderboardRankType;
461
+ sortOrder: 'ASC' | 'DESC';
462
+ minRequiredAccountValue: BigNumber;
436
463
  }
437
464
  interface IndexerLeaderboardContest {
438
465
  contestId: number;
439
466
  startTime: BigNumber;
440
467
  endTime: BigNumber;
441
- period: BigNumber;
442
468
  lastUpdated: BigNumber;
443
469
  totalParticipants: BigNumber;
444
- minRequiredAccountValue: BigNumber;
445
- minRequiredVolume: BigNumber;
446
470
  requiredProductIds: number[];
447
471
  active: boolean;
472
+ title: string;
473
+ description: string;
474
+ tracks: IndexerLeaderboardContestTrack[];
448
475
  }
449
476
  interface GetIndexerLeaderboardContestsResponse {
450
477
  contests: IndexerLeaderboardContest[];
451
478
  }
479
+ /**
480
+ * Social Accounts
481
+ */
482
+ interface ConnectSocialAccountParams extends Subaccount, SignatureParams {
483
+ provider: 'twitter';
484
+ /** In millis, defaults to 90s in the future. */
485
+ recvTime?: BigNumber;
486
+ }
487
+ interface ConnectSocialAccountResponse {
488
+ url: string;
489
+ }
490
+ interface ListIndexerSocialAccountsParams {
491
+ address: Address;
492
+ }
493
+ interface ListIndexerSocialAccountsResponse {
494
+ accounts: IndexerSocialAccountInfo[];
495
+ }
496
+ type RevokeSocialAccountParams = ConnectSocialAccountParams;
497
+ type RevokeSocialAccountResponse = ListIndexerSocialAccountsResponse;
452
498
  type GetIndexerFastWithdrawalSignatureParams = IndexerServerFastWithdrawalSignatureParams;
453
499
  interface GetIndexerFastWithdrawalSignatureResponse {
454
500
  idx: bigint;
@@ -645,4 +691,4 @@ interface IndexerV2Symbol {
645
691
  */
646
692
  type GetIndexerV2SymbolsResponse = Record<string, IndexerV2Symbol>;
647
693
 
648
- 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, GetIndexerPointsParams, GetIndexerPointsResponse, GetIndexerPrivateAlphaChoiceParams, GetIndexerPrivateAlphaChoiceResponse, GetIndexerProductSnapshotsParams, GetIndexerProductSnapshotsResponse, GetIndexerQuotePriceResponse, GetIndexerReferralCodeParams, GetIndexerReferralCodeResponse, GetIndexerSubaccountDDAParams, GetIndexerSubaccountDDAResponse, GetIndexerV2SymbolsParams, GetIndexerV2SymbolsResponse, GetIndexerV2TickersParams, GetIndexerV2TickersResponse, IndexerAllTimePoints, IndexerBalanceTrackedVars, IndexerEvent, IndexerEventBalanceStateSnapshot, IndexerEventPerpStateSnapshot, IndexerEventSpotStateSnapshot, IndexerEventWithTx, IndexerFundingRate, IndexerLeaderboardContest, IndexerLeaderboardParticipant, IndexerLeaderboardRegistration, IndexerMaker, IndexerMakerSnapshot, IndexerMarketSnapshot, IndexerMatchEvent, IndexerMatchEventBalances, IndexerNlpSnapshot, IndexerOraclePrice, IndexerOrder, IndexerPerpBalance, IndexerPerpPrices, IndexerPointsEpoch, IndexerProductPayment, IndexerProductSnapshot, IndexerSnapshotBalance, IndexerSnapshotsIntervalParams, IndexerSpotBalance, IndexerSubaccountSnapshot, IndexerV2MarketHours, IndexerV2Symbol, IndexerV2TickerResponse, IndexerV2TradingStatus, ListIndexerSubaccountsParams, ListIndexerSubaccountsResponse, TickerMarketType, UpdateIndexerLeaderboardRegistrationParams, UpdateIndexerLeaderboardRegistrationResponse };
694
+ export type { Candlestick, ConnectSocialAccountParams, ConnectSocialAccountResponse, GetIndexerBacklogResponse, GetIndexerCandlesticksParams, GetIndexerCandlesticksResponse, GetIndexerEdgeCandlesticksParams, GetIndexerEdgeCandlesticksResponse, GetIndexerEdgeMarketSnapshotResponse, GetIndexerEdgeMarketSnapshotsParams, GetIndexerEventsLimitType, GetIndexerEventsParams, GetIndexerEventsResponse, GetIndexerFastWithdrawalSignatureParams, GetIndexerFastWithdrawalSignatureResponse, GetIndexerFundingRateParams, GetIndexerFundingRateResponse, GetIndexerInterestFundingPaymentsParams, GetIndexerInterestFundingPaymentsResponse, GetIndexerLeaderboardContestsParams, GetIndexerLeaderboardContestsResponse, GetIndexerLeaderboardParams, GetIndexerLeaderboardParticipantParams, GetIndexerLeaderboardParticipantResponse, GetIndexerLeaderboardRegistrationsParams, GetIndexerLeaderboardRegistrationsResponse, GetIndexerLeaderboardResponse, GetIndexerLinkedSignerParams, GetIndexerLinkedSignerResponse, GetIndexerMakerStatisticsParams, GetIndexerMakerStatisticsResponse, GetIndexerMarketSnapshotsParams, GetIndexerMarketSnapshotsResponse, GetIndexerMatchEventsParams, GetIndexerMatchEventsResponse, GetIndexerMultiProductFundingRatesParams, GetIndexerMultiProductFundingRatesResponse, GetIndexerMultiProductPerpPricesParams, GetIndexerMultiProductPerpPricesResponse, GetIndexerMultiProductSnapshotsParams, GetIndexerMultiProductSnapshotsResponse, GetIndexerMultiSubaccountSnapshotsParams, GetIndexerMultiSubaccountSnapshotsResponse, GetIndexerNlpSnapshotsParams, GetIndexerNlpSnapshotsResponse, GetIndexerOraclePricesParams, GetIndexerOraclePricesResponse, GetIndexerOrdersParams, GetIndexerOrdersResponse, GetIndexerPerpPricesParams, GetIndexerPerpPricesResponse, GetIndexerPointsParams, GetIndexerPointsResponse, GetIndexerPrivateAlphaChoiceParams, GetIndexerPrivateAlphaChoiceResponse, GetIndexerProductSnapshotsParams, GetIndexerProductSnapshotsResponse, GetIndexerQuotePriceResponse, GetIndexerReferralCodeParams, GetIndexerReferralCodeResponse, GetIndexerSubaccountDDAParams, GetIndexerSubaccountDDAResponse, GetIndexerV2SymbolsParams, GetIndexerV2SymbolsResponse, GetIndexerV2TickersParams, GetIndexerV2TickersResponse, IndexerAllTimePoints, IndexerBalanceTrackedVars, IndexerEvent, IndexerEventBalanceStateSnapshot, IndexerEventPerpStateSnapshot, IndexerEventSpotStateSnapshot, IndexerEventWithTx, IndexerFundingRate, IndexerLeaderboardContest, IndexerLeaderboardContestTrack, IndexerLeaderboardParticipant, IndexerLeaderboardRegistration, IndexerLeaderboardTrackPosition, IndexerMaker, IndexerMakerSnapshot, IndexerMarketSnapshot, IndexerMatchEvent, IndexerMatchEventBalances, IndexerNlpSnapshot, IndexerOraclePrice, IndexerOrder, IndexerPerpBalance, IndexerPerpPrices, IndexerPointsEpoch, IndexerProductPayment, IndexerProductSnapshot, IndexerSnapshotBalance, IndexerSnapshotsIntervalParams, IndexerSocialAccountInfo, IndexerSpotBalance, IndexerSubaccountSnapshot, IndexerV2MarketHours, IndexerV2Symbol, IndexerV2TickerResponse, IndexerV2TradingStatus, ListIndexerSocialAccountsParams, ListIndexerSocialAccountsResponse, ListIndexerSubaccountsParams, ListIndexerSubaccountsResponse, RegisterLeaderboardParams, RegisterLeaderboardResponse, RevokeSocialAccountParams, RevokeSocialAccountResponse, TickerMarketType };
@@ -1,12 +1,12 @@
1
1
  export { CandlestickPeriod } from './CandlestickPeriod.cjs';
2
- 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, GetIndexerPointsParams, GetIndexerPointsResponse, GetIndexerPrivateAlphaChoiceParams, GetIndexerPrivateAlphaChoiceResponse, GetIndexerProductSnapshotsParams, GetIndexerProductSnapshotsResponse, GetIndexerQuotePriceResponse, GetIndexerReferralCodeParams, GetIndexerReferralCodeResponse, GetIndexerSubaccountDDAParams, GetIndexerSubaccountDDAResponse, GetIndexerV2SymbolsParams, GetIndexerV2SymbolsResponse, GetIndexerV2TickersParams, GetIndexerV2TickersResponse, IndexerAllTimePoints, IndexerBalanceTrackedVars, IndexerEvent, IndexerEventBalanceStateSnapshot, IndexerEventPerpStateSnapshot, IndexerEventSpotStateSnapshot, IndexerEventWithTx, IndexerFundingRate, IndexerLeaderboardContest, IndexerLeaderboardParticipant, IndexerLeaderboardRegistration, IndexerMaker, IndexerMakerSnapshot, IndexerMarketSnapshot, IndexerMatchEvent, IndexerMatchEventBalances, IndexerNlpSnapshot, IndexerOraclePrice, IndexerOrder, IndexerPerpBalance, IndexerPerpPrices, IndexerPointsEpoch, IndexerProductPayment, IndexerProductSnapshot, IndexerSnapshotBalance, IndexerSnapshotsIntervalParams, IndexerSpotBalance, IndexerSubaccountSnapshot, IndexerV2MarketHours, IndexerV2Symbol, IndexerV2TickerResponse, IndexerV2TradingStatus, ListIndexerSubaccountsParams, ListIndexerSubaccountsResponse, TickerMarketType, UpdateIndexerLeaderboardRegistrationParams, UpdateIndexerLeaderboardRegistrationResponse } from './clientTypes.cjs';
2
+ export { Candlestick, ConnectSocialAccountParams, ConnectSocialAccountResponse, GetIndexerBacklogResponse, GetIndexerCandlesticksParams, GetIndexerCandlesticksResponse, GetIndexerEdgeCandlesticksParams, GetIndexerEdgeCandlesticksResponse, GetIndexerEdgeMarketSnapshotResponse, GetIndexerEdgeMarketSnapshotsParams, GetIndexerEventsLimitType, GetIndexerEventsParams, GetIndexerEventsResponse, GetIndexerFastWithdrawalSignatureParams, GetIndexerFastWithdrawalSignatureResponse, GetIndexerFundingRateParams, GetIndexerFundingRateResponse, GetIndexerInterestFundingPaymentsParams, GetIndexerInterestFundingPaymentsResponse, GetIndexerLeaderboardContestsParams, GetIndexerLeaderboardContestsResponse, GetIndexerLeaderboardParams, GetIndexerLeaderboardParticipantParams, GetIndexerLeaderboardParticipantResponse, GetIndexerLeaderboardRegistrationsParams, GetIndexerLeaderboardRegistrationsResponse, GetIndexerLeaderboardResponse, GetIndexerLinkedSignerParams, GetIndexerLinkedSignerResponse, GetIndexerMakerStatisticsParams, GetIndexerMakerStatisticsResponse, GetIndexerMarketSnapshotsParams, GetIndexerMarketSnapshotsResponse, GetIndexerMatchEventsParams, GetIndexerMatchEventsResponse, GetIndexerMultiProductFundingRatesParams, GetIndexerMultiProductFundingRatesResponse, GetIndexerMultiProductPerpPricesParams, GetIndexerMultiProductPerpPricesResponse, GetIndexerMultiProductSnapshotsParams, GetIndexerMultiProductSnapshotsResponse, GetIndexerMultiSubaccountSnapshotsParams, GetIndexerMultiSubaccountSnapshotsResponse, GetIndexerNlpSnapshotsParams, GetIndexerNlpSnapshotsResponse, GetIndexerOraclePricesParams, GetIndexerOraclePricesResponse, GetIndexerOrdersParams, GetIndexerOrdersResponse, GetIndexerPerpPricesParams, GetIndexerPerpPricesResponse, GetIndexerPointsParams, GetIndexerPointsResponse, GetIndexerPrivateAlphaChoiceParams, GetIndexerPrivateAlphaChoiceResponse, GetIndexerProductSnapshotsParams, GetIndexerProductSnapshotsResponse, GetIndexerQuotePriceResponse, GetIndexerReferralCodeParams, GetIndexerReferralCodeResponse, GetIndexerSubaccountDDAParams, GetIndexerSubaccountDDAResponse, GetIndexerV2SymbolsParams, GetIndexerV2SymbolsResponse, GetIndexerV2TickersParams, GetIndexerV2TickersResponse, IndexerAllTimePoints, IndexerBalanceTrackedVars, IndexerEvent, IndexerEventBalanceStateSnapshot, IndexerEventPerpStateSnapshot, IndexerEventSpotStateSnapshot, IndexerEventWithTx, IndexerFundingRate, IndexerLeaderboardContest, IndexerLeaderboardContestTrack, IndexerLeaderboardParticipant, IndexerLeaderboardRegistration, IndexerLeaderboardTrackPosition, IndexerMaker, IndexerMakerSnapshot, IndexerMarketSnapshot, IndexerMatchEvent, IndexerMatchEventBalances, IndexerNlpSnapshot, IndexerOraclePrice, IndexerOrder, IndexerPerpBalance, IndexerPerpPrices, IndexerPointsEpoch, IndexerProductPayment, IndexerProductSnapshot, IndexerSnapshotBalance, IndexerSnapshotsIntervalParams, IndexerSocialAccountInfo, IndexerSpotBalance, IndexerSubaccountSnapshot, IndexerV2MarketHours, IndexerV2Symbol, IndexerV2TickerResponse, IndexerV2TradingStatus, ListIndexerSocialAccountsParams, ListIndexerSocialAccountsResponse, ListIndexerSubaccountsParams, ListIndexerSubaccountsResponse, RegisterLeaderboardParams, RegisterLeaderboardResponse, RevokeSocialAccountParams, RevokeSocialAccountResponse, TickerMarketType } from './clientTypes.cjs';
3
3
  export { CollateralEventType } from './collateralEventType.cjs';
4
4
  export { IndexerEventType } from './IndexerEventType.cjs';
5
5
  export { IndexerLeaderboardRankType } from './IndexerLeaderboardType.cjs';
6
6
  export { NadoDepositCollateralTx, NadoLiquidateSubaccountTx, NadoMatchOrdersRfqTx, NadoMatchOrdersTx, NadoTransferQuoteTx, NadoTx, NadoWithdrawCollateralTx } from './NadoTx.cjs';
7
7
  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';
8
- export { IndexerServerBalance, IndexerServerCandlestick, IndexerServerEvent, IndexerServerLeaderboardContest, IndexerServerLeaderboardPosition, IndexerServerLeaderboardRegistration, IndexerServerMaker, IndexerServerMakerData, IndexerServerMarketSnapshot, IndexerServerMarketSnapshotInterval, IndexerServerMatchEvent, IndexerServerMatchEventBalances, IndexerServerNlpSnapshot, IndexerServerOraclePrice, IndexerServerOrder, IndexerServerProduct, IndexerServerProductPayment, IndexerServerProductSnapshot, IndexerServerSnapshotsInterval, IndexerServerTx } from './serverModelTypes.cjs';
9
- export { IndexerEdgeServerCandlesticksParams, IndexerEdgeServerCandlesticksResponse, IndexerEdgeServerMarketSnapshotsParams, IndexerEdgeServerMarketSnapshotsResponse, IndexerServerAllTimePoints, 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, IndexerServerPointsEpoch, IndexerServerPointsParams, IndexerServerPointsResponse, IndexerServerPriceParams, IndexerServerPriceResponse, IndexerServerPrivateAlphaChoiceParams, IndexerServerPrivateAlphaChoiceResponse, IndexerServerProductsParams, IndexerServerProductsResponse, IndexerServerQueryRequestByType, IndexerServerQueryRequestType, IndexerServerQueryResponseByType, IndexerServerQuotePriceResponse, IndexerServerReferralCodeParams, IndexerServerReferralCodeResponse, IndexerServerTriggerTypeFilter, IndexerServerV2MarketHours, IndexerServerV2Symbol, IndexerServerV2SymbolsResponse, IndexerServerV2TickerResponse, IndexerServerV2TickersResponse } from './serverTypes.cjs';
8
+ export { IndexerServerBalance, IndexerServerCandlestick, IndexerServerEvent, IndexerServerLeaderboardContest, IndexerServerLeaderboardContestTrack, IndexerServerLeaderboardPosition, IndexerServerLeaderboardRegistration, IndexerServerLeaderboardTrackPosition, IndexerServerMaker, IndexerServerMakerData, IndexerServerMarketSnapshot, IndexerServerMarketSnapshotInterval, IndexerServerMatchEvent, IndexerServerMatchEventBalances, IndexerServerNlpSnapshot, IndexerServerOraclePrice, IndexerServerOrder, IndexerServerProduct, IndexerServerProductPayment, IndexerServerProductSnapshot, IndexerServerSnapshotsInterval, IndexerServerSocialAccount, IndexerServerTx } from './serverModelTypes.cjs';
9
+ export { IndexerEdgeServerCandlesticksParams, IndexerEdgeServerCandlesticksResponse, IndexerEdgeServerMarketSnapshotsParams, IndexerEdgeServerMarketSnapshotsResponse, IndexerServerAllTimePoints, IndexerServerBacklogResponse, IndexerServerCandlesticksParams, IndexerServerCandlesticksResponse, IndexerServerDDAQueryParams, IndexerServerDDAResponse, IndexerServerEventsParams, IndexerServerEventsResponse, IndexerServerFastWithdrawalSignatureParams, IndexerServerFastWithdrawalSignatureResponse, IndexerServerFundingRate, IndexerServerFundingRateParams, IndexerServerFundingRateResponse, IndexerServerFundingRatesParams, IndexerServerFundingRatesResponse, IndexerServerInterestFundingParams, IndexerServerInterestFundingResponse, IndexerServerLeaderboardContestsParams, IndexerServerLeaderboardContestsResponse, IndexerServerLeaderboardParams, IndexerServerLeaderboardRankParams, IndexerServerLeaderboardRankResponse, IndexerServerLeaderboardRegisterParams, IndexerServerLeaderboardRegisterResponse, IndexerServerLeaderboardRegistrationsParams, IndexerServerLeaderboardRegistrationsResponse, IndexerServerLeaderboardResponse, IndexerServerLinkedSignerParams, IndexerServerLinkedSignerResponse, IndexerServerListSocialAccountsParams, IndexerServerListSubaccountsParams, IndexerServerListSubaccountsResponse, IndexerServerMakerStatisticsParams, IndexerServerMakerStatisticsResponse, IndexerServerMarketSnapshotsParams, IndexerServerMarketSnapshotsResponse, IndexerServerMatchEventsParams, IndexerServerMatchEventsResponse, IndexerServerMultiProductsParams, IndexerServerMultiProductsResponse, IndexerServerMultiSubaccountSnapshotsParams, IndexerServerMultiSubaccountSnapshotsResponse, IndexerServerNlpSnapshotsParams, IndexerServerNlpSnapshotsResponse, IndexerServerOraclePricesParams, IndexerServerOraclePricesResponse, IndexerServerOrdersParams, IndexerServerOrdersResponse, IndexerServerPerpPrices, IndexerServerPerpPricesParams, IndexerServerPerpPricesResponse, IndexerServerPointsEpoch, IndexerServerPointsParams, IndexerServerPointsResponse, IndexerServerPriceParams, IndexerServerPriceResponse, IndexerServerPrivateAlphaChoiceParams, IndexerServerPrivateAlphaChoiceResponse, IndexerServerProductsParams, IndexerServerProductsResponse, IndexerServerQueryRequestByType, IndexerServerQueryRequestType, IndexerServerQueryResponseByType, IndexerServerQuotePriceResponse, IndexerServerReferralCodeParams, IndexerServerReferralCodeResponse, IndexerServerRevokeSocialAccountParams, IndexerServerSocialAccountsResponse, IndexerServerSocialConnectParams, IndexerServerSocialConnectResponse, IndexerServerTriggerTypeFilter, IndexerServerV2MarketHours, IndexerServerV2Symbol, IndexerServerV2SymbolsResponse, IndexerServerV2TickerResponse, IndexerServerV2TickersResponse } from './serverTypes.cjs';
10
10
  import '@nadohq/shared';
11
11
  import 'bignumber.js';
12
12
  import 'viem';
@@ -1,12 +1,12 @@
1
1
  export { CandlestickPeriod } from './CandlestickPeriod.js';
2
- 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, GetIndexerPointsParams, GetIndexerPointsResponse, GetIndexerPrivateAlphaChoiceParams, GetIndexerPrivateAlphaChoiceResponse, GetIndexerProductSnapshotsParams, GetIndexerProductSnapshotsResponse, GetIndexerQuotePriceResponse, GetIndexerReferralCodeParams, GetIndexerReferralCodeResponse, GetIndexerSubaccountDDAParams, GetIndexerSubaccountDDAResponse, GetIndexerV2SymbolsParams, GetIndexerV2SymbolsResponse, GetIndexerV2TickersParams, GetIndexerV2TickersResponse, IndexerAllTimePoints, IndexerBalanceTrackedVars, IndexerEvent, IndexerEventBalanceStateSnapshot, IndexerEventPerpStateSnapshot, IndexerEventSpotStateSnapshot, IndexerEventWithTx, IndexerFundingRate, IndexerLeaderboardContest, IndexerLeaderboardParticipant, IndexerLeaderboardRegistration, IndexerMaker, IndexerMakerSnapshot, IndexerMarketSnapshot, IndexerMatchEvent, IndexerMatchEventBalances, IndexerNlpSnapshot, IndexerOraclePrice, IndexerOrder, IndexerPerpBalance, IndexerPerpPrices, IndexerPointsEpoch, IndexerProductPayment, IndexerProductSnapshot, IndexerSnapshotBalance, IndexerSnapshotsIntervalParams, IndexerSpotBalance, IndexerSubaccountSnapshot, IndexerV2MarketHours, IndexerV2Symbol, IndexerV2TickerResponse, IndexerV2TradingStatus, ListIndexerSubaccountsParams, ListIndexerSubaccountsResponse, TickerMarketType, UpdateIndexerLeaderboardRegistrationParams, UpdateIndexerLeaderboardRegistrationResponse } from './clientTypes.js';
2
+ export { Candlestick, ConnectSocialAccountParams, ConnectSocialAccountResponse, GetIndexerBacklogResponse, GetIndexerCandlesticksParams, GetIndexerCandlesticksResponse, GetIndexerEdgeCandlesticksParams, GetIndexerEdgeCandlesticksResponse, GetIndexerEdgeMarketSnapshotResponse, GetIndexerEdgeMarketSnapshotsParams, GetIndexerEventsLimitType, GetIndexerEventsParams, GetIndexerEventsResponse, GetIndexerFastWithdrawalSignatureParams, GetIndexerFastWithdrawalSignatureResponse, GetIndexerFundingRateParams, GetIndexerFundingRateResponse, GetIndexerInterestFundingPaymentsParams, GetIndexerInterestFundingPaymentsResponse, GetIndexerLeaderboardContestsParams, GetIndexerLeaderboardContestsResponse, GetIndexerLeaderboardParams, GetIndexerLeaderboardParticipantParams, GetIndexerLeaderboardParticipantResponse, GetIndexerLeaderboardRegistrationsParams, GetIndexerLeaderboardRegistrationsResponse, GetIndexerLeaderboardResponse, GetIndexerLinkedSignerParams, GetIndexerLinkedSignerResponse, GetIndexerMakerStatisticsParams, GetIndexerMakerStatisticsResponse, GetIndexerMarketSnapshotsParams, GetIndexerMarketSnapshotsResponse, GetIndexerMatchEventsParams, GetIndexerMatchEventsResponse, GetIndexerMultiProductFundingRatesParams, GetIndexerMultiProductFundingRatesResponse, GetIndexerMultiProductPerpPricesParams, GetIndexerMultiProductPerpPricesResponse, GetIndexerMultiProductSnapshotsParams, GetIndexerMultiProductSnapshotsResponse, GetIndexerMultiSubaccountSnapshotsParams, GetIndexerMultiSubaccountSnapshotsResponse, GetIndexerNlpSnapshotsParams, GetIndexerNlpSnapshotsResponse, GetIndexerOraclePricesParams, GetIndexerOraclePricesResponse, GetIndexerOrdersParams, GetIndexerOrdersResponse, GetIndexerPerpPricesParams, GetIndexerPerpPricesResponse, GetIndexerPointsParams, GetIndexerPointsResponse, GetIndexerPrivateAlphaChoiceParams, GetIndexerPrivateAlphaChoiceResponse, GetIndexerProductSnapshotsParams, GetIndexerProductSnapshotsResponse, GetIndexerQuotePriceResponse, GetIndexerReferralCodeParams, GetIndexerReferralCodeResponse, GetIndexerSubaccountDDAParams, GetIndexerSubaccountDDAResponse, GetIndexerV2SymbolsParams, GetIndexerV2SymbolsResponse, GetIndexerV2TickersParams, GetIndexerV2TickersResponse, IndexerAllTimePoints, IndexerBalanceTrackedVars, IndexerEvent, IndexerEventBalanceStateSnapshot, IndexerEventPerpStateSnapshot, IndexerEventSpotStateSnapshot, IndexerEventWithTx, IndexerFundingRate, IndexerLeaderboardContest, IndexerLeaderboardContestTrack, IndexerLeaderboardParticipant, IndexerLeaderboardRegistration, IndexerLeaderboardTrackPosition, IndexerMaker, IndexerMakerSnapshot, IndexerMarketSnapshot, IndexerMatchEvent, IndexerMatchEventBalances, IndexerNlpSnapshot, IndexerOraclePrice, IndexerOrder, IndexerPerpBalance, IndexerPerpPrices, IndexerPointsEpoch, IndexerProductPayment, IndexerProductSnapshot, IndexerSnapshotBalance, IndexerSnapshotsIntervalParams, IndexerSocialAccountInfo, IndexerSpotBalance, IndexerSubaccountSnapshot, IndexerV2MarketHours, IndexerV2Symbol, IndexerV2TickerResponse, IndexerV2TradingStatus, ListIndexerSocialAccountsParams, ListIndexerSocialAccountsResponse, ListIndexerSubaccountsParams, ListIndexerSubaccountsResponse, RegisterLeaderboardParams, RegisterLeaderboardResponse, RevokeSocialAccountParams, RevokeSocialAccountResponse, TickerMarketType } from './clientTypes.js';
3
3
  export { CollateralEventType } from './collateralEventType.js';
4
4
  export { IndexerEventType } from './IndexerEventType.js';
5
5
  export { IndexerLeaderboardRankType } from './IndexerLeaderboardType.js';
6
6
  export { NadoDepositCollateralTx, NadoLiquidateSubaccountTx, NadoMatchOrdersRfqTx, NadoMatchOrdersTx, NadoTransferQuoteTx, NadoTx, NadoWithdrawCollateralTx } from './NadoTx.js';
7
7
  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';
8
- export { IndexerServerBalance, IndexerServerCandlestick, IndexerServerEvent, IndexerServerLeaderboardContest, IndexerServerLeaderboardPosition, IndexerServerLeaderboardRegistration, IndexerServerMaker, IndexerServerMakerData, IndexerServerMarketSnapshot, IndexerServerMarketSnapshotInterval, IndexerServerMatchEvent, IndexerServerMatchEventBalances, IndexerServerNlpSnapshot, IndexerServerOraclePrice, IndexerServerOrder, IndexerServerProduct, IndexerServerProductPayment, IndexerServerProductSnapshot, IndexerServerSnapshotsInterval, IndexerServerTx } from './serverModelTypes.js';
9
- export { IndexerEdgeServerCandlesticksParams, IndexerEdgeServerCandlesticksResponse, IndexerEdgeServerMarketSnapshotsParams, IndexerEdgeServerMarketSnapshotsResponse, IndexerServerAllTimePoints, 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, IndexerServerPointsEpoch, IndexerServerPointsParams, IndexerServerPointsResponse, IndexerServerPriceParams, IndexerServerPriceResponse, IndexerServerPrivateAlphaChoiceParams, IndexerServerPrivateAlphaChoiceResponse, IndexerServerProductsParams, IndexerServerProductsResponse, IndexerServerQueryRequestByType, IndexerServerQueryRequestType, IndexerServerQueryResponseByType, IndexerServerQuotePriceResponse, IndexerServerReferralCodeParams, IndexerServerReferralCodeResponse, IndexerServerTriggerTypeFilter, IndexerServerV2MarketHours, IndexerServerV2Symbol, IndexerServerV2SymbolsResponse, IndexerServerV2TickerResponse, IndexerServerV2TickersResponse } from './serverTypes.js';
8
+ export { IndexerServerBalance, IndexerServerCandlestick, IndexerServerEvent, IndexerServerLeaderboardContest, IndexerServerLeaderboardContestTrack, IndexerServerLeaderboardPosition, IndexerServerLeaderboardRegistration, IndexerServerLeaderboardTrackPosition, IndexerServerMaker, IndexerServerMakerData, IndexerServerMarketSnapshot, IndexerServerMarketSnapshotInterval, IndexerServerMatchEvent, IndexerServerMatchEventBalances, IndexerServerNlpSnapshot, IndexerServerOraclePrice, IndexerServerOrder, IndexerServerProduct, IndexerServerProductPayment, IndexerServerProductSnapshot, IndexerServerSnapshotsInterval, IndexerServerSocialAccount, IndexerServerTx } from './serverModelTypes.js';
9
+ export { IndexerEdgeServerCandlesticksParams, IndexerEdgeServerCandlesticksResponse, IndexerEdgeServerMarketSnapshotsParams, IndexerEdgeServerMarketSnapshotsResponse, IndexerServerAllTimePoints, IndexerServerBacklogResponse, IndexerServerCandlesticksParams, IndexerServerCandlesticksResponse, IndexerServerDDAQueryParams, IndexerServerDDAResponse, IndexerServerEventsParams, IndexerServerEventsResponse, IndexerServerFastWithdrawalSignatureParams, IndexerServerFastWithdrawalSignatureResponse, IndexerServerFundingRate, IndexerServerFundingRateParams, IndexerServerFundingRateResponse, IndexerServerFundingRatesParams, IndexerServerFundingRatesResponse, IndexerServerInterestFundingParams, IndexerServerInterestFundingResponse, IndexerServerLeaderboardContestsParams, IndexerServerLeaderboardContestsResponse, IndexerServerLeaderboardParams, IndexerServerLeaderboardRankParams, IndexerServerLeaderboardRankResponse, IndexerServerLeaderboardRegisterParams, IndexerServerLeaderboardRegisterResponse, IndexerServerLeaderboardRegistrationsParams, IndexerServerLeaderboardRegistrationsResponse, IndexerServerLeaderboardResponse, IndexerServerLinkedSignerParams, IndexerServerLinkedSignerResponse, IndexerServerListSocialAccountsParams, IndexerServerListSubaccountsParams, IndexerServerListSubaccountsResponse, IndexerServerMakerStatisticsParams, IndexerServerMakerStatisticsResponse, IndexerServerMarketSnapshotsParams, IndexerServerMarketSnapshotsResponse, IndexerServerMatchEventsParams, IndexerServerMatchEventsResponse, IndexerServerMultiProductsParams, IndexerServerMultiProductsResponse, IndexerServerMultiSubaccountSnapshotsParams, IndexerServerMultiSubaccountSnapshotsResponse, IndexerServerNlpSnapshotsParams, IndexerServerNlpSnapshotsResponse, IndexerServerOraclePricesParams, IndexerServerOraclePricesResponse, IndexerServerOrdersParams, IndexerServerOrdersResponse, IndexerServerPerpPrices, IndexerServerPerpPricesParams, IndexerServerPerpPricesResponse, IndexerServerPointsEpoch, IndexerServerPointsParams, IndexerServerPointsResponse, IndexerServerPriceParams, IndexerServerPriceResponse, IndexerServerPrivateAlphaChoiceParams, IndexerServerPrivateAlphaChoiceResponse, IndexerServerProductsParams, IndexerServerProductsResponse, IndexerServerQueryRequestByType, IndexerServerQueryRequestType, IndexerServerQueryResponseByType, IndexerServerQuotePriceResponse, IndexerServerReferralCodeParams, IndexerServerReferralCodeResponse, IndexerServerRevokeSocialAccountParams, IndexerServerSocialAccountsResponse, IndexerServerSocialConnectParams, IndexerServerSocialConnectResponse, IndexerServerTriggerTypeFilter, IndexerServerV2MarketHours, IndexerServerV2Symbol, IndexerServerV2SymbolsResponse, IndexerServerV2TickerResponse, IndexerServerV2TickersResponse } from './serverTypes.js';
10
10
  import '@nadohq/shared';
11
11
  import 'bignumber.js';
12
12
  import 'viem';
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/types/serverModelTypes.ts"],"sourcesContent":["import {\n EngineServerPerpBalance,\n EngineServerPerpProduct,\n EngineServerSpotBalance,\n EngineServerSpotProduct,\n} from '@nadohq/engine-client';\nimport { EIP712OrderValues } from '@nadohq/shared';\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 * Total traded volume in terms of the primary quote (i.e in terms of USDT) for this product\n */\n quote_volume_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 subaccount: string;\n product_id: number;\n submission_idx: string;\n last_fill_submission_idx: string;\n amount: string;\n price_x18: string;\n expiration: string;\n appendix: string;\n nonce: string;\n isolated: boolean;\n base_filled: string;\n // Includes fee\n quote_filled: string;\n // Includes sequencer fee\n fee: string;\n builder_fee: string;\n realized_pnl: string;\n closed_amount: string;\n // Cumulative realized entry price for the closed amount (x18)\n closed_net_entry: string;\n // Total isolated margin on the position before the close (x18). Only present for isolated margin orders; null for cross-margin orders\n closed_margin: string | null;\n // Unix timestamp (seconds) of the first fill on the order\n first_fill_timestamp: string;\n // Unix timestamp (seconds) of the last fill on the order\n last_fill_timestamp: string;\n pre_balance: IndexerServerMatchEventBalances;\n post_balance: IndexerServerMatchEventBalances;\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 builder_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 is_taker: boolean;\n realized_pnl: string;\n closed_amount: string;\n // Realized entry price for the closed amount on this match (x18). Represents the total quote value at which the closed portion of the position was originally entered.\n closed_net_entry: string;\n // Margin allocated to the closed amount on this match (x18). Only present for isolated margin orders; null for cross-margin orders.\n margin: string | null;\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_quote: string;\n cumulative_mint_quote: 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
+ {"version":3,"sources":["../../src/types/serverModelTypes.ts"],"sourcesContent":["import {\n EngineServerPerpBalance,\n EngineServerPerpProduct,\n EngineServerSpotBalance,\n EngineServerSpotProduct,\n} from '@nadohq/engine-client';\nimport { EIP712OrderValues } from '@nadohq/shared';\nimport { IndexerEventType } from './IndexerEventType';\nimport { IndexerLeaderboardRankType } from './IndexerLeaderboardType';\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 * Total traded volume in terms of the primary quote (i.e in terms of USDT) for this product\n */\n quote_volume_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 subaccount: string;\n product_id: number;\n submission_idx: string;\n last_fill_submission_idx: string;\n amount: string;\n price_x18: string;\n expiration: string;\n appendix: string;\n nonce: string;\n isolated: boolean;\n base_filled: string;\n // Includes fee\n quote_filled: string;\n // Includes sequencer fee\n fee: string;\n builder_fee: string;\n realized_pnl: string;\n closed_amount: string;\n // Cumulative realized entry price for the closed amount (x18)\n closed_net_entry: string;\n // Total isolated margin on the position before the close (x18). Only present for isolated margin orders; null for cross-margin orders\n closed_margin: string | null;\n // Unix timestamp (seconds) of the first fill on the order\n first_fill_timestamp: string;\n // Unix timestamp (seconds) of the last fill on the order\n last_fill_timestamp: string;\n pre_balance: IndexerServerMatchEventBalances;\n post_balance: IndexerServerMatchEventBalances;\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 builder_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 is_taker: boolean;\n realized_pnl: string;\n closed_amount: string;\n // Realized entry price for the closed amount on this match (x18). Represents the total quote value at which the closed portion of the position was originally entered.\n closed_net_entry: string;\n // Margin allocated to the closed amount on this match (x18). Only present for isolated margin orders; null for cross-margin orders.\n margin: string | null;\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 IndexerServerSocialAccount {\n provider: 'twitter';\n username: string;\n display_name: string;\n profile_image_url: string;\n}\n\nexport interface IndexerServerLeaderboardTrackPosition {\n value: string;\n rank: string;\n qualification_status: 'qualified' | 'insufficient_account_value';\n}\n\nexport interface IndexerServerLeaderboardContestTrack {\n track_id: number;\n rank_type: IndexerLeaderboardRankType;\n sort_order: 'ASC' | 'DESC';\n threshold: string;\n}\n\nexport interface IndexerServerLeaderboardPosition {\n subaccount: string;\n contest_id: number;\n account_value: string;\n update_time: string;\n tracks: Partial<\n Record<IndexerLeaderboardRankType, IndexerServerLeaderboardTrackPosition>\n >;\n social_accounts: IndexerServerSocialAccount[];\n}\n\nexport interface IndexerServerLeaderboardContest {\n contest_id: number;\n start_time: string;\n end_time: string;\n count: string;\n last_updated: string;\n product_ids: number[];\n active: boolean;\n title: string;\n description: string;\n tracks: IndexerServerLeaderboardContestTrack[];\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_quote: string;\n cumulative_mint_quote: 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,6 +1,7 @@
1
1
  import { EngineServerSpotBalance, EngineServerPerpBalance, EngineServerSpotProduct, EngineServerPerpProduct } from '@nadohq/engine-client';
2
2
  import { EIP712OrderValues } from '@nadohq/shared';
3
3
  import { IndexerEventType } from './IndexerEventType.cjs';
4
+ import { IndexerLeaderboardRankType } from './IndexerLeaderboardType.cjs';
4
5
  import { NadoTx } from './NadoTx.cjs';
5
6
 
6
7
  interface IndexerServerSnapshotsInterval {
@@ -198,28 +199,42 @@ interface IndexerServerMaker {
198
199
  /**
199
200
  * Leaderboard
200
201
  */
202
+ interface IndexerServerSocialAccount {
203
+ provider: 'twitter';
204
+ username: string;
205
+ display_name: string;
206
+ profile_image_url: string;
207
+ }
208
+ interface IndexerServerLeaderboardTrackPosition {
209
+ value: string;
210
+ rank: string;
211
+ qualification_status: 'qualified' | 'insufficient_account_value';
212
+ }
213
+ interface IndexerServerLeaderboardContestTrack {
214
+ track_id: number;
215
+ rank_type: IndexerLeaderboardRankType;
216
+ sort_order: 'ASC' | 'DESC';
217
+ threshold: string;
218
+ }
201
219
  interface IndexerServerLeaderboardPosition {
202
220
  subaccount: string;
203
221
  contest_id: number;
204
- pnl: string;
205
- pnl_rank: string;
206
- roi: string;
207
- roi_rank: string;
208
222
  account_value: string;
209
- volume?: string;
210
223
  update_time: string;
224
+ tracks: Partial<Record<IndexerLeaderboardRankType, IndexerServerLeaderboardTrackPosition>>;
225
+ social_accounts: IndexerServerSocialAccount[];
211
226
  }
212
227
  interface IndexerServerLeaderboardContest {
213
228
  contest_id: number;
214
229
  start_time: string;
215
230
  end_time: string;
216
- timeframe: string;
217
231
  count: string;
218
- threshold: string;
219
- volume_threshold: string;
220
- product_ids: number[];
221
232
  last_updated: string;
233
+ product_ids: number[];
222
234
  active: boolean;
235
+ title: string;
236
+ description: string;
237
+ tracks: IndexerServerLeaderboardContestTrack[];
223
238
  }
224
239
  interface IndexerServerLeaderboardRegistration {
225
240
  subaccount: string;
@@ -242,4 +257,4 @@ interface IndexerServerNlpSnapshot {
242
257
  tvl: string;
243
258
  }
244
259
 
245
- export type { IndexerServerBalance, IndexerServerCandlestick, IndexerServerEvent, IndexerServerLeaderboardContest, IndexerServerLeaderboardPosition, IndexerServerLeaderboardRegistration, IndexerServerMaker, IndexerServerMakerData, IndexerServerMarketSnapshot, IndexerServerMarketSnapshotInterval, IndexerServerMatchEvent, IndexerServerMatchEventBalances, IndexerServerNlpSnapshot, IndexerServerOraclePrice, IndexerServerOrder, IndexerServerProduct, IndexerServerProductPayment, IndexerServerProductSnapshot, IndexerServerSnapshotsInterval, IndexerServerTx };
260
+ export type { IndexerServerBalance, IndexerServerCandlestick, IndexerServerEvent, IndexerServerLeaderboardContest, IndexerServerLeaderboardContestTrack, IndexerServerLeaderboardPosition, IndexerServerLeaderboardRegistration, IndexerServerLeaderboardTrackPosition, IndexerServerMaker, IndexerServerMakerData, IndexerServerMarketSnapshot, IndexerServerMarketSnapshotInterval, IndexerServerMatchEvent, IndexerServerMatchEventBalances, IndexerServerNlpSnapshot, IndexerServerOraclePrice, IndexerServerOrder, IndexerServerProduct, IndexerServerProductPayment, IndexerServerProductSnapshot, IndexerServerSnapshotsInterval, IndexerServerSocialAccount, IndexerServerTx };