import { Lt as IndexerServerQueryRequestByType, Rt as IndexerServerQueryRequestType, zt as IndexerServerQueryResponseByType } from "./serverTypes-sSPZDJZ-.cjs"; import { $ as GetIndexerOrdersResponse, A as GetIndexerLeaderboardRegistrationsResponse, An as RevokeSocialAccountResponse, B as GetIndexerMultiProductFundingRatesParams, C as GetIndexerInterestFundingPaymentsResponse, Cn as ListIndexerSocialAccountsParams, Ct as GetIndexerXPointsParams, D as GetIndexerLeaderboardParticipantParams, Dn as RegisterLeaderboardParams, E as GetIndexerLeaderboardParams, En as ListIndexerSubaccountsResponse, F as GetIndexerMakerStatisticsResponse, G as GetIndexerMultiProductSnapshotsResponse, H as GetIndexerMultiProductPerpPricesParams, I as GetIndexerMarketSnapshotsParams, J as GetIndexerNlpSnapshotsParams, K as GetIndexerMultiSubaccountSnapshotsParams, L as GetIndexerMarketSnapshotsResponse, M as GetIndexerLinkedSignerParams, N as GetIndexerLinkedSignerResponse, O as GetIndexerLeaderboardParticipantResponse, On as RegisterLeaderboardResponse, P as GetIndexerMakerStatisticsParams, Q as GetIndexerOrdersParams, R as GetIndexerMatchEventsParams, S as GetIndexerInterestFundingPaymentsParams, St as GetIndexerV2TickersResponse, T as GetIndexerLeaderboardContestsResponse, Tn as ListIndexerSubaccountsParams, U as GetIndexerMultiProductPerpPricesResponse, V as GetIndexerMultiProductFundingRatesResponse, W as GetIndexerMultiProductSnapshotsParams, X as GetIndexerOraclePricesParams, Y as GetIndexerNlpSnapshotsResponse, Z as GetIndexerOraclePricesResponse, _ as GetIndexerFastWithdrawalSignatureResponse, _t as GetIndexerSubaccountDDAParams, a as GetIndexerCandlesticksParams, at as GetIndexerPortfolioCalendarResponse, b as GetIndexerFundingRateParams, bt as GetIndexerV2SymbolsResponse, c as GetIndexerCashIncentivesResponse, ct as GetIndexerPositionsParams, d as GetIndexerEdgeMarketSnapshotResponse, dt as GetIndexerPrivateAlphaChoiceResponse, et as GetIndexerPerpPricesParams, f as GetIndexerEdgeMarketSnapshotsParams, ft as GetIndexerProductSnapshotsParams, g as GetIndexerFastWithdrawalSignatureParams, gt as GetIndexerReferralCodeResponse, h as GetIndexerEventsResponse, ht as GetIndexerReferralCodeParams, i as GetIndexerBacklogResponse, it as GetIndexerPortfolioCalendarParams, j as GetIndexerLeaderboardResponse, k as GetIndexerLeaderboardRegistrationsParams, kn as RevokeSocialAccountParams, l as GetIndexerEdgeCandlesticksParams, lt as GetIndexerPositionsResponse, m as GetIndexerEventsParams, mt as GetIndexerQuotePriceResponse, n as ConnectSocialAccountParams, nt as GetIndexerPointsParams, o as GetIndexerCandlesticksResponse, ot as GetIndexerPortfolioParams, pt as GetIndexerProductSnapshotsResponse, q as GetIndexerMultiSubaccountSnapshotsResponse, r as ConnectSocialAccountResponse, rt as GetIndexerPointsResponse, s as GetIndexerCashIncentivesParams, st as GetIndexerPortfolioResponse, tt as GetIndexerPerpPricesResponse, u as GetIndexerEdgeCandlesticksResponse, ut as GetIndexerPrivateAlphaChoiceParams, v as GetIndexerFundingRateHistoryParams, vt as GetIndexerSubaccountDDAResponse, w as GetIndexerLeaderboardContestsParams, wn as ListIndexerSocialAccountsResponse, wt as GetIndexerXPointsResponse, x as GetIndexerFundingRateResponse, xt as GetIndexerV2TickersParams, y as GetIndexerFundingRateHistoryResponse, yt as GetIndexerV2SymbolsParams, z as GetIndexerMatchEventsResponse } from "./clientTypes-DnLNlJrL.cjs"; import { SignableRequestType, SignableRequestTypeToParams, WalletClientWithAccount } from "@nadohq/shared"; import { AxiosInstance } from "axios"; //#region src/IndexerBaseClient.d.ts interface IndexerClientOpts { url: string; rewardsUrl?: string; walletClient?: WalletClientWithAccount; linkedSignerWalletClient?: WalletClientWithAccount; clientType?: string; } /** * Base client for all indexer requests */ declare class IndexerBaseClient { readonly opts: IndexerClientOpts; readonly v1Url: string; readonly v2Url: string; readonly rewardsUrl: string; readonly axiosInstance: AxiosInstance; constructor(opts: IndexerClientOpts); /** * Sets the linked signer for execute requests * * @param linkedSignerWalletClient The linkedSigner to use for all signatures. Set to null to revert to the chain signer */ setLinkedSigner(linkedSignerWalletClient: WalletClientWithAccount | null): void; /** * List all subaccounts * * @param params */ listSubaccounts(params: ListIndexerSubaccountsParams): Promise; /** * Retrieve snapshots of multiple subaccounts at multiple points in time. * Each snapshot is a view of the subaccount's balances at this point in time, with tracked variables for interest, funding, etc. * * @param params */ getMultiSubaccountSnapshots(params: GetIndexerMultiSubaccountSnapshotsParams): Promise; /** * Retrieves referral code for an address * * @param params */ getReferralCode(params: GetIndexerReferralCodeParams): Promise; /** * Retrieves funding rate for a product, where 1 = 100% * @param params */ getFundingRate(params: GetIndexerFundingRateParams): Promise; /** * Retrieves funding rate for multiple products, where 1 = 100% * @param params */ getMultiProductFundingRates(params: GetIndexerMultiProductFundingRatesParams): Promise; /** * Retrieves a perp product's historical (realized hourly) funding rates, * ordered ascending by timestamp, where 1 = 100%. * * To paginate forward, pass the last entry's `timestamp + 1` as the next * request's `startTimeInclusive`. * * @param params */ getFundingRateHistory(params: GetIndexerFundingRateHistoryParams): Promise; /** * Retrieves a subaccount's account-value, PnL, traded-volume, average-trade-size, * and markets-traded history across all timeframes, keyed by period. The value * aggregates the cross-margin account plus every isolated child; the queried * subaccount must be cross-margin. * * Points are downsampled per timeframe, so the most recent point can be up to * ~20 minutes stale. For the exact live value, use the engine client's * `getSubaccountSummary` query instead. * * @param params */ getPortfolio(params: GetIndexerPortfolioParams): Promise; /** * Retrieves a subaccount's per-UTC-day PnL, traded volume, trade count, and * markets traded between `startTime` and `endTime` (inclusive), split into * `spot` and `perp` scopes. The value aggregates the cross-margin account plus * every isolated child; the queried subaccount must be cross-margin. * * Use this for calendar/heat-map style views of daily performance. For * continuous time series, use `getPortfolio` instead. * * `startTime`/`endTime` must be UTC midnight (divisible by 86400); the range * is capped at 500 days. Days before the subaccount's first recorded activity * return zeroed entries; days after the latest available data are omitted, so * a range ending in the future stops at today. The current (partial) day is * measured up to the latest available snapshot, which can be up to ~20 * minutes stale. * * @param params */ getPortfolioCalendar(params: GetIndexerPortfolioCalendarParams): Promise; /** * Retrieves latest mark/index price for a perp product * @param params */ getPerpPrices(params: GetIndexerPerpPricesParams): Promise; /** * Retrieves latest mark/index price for multiple perp products * @param params */ getMultiProductPerpPrices(params: GetIndexerMultiProductPerpPricesParams): Promise; /** * Retrieves latest oracle prices for provided products * @param params */ getOraclePrices(params: GetIndexerOraclePricesParams): Promise; /** * Retrieves candlesticks for a product * @param params */ getCandlesticks(params: GetIndexerCandlesticksParams): Promise; /** * Retrieves candlesticks for a product from Edge * @param params */ getEdgeCandlesticks(params: GetIndexerEdgeCandlesticksParams): Promise; /** * Retrieves historical snapshots for a product * @param params */ getProductSnapshots(params: GetIndexerProductSnapshotsParams): Promise; /** * Retrieves historical snapshots for multiple products * @param params */ getMultiProductSnapshots(params: GetIndexerMultiProductSnapshotsParams): Promise; /** * Retrieves historical events * * @param params */ getEvents(params: GetIndexerEventsParams): Promise; /** * Retrieves historical orders * @param params */ getOrders(params: GetIndexerOrdersParams): Promise; /** * Gets match order events, this will return the same events as the events query, but with additional information * to identify the order that was matched * * @param params */ getMatchEvents(params: GetIndexerMatchEventsParams): Promise; /** * Retrieves a subaccount's historical positions, ordered descending by `openId`. * Positions are tracked for every product except the quote product. * * The response also includes the boundary events (with their transactions) at each * position's open and close, or open and latest update while still open; join them * to positions via `openId` / `closeId` / `submissionIndex`. * * To paginate, pass the last returned position's `openId - 1` as the next request's * `startCursor`. * * @param params */ getPositions(params: GetIndexerPositionsParams): Promise; /** * Retrieves historical funding & interest payments. * NOTE: `limit` is an upperbound. If a user changes position size such that his position is 0 during each funding/interest tick, * then the indexer will return fewer than `limit` results per page. However, more events can be present. This means that * there isn't a reliable way to determine whether there is a next page. We just need to keep paginating until the next cursor is null. * * @param params */ getInterestFundingPayments(params: GetIndexerInterestFundingPaymentsParams): Promise; /** * Gets quote (USDT) price in terms of USD */ getQuotePrice(): Promise; /** * Fetches currently registered linked signer with the remaining txs allowed for the subaccount */ getLinkedSignerWithRateLimit(params: GetIndexerLinkedSignerParams): Promise; /** * Retrieve historical market snapshots * @param params */ getMarketSnapshots(params: GetIndexerMarketSnapshotsParams): Promise; /** * Retrieve historical market snapshots from Edge * @param params */ getEdgeMarketSnapshots(params: GetIndexerEdgeMarketSnapshotsParams): Promise; /** * Retrieve maker statistics for a given epoch * * @param params */ getMakerStatistics(params: GetIndexerMakerStatisticsParams): Promise; /** * Retrieve leaderboard stats for a given contest * * @param params */ getLeaderboard(params: GetIndexerLeaderboardParams): Promise; /** * Retrieve leaderboard ranking of a subaccount on a given contest * * @param params */ getLeaderboardParticipant(params: GetIndexerLeaderboardParticipantParams): Promise; /** * Registers a subaccount for one or more contests. Requires EIP-712 signing. * * @param params - Registration parameters including contest IDs and signing config. */ registerLeaderboard(params: RegisterLeaderboardParams): Promise; /** * Retrieves contest registrations for a subaccount. Supports batch lookup * across multiple contests with an optional active filter. * * @param params - Query parameters including subaccount and contest IDs. */ getLeaderboardRegistrations(params: GetIndexerLeaderboardRegistrationsParams): Promise; /** * Retrieve metadata of provided leaderboard contests * * @param params */ getLeaderboardContests(params: GetIndexerLeaderboardContestsParams): Promise; /** * Retrieve signature and tx to submit a fast withdrawal * * @param params */ getFastWithdrawalSignature(params: GetIndexerFastWithdrawalSignatureParams): Promise; getNlpSnapshots(params: GetIndexerNlpSnapshotsParams): Promise; /** * Retrieves the subaccount's DDA (Direct Deposit Address) * @param params */ getSubaccountDDA(params: GetIndexerSubaccountDDAParams): Promise; getSequencerBacklog(): Promise; /** * Retrieves private alpha choice information for a given address * @param params */ getPrivateAlphaChoice(params: GetIndexerPrivateAlphaChoiceParams): Promise; /** * Retrieves points information for a given address, including points per epoch and all-time points * @param params */ getPoints(params: GetIndexerPointsParams): Promise; /** * Retrieves xPoints information (Nado x xStocks points program) for a given address, * including per-epoch points, all-time points, and per-quest breakdowns. * @param params */ getXPoints(params: GetIndexerXPointsParams): Promise; /** * Retrieves cash incentives information for a given wallet address: per-event platform volume, * unlocked rewards, and `wallet.claim`, which carries the claim status plus the merkle proof when * that status is `claimable`. * @param params */ getCashIncentives(params: GetIndexerCashIncentivesParams): Promise; /** * Initiates a social account connection flow. Returns a URL the user must visit to complete the OAuth flow. * Requires EIP-712 signing. * * @param params - Connection parameters including provider and signing config. */ connectSocialAccount(params: ConnectSocialAccountParams): Promise; /** * Lists linked social accounts for a given address. * * @param params - Query parameters including the wallet address. */ listSocialAccounts(params: ListIndexerSocialAccountsParams): Promise; /** * Revokes a linked social account. Requires EIP-712 signing. * * @param params - Revocation parameters including provider and signing config. */ revokeSocialAccount(params: RevokeSocialAccountParams): Promise; /** * Get tickers from the v2 indexer endpoint * @param params */ getV2Tickers(params: GetIndexerV2TickersParams): Promise; /** * Get symbols with market hours from the v2 indexer endpoint * @param params */ getV2Symbols(params?: GetIndexerV2SymbolsParams): Promise; protected query(requestType: TRequestType, params: IndexerServerQueryRequestByType[TRequestType]): Promise; /** * Runs a query against the rewards endpoint, which serves leaderboard, points, * cash incentives, private alpha, and social account queries */ protected rewardsQuery(requestType: TRequestType, params: IndexerServerQueryRequestByType[TRequestType]): Promise; private queryWithUrl; protected sign(requestType: T, verifyingContract: string, chainId: number, params: SignableRequestTypeToParams[T]): Promise<`0x${string}`>; private checkResponseStatus; } //#endregion export { IndexerBaseClient, IndexerClientOpts }; //# sourceMappingURL=IndexerBaseClient.d.cts.map