@nadohq/indexer-client 0.1.0-alpha.13 → 0.1.0-alpha.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/IndexerBaseClient.cjs +1 -0
- package/dist/IndexerBaseClient.cjs.map +1 -1
- package/dist/IndexerBaseClient.js +1 -0
- package/dist/IndexerBaseClient.js.map +1 -1
- package/dist/IndexerClient.cjs +5 -4
- package/dist/IndexerClient.cjs.map +1 -1
- package/dist/IndexerClient.js +5 -2
- package/dist/IndexerClient.js.map +1 -1
- package/dist/dataMappers.d.cts +1 -1
- package/dist/dataMappers.d.ts +1 -1
- package/dist/index.cjs +4 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -9
- package/dist/index.d.ts +9 -9
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/types/clientTypes.cjs.map +1 -1
- package/dist/types/clientTypes.d.cts +2 -1
- package/dist/types/clientTypes.d.ts +2 -1
- package/dist/types/index.cjs +11 -11
- package/dist/types/index.cjs.map +1 -1
- package/dist/types/index.d.cts +5 -5
- package/dist/types/index.d.ts +5 -5
- package/dist/types/index.js +5 -5
- package/dist/types/index.js.map +1 -1
- package/dist/types/paginatedEventsTypes.cjs.map +1 -1
- package/dist/types/paginatedEventsTypes.d.cts +6 -6
- package/dist/types/paginatedEventsTypes.d.ts +6 -6
- package/dist/types/serverTypes.cjs.map +1 -1
- package/dist/types/serverTypes.d.cts +3 -1
- package/dist/types/serverTypes.d.ts +3 -1
- package/package.json +4 -4
- package/src/IndexerBaseClient.ts +1 -0
- package/src/IndexerClient.ts +8 -5
- package/src/index.ts +2 -2
- package/src/types/clientTypes.ts +2 -0
- package/src/types/index.ts +5 -5
- package/src/types/paginatedEventsTypes.ts +1 -1
- package/src/types/serverTypes.ts +7 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/IndexerClient.ts"],"sourcesContent":["import {\n ProductEngineType,\n QUOTE_PRODUCT_ID,\n subaccountFromHex,\n NLP_PRODUCT_ID,\n} from '@nadohq/shared';\nimport { toBigDecimal, toIntegerString } from '@nadohq/shared';\n\nimport { IndexerBaseClient } from './IndexerBaseClient';\nimport {\n BaseIndexerPaginatedEvent,\n CollateralEventType,\n GetIndexerPaginatedInterestFundingPaymentsResponse,\n GetIndexerPaginatedLeaderboardParams,\n GetIndexerPaginatedLeaderboardResponse,\n GetIndexerPaginatedOrdersParams,\n GetIndexerPaginatedOrdersResponse,\n GetIndexerSubaccountCollateralEventsParams,\n GetIndexerSubaccountCollateralEventsResponse,\n GetIndexerSubaccountInterestFundingPaymentsParams,\n GetIndexerSubaccountLiquidationEventsParams,\n GetIndexerSubaccountLiquidationEventsResponse,\n GetIndexerSubaccountMatchEventParams,\n GetIndexerSubaccountMatchEventsResponse,\n GetIndexerSubaccountSettlementEventsParams,\n GetIndexerSubaccountSettlementEventsResponse,\n GetIndexerSubaccountNlpEventsParams,\n GetIndexerSubaccountNlpEventsResponse,\n IndexerCollateralEvent,\n IndexerEventPerpStateSnapshot,\n IndexerEventSpotStateSnapshot,\n IndexerEventWithTx,\n IndexerLiquidationEvent,\n IndexerSettlementEvent,\n IndexerNlpEvent,\n PaginatedIndexerEventsResponse,\n} from './types';\n\n/**\n * Indexer client providing paginated queries for historical data from the Nado indexer service\n */\nexport class IndexerClient extends IndexerBaseClient {\n async getPaginatedSubaccountMatchEvents(\n params: GetIndexerSubaccountMatchEventParams,\n ): Promise<GetIndexerSubaccountMatchEventsResponse> {\n const {\n startCursor,\n maxTimestampInclusive,\n limit: requestedLimit,\n subaccountName,\n subaccountOwner,\n isolated,\n productIds,\n } = params;\n\n const limit = requestedLimit + 1;\n const events = await this.getMatchEvents({\n startCursor,\n maxTimestampInclusive,\n limit,\n subaccount: { subaccountName, subaccountOwner },\n productIds,\n isolated,\n });\n\n return this.getPaginationEventsResponse(events, requestedLimit);\n }\n\n async getPaginatedSubaccountNlpEvents(\n params: GetIndexerSubaccountNlpEventsParams,\n ): Promise<GetIndexerSubaccountNlpEventsResponse> {\n const {\n startCursor,\n maxTimestampInclusive,\n limit: requestedLimit,\n subaccountName,\n subaccountOwner,\n } = params;\n\n // There are 2 events per mint/burn for spot - one associated with the NLP product & the other with the primary quote\n const limit = requestedLimit + 1;\n const baseResponse = await this.getEvents({\n startCursor,\n maxTimestampInclusive,\n eventTypes: ['mint_nlp', 'burn_nlp'],\n limit: {\n type: 'txs',\n value: limit,\n },\n subaccount: { subaccountName, subaccountOwner },\n });\n\n // Now aggregate results by the submission index, use map to maintain insertion order\n const eventsBySubmissionIdx = new Map<string, IndexerNlpEvent>();\n\n baseResponse.forEach((event) => {\n const mappedEvent = (() => {\n const existingEvent = eventsBySubmissionIdx.get(event.submissionIndex);\n if (existingEvent) {\n return existingEvent;\n }\n\n const newEvent: IndexerNlpEvent = {\n nlpDelta: toBigDecimal(0),\n primaryQuoteDelta: toBigDecimal(0),\n timestamp: event.timestamp,\n submissionIndex: event.submissionIndex,\n tx: event.tx,\n ...subaccountFromHex(event.subaccount),\n };\n eventsBySubmissionIdx.set(event.submissionIndex, newEvent);\n\n return newEvent;\n })();\n\n const balanceDelta = event.state.postBalance.amount.minus(\n event.state.preBalance.amount,\n );\n\n const productId = event.state.market.productId;\n if (productId === QUOTE_PRODUCT_ID) {\n mappedEvent.primaryQuoteDelta = balanceDelta;\n } else if (productId === NLP_PRODUCT_ID) {\n mappedEvent.nlpDelta = balanceDelta;\n } else {\n throw Error(`Invalid product ID for NLP event ${productId}`);\n }\n });\n\n // Force cast to get rid of the `Partial`\n const events = Array.from(eventsBySubmissionIdx.values());\n return this.getPaginationEventsResponse(events, requestedLimit);\n }\n\n async getPaginatedSubaccountCollateralEvents(\n params: GetIndexerSubaccountCollateralEventsParams,\n ): Promise<GetIndexerSubaccountCollateralEventsResponse> {\n const {\n startCursor,\n maxTimestampInclusive,\n limit: requestedLimit,\n subaccountName,\n subaccountOwner,\n eventTypes,\n isolated,\n } = params;\n\n const limit = requestedLimit + 1;\n const baseResponse = await this.getEvents({\n startCursor,\n maxTimestampInclusive,\n eventTypes: eventTypes ?? [\n 'deposit_collateral',\n 'withdraw_collateral',\n 'transfer_quote',\n ],\n limit: {\n type: 'txs',\n value: limit,\n },\n subaccount: { subaccountName, subaccountOwner },\n isolated,\n });\n\n const events = baseResponse.map((event): IndexerCollateralEvent => {\n if (event.state.type !== ProductEngineType.SPOT) {\n throw Error('Incorrect event state for collateral event');\n }\n\n return {\n timestamp: event.timestamp,\n // This cast is safe as the query param restricts to collateral events\n eventType: event.eventType as CollateralEventType,\n submissionIndex: event.submissionIndex,\n snapshot: event.state,\n amount: event.state.postBalance.amount.minus(\n event.state.preBalance.amount,\n ),\n newAmount: event.state.postBalance.amount,\n tx: event.tx,\n ...subaccountFromHex(event.subaccount),\n };\n });\n\n return this.getPaginationEventsResponse(events, requestedLimit);\n }\n\n async getPaginatedSubaccountOrders(\n params: GetIndexerPaginatedOrdersParams,\n ): Promise<GetIndexerPaginatedOrdersResponse> {\n const {\n startCursor,\n maxTimestampInclusive,\n limit: requestedLimit,\n subaccountName,\n subaccountOwner,\n productIds,\n isolated,\n } = params;\n\n const limit = requestedLimit + 1;\n const baseResponse = await this.getOrders({\n startCursor,\n maxTimestampInclusive,\n subaccount: { subaccountName, subaccountOwner },\n limit,\n productIds,\n isolated,\n });\n\n // Same pagination meta logic as events, but duplicate for now as this return type is slightly different\n const truncatedOrders = baseResponse.slice(0, requestedLimit);\n const hasMore = baseResponse.length > truncatedOrders.length;\n return {\n meta: {\n hasMore,\n nextCursor: baseResponse[truncatedOrders.length]?.submissionIndex,\n },\n orders: truncatedOrders,\n };\n }\n\n async getPaginatedSubaccountSettlementEvents(\n params: GetIndexerSubaccountSettlementEventsParams,\n ): Promise<GetIndexerSubaccountSettlementEventsResponse> {\n const {\n startCursor,\n maxTimestampInclusive,\n limit: requestedLimit,\n subaccountName,\n subaccountOwner,\n } = params;\n\n // Each settlement has a quote & perp balance change, so 2 events per settlement tx\n const limit = requestedLimit + 1;\n const baseResponse = await this.getEvents({\n startCursor,\n maxTimestampInclusive,\n eventTypes: ['settle_pnl'],\n limit: {\n type: 'txs',\n value: limit,\n },\n subaccount: { subaccountName, subaccountOwner },\n });\n\n const events = baseResponse\n .map((event): IndexerSettlementEvent | undefined => {\n if (event.state.market.productId === QUOTE_PRODUCT_ID) {\n return;\n }\n if (event.state.type !== ProductEngineType.PERP) {\n throw Error('Incorrect event state for settlement event');\n }\n\n return {\n timestamp: event.timestamp,\n submissionIndex: event.submissionIndex,\n snapshot: event.state,\n // Spot quote delta = -vQuote delta\n quoteDelta: event.state.preBalance.vQuoteBalance.minus(\n event.state.postBalance.vQuoteBalance,\n ),\n isolated: event.isolated,\n tx: event.tx,\n ...subaccountFromHex(event.subaccount),\n };\n })\n .filter((event): event is IndexerSettlementEvent => !!event);\n\n return this.getPaginationEventsResponse(events, requestedLimit);\n }\n\n async getPaginatedSubaccountLiquidationEvents(\n params: GetIndexerSubaccountLiquidationEventsParams,\n ): Promise<GetIndexerSubaccountLiquidationEventsResponse> {\n const {\n startCursor,\n maxTimestampInclusive,\n limit: requestedLimit,\n subaccountName,\n subaccountOwner,\n } = params;\n\n // There is 1 event emitted per product, including quote\n // However, if the balance change is 0, then the liquidation did not touch the product\n // A tx operates on a given health group, so only a spot & its associated perp can be actually liquidated within a single tx\n // with an associated quote balance change\n const limit = requestedLimit + 1;\n const baseResponse = await this.getEvents({\n startCursor,\n maxTimestampInclusive,\n eventTypes: ['liquidate_subaccount'],\n limit: {\n type: 'txs',\n value: limit,\n },\n subaccount: { subaccountName, subaccountOwner },\n });\n\n // Now aggregate results by the submission index, use map to maintain insertion order\n const eventsBySubmissionIdx = new Map<\n string,\n Partial<IndexerLiquidationEvent>\n >();\n\n baseResponse.forEach((event) => {\n const mappedEvent = (() => {\n const existingEvent = eventsBySubmissionIdx.get(event.submissionIndex);\n if (existingEvent) {\n return existingEvent;\n }\n\n const newEvent: Partial<IndexerLiquidationEvent> = {\n perp: undefined,\n spot: undefined,\n quote: undefined,\n timestamp: event.timestamp,\n submissionIndex: event.submissionIndex,\n };\n\n return newEvent;\n })();\n\n // The original balance is the negated delta\n const balanceDelta = event.state.postBalance.amount.minus(\n event.state.preBalance.amount,\n );\n\n // Event without balance change - not part of this liq\n // However, we could have zero balance changes for the quote product if this was a partial liquidation\n if (\n balanceDelta.isZero() &&\n event.state.market.productId !== QUOTE_PRODUCT_ID\n ) {\n return;\n }\n\n if (event.state.type === ProductEngineType.PERP) {\n mappedEvent.perp = {\n amountLiquidated: balanceDelta.negated(),\n // This cast is safe because we're checking for event.state.type\n indexerEvent:\n event as IndexerEventWithTx<IndexerEventPerpStateSnapshot>,\n };\n } else if (event.state.market.productId === QUOTE_PRODUCT_ID) {\n mappedEvent.quote = {\n balanceDelta,\n indexerEvent:\n event as IndexerEventWithTx<IndexerEventSpotStateSnapshot>,\n };\n } else {\n mappedEvent.spot = {\n amountLiquidated: balanceDelta.negated(),\n indexerEvent:\n event as IndexerEventWithTx<IndexerEventSpotStateSnapshot>,\n };\n }\n\n eventsBySubmissionIdx.set(event.submissionIndex, mappedEvent);\n });\n\n // Force cast to get rid of the `Partial`\n const events = Array.from(\n eventsBySubmissionIdx.values(),\n ) as IndexerLiquidationEvent[];\n return this.getPaginationEventsResponse(events, requestedLimit);\n }\n\n /**\n * Get all interest funding payments for a given subaccount with the standard pagination response\n * This is a simple wrapper over the underlying `getInterestFundingPayments` function. Very little\n * additional processing is needed because the endpoint is well structured for pagination\n *\n * @param params\n */\n async getPaginatedSubaccountInterestFundingPayments(\n params: GetIndexerSubaccountInterestFundingPaymentsParams,\n ): Promise<GetIndexerPaginatedInterestFundingPaymentsResponse> {\n const {\n limit,\n productIds,\n startCursor,\n maxTimestampInclusive,\n subaccountName,\n subaccountOwner,\n } = params;\n const baseResponse = await this.getInterestFundingPayments({\n limit,\n productIds,\n startCursor,\n maxTimestampInclusive,\n subaccount: {\n subaccountName,\n subaccountOwner,\n },\n });\n\n return {\n ...baseResponse,\n meta: {\n hasMore: baseResponse.nextCursor != null,\n nextCursor: baseResponse.nextCursor ?? undefined,\n },\n };\n }\n\n /**\n * Paginated leaderboard query that paginates on rank number.\n *\n * @param params\n */\n async getPaginatedLeaderboard(\n params: GetIndexerPaginatedLeaderboardParams,\n ): Promise<GetIndexerPaginatedLeaderboardResponse> {\n const requestedLimit = params.limit;\n\n const baseResponse = await this.getLeaderboard({\n contestId: params.contestId,\n rankType: params.rankType,\n // Query for 1 more result for proper pagination\n limit: requestedLimit + 1,\n // Start cursor is the next rank number\n startCursor: params.startCursor,\n });\n\n // Next cursor is the rank number of the (requestedLimit+1)th item\n const nextCursor =\n params.rankType === 'pnl'\n ? baseResponse.participants[requestedLimit]?.pnlRank\n : baseResponse.participants[requestedLimit]?.roiRank;\n\n return {\n ...baseResponse,\n // Truncate the response to the requested limit\n participants: baseResponse.participants.slice(0, requestedLimit),\n meta: {\n hasMore: baseResponse.participants.length > requestedLimit,\n nextCursor:\n nextCursor !== undefined ? toIntegerString(nextCursor) : undefined,\n },\n };\n }\n\n /**\n * A util function to generate the standard pagination response for events\n * @param events\n * @param requestedLimit given by consumers of the SDK\n * @private\n */\n private getPaginationEventsResponse<T extends BaseIndexerPaginatedEvent>(\n events: T[],\n requestedLimit: number,\n ): PaginatedIndexerEventsResponse<T> {\n const truncatedEvents = events.slice(0, requestedLimit);\n const hasMore = events.length > truncatedEvents.length;\n\n return {\n events: truncatedEvents,\n meta: {\n hasMore,\n // We want the NEXT available cursor, so we use the first event after the truncation cutoff\n // If len(events) === len(truncatedEvents), there are no more entries and this is undefined\n nextCursor: events[truncatedEvents.length]?.submissionIndex,\n },\n };\n }\n}\n"],"mappings":";AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,cAAc,uBAAuB;AAE9C,SAAS,yBAAyB;AAiC3B,IAAM,gBAAN,cAA4B,kBAAkB;AAAA,EACnD,MAAM,kCACJ,QACkD;AAClD,UA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AAa,aAAa,cAAc,GAAG;AAEjD,WAAO;AAAA,MACL,GAAG;AAAA;AAAA,MAEH,cAAc,aAAa,aAAa,MAAM,GAAG,cAAc;AAAA,MAC/D,MAAM;AAAA,QACJ,SAAS,aAAa,aAAa,SAAS;AAAA,QAC5C,YACE,eAAe,SAAY,gBAAgB,UAAU,IAAI;AAAA,MAC7D;AAAA,IACF;AAAA,EACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQQ,4BACN,QACA,gBACmC;AACnC,UAAM,kBAAkB,OAAO,MAAM,GAAG,cAAc;AACtD,UAAM,UAAU,OAAO,SAAS,gBAAgB;AAEhD,WAAO;AAAA,MACL,QAAQ;AAAA,MACR,MAAM;AAAA,QACJ;AAAA;AAAA;AAAA,QAGA,YAAY,OAAO,gBAAgB,MAAM,GAAG;AAAA,MAC9C;AAAA,IACF;AAAA,EACF;AACF;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../src/IndexerClient.ts"],"sourcesContent":["import {\n NLP_PRODUCT_ID,\n ProductEngineType,\n QUOTE_PRODUCT_ID,\n subaccountFromHex,\n toBigDecimal,\n toIntegerString,\n} from '@nadohq/shared';\n\nimport { IndexerBaseClient } from './IndexerBaseClient';\nimport {\n BaseIndexerPaginatedEvent,\n CollateralEventType,\n GetIndexerPaginatedInterestFundingPaymentsResponse,\n GetIndexerPaginatedLeaderboardParams,\n GetIndexerPaginatedLeaderboardResponse,\n GetIndexerPaginatedOrdersParams,\n GetIndexerPaginatedOrdersResponse,\n GetIndexerSubaccountCollateralEventsParams,\n GetIndexerSubaccountCollateralEventsResponse,\n GetIndexerSubaccountInterestFundingPaymentsParams,\n GetIndexerSubaccountLiquidationEventsParams,\n GetIndexerSubaccountLiquidationEventsResponse,\n GetIndexerSubaccountMatchEventParams,\n GetIndexerSubaccountMatchEventsResponse,\n GetIndexerSubaccountNlpEventsParams,\n GetIndexerSubaccountNlpEventsResponse,\n GetIndexerSubaccountSettlementEventsParams,\n GetIndexerSubaccountSettlementEventsResponse,\n IndexerCollateralEvent,\n IndexerEventPerpStateSnapshot,\n IndexerEventSpotStateSnapshot,\n IndexerEventWithTx,\n IndexerLiquidationEvent,\n IndexerNlpEvent,\n IndexerSettlementEvent,\n PaginatedIndexerEventsResponse,\n} from './types';\n\n/**\n * Indexer client providing paginated queries for historical data from the Nado indexer service\n */\nexport class IndexerClient extends IndexerBaseClient {\n async getPaginatedSubaccountMatchEvents(\n params: GetIndexerSubaccountMatchEventParams,\n ): Promise<GetIndexerSubaccountMatchEventsResponse> {\n const {\n startCursor,\n maxTimestampInclusive,\n limit: requestedLimit,\n subaccountName,\n subaccountOwner,\n isolated,\n productIds,\n } = params;\n\n const limit = requestedLimit + 1;\n const events = await this.getMatchEvents({\n startCursor,\n maxTimestampInclusive,\n limit,\n subaccount: { subaccountName, subaccountOwner },\n productIds,\n isolated,\n });\n\n return this.getPaginationEventsResponse(events, requestedLimit);\n }\n\n async getPaginatedSubaccountNlpEvents(\n params: GetIndexerSubaccountNlpEventsParams,\n ): Promise<GetIndexerSubaccountNlpEventsResponse> {\n const {\n startCursor,\n maxTimestampInclusive,\n limit: requestedLimit,\n subaccountName,\n subaccountOwner,\n } = params;\n\n // There are 2 events per mint/burn for spot - one associated with the NLP product & the other with the primary quote\n const limit = requestedLimit + 1;\n const baseResponse = await this.getEvents({\n startCursor,\n maxTimestampInclusive,\n eventTypes: ['mint_nlp', 'burn_nlp'],\n limit: {\n type: 'txs',\n value: limit,\n },\n subaccount: { subaccountName, subaccountOwner },\n });\n\n // Now aggregate results by the submission index, use map to maintain insertion order\n const eventsBySubmissionIdx = new Map<string, IndexerNlpEvent>();\n\n baseResponse.forEach((event) => {\n const mappedEvent = (() => {\n const existingEvent = eventsBySubmissionIdx.get(event.submissionIndex);\n if (existingEvent) {\n return existingEvent;\n }\n\n const newEvent: IndexerNlpEvent = {\n nlpDelta: toBigDecimal(0),\n primaryQuoteDelta: toBigDecimal(0),\n timestamp: event.timestamp,\n submissionIndex: event.submissionIndex,\n tx: event.tx,\n ...subaccountFromHex(event.subaccount),\n };\n eventsBySubmissionIdx.set(event.submissionIndex, newEvent);\n\n return newEvent;\n })();\n\n const balanceDelta = event.state.postBalance.amount.minus(\n event.state.preBalance.amount,\n );\n\n const productId = event.state.market.productId;\n if (productId === QUOTE_PRODUCT_ID) {\n mappedEvent.primaryQuoteDelta = balanceDelta;\n } else if (productId === NLP_PRODUCT_ID) {\n mappedEvent.nlpDelta = balanceDelta;\n } else {\n throw Error(`Invalid product ID for NLP event ${productId}`);\n }\n });\n\n // Force cast to get rid of the `Partial`\n const events = Array.from(eventsBySubmissionIdx.values());\n return this.getPaginationEventsResponse(events, requestedLimit);\n }\n\n async getPaginatedSubaccountCollateralEvents(\n params: GetIndexerSubaccountCollateralEventsParams,\n ): Promise<GetIndexerSubaccountCollateralEventsResponse> {\n const {\n startCursor,\n maxTimestampInclusive,\n limit: requestedLimit,\n subaccountName,\n subaccountOwner,\n eventTypes,\n isolated,\n } = params;\n\n const limit = requestedLimit + 1;\n const baseResponse = await this.getEvents({\n startCursor,\n maxTimestampInclusive,\n eventTypes: eventTypes ?? [\n 'deposit_collateral',\n 'withdraw_collateral',\n 'transfer_quote',\n ],\n limit: {\n type: 'txs',\n value: limit,\n },\n subaccount: { subaccountName, subaccountOwner },\n isolated,\n });\n\n const events = baseResponse.map((event): IndexerCollateralEvent => {\n if (event.state.type !== ProductEngineType.SPOT) {\n throw Error('Incorrect event state for collateral event');\n }\n\n return {\n timestamp: event.timestamp,\n // This cast is safe as the query param restricts to collateral events\n eventType: event.eventType as CollateralEventType,\n submissionIndex: event.submissionIndex,\n snapshot: event.state,\n amount: event.state.postBalance.amount.minus(\n event.state.preBalance.amount,\n ),\n newAmount: event.state.postBalance.amount,\n tx: event.tx,\n ...subaccountFromHex(event.subaccount),\n };\n });\n\n return this.getPaginationEventsResponse(events, requestedLimit);\n }\n\n async getPaginatedSubaccountOrders(\n params: GetIndexerPaginatedOrdersParams,\n ): Promise<GetIndexerPaginatedOrdersResponse> {\n const {\n startCursor,\n maxTimestampInclusive,\n limit: requestedLimit,\n subaccountName,\n subaccountOwner,\n productIds,\n triggerTypes,\n isolated,\n } = params;\n\n const limit = requestedLimit + 1;\n const baseResponse = await this.getOrders({\n startCursor,\n maxTimestampInclusive,\n subaccount: { subaccountName, subaccountOwner },\n limit,\n productIds,\n triggerTypes,\n isolated,\n });\n\n // Same pagination meta logic as events, but duplicate for now as this return type is slightly different\n const truncatedOrders = baseResponse.slice(0, requestedLimit);\n const hasMore = baseResponse.length > truncatedOrders.length;\n return {\n meta: {\n hasMore,\n nextCursor: baseResponse[truncatedOrders.length]?.submissionIndex,\n },\n orders: truncatedOrders,\n };\n }\n\n async getPaginatedSubaccountSettlementEvents(\n params: GetIndexerSubaccountSettlementEventsParams,\n ): Promise<GetIndexerSubaccountSettlementEventsResponse> {\n const {\n startCursor,\n maxTimestampInclusive,\n limit: requestedLimit,\n subaccountName,\n subaccountOwner,\n } = params;\n\n // Each settlement has a quote & perp balance change, so 2 events per settlement tx\n const limit = requestedLimit + 1;\n const baseResponse = await this.getEvents({\n startCursor,\n maxTimestampInclusive,\n eventTypes: ['settle_pnl'],\n limit: {\n type: 'txs',\n value: limit,\n },\n subaccount: { subaccountName, subaccountOwner },\n });\n\n const events = baseResponse\n .map((event): IndexerSettlementEvent | undefined => {\n if (event.state.market.productId === QUOTE_PRODUCT_ID) {\n return;\n }\n if (event.state.type !== ProductEngineType.PERP) {\n throw Error('Incorrect event state for settlement event');\n }\n\n return {\n timestamp: event.timestamp,\n submissionIndex: event.submissionIndex,\n snapshot: event.state,\n // Spot quote delta = -vQuote delta\n quoteDelta: event.state.preBalance.vQuoteBalance.minus(\n event.state.postBalance.vQuoteBalance,\n ),\n isolated: event.isolated,\n tx: event.tx,\n ...subaccountFromHex(event.subaccount),\n };\n })\n .filter((event): event is IndexerSettlementEvent => !!event);\n\n return this.getPaginationEventsResponse(events, requestedLimit);\n }\n\n async getPaginatedSubaccountLiquidationEvents(\n params: GetIndexerSubaccountLiquidationEventsParams,\n ): Promise<GetIndexerSubaccountLiquidationEventsResponse> {\n const {\n startCursor,\n maxTimestampInclusive,\n limit: requestedLimit,\n subaccountName,\n subaccountOwner,\n } = params;\n\n // There is 1 event emitted per product, including quote\n // However, if the balance change is 0, then the liquidation did not touch the product\n // A tx operates on a given health group, so only a spot & its associated perp can be actually liquidated within a single tx\n // with an associated quote balance change\n const limit = requestedLimit + 1;\n const baseResponse = await this.getEvents({\n startCursor,\n maxTimestampInclusive,\n eventTypes: ['liquidate_subaccount'],\n limit: {\n type: 'txs',\n value: limit,\n },\n subaccount: { subaccountName, subaccountOwner },\n });\n\n // Now aggregate results by the submission index, use map to maintain insertion order\n const eventsBySubmissionIdx = new Map<\n string,\n Partial<IndexerLiquidationEvent>\n >();\n\n baseResponse.forEach((event) => {\n const mappedEvent = (() => {\n const existingEvent = eventsBySubmissionIdx.get(event.submissionIndex);\n if (existingEvent) {\n return existingEvent;\n }\n\n const newEvent: Partial<IndexerLiquidationEvent> = {\n perp: undefined,\n spot: undefined,\n quote: undefined,\n timestamp: event.timestamp,\n submissionIndex: event.submissionIndex,\n };\n\n return newEvent;\n })();\n\n // The original balance is the negated delta\n const balanceDelta = event.state.postBalance.amount.minus(\n event.state.preBalance.amount,\n );\n\n // Event without balance change - not part of this liq\n // However, we could have zero balance changes for the quote product if this was a partial liquidation\n if (\n balanceDelta.isZero() &&\n event.state.market.productId !== QUOTE_PRODUCT_ID\n ) {\n return;\n }\n\n if (event.state.type === ProductEngineType.PERP) {\n mappedEvent.perp = {\n amountLiquidated: balanceDelta.negated(),\n // This cast is safe because we're checking for event.state.type\n indexerEvent:\n event as IndexerEventWithTx<IndexerEventPerpStateSnapshot>,\n };\n } else if (event.state.market.productId === QUOTE_PRODUCT_ID) {\n mappedEvent.quote = {\n balanceDelta,\n indexerEvent:\n event as IndexerEventWithTx<IndexerEventSpotStateSnapshot>,\n };\n } else {\n mappedEvent.spot = {\n amountLiquidated: balanceDelta.negated(),\n indexerEvent:\n event as IndexerEventWithTx<IndexerEventSpotStateSnapshot>,\n };\n }\n\n eventsBySubmissionIdx.set(event.submissionIndex, mappedEvent);\n });\n\n // Force cast to get rid of the `Partial`\n const events = Array.from(\n eventsBySubmissionIdx.values(),\n ) as IndexerLiquidationEvent[];\n return this.getPaginationEventsResponse(events, requestedLimit);\n }\n\n /**\n * Get all interest funding payments for a given subaccount with the standard pagination response\n * This is a simple wrapper over the underlying `getInterestFundingPayments` function. Very little\n * additional processing is needed because the endpoint is well structured for pagination\n *\n * @param params\n */\n async getPaginatedSubaccountInterestFundingPayments(\n params: GetIndexerSubaccountInterestFundingPaymentsParams,\n ): Promise<GetIndexerPaginatedInterestFundingPaymentsResponse> {\n const {\n limit,\n productIds,\n startCursor,\n maxTimestampInclusive,\n subaccountName,\n subaccountOwner,\n } = params;\n const baseResponse = await this.getInterestFundingPayments({\n limit,\n productIds,\n startCursor,\n maxTimestampInclusive,\n subaccount: {\n subaccountName,\n subaccountOwner,\n },\n });\n\n return {\n ...baseResponse,\n meta: {\n hasMore: baseResponse.nextCursor != null,\n nextCursor: baseResponse.nextCursor ?? undefined,\n },\n };\n }\n\n /**\n * Paginated leaderboard query that paginates on rank number.\n *\n * @param params\n */\n async getPaginatedLeaderboard(\n params: GetIndexerPaginatedLeaderboardParams,\n ): Promise<GetIndexerPaginatedLeaderboardResponse> {\n const requestedLimit = params.limit;\n\n const baseResponse = await this.getLeaderboard({\n contestId: params.contestId,\n rankType: params.rankType,\n // Query for 1 more result for proper pagination\n limit: requestedLimit + 1,\n // Start cursor is the next rank number\n startCursor: params.startCursor,\n });\n\n // Next cursor is the rank number of the (requestedLimit+1)th item\n const nextCursor =\n params.rankType === 'pnl'\n ? baseResponse.participants[requestedLimit]?.pnlRank\n : baseResponse.participants[requestedLimit]?.roiRank;\n\n return {\n ...baseResponse,\n // Truncate the response to the requested limit\n participants: baseResponse.participants.slice(0, requestedLimit),\n meta: {\n hasMore: baseResponse.participants.length > requestedLimit,\n nextCursor:\n nextCursor !== undefined ? toIntegerString(nextCursor) : undefined,\n },\n };\n }\n\n /**\n * A util function to generate the standard pagination response for events\n * @param events\n * @param requestedLimit given by consumers of the SDK\n * @private\n */\n private getPaginationEventsResponse<T extends BaseIndexerPaginatedEvent>(\n events: T[],\n requestedLimit: number,\n ): PaginatedIndexerEventsResponse<T> {\n const truncatedEvents = events.slice(0, requestedLimit);\n const hasMore = events.length > truncatedEvents.length;\n\n return {\n events: truncatedEvents,\n meta: {\n hasMore,\n // We want the NEXT available cursor, so we use the first event after the truncation cutoff\n // If len(events) === len(truncatedEvents), there are no more entries and this is undefined\n nextCursor: events[truncatedEvents.length]?.submissionIndex,\n },\n };\n }\n}\n"],"mappings":";AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,SAAS,yBAAyB;AAiC3B,IAAM,gBAAN,cAA4B,kBAAkB;AAAA,EACnD,MAAM,kCACJ,QACkD;AAClD,UAAM;AAAA,MACJ;AAAA,MACA;AAAA,MACA,OAAO;AAAA,MACP;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF,IAAI;AAEJ,UAAM,QAAQ,iBAAiB;AAC/B,UAAM,SAAS,MAAM,KAAK,eAAe;AAAA,MACvC;AAAA,MACA;AAAA,MACA;AAAA,MACA,YAAY,EAAE,gBAAgB,gBAAgB;AAAA,MAC9C;AAAA,MACA;AAAA,IACF,CAAC;AAED,WAAO,KAAK,4BAA4B,QAAQ,cAAc;AAAA,EAChE;AAAA,EAEA,MAAM,gCACJ,QACgD;AAChD,UAAM;AAAA,MACJ;AAAA,MACA;AAAA,MACA,OAAO;AAAA,MACP;AAAA,MACA;AAAA,IACF,IAAI;AAGJ,UAAM,QAAQ,iBAAiB;AAC/B,UAAM,eAAe,MAAM,KAAK,UAAU;AAAA,MACxC;AAAA,MACA;AAAA,MACA,YAAY,CAAC,YAAY,UAAU;AAAA,MACnC,OA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ataMappers.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Market } from '@nadohq/shared';
|
|
2
2
|
import { IndexerSnapshotsIntervalParams, IndexerSpotBalance, IndexerPerpBalance, IndexerOrder, IndexerEvent, IndexerEventWithTx, IndexerMatchEventBalances, IndexerProductPayment, IndexerPerpPrices, IndexerFundingRate, IndexerMaker, IndexerLeaderboardParticipant, IndexerLeaderboardRegistration, IndexerLeaderboardContest, Candlestick, IndexerMarketSnapshot, IndexerNlpSnapshot } from './types/clientTypes.cjs';
|
|
3
|
-
import { IndexerServerPerpPrices, IndexerServerFundingRate } from './types/serverTypes.cjs';
|
|
4
3
|
import { IndexerServerSnapshotsInterval, IndexerServerProduct, IndexerServerBalance, IndexerServerOrder, IndexerServerEvent, IndexerServerTx, IndexerServerMatchEventBalances, IndexerServerProductPayment, IndexerServerMaker, IndexerServerLeaderboardPosition, IndexerServerLeaderboardRegistration, IndexerServerLeaderboardContest, IndexerServerCandlestick, IndexerServerMarketSnapshot, IndexerServerNlpSnapshot } from './types/serverModelTypes.cjs';
|
|
4
|
+
import { IndexerServerPerpPrices, IndexerServerFundingRate } from './types/serverTypes.cjs';
|
|
5
5
|
import 'viem';
|
|
6
6
|
import './types/CandlestickPeriod.cjs';
|
|
7
7
|
import './types/IndexerEventType.cjs';
|
package/dist/dataMappers.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Market } from '@nadohq/shared';
|
|
2
2
|
import { IndexerSnapshotsIntervalParams, IndexerSpotBalance, IndexerPerpBalance, IndexerOrder, IndexerEvent, IndexerEventWithTx, IndexerMatchEventBalances, IndexerProductPayment, IndexerPerpPrices, IndexerFundingRate, IndexerMaker, IndexerLeaderboardParticipant, IndexerLeaderboardRegistration, IndexerLeaderboardContest, Candlestick, IndexerMarketSnapshot, IndexerNlpSnapshot } from './types/clientTypes.js';
|
|
3
|
-
import { IndexerServerPerpPrices, IndexerServerFundingRate } from './types/serverTypes.js';
|
|
4
3
|
import { IndexerServerSnapshotsInterval, IndexerServerProduct, IndexerServerBalance, IndexerServerOrder, IndexerServerEvent, IndexerServerTx, IndexerServerMatchEventBalances, IndexerServerProductPayment, IndexerServerMaker, IndexerServerLeaderboardPosition, IndexerServerLeaderboardRegistration, IndexerServerLeaderboardContest, IndexerServerCandlestick, IndexerServerMarketSnapshot, IndexerServerNlpSnapshot } from './types/serverModelTypes.js';
|
|
4
|
+
import { IndexerServerPerpPrices, IndexerServerFundingRate } from './types/serverTypes.js';
|
|
5
5
|
import 'viem';
|
|
6
6
|
import './types/CandlestickPeriod.js';
|
|
7
7
|
import './types/IndexerEventType.js';
|
package/dist/index.cjs
CHANGED
|
@@ -17,15 +17,15 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
17
17
|
// src/index.ts
|
|
18
18
|
var index_exports = {};
|
|
19
19
|
module.exports = __toCommonJS(index_exports);
|
|
20
|
-
__reExport(index_exports, require("./types/index.cjs"), module.exports);
|
|
21
|
-
__reExport(index_exports, require("./IndexerClient.cjs"), module.exports);
|
|
22
20
|
__reExport(index_exports, require("./endpoints.cjs"), module.exports);
|
|
21
|
+
__reExport(index_exports, require("./IndexerClient.cjs"), module.exports);
|
|
22
|
+
__reExport(index_exports, require("./types/index.cjs"), module.exports);
|
|
23
23
|
__reExport(index_exports, require("./utils/index.cjs"), module.exports);
|
|
24
24
|
// Annotate the CommonJS export names for ESM import in node:
|
|
25
25
|
0 && (module.exports = {
|
|
26
|
-
...require("./types/index.cjs"),
|
|
27
|
-
...require("./IndexerClient.cjs"),
|
|
28
26
|
...require("./endpoints.cjs"),
|
|
27
|
+
...require("./IndexerClient.cjs"),
|
|
28
|
+
...require("./types/index.cjs"),
|
|
29
29
|
...require("./utils/index.cjs")
|
|
30
30
|
});
|
|
31
31
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export * from './
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export * from './endpoints';\nexport * from './IndexerClient';\nexport * from './types';\nexport * from './utils';\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,0BAAc,4BAAd;AACA,0BAAc,gCADd;AAEA,0BAAc,8BAFd;AAGA,0BAAc,8BAHd;","names":[]}
|
package/dist/index.d.cts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
3
|
-
export { IndexerEdgeServerCandlesticksParams, IndexerEdgeServerCandlesticksResponse, IndexerEdgeServerMarketSnapshotsParams, IndexerEdgeServerMarketSnapshotsResponse, IndexerServerBacklogResponse, IndexerServerCandlesticksParams, IndexerServerCandlesticksResponse, IndexerServerDDAQueryParams, IndexerServerDDAResponse, IndexerServerEventsParams, IndexerServerEventsResponse, IndexerServerFastWithdrawalSignatureParams, IndexerServerFastWithdrawalSignatureResponse, IndexerServerFundingRate, IndexerServerFundingRateParams, IndexerServerFundingRateResponse, IndexerServerFundingRatesParams, IndexerServerFundingRatesResponse, IndexerServerInterestFundingParams, IndexerServerInterestFundingResponse, IndexerServerLeaderboardContestsParams, IndexerServerLeaderboardContestsResponse, IndexerServerLeaderboardParams, IndexerServerLeaderboardRankParams, IndexerServerLeaderboardRankResponse, IndexerServerLeaderboardRegistrationParams, IndexerServerLeaderboardRegistrationResponse, IndexerServerLeaderboardResponse, IndexerServerLinkedSignerParams, IndexerServerLinkedSignerResponse, IndexerServerListSubaccountsParams, IndexerServerListSubaccountsResponse, IndexerServerMakerStatisticsParams, IndexerServerMakerStatisticsResponse, IndexerServerMarketSnapshotsParams, IndexerServerMarketSnapshotsResponse, IndexerServerMatchEventsParams, IndexerServerMatchEventsResponse, IndexerServerMultiProductsParams, IndexerServerMultiProductsResponse, IndexerServerMultiSubaccountSnapshotsParams, IndexerServerMultiSubaccountSnapshotsResponse, IndexerServerNlpSnapshotsParams, IndexerServerNlpSnapshotsResponse, IndexerServerOraclePricesParams, IndexerServerOraclePricesResponse, IndexerServerOrdersParams, IndexerServerOrdersResponse, IndexerServerPerpPrices, IndexerServerPerpPricesParams, IndexerServerPerpPricesResponse, IndexerServerPriceParams, IndexerServerPriceResponse, IndexerServerProductsParams, IndexerServerProductsResponse, IndexerServerQueryRequestByType, IndexerServerQueryRequestType, IndexerServerQueryResponseByType, IndexerServerReferralCodeParams, IndexerServerReferralCodeResponse, IndexerServerUsdcPriceResponse } from './types/serverTypes.cjs';
|
|
4
|
-
export { IndexerServerBalance, IndexerServerCandlestick, IndexerServerEvent, IndexerServerLeaderboardContest, IndexerServerLeaderboardPosition, IndexerServerLeaderboardRegistration, IndexerServerMaker, IndexerServerMakerData, IndexerServerMarketSnapshot, IndexerServerMarketSnapshotInterval, IndexerServerMatchEvent, IndexerServerMatchEventBalances, IndexerServerNlpSnapshot, IndexerServerOraclePrice, IndexerServerOrder, IndexerServerProduct, IndexerServerProductPayment, IndexerServerProductSnapshot, IndexerServerSnapshotsInterval, IndexerServerTx } from './types/serverModelTypes.cjs';
|
|
1
|
+
export { INDEXER_CLIENT_ENDPOINTS } from './endpoints.cjs';
|
|
2
|
+
export { IndexerClient } from './IndexerClient.cjs';
|
|
5
3
|
export { CandlestickPeriod } from './types/CandlestickPeriod.cjs';
|
|
4
|
+
export { Candlestick, GetIndexerBacklogResponse, GetIndexerCandlesticksParams, GetIndexerCandlesticksResponse, GetIndexerEdgeCandlesticksParams, GetIndexerEdgeCandlesticksResponse, GetIndexerEdgeMarketSnapshotResponse, GetIndexerEdgeMarketSnapshotsParams, GetIndexerEventsLimitType, GetIndexerEventsParams, GetIndexerEventsResponse, GetIndexerFastWithdrawalSignatureParams, GetIndexerFastWithdrawalSignatureResponse, GetIndexerFundingRateParams, GetIndexerFundingRateResponse, GetIndexerInterestFundingPaymentsParams, GetIndexerInterestFundingPaymentsResponse, GetIndexerLeaderboardContestsParams, GetIndexerLeaderboardContestsResponse, GetIndexerLeaderboardParams, GetIndexerLeaderboardParticipantParams, GetIndexerLeaderboardParticipantResponse, GetIndexerLeaderboardRegistrationParams, GetIndexerLeaderboardRegistrationResponse, GetIndexerLeaderboardResponse, GetIndexerLinkedSignerParams, GetIndexerLinkedSignerResponse, GetIndexerMakerStatisticsParams, GetIndexerMakerStatisticsResponse, GetIndexerMarketSnapshotsParams, GetIndexerMarketSnapshotsResponse, GetIndexerMatchEventsParams, GetIndexerMatchEventsResponse, GetIndexerMultiProductFundingRatesParams, GetIndexerMultiProductFundingRatesResponse, GetIndexerMultiProductPerpPricesParams, GetIndexerMultiProductPerpPricesResponse, GetIndexerMultiProductSnapshotsParams, GetIndexerMultiProductSnapshotsResponse, GetIndexerMultiSubaccountSnapshotsParams, GetIndexerMultiSubaccountSnapshotsResponse, GetIndexerNlpSnapshotsParams, GetIndexerNlpSnapshotsResponse, GetIndexerOraclePricesParams, GetIndexerOraclePricesResponse, GetIndexerOrdersParams, GetIndexerOrdersResponse, GetIndexerPerpPricesParams, GetIndexerPerpPricesResponse, GetIndexerProductSnapshotsParams, GetIndexerProductSnapshotsResponse, GetIndexerQuotePriceResponse, GetIndexerReferralCodeParams, GetIndexerReferralCodeResponse, GetIndexerSubaccountDDAParams, GetIndexerSubaccountDDAResponse, IndexerBalanceTrackedVars, IndexerEvent, IndexerEventBalanceStateSnapshot, IndexerEventPerpStateSnapshot, IndexerEventSpotStateSnapshot, IndexerEventWithTx, IndexerFundingRate, IndexerLeaderboardContest, IndexerLeaderboardParticipant, IndexerLeaderboardRegistration, IndexerMaker, IndexerMakerSnapshot, IndexerMarketSnapshot, IndexerMatchEvent, IndexerMatchEventBalances, IndexerNlpSnapshot, IndexerOraclePrice, IndexerOrder, IndexerPerpBalance, IndexerPerpPrices, IndexerProductPayment, IndexerProductSnapshot, IndexerSnapshotBalance, IndexerSnapshotsIntervalParams, IndexerSpotBalance, IndexerSubaccountSnapshot, ListIndexerSubaccountsParams, ListIndexerSubaccountsResponse, UpdateIndexerLeaderboardRegistrationParams, UpdateIndexerLeaderboardRegistrationResponse } from './types/clientTypes.cjs';
|
|
5
|
+
export { CollateralEventType } from './types/collateralEventType.cjs';
|
|
6
6
|
export { IndexerEventType } from './types/IndexerEventType.cjs';
|
|
7
7
|
export { IndexerLeaderboardRankType } from './types/IndexerLeaderboardType.cjs';
|
|
8
|
-
export { CollateralEventType } from './types/collateralEventType.cjs';
|
|
9
8
|
export { NadoDepositCollateralTx, NadoLiquidateSubaccountTx, NadoMatchOrdersRfqTx, NadoMatchOrdersTx, NadoTransferQuoteTx, NadoTx, NadoWithdrawCollateralTx } from './types/NadoTx.cjs';
|
|
10
|
-
export {
|
|
11
|
-
export {
|
|
9
|
+
export { BaseIndexerPaginatedEvent, GetIndexerPaginatedInterestFundingPaymentsResponse, GetIndexerPaginatedLeaderboardParams, GetIndexerPaginatedLeaderboardResponse, GetIndexerPaginatedOrdersParams, GetIndexerPaginatedOrdersResponse, GetIndexerSubaccountCollateralEventsParams, GetIndexerSubaccountCollateralEventsResponse, GetIndexerSubaccountInterestFundingPaymentsParams, GetIndexerSubaccountLiquidationEventsParams, GetIndexerSubaccountLiquidationEventsResponse, GetIndexerSubaccountMatchEventParams, GetIndexerSubaccountMatchEventsResponse, GetIndexerSubaccountNlpEventsParams, GetIndexerSubaccountNlpEventsResponse, GetIndexerSubaccountSettlementEventsParams, GetIndexerSubaccountSettlementEventsResponse, IndexerCollateralEvent, IndexerLiquidationEvent, IndexerNlpEvent, IndexerPaginationMeta, IndexerPaginationParams, IndexerSettlementEvent, PaginatedIndexerEventsResponse, WithPaginationMeta } from './types/paginatedEventsTypes.cjs';
|
|
10
|
+
export { IndexerServerBalance, IndexerServerCandlestick, IndexerServerEvent, IndexerServerLeaderboardContest, IndexerServerLeaderboardPosition, IndexerServerLeaderboardRegistration, IndexerServerMaker, IndexerServerMakerData, IndexerServerMarketSnapshot, IndexerServerMarketSnapshotInterval, IndexerServerMatchEvent, IndexerServerMatchEventBalances, IndexerServerNlpSnapshot, IndexerServerOraclePrice, IndexerServerOrder, IndexerServerProduct, IndexerServerProductPayment, IndexerServerProductSnapshot, IndexerServerSnapshotsInterval, IndexerServerTx } from './types/serverModelTypes.cjs';
|
|
11
|
+
export { IndexerEdgeServerCandlesticksParams, IndexerEdgeServerCandlesticksResponse, IndexerEdgeServerMarketSnapshotsParams, IndexerEdgeServerMarketSnapshotsResponse, IndexerServerBacklogResponse, IndexerServerCandlesticksParams, IndexerServerCandlesticksResponse, IndexerServerDDAQueryParams, IndexerServerDDAResponse, IndexerServerEventsParams, IndexerServerEventsResponse, IndexerServerFastWithdrawalSignatureParams, IndexerServerFastWithdrawalSignatureResponse, IndexerServerFundingRate, IndexerServerFundingRateParams, IndexerServerFundingRateResponse, IndexerServerFundingRatesParams, IndexerServerFundingRatesResponse, IndexerServerInterestFundingParams, IndexerServerInterestFundingResponse, IndexerServerLeaderboardContestsParams, IndexerServerLeaderboardContestsResponse, IndexerServerLeaderboardParams, IndexerServerLeaderboardRankParams, IndexerServerLeaderboardRankResponse, IndexerServerLeaderboardRegistrationParams, IndexerServerLeaderboardRegistrationResponse, IndexerServerLeaderboardResponse, IndexerServerLinkedSignerParams, IndexerServerLinkedSignerResponse, IndexerServerListSubaccountsParams, IndexerServerListSubaccountsResponse, IndexerServerMakerStatisticsParams, IndexerServerMakerStatisticsResponse, IndexerServerMarketSnapshotsParams, IndexerServerMarketSnapshotsResponse, IndexerServerMatchEventsParams, IndexerServerMatchEventsResponse, IndexerServerMultiProductsParams, IndexerServerMultiProductsResponse, IndexerServerMultiSubaccountSnapshotsParams, IndexerServerMultiSubaccountSnapshotsResponse, IndexerServerNlpSnapshotsParams, IndexerServerNlpSnapshotsResponse, IndexerServerOraclePricesParams, IndexerServerOraclePricesResponse, IndexerServerOrdersParams, IndexerServerOrdersResponse, IndexerServerPerpPrices, IndexerServerPerpPricesParams, IndexerServerPerpPricesResponse, IndexerServerPriceParams, IndexerServerPriceResponse, IndexerServerProductsParams, IndexerServerProductsResponse, IndexerServerQueryRequestByType, IndexerServerQueryRequestType, IndexerServerQueryResponseByType, IndexerServerReferralCodeParams, IndexerServerReferralCodeResponse, IndexerServerTriggerTypeFilter, IndexerServerUsdcPriceResponse } from './types/serverTypes.cjs';
|
|
12
12
|
export { calcIndexerPerpBalanceNotionalValue, calcIndexerPerpBalanceValue, calcIndexerSpotBalanceValue } from './utils/indexerBalanceValue.cjs';
|
|
13
13
|
import '@nadohq/shared';
|
|
14
|
-
import 'viem';
|
|
15
|
-
import '@nadohq/engine-client';
|
|
16
14
|
import './IndexerBaseClient.cjs';
|
|
17
15
|
import 'axios';
|
|
16
|
+
import 'viem';
|
|
17
|
+
import '@nadohq/engine-client';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
3
|
-
export { IndexerEdgeServerCandlesticksParams, IndexerEdgeServerCandlesticksResponse, IndexerEdgeServerMarketSnapshotsParams, IndexerEdgeServerMarketSnapshotsResponse, IndexerServerBacklogResponse, IndexerServerCandlesticksParams, IndexerServerCandlesticksResponse, IndexerServerDDAQueryParams, IndexerServerDDAResponse, IndexerServerEventsParams, IndexerServerEventsResponse, IndexerServerFastWithdrawalSignatureParams, IndexerServerFastWithdrawalSignatureResponse, IndexerServerFundingRate, IndexerServerFundingRateParams, IndexerServerFundingRateResponse, IndexerServerFundingRatesParams, IndexerServerFundingRatesResponse, IndexerServerInterestFundingParams, IndexerServerInterestFundingResponse, IndexerServerLeaderboardContestsParams, IndexerServerLeaderboardContestsResponse, IndexerServerLeaderboardParams, IndexerServerLeaderboardRankParams, IndexerServerLeaderboardRankResponse, IndexerServerLeaderboardRegistrationParams, IndexerServerLeaderboardRegistrationResponse, IndexerServerLeaderboardResponse, IndexerServerLinkedSignerParams, IndexerServerLinkedSignerResponse, IndexerServerListSubaccountsParams, IndexerServerListSubaccountsResponse, IndexerServerMakerStatisticsParams, IndexerServerMakerStatisticsResponse, IndexerServerMarketSnapshotsParams, IndexerServerMarketSnapshotsResponse, IndexerServerMatchEventsParams, IndexerServerMatchEventsResponse, IndexerServerMultiProductsParams, IndexerServerMultiProductsResponse, IndexerServerMultiSubaccountSnapshotsParams, IndexerServerMultiSubaccountSnapshotsResponse, IndexerServerNlpSnapshotsParams, IndexerServerNlpSnapshotsResponse, IndexerServerOraclePricesParams, IndexerServerOraclePricesResponse, IndexerServerOrdersParams, IndexerServerOrdersResponse, IndexerServerPerpPrices, IndexerServerPerpPricesParams, IndexerServerPerpPricesResponse, IndexerServerPriceParams, IndexerServerPriceResponse, IndexerServerProductsParams, IndexerServerProductsResponse, IndexerServerQueryRequestByType, IndexerServerQueryRequestType, IndexerServerQueryResponseByType, IndexerServerReferralCodeParams, IndexerServerReferralCodeResponse, IndexerServerUsdcPriceResponse } from './types/serverTypes.js';
|
|
4
|
-
export { IndexerServerBalance, IndexerServerCandlestick, IndexerServerEvent, IndexerServerLeaderboardContest, IndexerServerLeaderboardPosition, IndexerServerLeaderboardRegistration, IndexerServerMaker, IndexerServerMakerData, IndexerServerMarketSnapshot, IndexerServerMarketSnapshotInterval, IndexerServerMatchEvent, IndexerServerMatchEventBalances, IndexerServerNlpSnapshot, IndexerServerOraclePrice, IndexerServerOrder, IndexerServerProduct, IndexerServerProductPayment, IndexerServerProductSnapshot, IndexerServerSnapshotsInterval, IndexerServerTx } from './types/serverModelTypes.js';
|
|
1
|
+
export { INDEXER_CLIENT_ENDPOINTS } from './endpoints.js';
|
|
2
|
+
export { IndexerClient } from './IndexerClient.js';
|
|
5
3
|
export { CandlestickPeriod } from './types/CandlestickPeriod.js';
|
|
4
|
+
export { Candlestick, GetIndexerBacklogResponse, GetIndexerCandlesticksParams, GetIndexerCandlesticksResponse, GetIndexerEdgeCandlesticksParams, GetIndexerEdgeCandlesticksResponse, GetIndexerEdgeMarketSnapshotResponse, GetIndexerEdgeMarketSnapshotsParams, GetIndexerEventsLimitType, GetIndexerEventsParams, GetIndexerEventsResponse, GetIndexerFastWithdrawalSignatureParams, GetIndexerFastWithdrawalSignatureResponse, GetIndexerFundingRateParams, GetIndexerFundingRateResponse, GetIndexerInterestFundingPaymentsParams, GetIndexerInterestFundingPaymentsResponse, GetIndexerLeaderboardContestsParams, GetIndexerLeaderboardContestsResponse, GetIndexerLeaderboardParams, GetIndexerLeaderboardParticipantParams, GetIndexerLeaderboardParticipantResponse, GetIndexerLeaderboardRegistrationParams, GetIndexerLeaderboardRegistrationResponse, GetIndexerLeaderboardResponse, GetIndexerLinkedSignerParams, GetIndexerLinkedSignerResponse, GetIndexerMakerStatisticsParams, GetIndexerMakerStatisticsResponse, GetIndexerMarketSnapshotsParams, GetIndexerMarketSnapshotsResponse, GetIndexerMatchEventsParams, GetIndexerMatchEventsResponse, GetIndexerMultiProductFundingRatesParams, GetIndexerMultiProductFundingRatesResponse, GetIndexerMultiProductPerpPricesParams, GetIndexerMultiProductPerpPricesResponse, GetIndexerMultiProductSnapshotsParams, GetIndexerMultiProductSnapshotsResponse, GetIndexerMultiSubaccountSnapshotsParams, GetIndexerMultiSubaccountSnapshotsResponse, GetIndexerNlpSnapshotsParams, GetIndexerNlpSnapshotsResponse, GetIndexerOraclePricesParams, GetIndexerOraclePricesResponse, GetIndexerOrdersParams, GetIndexerOrdersResponse, GetIndexerPerpPricesParams, GetIndexerPerpPricesResponse, GetIndexerProductSnapshotsParams, GetIndexerProductSnapshotsResponse, GetIndexerQuotePriceResponse, GetIndexerReferralCodeParams, GetIndexerReferralCodeResponse, GetIndexerSubaccountDDAParams, GetIndexerSubaccountDDAResponse, IndexerBalanceTrackedVars, IndexerEvent, IndexerEventBalanceStateSnapshot, IndexerEventPerpStateSnapshot, IndexerEventSpotStateSnapshot, IndexerEventWithTx, IndexerFundingRate, IndexerLeaderboardContest, IndexerLeaderboardParticipant, IndexerLeaderboardRegistration, IndexerMaker, IndexerMakerSnapshot, IndexerMarketSnapshot, IndexerMatchEvent, IndexerMatchEventBalances, IndexerNlpSnapshot, IndexerOraclePrice, IndexerOrder, IndexerPerpBalance, IndexerPerpPrices, IndexerProductPayment, IndexerProductSnapshot, IndexerSnapshotBalance, IndexerSnapshotsIntervalParams, IndexerSpotBalance, IndexerSubaccountSnapshot, ListIndexerSubaccountsParams, ListIndexerSubaccountsResponse, UpdateIndexerLeaderboardRegistrationParams, UpdateIndexerLeaderboardRegistrationResponse } from './types/clientTypes.js';
|
|
5
|
+
export { CollateralEventType } from './types/collateralEventType.js';
|
|
6
6
|
export { IndexerEventType } from './types/IndexerEventType.js';
|
|
7
7
|
export { IndexerLeaderboardRankType } from './types/IndexerLeaderboardType.js';
|
|
8
|
-
export { CollateralEventType } from './types/collateralEventType.js';
|
|
9
8
|
export { NadoDepositCollateralTx, NadoLiquidateSubaccountTx, NadoMatchOrdersRfqTx, NadoMatchOrdersTx, NadoTransferQuoteTx, NadoTx, NadoWithdrawCollateralTx } from './types/NadoTx.js';
|
|
10
|
-
export {
|
|
11
|
-
export {
|
|
9
|
+
export { BaseIndexerPaginatedEvent, GetIndexerPaginatedInterestFundingPaymentsResponse, GetIndexerPaginatedLeaderboardParams, GetIndexerPaginatedLeaderboardResponse, GetIndexerPaginatedOrdersParams, GetIndexerPaginatedOrdersResponse, GetIndexerSubaccountCollateralEventsParams, GetIndexerSubaccountCollateralEventsResponse, GetIndexerSubaccountInterestFundingPaymentsParams, GetIndexerSubaccountLiquidationEventsParams, GetIndexerSubaccountLiquidationEventsResponse, GetIndexerSubaccountMatchEventParams, GetIndexerSubaccountMatchEventsResponse, GetIndexerSubaccountNlpEventsParams, GetIndexerSubaccountNlpEventsResponse, GetIndexerSubaccountSettlementEventsParams, GetIndexerSubaccountSettlementEventsResponse, IndexerCollateralEvent, IndexerLiquidationEvent, IndexerNlpEvent, IndexerPaginationMeta, IndexerPaginationParams, IndexerSettlementEvent, PaginatedIndexerEventsResponse, WithPaginationMeta } from './types/paginatedEventsTypes.js';
|
|
10
|
+
export { IndexerServerBalance, IndexerServerCandlestick, IndexerServerEvent, IndexerServerLeaderboardContest, IndexerServerLeaderboardPosition, IndexerServerLeaderboardRegistration, IndexerServerMaker, IndexerServerMakerData, IndexerServerMarketSnapshot, IndexerServerMarketSnapshotInterval, IndexerServerMatchEvent, IndexerServerMatchEventBalances, IndexerServerNlpSnapshot, IndexerServerOraclePrice, IndexerServerOrder, IndexerServerProduct, IndexerServerProductPayment, IndexerServerProductSnapshot, IndexerServerSnapshotsInterval, IndexerServerTx } from './types/serverModelTypes.js';
|
|
11
|
+
export { IndexerEdgeServerCandlesticksParams, IndexerEdgeServerCandlesticksResponse, IndexerEdgeServerMarketSnapshotsParams, IndexerEdgeServerMarketSnapshotsResponse, IndexerServerBacklogResponse, IndexerServerCandlesticksParams, IndexerServerCandlesticksResponse, IndexerServerDDAQueryParams, IndexerServerDDAResponse, IndexerServerEventsParams, IndexerServerEventsResponse, IndexerServerFastWithdrawalSignatureParams, IndexerServerFastWithdrawalSignatureResponse, IndexerServerFundingRate, IndexerServerFundingRateParams, IndexerServerFundingRateResponse, IndexerServerFundingRatesParams, IndexerServerFundingRatesResponse, IndexerServerInterestFundingParams, IndexerServerInterestFundingResponse, IndexerServerLeaderboardContestsParams, IndexerServerLeaderboardContestsResponse, IndexerServerLeaderboardParams, IndexerServerLeaderboardRankParams, IndexerServerLeaderboardRankResponse, IndexerServerLeaderboardRegistrationParams, IndexerServerLeaderboardRegistrationResponse, IndexerServerLeaderboardResponse, IndexerServerLinkedSignerParams, IndexerServerLinkedSignerResponse, IndexerServerListSubaccountsParams, IndexerServerListSubaccountsResponse, IndexerServerMakerStatisticsParams, IndexerServerMakerStatisticsResponse, IndexerServerMarketSnapshotsParams, IndexerServerMarketSnapshotsResponse, IndexerServerMatchEventsParams, IndexerServerMatchEventsResponse, IndexerServerMultiProductsParams, IndexerServerMultiProductsResponse, IndexerServerMultiSubaccountSnapshotsParams, IndexerServerMultiSubaccountSnapshotsResponse, IndexerServerNlpSnapshotsParams, IndexerServerNlpSnapshotsResponse, IndexerServerOraclePricesParams, IndexerServerOraclePricesResponse, IndexerServerOrdersParams, IndexerServerOrdersResponse, IndexerServerPerpPrices, IndexerServerPerpPricesParams, IndexerServerPerpPricesResponse, IndexerServerPriceParams, IndexerServerPriceResponse, IndexerServerProductsParams, IndexerServerProductsResponse, IndexerServerQueryRequestByType, IndexerServerQueryRequestType, IndexerServerQueryResponseByType, IndexerServerReferralCodeParams, IndexerServerReferralCodeResponse, IndexerServerTriggerTypeFilter, IndexerServerUsdcPriceResponse } from './types/serverTypes.js';
|
|
12
12
|
export { calcIndexerPerpBalanceNotionalValue, calcIndexerPerpBalanceValue, calcIndexerSpotBalanceValue } from './utils/indexerBalanceValue.js';
|
|
13
13
|
import '@nadohq/shared';
|
|
14
|
-
import 'viem';
|
|
15
|
-
import '@nadohq/engine-client';
|
|
16
14
|
import './IndexerBaseClient.js';
|
|
17
15
|
import 'axios';
|
|
16
|
+
import 'viem';
|
|
17
|
+
import '@nadohq/engine-client';
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// src/index.ts
|
|
2
|
-
export * from "./types/index.js";
|
|
3
|
-
export * from "./IndexerClient.js";
|
|
4
2
|
export * from "./endpoints.js";
|
|
3
|
+
export * from "./IndexerClient.js";
|
|
4
|
+
export * from "./types/index.js";
|
|
5
5
|
export * from "./utils/index.js";
|
|
6
6
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export * from './
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export * from './endpoints';\nexport * from './IndexerClient';\nexport * from './types';\nexport * from './utils';\n"],"mappings":";AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;","names":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/types/clientTypes.ts"],"sourcesContent":["import {\n BigDecimal,\n EIP712OrderValues,\n Market,\n OrderAppendix,\n PerpBalance,\n PerpMarket,\n ProductEngineType,\n SpotBalance,\n SpotMarket,\n Subaccount,\n} from '@nadohq/shared';\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} from './serverTypes';\n\n/**\n * Base types\n */\n\nexport type IndexerSpotBalance = Omit<SpotBalance, 'healthContributions'>;\n\nexport type IndexerPerpBalance = Omit<PerpBalance, 'healthContributions'>;\n\nexport interface IndexerEventSpotStateSnapshot {\n type: ProductEngineType.SPOT;\n preBalance: IndexerSpotBalance;\n postBalance: IndexerSpotBalance;\n market: SpotMarket;\n}\n\nexport interface IndexerEventPerpStateSnapshot {\n type: ProductEngineType.PERP;\n preBalance: IndexerPerpBalance;\n postBalance: IndexerPerpBalance;\n market: PerpMarket;\n}\n\nexport type IndexerEventBalanceStateSnapshot =\n | IndexerEventSpotStateSnapshot\n | IndexerEventPerpStateSnapshot;\n\nexport interface IndexerBalanceTrackedVars {\n netInterestUnrealized: BigDecimal;\n netInterestCumulative: BigDecimal;\n netFundingUnrealized: BigDecimal;\n netFundingCumulative: BigDecimal;\n netEntryUnrealized: BigDecimal;\n netEntryCumulative: BigDecimal;\n}\n\nexport interface IndexerEvent<\n TStateType extends\n IndexerEventBalanceStateSnapshot = IndexerEventBalanceStateSnapshot,\n> {\n subaccount: string;\n isolated: boolean;\n // The product ID associated with the isolated perp market. This is only used when productId === QUOTE_PRODUCT_ID and isolated === true\n isolatedProductId: number | null;\n productId: number;\n submissionIndex: string;\n eventType: IndexerEventType;\n state: TStateType;\n trackedVars: IndexerBalanceTrackedVars;\n}\n\nexport interface IndexerEventWithTx<\n TStateType extends\n IndexerEventBalanceStateSnapshot = IndexerEventBalanceStateSnapshot,\n> extends IndexerEvent<TStateType> {\n timestamp: BigDecimal;\n tx: NadoTx;\n}\n\n/**\n * List subaccounts\n */\n\nexport type ListIndexerSubaccountsParams = IndexerServerListSubaccountsParams;\n\nexport type ListIndexerSubaccountsResponse = ({\n hexId: string;\n} & Subaccount)[];\n\n/**\n * Subaccount snapshots\n */\n\nexport interface GetIndexerMultiSubaccountSnapshotsParams {\n subaccounts: Subaccount[];\n // A series of timestamps for which to return a summary of each subaccount\n timestamps: number[];\n // If not given, will return both isolated & non-iso balances\n isolated?: boolean;\n}\n\nexport type IndexerSnapshotBalance<\n TStateType extends\n IndexerEventBalanceStateSnapshot = IndexerEventBalanceStateSnapshot,\n> = IndexerEvent<TStateType>;\n\nexport interface IndexerSubaccountSnapshot {\n timestamp: BigDecimal;\n balances: IndexerSnapshotBalance[];\n}\n\nexport interface GetIndexerMultiSubaccountSnapshotsResponse {\n // Utility for retrieving a subaccount's hex ID, in the same order as the request params\n subaccountHexIds: string[];\n // Map of subaccount hex -> timestamp requested -> summary for that time\n snapshots: Record<string, Record<string, IndexerSubaccountSnapshot>>;\n}\n\n/**\n * Perp prices\n */\n\nexport interface GetIndexerPerpPricesParams {\n productId: number;\n}\n\nexport interface IndexerPerpPrices {\n productId: number;\n indexPrice: BigDecimal;\n markPrice: BigDecimal;\n // Seconds\n updateTime: BigDecimal;\n}\n\nexport type GetIndexerPerpPricesResponse = IndexerPerpPrices;\n\nexport interface GetIndexerMultiProductPerpPricesParams {\n productIds: number[];\n}\n\n// Map of productId -> IndexerPerpPrices\nexport type GetIndexerMultiProductPerpPricesResponse = Record<\n number,\n IndexerPerpPrices\n>;\n\n/**\n * Oracle prices\n */\n\nexport interface GetIndexerOraclePricesParams {\n productIds: number[];\n}\n\nexport interface IndexerOraclePrice {\n productId: number;\n oraclePrice: BigDecimal;\n // Seconds\n updateTime: BigDecimal;\n}\n\nexport type GetIndexerOraclePricesResponse = IndexerOraclePrice[];\n\n/**\n * Funding rates\n */\n\nexport interface GetIndexerFundingRateParams {\n productId: number;\n}\n\nexport interface IndexerFundingRate {\n productId: number;\n fundingRate: BigDecimal;\n // Seconds\n updateTime: BigDecimal;\n}\n\nexport type GetIndexerFundingRateResponse = IndexerFundingRate;\n\nexport interface GetIndexerMultiProductFundingRatesParams {\n productIds: number[];\n}\n\n// Map of productId -> IndexerFundingRate\nexport type GetIndexerMultiProductFundingRatesResponse = Record<\n number,\n IndexerFundingRate\n>;\n\n/**\n * Candlesticks\n */\n\nexport interface GetIndexerCandlesticksParams {\n productId: number;\n period: CandlestickPeriod;\n // Seconds\n maxTimeInclusive?: number;\n limit: number;\n}\n\n// Semi-Tradingview compatible bars\nexport interface Candlestick {\n // In SECONDS, for TV compat, this needs to be in millis\n time: BigDecimal;\n open: BigDecimal;\n high: BigDecimal;\n low: BigDecimal;\n close: BigDecimal;\n volume: BigDecimal;\n}\n\nexport type GetIndexerCandlesticksResponse = Candlestick[];\n\nexport type GetIndexerEdgeCandlesticksResponse = GetIndexerCandlesticksResponse;\n\nexport type GetIndexerEdgeCandlesticksParams = GetIndexerCandlesticksParams;\n\n/**\n * Product snapshots\n */\n\nexport interface GetIndexerProductSnapshotsParams {\n // Max submission index, inclusive\n startCursor?: string;\n productId: number;\n maxTimestampInclusive?: number;\n limit: number;\n}\n\nexport interface IndexerProductSnapshot extends Market {\n submissionIndex: string;\n}\n\nexport type GetIndexerProductSnapshotsResponse = IndexerProductSnapshot[];\n\nexport interface GetIndexerMultiProductSnapshotsParams {\n productIds: number[];\n maxTimestampInclusive?: number[];\n}\n\n// Map of timestamp -> (productId -> IndexerProductSnapshot)\nexport type GetIndexerMultiProductSnapshotsResponse = Record<\n string,\n Record<number, IndexerProductSnapshot>\n>;\n\nexport interface IndexerSnapshotsIntervalParams {\n /** Currently accepts all integers, in seconds */\n granularity: number;\n /**\n * Optional upper bound for snapshot timestamps (in seconds).\n * Without this, snapshots will default to align with last UTC midnight,\n * which can make \"Last 24h\" metrics inaccurate.\n */\n maxTimeInclusive?: number;\n limit: number;\n}\n\n/**\n * Market snapshots\n */\n\nexport interface GetIndexerMarketSnapshotsParams\n extends IndexerSnapshotsIntervalParams {\n // Defaults to all\n productIds?: number[];\n}\n\nexport interface IndexerMarketSnapshot {\n timestamp: BigDecimal;\n cumulativeUsers: BigDecimal;\n dailyActiveUsers: BigDecimal;\n tvl: BigDecimal;\n cumulativeVolumes: Record<number, BigDecimal>;\n cumulativeTakerFees: Record<number, BigDecimal>;\n cumulativeSequencerFees: Record<number, BigDecimal>;\n cumulativeMakerFees: Record<number, BigDecimal>;\n cumulativeTrades: Record<number, BigDecimal>;\n cumulativeLiquidationAmounts: Record<number, BigDecimal>;\n openInterestsQuote: Record<number, BigDecimal>;\n totalDeposits: Record<number, BigDecimal>;\n totalBorrows: Record<number, BigDecimal>;\n fundingRates: Record<number, BigDecimal>;\n depositRates: Record<number, BigDecimal>;\n borrowRates: Record<number, BigDecimal>;\n cumulativeTradeSizes: Record<number, BigDecimal>;\n cumulativeInflows: Record<number, BigDecimal>;\n cumulativeOutflows: Record<number, BigDecimal>;\n oraclePrices: Record<number, BigDecimal>;\n}\n\nexport type GetIndexerMarketSnapshotsResponse = IndexerMarketSnapshot[];\n\nexport type GetIndexerEdgeMarketSnapshotsParams =\n IndexerSnapshotsIntervalParams;\n\n// Map of chain id -> IndexerMarketSnapshot[]\nexport type GetIndexerEdgeMarketSnapshotResponse = Record<\n number,\n IndexerMarketSnapshot[]\n>;\n\n/**\n * Events\n */\n\n// There can be multiple events per tx, this allows a limit depending on usecase\nexport type GetIndexerEventsLimitType = 'events' | 'txs';\n\nexport interface GetIndexerEventsParams {\n // Max submission index, inclusive\n startCursor?: string;\n subaccount?: Subaccount;\n productIds?: number[];\n // If not given, will return both isolated & non-iso events\n isolated?: boolean;\n eventTypes?: IndexerEventType[];\n maxTimestampInclusive?: number;\n // Descending order for idx (time), defaults to true\n desc?: boolean;\n limit?: {\n type: GetIndexerEventsLimitType;\n value: number;\n };\n}\n\nexport type GetIndexerEventsResponse = IndexerEventWithTx[];\n\n/**\n * Historical orders\n */\n\nexport interface GetIndexerOrdersParams {\n // Max submission index, inclusive\n startCursor?: string;\n subaccount?: Subaccount;\n minTimestampInclusive?: number;\n maxTimestampInclusive?: number;\n limit?: number;\n productIds?: number[];\n // If not given, will return both isolated & non-iso orders\n isolated?: boolean;\n digests?: string[];\n}\n\nexport interface IndexerOrder {\n digest: string;\n subaccount: string;\n productId: number;\n submissionIndex: string;\n amount: BigDecimal;\n price: BigDecimal;\n expiration: number;\n // Order metadata from appendix\n appendix: OrderAppendix;\n nonce: BigDecimal;\n // Derived from the nonce\n recvTimeSeconds: number;\n // Fill amounts\n baseFilled: BigDecimal;\n // Includes fee\n quoteFilled: BigDecimal;\n // Includes sequencer fee\n totalFee: BigDecimal;\n}\n\nexport type GetIndexerOrdersResponse = IndexerOrder[];\n\n/**\n * Match events\n */\n\nexport interface GetIndexerMatchEventsParams {\n // When not given, will return all maker events\n subaccount?: Subaccount;\n productIds?: number[];\n // If not given, will return both isolated & non-iso events\n isolated?: boolean;\n maxTimestampInclusive?: number;\n limit: number;\n // Max submission index, inclusive\n startCursor?: string;\n}\n\n// There are 2 balance states per match event if the match is in a spot market, but only one if the match is in a perp market\nexport interface IndexerMatchEventBalances {\n base: IndexerSpotBalance | IndexerPerpBalance;\n quote?: IndexerSpotBalance;\n}\n\nexport interface IndexerMatchEvent extends Subaccount {\n productId: number;\n digest: string;\n isolated: boolean;\n order: EIP712OrderValues;\n baseFilled: BigDecimal;\n quoteFilled: BigDecimal;\n // Includes sequencer fee\n totalFee: BigDecimal;\n sequencerFee: BigDecimal;\n cumulativeBaseFilled: BigDecimal;\n cumulativeQuoteFilled: BigDecimal;\n cumulativeFee: BigDecimal;\n submissionIndex: string;\n timestamp: BigDecimal;\n // Tracked vars for the balance BEFORE this match event occurred\n preEventTrackedVars: Pick<\n IndexerBalanceTrackedVars,\n 'netEntryCumulative' | 'netEntryUnrealized'\n >;\n preBalances: IndexerMatchEventBalances;\n postBalances: IndexerMatchEventBalances;\n tx: NadoTx;\n}\n\nexport type GetIndexerMatchEventsResponse = IndexerMatchEvent[];\n\n/**\n * Quote price\n */\n\nexport interface GetIndexerQuotePriceResponse {\n price: BigDecimal;\n}\n\n/**\n * Linked Signer\n */\n\nexport interface GetIndexerLinkedSignerParams {\n subaccount: Subaccount;\n}\n\nexport interface GetIndexerLinkedSignerResponse {\n totalTxLimit: BigDecimal;\n remainingTxs: BigDecimal;\n // If remainingTxs is 0, this is the time until the next link signer tx can be sent\n waitTimeUntilNextTx: BigDecimal;\n // If zero address, none is configured\n signer: string;\n}\n\n/**\n * Interest / funding payments\n */\n\nexport interface GetIndexerInterestFundingPaymentsParams {\n subaccount: Subaccount;\n productIds: number[];\n maxTimestampInclusive?: number;\n limit: number;\n // Max submission index, inclusive\n startCursor?: string;\n}\n\nexport interface IndexerProductPayment {\n productId: number;\n submissionIndex: string;\n timestamp: BigDecimal;\n paymentAmount: BigDecimal;\n // For spots: previous spot balance at the moment of payment (exclusive of `paymentAmount`).\n // For perps: previous perp balance at the moment of payment + amount of perps locked in LPs (exclusive of `paymentAmount`).\n balanceAmount: BigDecimal;\n // Represents the annually interest rate for spots and annually funding rate for perps.\n annualPaymentRate: BigDecimal;\n oraclePrice: BigDecimal;\n isolated: boolean;\n // The product ID associated with the isolated perp market. This is only used when product_id === QUOTE_PRODUCT_ID and isolated === true\n isolatedProductId: number | null;\n}\n\nexport interface GetIndexerInterestFundingPaymentsResponse {\n interestPayments: IndexerProductPayment[];\n fundingPayments: IndexerProductPayment[];\n nextCursor: string | null;\n}\n\n/**\n * Referral code\n */\n\nexport interface GetIndexerReferralCodeParams {\n subaccount: Subaccount;\n}\n\nexport interface GetIndexerReferralCodeResponse {\n referralCode: string | null;\n}\n\n/**\n * Maker stats\n */\n\nexport interface GetIndexerMakerStatisticsParams {\n productId: number;\n epoch: number;\n interval: number;\n}\n\nexport interface IndexerMakerSnapshot {\n timestamp: BigDecimal;\n makerFee: BigDecimal;\n uptime: BigDecimal;\n sumQMin: BigDecimal;\n qScore: BigDecimal;\n makerShare: BigDecimal;\n expectedMakerReward: BigDecimal;\n}\n\nexport interface IndexerMaker {\n address: string;\n snapshots: IndexerMakerSnapshot[];\n}\n\nexport interface GetIndexerMakerStatisticsResponse {\n rewardCoefficient: BigDecimal;\n makers: IndexerMaker[];\n}\n\n/**\n * Leaderboards\n */\n\nexport interface GetIndexerLeaderboardParams {\n contestId: number;\n rankType: IndexerLeaderboardRankType;\n // Min rank inclusive\n startCursor?: string;\n limit?: number;\n}\n\nexport interface IndexerLeaderboardParticipant {\n subaccount: Subaccount;\n contestId: number;\n pnl: BigDecimal;\n pnlRank: BigDecimal;\n percentRoi: BigDecimal;\n roiRank: BigDecimal;\n // Float indicating the ending account value at the time the snapshot was taken i.e: at updateTime\n accountValue: BigDecimal;\n // Float indicating the trading volume at the time the snapshot was taken i.e: at updateTime.\n // Null for contests that have no volume requirement.\n volume?: BigDecimal;\n // Seconds\n updateTime: BigDecimal;\n}\n\nexport interface GetIndexerLeaderboardResponse {\n participants: IndexerLeaderboardParticipant[];\n}\n\nexport interface GetIndexerLeaderboardParticipantParams {\n contestIds: number[];\n subaccount: Subaccount;\n}\n\nexport interface GetIndexerLeaderboardParticipantResponse {\n // If the subaccount is not eligible for a given contest, it would not be included in the response.\n // contestId -> IndexerLeaderboardParticipant\n participant: Record<string, IndexerLeaderboardParticipant>;\n}\n\ninterface LeaderboardSignatureParams {\n // endpoint address\n verifyingAddr: string;\n chainId: number;\n}\n\nexport interface GetIndexerLeaderboardRegistrationParams extends Subaccount {\n contestId: number;\n}\n\nexport interface UpdateIndexerLeaderboardRegistrationParams\n extends GetIndexerLeaderboardRegistrationParams {\n updateRegistration: LeaderboardSignatureParams;\n // In millis, defaults to 90s in the future\n recvTime?: BigDecimal;\n}\n\nexport interface IndexerLeaderboardRegistration {\n subaccount: Subaccount;\n contestId: number;\n // Seconds\n updateTime: BigDecimal;\n}\n\nexport interface GetIndexerLeaderboardRegistrationResponse {\n // For non-tiered contests, null if the user is not registered for the provided contestId.\n // For tiered contests (i.e., related contests), null if the user is not registered for any of the contests in the tier group.\n registration: IndexerLeaderboardRegistration | null;\n}\n\nexport type UpdateIndexerLeaderboardRegistrationResponse =\n GetIndexerLeaderboardRegistrationResponse;\n\nexport interface GetIndexerLeaderboardContestsParams {\n contestIds: number[];\n}\n\nexport interface IndexerLeaderboardContest {\n contestId: number;\n // NOTE: Start / End times are ignored when `period` is non-zero.\n // Start time in seconds\n startTime: BigDecimal;\n // End time in seconds\n endTime: BigDecimal;\n // Contest duration in seconds; when set to 0, contest duration is [startTime,endTime];\n // Otherwise, contest runs indefinitely in the interval [lastUpdated - period, lastUpdated] if active;\n period: BigDecimal;\n // Last updated time in Seconds\n lastUpdated: BigDecimal;\n totalParticipants: BigDecimal;\n // Float indicating the min account value required to be eligible for this contest e.g: 250.0\n minRequiredAccountValue: BigDecimal;\n // Float indicating the min trading volume required to be eligible for this contest e.g: 1000.0\n minRequiredVolume: BigDecimal;\n // For market-specific contests, only the volume from these products will be counted.\n requiredProductIds: number[];\n active: boolean;\n}\n\nexport interface GetIndexerLeaderboardContestsResponse {\n contests: IndexerLeaderboardContest[];\n}\n\nexport type GetIndexerFastWithdrawalSignatureParams =\n IndexerServerFastWithdrawalSignatureParams;\n\nexport interface GetIndexerFastWithdrawalSignatureResponse {\n idx: bigint;\n tx: NadoWithdrawCollateralTx['withdraw_collateral'];\n txBytes: Hex;\n signatures: Hex[];\n}\n\n/**\n * NLP\n */\n\nexport type GetIndexerNlpSnapshotsParams = IndexerSnapshotsIntervalParams;\n\nexport interface IndexerNlpSnapshot {\n submissionIndex: string;\n timestamp: BigDecimal;\n // Total volume traded by the NLP, in terms of the primary quote\n cumulativeVolume: BigDecimal;\n cumulativeTrades: BigDecimal;\n cumulativeMintAmountUsdc: BigDecimal;\n cumulativeBurnAmountUsdc: BigDecimal;\n cumulativePnl: BigDecimal;\n tvl: BigDecimal;\n oraclePrice: BigDecimal;\n depositors: BigDecimal;\n}\n\nexport interface GetIndexerNlpSnapshotsResponse {\n snapshots: IndexerNlpSnapshot[];\n}\n\nexport interface GetIndexerBacklogResponse {\n // Total number of transactions stored in the indexer DB\n totalTxs: BigDecimal;\n // Current nSubmissions value from the chain (i.e., number of processed txs)\n totalSubmissions: BigDecimal;\n // Number of unprocessed transactions (totalTxs - totalSubmissions)\n backlogSize: BigDecimal;\n // UNIX timestamp (in seconds) of when the data was last updated\n updatedAt: BigDecimal;\n // Estimated time in seconds (float) to clear the entire backlog (null if unavailable)\n backlogEtaInSeconds: BigDecimal | null;\n // Current submission rate in transactions per second (float) (null if unavailable)\n txsPerSecond: BigDecimal | null;\n}\n\nexport interface GetIndexerSubaccountDDAParams {\n subaccount: Subaccount;\n}\n\nexport interface GetIndexerSubaccountDDAResponse {\n address: Address;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/types/clientTypes.ts"],"sourcesContent":["import {\n BigDecimal,\n EIP712OrderValues,\n Market,\n OrderAppendix,\n PerpBalance,\n PerpMarket,\n ProductEngineType,\n SpotBalance,\n SpotMarket,\n Subaccount,\n} from '@nadohq/shared';\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: BigDecimal;\n netInterestCumulative: BigDecimal;\n netFundingUnrealized: BigDecimal;\n netFundingCumulative: BigDecimal;\n netEntryUnrealized: BigDecimal;\n netEntryCumulative: BigDecimal;\n}\n\nexport interface IndexerEvent<\n TStateType extends\n IndexerEventBalanceStateSnapshot = IndexerEventBalanceStateSnapshot,\n> {\n subaccount: string;\n isolated: boolean;\n // The product ID associated with the isolated perp market. This is only used when productId === QUOTE_PRODUCT_ID and isolated === true\n isolatedProductId: number | null;\n productId: number;\n submissionIndex: string;\n eventType: IndexerEventType;\n state: TStateType;\n trackedVars: IndexerBalanceTrackedVars;\n}\n\nexport interface IndexerEventWithTx<\n TStateType extends\n IndexerEventBalanceStateSnapshot = IndexerEventBalanceStateSnapshot,\n> extends IndexerEvent<TStateType> {\n timestamp: BigDecimal;\n tx: NadoTx;\n}\n\n/**\n * List subaccounts\n */\n\nexport type ListIndexerSubaccountsParams = IndexerServerListSubaccountsParams;\n\nexport type ListIndexerSubaccountsResponse = ({\n hexId: string;\n} & Subaccount)[];\n\n/**\n * Subaccount snapshots\n */\n\nexport interface GetIndexerMultiSubaccountSnapshotsParams {\n subaccounts: Subaccount[];\n // A series of timestamps for which to return a summary of each subaccount\n timestamps: number[];\n // If not given, will return both isolated & non-iso balances\n isolated?: boolean;\n}\n\nexport type IndexerSnapshotBalance<\n TStateType extends\n IndexerEventBalanceStateSnapshot = IndexerEventBalanceStateSnapshot,\n> = IndexerEvent<TStateType>;\n\nexport interface IndexerSubaccountSnapshot {\n timestamp: BigDecimal;\n balances: IndexerSnapshotBalance[];\n}\n\nexport interface GetIndexerMultiSubaccountSnapshotsResponse {\n // Utility for retrieving a subaccount's hex ID, in the same order as the request params\n subaccountHexIds: string[];\n // Map of subaccount hex -> timestamp requested -> summary for that time\n snapshots: Record<string, Record<string, IndexerSubaccountSnapshot>>;\n}\n\n/**\n * Perp prices\n */\n\nexport interface GetIndexerPerpPricesParams {\n productId: number;\n}\n\nexport interface IndexerPerpPrices {\n productId: number;\n indexPrice: BigDecimal;\n markPrice: BigDecimal;\n // Seconds\n updateTime: BigDecimal;\n}\n\nexport type GetIndexerPerpPricesResponse = IndexerPerpPrices;\n\nexport interface GetIndexerMultiProductPerpPricesParams {\n productIds: number[];\n}\n\n// Map of productId -> IndexerPerpPrices\nexport type GetIndexerMultiProductPerpPricesResponse = Record<\n number,\n IndexerPerpPrices\n>;\n\n/**\n * Oracle prices\n */\n\nexport interface GetIndexerOraclePricesParams {\n productIds: number[];\n}\n\nexport interface IndexerOraclePrice {\n productId: number;\n oraclePrice: BigDecimal;\n // Seconds\n updateTime: BigDecimal;\n}\n\nexport type GetIndexerOraclePricesResponse = IndexerOraclePrice[];\n\n/**\n * Funding rates\n */\n\nexport interface GetIndexerFundingRateParams {\n productId: number;\n}\n\nexport interface IndexerFundingRate {\n productId: number;\n fundingRate: BigDecimal;\n // Seconds\n updateTime: BigDecimal;\n}\n\nexport type GetIndexerFundingRateResponse = IndexerFundingRate;\n\nexport interface GetIndexerMultiProductFundingRatesParams {\n productIds: number[];\n}\n\n// Map of productId -> IndexerFundingRate\nexport type GetIndexerMultiProductFundingRatesResponse = Record<\n number,\n IndexerFundingRate\n>;\n\n/**\n * Candlesticks\n */\n\nexport interface GetIndexerCandlesticksParams {\n productId: number;\n period: CandlestickPeriod;\n // Seconds\n maxTimeInclusive?: number;\n limit: number;\n}\n\n// Semi-Tradingview compatible bars\nexport interface Candlestick {\n // In SECONDS, for TV compat, this needs to be in millis\n time: BigDecimal;\n open: BigDecimal;\n high: BigDecimal;\n low: BigDecimal;\n close: BigDecimal;\n volume: BigDecimal;\n}\n\nexport type GetIndexerCandlesticksResponse = Candlestick[];\n\nexport type GetIndexerEdgeCandlesticksResponse = GetIndexerCandlesticksResponse;\n\nexport type GetIndexerEdgeCandlesticksParams = GetIndexerCandlesticksParams;\n\n/**\n * Product snapshots\n */\n\nexport interface GetIndexerProductSnapshotsParams {\n // Max submission index, inclusive\n startCursor?: string;\n productId: number;\n maxTimestampInclusive?: number;\n limit: number;\n}\n\nexport interface IndexerProductSnapshot extends Market {\n submissionIndex: string;\n}\n\nexport type GetIndexerProductSnapshotsResponse = IndexerProductSnapshot[];\n\nexport interface GetIndexerMultiProductSnapshotsParams {\n productIds: number[];\n maxTimestampInclusive?: number[];\n}\n\n// Map of timestamp -> (productId -> IndexerProductSnapshot)\nexport type GetIndexerMultiProductSnapshotsResponse = Record<\n string,\n Record<number, IndexerProductSnapshot>\n>;\n\nexport interface IndexerSnapshotsIntervalParams {\n /** Currently accepts all integers, in seconds */\n granularity: number;\n /**\n * Optional upper bound for snapshot timestamps (in seconds).\n * Without this, snapshots will default to align with last UTC midnight,\n * which can make \"Last 24h\" metrics inaccurate.\n */\n maxTimeInclusive?: number;\n limit: number;\n}\n\n/**\n * Market snapshots\n */\n\nexport interface GetIndexerMarketSnapshotsParams\n extends IndexerSnapshotsIntervalParams {\n // Defaults to all\n productIds?: number[];\n}\n\nexport interface IndexerMarketSnapshot {\n timestamp: BigDecimal;\n cumulativeUsers: BigDecimal;\n dailyActiveUsers: BigDecimal;\n tvl: BigDecimal;\n cumulativeVolumes: Record<number, BigDecimal>;\n cumulativeTakerFees: Record<number, BigDecimal>;\n cumulativeSequencerFees: Record<number, BigDecimal>;\n cumulativeMakerFees: Record<number, BigDecimal>;\n cumulativeTrades: Record<number, BigDecimal>;\n cumulativeLiquidationAmounts: Record<number, BigDecimal>;\n openInterestsQuote: Record<number, BigDecimal>;\n totalDeposits: Record<number, BigDecimal>;\n totalBorrows: Record<number, BigDecimal>;\n fundingRates: Record<number, BigDecimal>;\n depositRates: Record<number, BigDecimal>;\n borrowRates: Record<number, BigDecimal>;\n cumulativeTradeSizes: Record<number, BigDecimal>;\n cumulativeInflows: Record<number, BigDecimal>;\n cumulativeOutflows: Record<number, BigDecimal>;\n oraclePrices: Record<number, BigDecimal>;\n}\n\nexport type GetIndexerMarketSnapshotsResponse = IndexerMarketSnapshot[];\n\nexport type GetIndexerEdgeMarketSnapshotsParams =\n IndexerSnapshotsIntervalParams;\n\n// Map of chain id -> IndexerMarketSnapshot[]\nexport type GetIndexerEdgeMarketSnapshotResponse = Record<\n number,\n IndexerMarketSnapshot[]\n>;\n\n/**\n * Events\n */\n\n// There can be multiple events per tx, this allows a limit depending on usecase\nexport type GetIndexerEventsLimitType = 'events' | 'txs';\n\nexport interface GetIndexerEventsParams {\n // Max submission index, inclusive\n startCursor?: string;\n subaccount?: Subaccount;\n productIds?: number[];\n // If not given, will return both isolated & non-iso events\n isolated?: boolean;\n eventTypes?: IndexerEventType[];\n maxTimestampInclusive?: number;\n // Descending order for idx (time), defaults to true\n desc?: boolean;\n limit?: {\n type: GetIndexerEventsLimitType;\n value: number;\n };\n}\n\nexport type GetIndexerEventsResponse = IndexerEventWithTx[];\n\n/**\n * Historical orders\n */\n\nexport interface GetIndexerOrdersParams {\n // Max submission index, inclusive\n startCursor?: string;\n subaccount?: Subaccount;\n minTimestampInclusive?: number;\n maxTimestampInclusive?: number;\n limit?: number;\n productIds?: number[];\n 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 amount: BigDecimal;\n price: BigDecimal;\n expiration: number;\n // Order metadata from appendix\n appendix: OrderAppendix;\n nonce: BigDecimal;\n // Derived from the nonce\n recvTimeSeconds: number;\n // Fill amounts\n baseFilled: BigDecimal;\n // Includes fee\n quoteFilled: BigDecimal;\n // Includes sequencer fee\n totalFee: BigDecimal;\n}\n\nexport type GetIndexerOrdersResponse = IndexerOrder[];\n\n/**\n * Match events\n */\n\nexport interface GetIndexerMatchEventsParams {\n // When not given, will return all maker events\n subaccount?: Subaccount;\n productIds?: number[];\n // If not given, will return both isolated & non-iso events\n isolated?: boolean;\n maxTimestampInclusive?: number;\n limit: number;\n // Max submission index, inclusive\n startCursor?: string;\n}\n\n// There are 2 balance states per match event if the match is in a spot market, but only one if the match is in a perp market\nexport interface IndexerMatchEventBalances {\n base: IndexerSpotBalance | IndexerPerpBalance;\n quote?: IndexerSpotBalance;\n}\n\nexport interface IndexerMatchEvent extends Subaccount {\n productId: number;\n digest: string;\n isolated: boolean;\n order: EIP712OrderValues;\n baseFilled: BigDecimal;\n quoteFilled: BigDecimal;\n // Includes sequencer fee\n totalFee: BigDecimal;\n sequencerFee: BigDecimal;\n cumulativeBaseFilled: BigDecimal;\n cumulativeQuoteFilled: BigDecimal;\n cumulativeFee: BigDecimal;\n submissionIndex: string;\n timestamp: BigDecimal;\n // Tracked vars for the balance BEFORE this match event occurred\n preEventTrackedVars: Pick<\n IndexerBalanceTrackedVars,\n 'netEntryCumulative' | 'netEntryUnrealized'\n >;\n preBalances: IndexerMatchEventBalances;\n postBalances: IndexerMatchEventBalances;\n tx: NadoTx;\n}\n\nexport type GetIndexerMatchEventsResponse = IndexerMatchEvent[];\n\n/**\n * Quote price\n */\n\nexport interface GetIndexerQuotePriceResponse {\n price: BigDecimal;\n}\n\n/**\n * Linked Signer\n */\n\nexport interface GetIndexerLinkedSignerParams {\n subaccount: Subaccount;\n}\n\nexport interface GetIndexerLinkedSignerResponse {\n totalTxLimit: BigDecimal;\n remainingTxs: BigDecimal;\n // If remainingTxs is 0, this is the time until the next link signer tx can be sent\n waitTimeUntilNextTx: BigDecimal;\n // If zero address, none is configured\n signer: string;\n}\n\n/**\n * Interest / funding payments\n */\n\nexport interface GetIndexerInterestFundingPaymentsParams {\n subaccount: Subaccount;\n productIds: number[];\n maxTimestampInclusive?: number;\n limit: number;\n // Max submission index, inclusive\n startCursor?: string;\n}\n\nexport interface IndexerProductPayment {\n productId: number;\n submissionIndex: string;\n timestamp: BigDecimal;\n paymentAmount: BigDecimal;\n // For spots: previous spot balance at the moment of payment (exclusive of `paymentAmount`).\n // For perps: previous perp balance at the moment of payment + amount of perps locked in LPs (exclusive of `paymentAmount`).\n balanceAmount: BigDecimal;\n // Represents the annually interest rate for spots and annually funding rate for perps.\n annualPaymentRate: BigDecimal;\n oraclePrice: BigDecimal;\n isolated: boolean;\n // The product ID associated with the isolated perp market. This is only used when product_id === QUOTE_PRODUCT_ID and isolated === true\n isolatedProductId: number | null;\n}\n\nexport interface GetIndexerInterestFundingPaymentsResponse {\n interestPayments: IndexerProductPayment[];\n fundingPayments: IndexerProductPayment[];\n nextCursor: string | null;\n}\n\n/**\n * Referral code\n */\n\nexport interface GetIndexerReferralCodeParams {\n subaccount: Subaccount;\n}\n\nexport interface GetIndexerReferralCodeResponse {\n referralCode: string | null;\n}\n\n/**\n * Maker stats\n */\n\nexport interface GetIndexerMakerStatisticsParams {\n productId: number;\n epoch: number;\n interval: number;\n}\n\nexport interface IndexerMakerSnapshot {\n timestamp: BigDecimal;\n makerFee: BigDecimal;\n uptime: BigDecimal;\n sumQMin: BigDecimal;\n qScore: BigDecimal;\n makerShare: BigDecimal;\n expectedMakerReward: BigDecimal;\n}\n\nexport interface IndexerMaker {\n address: string;\n snapshots: IndexerMakerSnapshot[];\n}\n\nexport interface GetIndexerMakerStatisticsResponse {\n rewardCoefficient: BigDecimal;\n makers: IndexerMaker[];\n}\n\n/**\n * Leaderboards\n */\n\nexport interface GetIndexerLeaderboardParams {\n contestId: number;\n rankType: IndexerLeaderboardRankType;\n // Min rank inclusive\n startCursor?: string;\n limit?: number;\n}\n\nexport interface IndexerLeaderboardParticipant {\n subaccount: Subaccount;\n contestId: number;\n pnl: BigDecimal;\n pnlRank: BigDecimal;\n percentRoi: BigDecimal;\n roiRank: BigDecimal;\n // Float indicating the ending account value at the time the snapshot was taken i.e: at updateTime\n accountValue: BigDecimal;\n // Float indicating the trading volume at the time the snapshot was taken i.e: at updateTime.\n // Null for contests that have no volume requirement.\n volume?: BigDecimal;\n // Seconds\n updateTime: BigDecimal;\n}\n\nexport interface GetIndexerLeaderboardResponse {\n participants: IndexerLeaderboardParticipant[];\n}\n\nexport interface GetIndexerLeaderboardParticipantParams {\n contestIds: number[];\n subaccount: Subaccount;\n}\n\nexport interface GetIndexerLeaderboardParticipantResponse {\n // If the subaccount is not eligible for a given contest, it would not be included in the response.\n // contestId -> IndexerLeaderboardParticipant\n participant: Record<string, IndexerLeaderboardParticipant>;\n}\n\ninterface LeaderboardSignatureParams {\n // endpoint address\n verifyingAddr: string;\n chainId: number;\n}\n\nexport interface GetIndexerLeaderboardRegistrationParams extends Subaccount {\n contestId: number;\n}\n\nexport interface UpdateIndexerLeaderboardRegistrationParams\n extends GetIndexerLeaderboardRegistrationParams {\n updateRegistration: LeaderboardSignatureParams;\n // In millis, defaults to 90s in the future\n recvTime?: BigDecimal;\n}\n\nexport interface IndexerLeaderboardRegistration {\n subaccount: Subaccount;\n contestId: number;\n // Seconds\n updateTime: BigDecimal;\n}\n\nexport interface GetIndexerLeaderboardRegistrationResponse {\n // For non-tiered contests, null if the user is not registered for the provided contestId.\n // For tiered contests (i.e., related contests), null if the user is not registered for any of the contests in the tier group.\n registration: IndexerLeaderboardRegistration | null;\n}\n\nexport type UpdateIndexerLeaderboardRegistrationResponse =\n GetIndexerLeaderboardRegistrationResponse;\n\nexport interface GetIndexerLeaderboardContestsParams {\n contestIds: number[];\n}\n\nexport interface IndexerLeaderboardContest {\n contestId: number;\n // NOTE: Start / End times are ignored when `period` is non-zero.\n // Start time in seconds\n startTime: BigDecimal;\n // End time in seconds\n endTime: BigDecimal;\n // Contest duration in seconds; when set to 0, contest duration is [startTime,endTime];\n // Otherwise, contest runs indefinitely in the interval [lastUpdated - period, lastUpdated] if active;\n period: BigDecimal;\n // Last updated time in Seconds\n lastUpdated: BigDecimal;\n totalParticipants: BigDecimal;\n // Float indicating the min account value required to be eligible for this contest e.g: 250.0\n minRequiredAccountValue: BigDecimal;\n // Float indicating the min trading volume required to be eligible for this contest e.g: 1000.0\n minRequiredVolume: BigDecimal;\n // For market-specific contests, only the volume from these products will be counted.\n requiredProductIds: number[];\n active: boolean;\n}\n\nexport interface GetIndexerLeaderboardContestsResponse {\n contests: IndexerLeaderboardContest[];\n}\n\nexport type GetIndexerFastWithdrawalSignatureParams =\n IndexerServerFastWithdrawalSignatureParams;\n\nexport interface GetIndexerFastWithdrawalSignatureResponse {\n idx: bigint;\n tx: NadoWithdrawCollateralTx['withdraw_collateral'];\n txBytes: Hex;\n signatures: Hex[];\n}\n\n/**\n * NLP\n */\n\nexport type GetIndexerNlpSnapshotsParams = IndexerSnapshotsIntervalParams;\n\nexport interface IndexerNlpSnapshot {\n submissionIndex: string;\n timestamp: BigDecimal;\n // Total volume traded by the NLP, in terms of the primary quote\n cumulativeVolume: BigDecimal;\n cumulativeTrades: BigDecimal;\n cumulativeMintAmountUsdc: BigDecimal;\n cumulativeBurnAmountUsdc: BigDecimal;\n cumulativePnl: BigDecimal;\n tvl: BigDecimal;\n oraclePrice: BigDecimal;\n depositors: BigDecimal;\n}\n\nexport interface GetIndexerNlpSnapshotsResponse {\n snapshots: IndexerNlpSnapshot[];\n}\n\nexport interface GetIndexerBacklogResponse {\n // Total number of transactions stored in the indexer DB\n totalTxs: BigDecimal;\n // Current nSubmissions value from the chain (i.e., number of processed txs)\n totalSubmissions: BigDecimal;\n // Number of unprocessed transactions (totalTxs - totalSubmissions)\n backlogSize: BigDecimal;\n // UNIX timestamp (in seconds) of when the data was last updated\n updatedAt: BigDecimal;\n // Estimated time in seconds (float) to clear the entire backlog (null if unavailable)\n backlogEtaInSeconds: BigDecimal | null;\n // Current submission rate in transactions per second (float) (null if unavailable)\n txsPerSecond: BigDecimal | null;\n}\n\nexport interface GetIndexerSubaccountDDAParams {\n subaccount: Subaccount;\n}\n\nexport interface GetIndexerSubaccountDDAResponse {\n address: Address;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
@@ -4,7 +4,7 @@ import { CandlestickPeriod } from './CandlestickPeriod.cjs';
|
|
|
4
4
|
import { IndexerEventType } from './IndexerEventType.cjs';
|
|
5
5
|
import { IndexerLeaderboardRankType } from './IndexerLeaderboardType.cjs';
|
|
6
6
|
import { NadoTx, NadoWithdrawCollateralTx } from './NadoTx.cjs';
|
|
7
|
-
import { IndexerServerListSubaccountsParams, IndexerServerFastWithdrawalSignatureParams } from './serverTypes.cjs';
|
|
7
|
+
import { IndexerServerListSubaccountsParams, IndexerServerTriggerTypeFilter, IndexerServerFastWithdrawalSignatureParams } from './serverTypes.cjs';
|
|
8
8
|
import './serverModelTypes.cjs';
|
|
9
9
|
import '@nadohq/engine-client';
|
|
10
10
|
|
|
@@ -225,6 +225,7 @@ interface GetIndexerOrdersParams {
|
|
|
225
225
|
maxTimestampInclusive?: number;
|
|
226
226
|
limit?: number;
|
|
227
227
|
productIds?: number[];
|
|
228
|
+
triggerTypes?: IndexerServerTriggerTypeFilter[];
|
|
228
229
|
isolated?: boolean;
|
|
229
230
|
digests?: string[];
|
|
230
231
|
}
|
|
@@ -4,7 +4,7 @@ import { CandlestickPeriod } from './CandlestickPeriod.js';
|
|
|
4
4
|
import { IndexerEventType } from './IndexerEventType.js';
|
|
5
5
|
import { IndexerLeaderboardRankType } from './IndexerLeaderboardType.js';
|
|
6
6
|
import { NadoTx, NadoWithdrawCollateralTx } from './NadoTx.js';
|
|
7
|
-
import { IndexerServerListSubaccountsParams, IndexerServerFastWithdrawalSignatureParams } from './serverTypes.js';
|
|
7
|
+
import { IndexerServerListSubaccountsParams, IndexerServerTriggerTypeFilter, IndexerServerFastWithdrawalSignatureParams } from './serverTypes.js';
|
|
8
8
|
import './serverModelTypes.js';
|
|
9
9
|
import '@nadohq/engine-client';
|
|
10
10
|
|
|
@@ -225,6 +225,7 @@ interface GetIndexerOrdersParams {
|
|
|
225
225
|
maxTimestampInclusive?: number;
|
|
226
226
|
limit?: number;
|
|
227
227
|
productIds?: number[];
|
|
228
|
+
triggerTypes?: IndexerServerTriggerTypeFilter[];
|
|
228
229
|
isolated?: boolean;
|
|
229
230
|
digests?: string[];
|
|
230
231
|
}
|
package/dist/types/index.cjs
CHANGED
|
@@ -17,25 +17,25 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
17
17
|
// src/types/index.ts
|
|
18
18
|
var types_exports = {};
|
|
19
19
|
module.exports = __toCommonJS(types_exports);
|
|
20
|
-
__reExport(types_exports, require("./clientTypes.cjs"), module.exports);
|
|
21
|
-
__reExport(types_exports, require("./paginatedEventsTypes.cjs"), module.exports);
|
|
22
|
-
__reExport(types_exports, require("./serverTypes.cjs"), module.exports);
|
|
23
|
-
__reExport(types_exports, require("./serverModelTypes.cjs"), module.exports);
|
|
24
20
|
__reExport(types_exports, require("./CandlestickPeriod.cjs"), module.exports);
|
|
21
|
+
__reExport(types_exports, require("./clientTypes.cjs"), module.exports);
|
|
22
|
+
__reExport(types_exports, require("./collateralEventType.cjs"), module.exports);
|
|
25
23
|
__reExport(types_exports, require("./IndexerEventType.cjs"), module.exports);
|
|
26
24
|
__reExport(types_exports, require("./IndexerLeaderboardType.cjs"), module.exports);
|
|
27
|
-
__reExport(types_exports, require("./collateralEventType.cjs"), module.exports);
|
|
28
25
|
__reExport(types_exports, require("./NadoTx.cjs"), module.exports);
|
|
26
|
+
__reExport(types_exports, require("./paginatedEventsTypes.cjs"), module.exports);
|
|
27
|
+
__reExport(types_exports, require("./serverModelTypes.cjs"), module.exports);
|
|
28
|
+
__reExport(types_exports, require("./serverTypes.cjs"), module.exports);
|
|
29
29
|
// Annotate the CommonJS export names for ESM import in node:
|
|
30
30
|
0 && (module.exports = {
|
|
31
|
-
...require("./clientTypes.cjs"),
|
|
32
|
-
...require("./paginatedEventsTypes.cjs"),
|
|
33
|
-
...require("./serverTypes.cjs"),
|
|
34
|
-
...require("./serverModelTypes.cjs"),
|
|
35
31
|
...require("./CandlestickPeriod.cjs"),
|
|
32
|
+
...require("./clientTypes.cjs"),
|
|
33
|
+
...require("./collateralEventType.cjs"),
|
|
36
34
|
...require("./IndexerEventType.cjs"),
|
|
37
35
|
...require("./IndexerLeaderboardType.cjs"),
|
|
38
|
-
...require("./
|
|
39
|
-
...require("./
|
|
36
|
+
...require("./NadoTx.cjs"),
|
|
37
|
+
...require("./paginatedEventsTypes.cjs"),
|
|
38
|
+
...require("./serverModelTypes.cjs"),
|
|
39
|
+
...require("./serverTypes.cjs")
|
|
40
40
|
});
|
|
41
41
|
//# sourceMappingURL=index.cjs.map
|
package/dist/types/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/types/index.ts"],"sourcesContent":["export * from './
|
|
1
|
+
{"version":3,"sources":["../../src/types/index.ts"],"sourcesContent":["export * from './CandlestickPeriod';\nexport * from './clientTypes';\nexport * from './collateralEventType';\nexport * from './IndexerEventType';\nexport * from './IndexerLeaderboardType';\nexport * from './NadoTx';\nexport * from './paginatedEventsTypes';\nexport * from './serverModelTypes';\nexport * from './serverTypes';\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,0BAAc,oCAAd;AACA,0BAAc,8BADd;AAEA,0BAAc,sCAFd;AAGA,0BAAc,mCAHd;AAIA,0BAAc,yCAJd;AAKA,0BAAc,yBALd;AAMA,0BAAc,uCANd;AAOA,0BAAc,mCAPd;AAQA,0BAAc,8BARd;","names":[]}
|
package/dist/types/index.d.cts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export { Candlestick, GetIndexerBacklogResponse, GetIndexerCandlesticksParams, GetIndexerCandlesticksResponse, GetIndexerEdgeCandlesticksParams, GetIndexerEdgeCandlesticksResponse, GetIndexerEdgeMarketSnapshotResponse, GetIndexerEdgeMarketSnapshotsParams, GetIndexerEventsLimitType, GetIndexerEventsParams, GetIndexerEventsResponse, GetIndexerFastWithdrawalSignatureParams, GetIndexerFastWithdrawalSignatureResponse, GetIndexerFundingRateParams, GetIndexerFundingRateResponse, GetIndexerInterestFundingPaymentsParams, GetIndexerInterestFundingPaymentsResponse, GetIndexerLeaderboardContestsParams, GetIndexerLeaderboardContestsResponse, GetIndexerLeaderboardParams, GetIndexerLeaderboardParticipantParams, GetIndexerLeaderboardParticipantResponse, GetIndexerLeaderboardRegistrationParams, GetIndexerLeaderboardRegistrationResponse, GetIndexerLeaderboardResponse, GetIndexerLinkedSignerParams, GetIndexerLinkedSignerResponse, GetIndexerMakerStatisticsParams, GetIndexerMakerStatisticsResponse, GetIndexerMarketSnapshotsParams, GetIndexerMarketSnapshotsResponse, GetIndexerMatchEventsParams, GetIndexerMatchEventsResponse, GetIndexerMultiProductFundingRatesParams, GetIndexerMultiProductFundingRatesResponse, GetIndexerMultiProductPerpPricesParams, GetIndexerMultiProductPerpPricesResponse, GetIndexerMultiProductSnapshotsParams, GetIndexerMultiProductSnapshotsResponse, GetIndexerMultiSubaccountSnapshotsParams, GetIndexerMultiSubaccountSnapshotsResponse, GetIndexerNlpSnapshotsParams, GetIndexerNlpSnapshotsResponse, GetIndexerOraclePricesParams, GetIndexerOraclePricesResponse, GetIndexerOrdersParams, GetIndexerOrdersResponse, GetIndexerPerpPricesParams, GetIndexerPerpPricesResponse, GetIndexerProductSnapshotsParams, GetIndexerProductSnapshotsResponse, GetIndexerQuotePriceResponse, GetIndexerReferralCodeParams, GetIndexerReferralCodeResponse, GetIndexerSubaccountDDAParams, GetIndexerSubaccountDDAResponse, IndexerBalanceTrackedVars, IndexerEvent, IndexerEventBalanceStateSnapshot, IndexerEventPerpStateSnapshot, IndexerEventSpotStateSnapshot, IndexerEventWithTx, IndexerFundingRate, IndexerLeaderboardContest, IndexerLeaderboardParticipant, IndexerLeaderboardRegistration, IndexerMaker, IndexerMakerSnapshot, IndexerMarketSnapshot, IndexerMatchEvent, IndexerMatchEventBalances, IndexerNlpSnapshot, IndexerOraclePrice, IndexerOrder, IndexerPerpBalance, IndexerPerpPrices, IndexerProductPayment, IndexerProductSnapshot, IndexerSnapshotBalance, IndexerSnapshotsIntervalParams, IndexerSpotBalance, IndexerSubaccountSnapshot, ListIndexerSubaccountsParams, ListIndexerSubaccountsResponse, UpdateIndexerLeaderboardRegistrationParams, UpdateIndexerLeaderboardRegistrationResponse } from './clientTypes.cjs';
|
|
2
|
-
export { BaseIndexerPaginatedEvent, GetIndexerPaginatedInterestFundingPaymentsResponse, GetIndexerPaginatedLeaderboardParams, GetIndexerPaginatedLeaderboardResponse, GetIndexerPaginatedOrdersParams, GetIndexerPaginatedOrdersResponse, GetIndexerSubaccountCollateralEventsParams, GetIndexerSubaccountCollateralEventsResponse, GetIndexerSubaccountInterestFundingPaymentsParams, GetIndexerSubaccountLiquidationEventsParams, GetIndexerSubaccountLiquidationEventsResponse, GetIndexerSubaccountMatchEventParams, GetIndexerSubaccountMatchEventsResponse, GetIndexerSubaccountNlpEventsParams, GetIndexerSubaccountNlpEventsResponse, GetIndexerSubaccountSettlementEventsParams, GetIndexerSubaccountSettlementEventsResponse, IndexerCollateralEvent, IndexerLiquidationEvent, IndexerNlpEvent, IndexerPaginationMeta, IndexerPaginationParams, IndexerSettlementEvent, PaginatedIndexerEventsResponse, WithPaginationMeta } from './paginatedEventsTypes.cjs';
|
|
3
|
-
export { IndexerEdgeServerCandlesticksParams, IndexerEdgeServerCandlesticksResponse, IndexerEdgeServerMarketSnapshotsParams, IndexerEdgeServerMarketSnapshotsResponse, IndexerServerBacklogResponse, IndexerServerCandlesticksParams, IndexerServerCandlesticksResponse, IndexerServerDDAQueryParams, IndexerServerDDAResponse, IndexerServerEventsParams, IndexerServerEventsResponse, IndexerServerFastWithdrawalSignatureParams, IndexerServerFastWithdrawalSignatureResponse, IndexerServerFundingRate, IndexerServerFundingRateParams, IndexerServerFundingRateResponse, IndexerServerFundingRatesParams, IndexerServerFundingRatesResponse, IndexerServerInterestFundingParams, IndexerServerInterestFundingResponse, IndexerServerLeaderboardContestsParams, IndexerServerLeaderboardContestsResponse, IndexerServerLeaderboardParams, IndexerServerLeaderboardRankParams, IndexerServerLeaderboardRankResponse, IndexerServerLeaderboardRegistrationParams, IndexerServerLeaderboardRegistrationResponse, IndexerServerLeaderboardResponse, IndexerServerLinkedSignerParams, IndexerServerLinkedSignerResponse, IndexerServerListSubaccountsParams, IndexerServerListSubaccountsResponse, IndexerServerMakerStatisticsParams, IndexerServerMakerStatisticsResponse, IndexerServerMarketSnapshotsParams, IndexerServerMarketSnapshotsResponse, IndexerServerMatchEventsParams, IndexerServerMatchEventsResponse, IndexerServerMultiProductsParams, IndexerServerMultiProductsResponse, IndexerServerMultiSubaccountSnapshotsParams, IndexerServerMultiSubaccountSnapshotsResponse, IndexerServerNlpSnapshotsParams, IndexerServerNlpSnapshotsResponse, IndexerServerOraclePricesParams, IndexerServerOraclePricesResponse, IndexerServerOrdersParams, IndexerServerOrdersResponse, IndexerServerPerpPrices, IndexerServerPerpPricesParams, IndexerServerPerpPricesResponse, IndexerServerPriceParams, IndexerServerPriceResponse, IndexerServerProductsParams, IndexerServerProductsResponse, IndexerServerQueryRequestByType, IndexerServerQueryRequestType, IndexerServerQueryResponseByType, IndexerServerReferralCodeParams, IndexerServerReferralCodeResponse, IndexerServerUsdcPriceResponse } from './serverTypes.cjs';
|
|
4
|
-
export { IndexerServerBalance, IndexerServerCandlestick, IndexerServerEvent, IndexerServerLeaderboardContest, IndexerServerLeaderboardPosition, IndexerServerLeaderboardRegistration, IndexerServerMaker, IndexerServerMakerData, IndexerServerMarketSnapshot, IndexerServerMarketSnapshotInterval, IndexerServerMatchEvent, IndexerServerMatchEventBalances, IndexerServerNlpSnapshot, IndexerServerOraclePrice, IndexerServerOrder, IndexerServerProduct, IndexerServerProductPayment, IndexerServerProductSnapshot, IndexerServerSnapshotsInterval, IndexerServerTx } from './serverModelTypes.cjs';
|
|
5
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, GetIndexerProductSnapshotsParams, GetIndexerProductSnapshotsResponse, GetIndexerQuotePriceResponse, GetIndexerReferralCodeParams, GetIndexerReferralCodeResponse, GetIndexerSubaccountDDAParams, GetIndexerSubaccountDDAResponse, IndexerBalanceTrackedVars, IndexerEvent, IndexerEventBalanceStateSnapshot, IndexerEventPerpStateSnapshot, IndexerEventSpotStateSnapshot, IndexerEventWithTx, IndexerFundingRate, IndexerLeaderboardContest, IndexerLeaderboardParticipant, IndexerLeaderboardRegistration, IndexerMaker, IndexerMakerSnapshot, IndexerMarketSnapshot, IndexerMatchEvent, IndexerMatchEventBalances, IndexerNlpSnapshot, IndexerOraclePrice, IndexerOrder, IndexerPerpBalance, IndexerPerpPrices, IndexerProductPayment, IndexerProductSnapshot, IndexerSnapshotBalance, IndexerSnapshotsIntervalParams, IndexerSpotBalance, IndexerSubaccountSnapshot, ListIndexerSubaccountsParams, ListIndexerSubaccountsResponse, UpdateIndexerLeaderboardRegistrationParams, UpdateIndexerLeaderboardRegistrationResponse } from './clientTypes.cjs';
|
|
3
|
+
export { CollateralEventType } from './collateralEventType.cjs';
|
|
6
4
|
export { IndexerEventType } from './IndexerEventType.cjs';
|
|
7
5
|
export { IndexerLeaderboardRankType } from './IndexerLeaderboardType.cjs';
|
|
8
|
-
export { CollateralEventType } from './collateralEventType.cjs';
|
|
9
6
|
export { NadoDepositCollateralTx, NadoLiquidateSubaccountTx, NadoMatchOrdersRfqTx, NadoMatchOrdersTx, NadoTransferQuoteTx, NadoTx, NadoWithdrawCollateralTx } from './NadoTx.cjs';
|
|
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, IndexerServerBacklogResponse, IndexerServerCandlesticksParams, IndexerServerCandlesticksResponse, IndexerServerDDAQueryParams, IndexerServerDDAResponse, IndexerServerEventsParams, IndexerServerEventsResponse, IndexerServerFastWithdrawalSignatureParams, IndexerServerFastWithdrawalSignatureResponse, IndexerServerFundingRate, IndexerServerFundingRateParams, IndexerServerFundingRateResponse, IndexerServerFundingRatesParams, IndexerServerFundingRatesResponse, IndexerServerInterestFundingParams, IndexerServerInterestFundingResponse, IndexerServerLeaderboardContestsParams, IndexerServerLeaderboardContestsResponse, IndexerServerLeaderboardParams, IndexerServerLeaderboardRankParams, IndexerServerLeaderboardRankResponse, IndexerServerLeaderboardRegistrationParams, IndexerServerLeaderboardRegistrationResponse, IndexerServerLeaderboardResponse, IndexerServerLinkedSignerParams, IndexerServerLinkedSignerResponse, IndexerServerListSubaccountsParams, IndexerServerListSubaccountsResponse, IndexerServerMakerStatisticsParams, IndexerServerMakerStatisticsResponse, IndexerServerMarketSnapshotsParams, IndexerServerMarketSnapshotsResponse, IndexerServerMatchEventsParams, IndexerServerMatchEventsResponse, IndexerServerMultiProductsParams, IndexerServerMultiProductsResponse, IndexerServerMultiSubaccountSnapshotsParams, IndexerServerMultiSubaccountSnapshotsResponse, IndexerServerNlpSnapshotsParams, IndexerServerNlpSnapshotsResponse, IndexerServerOraclePricesParams, IndexerServerOraclePricesResponse, IndexerServerOrdersParams, IndexerServerOrdersResponse, IndexerServerPerpPrices, IndexerServerPerpPricesParams, IndexerServerPerpPricesResponse, IndexerServerPriceParams, IndexerServerPriceResponse, IndexerServerProductsParams, IndexerServerProductsResponse, IndexerServerQueryRequestByType, IndexerServerQueryRequestType, IndexerServerQueryResponseByType, IndexerServerReferralCodeParams, IndexerServerReferralCodeResponse, IndexerServerTriggerTypeFilter, IndexerServerUsdcPriceResponse } from './serverTypes.cjs';
|
|
10
10
|
import '@nadohq/shared';
|
|
11
11
|
import 'viem';
|
|
12
12
|
import '@nadohq/engine-client';
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export { Candlestick, GetIndexerBacklogResponse, GetIndexerCandlesticksParams, GetIndexerCandlesticksResponse, GetIndexerEdgeCandlesticksParams, GetIndexerEdgeCandlesticksResponse, GetIndexerEdgeMarketSnapshotResponse, GetIndexerEdgeMarketSnapshotsParams, GetIndexerEventsLimitType, GetIndexerEventsParams, GetIndexerEventsResponse, GetIndexerFastWithdrawalSignatureParams, GetIndexerFastWithdrawalSignatureResponse, GetIndexerFundingRateParams, GetIndexerFundingRateResponse, GetIndexerInterestFundingPaymentsParams, GetIndexerInterestFundingPaymentsResponse, GetIndexerLeaderboardContestsParams, GetIndexerLeaderboardContestsResponse, GetIndexerLeaderboardParams, GetIndexerLeaderboardParticipantParams, GetIndexerLeaderboardParticipantResponse, GetIndexerLeaderboardRegistrationParams, GetIndexerLeaderboardRegistrationResponse, GetIndexerLeaderboardResponse, GetIndexerLinkedSignerParams, GetIndexerLinkedSignerResponse, GetIndexerMakerStatisticsParams, GetIndexerMakerStatisticsResponse, GetIndexerMarketSnapshotsParams, GetIndexerMarketSnapshotsResponse, GetIndexerMatchEventsParams, GetIndexerMatchEventsResponse, GetIndexerMultiProductFundingRatesParams, GetIndexerMultiProductFundingRatesResponse, GetIndexerMultiProductPerpPricesParams, GetIndexerMultiProductPerpPricesResponse, GetIndexerMultiProductSnapshotsParams, GetIndexerMultiProductSnapshotsResponse, GetIndexerMultiSubaccountSnapshotsParams, GetIndexerMultiSubaccountSnapshotsResponse, GetIndexerNlpSnapshotsParams, GetIndexerNlpSnapshotsResponse, GetIndexerOraclePricesParams, GetIndexerOraclePricesResponse, GetIndexerOrdersParams, GetIndexerOrdersResponse, GetIndexerPerpPricesParams, GetIndexerPerpPricesResponse, GetIndexerProductSnapshotsParams, GetIndexerProductSnapshotsResponse, GetIndexerQuotePriceResponse, GetIndexerReferralCodeParams, GetIndexerReferralCodeResponse, GetIndexerSubaccountDDAParams, GetIndexerSubaccountDDAResponse, IndexerBalanceTrackedVars, IndexerEvent, IndexerEventBalanceStateSnapshot, IndexerEventPerpStateSnapshot, IndexerEventSpotStateSnapshot, IndexerEventWithTx, IndexerFundingRate, IndexerLeaderboardContest, IndexerLeaderboardParticipant, IndexerLeaderboardRegistration, IndexerMaker, IndexerMakerSnapshot, IndexerMarketSnapshot, IndexerMatchEvent, IndexerMatchEventBalances, IndexerNlpSnapshot, IndexerOraclePrice, IndexerOrder, IndexerPerpBalance, IndexerPerpPrices, IndexerProductPayment, IndexerProductSnapshot, IndexerSnapshotBalance, IndexerSnapshotsIntervalParams, IndexerSpotBalance, IndexerSubaccountSnapshot, ListIndexerSubaccountsParams, ListIndexerSubaccountsResponse, UpdateIndexerLeaderboardRegistrationParams, UpdateIndexerLeaderboardRegistrationResponse } from './clientTypes.js';
|
|
2
|
-
export { BaseIndexerPaginatedEvent, GetIndexerPaginatedInterestFundingPaymentsResponse, GetIndexerPaginatedLeaderboardParams, GetIndexerPaginatedLeaderboardResponse, GetIndexerPaginatedOrdersParams, GetIndexerPaginatedOrdersResponse, GetIndexerSubaccountCollateralEventsParams, GetIndexerSubaccountCollateralEventsResponse, GetIndexerSubaccountInterestFundingPaymentsParams, GetIndexerSubaccountLiquidationEventsParams, GetIndexerSubaccountLiquidationEventsResponse, GetIndexerSubaccountMatchEventParams, GetIndexerSubaccountMatchEventsResponse, GetIndexerSubaccountNlpEventsParams, GetIndexerSubaccountNlpEventsResponse, GetIndexerSubaccountSettlementEventsParams, GetIndexerSubaccountSettlementEventsResponse, IndexerCollateralEvent, IndexerLiquidationEvent, IndexerNlpEvent, IndexerPaginationMeta, IndexerPaginationParams, IndexerSettlementEvent, PaginatedIndexerEventsResponse, WithPaginationMeta } from './paginatedEventsTypes.js';
|
|
3
|
-
export { IndexerEdgeServerCandlesticksParams, IndexerEdgeServerCandlesticksResponse, IndexerEdgeServerMarketSnapshotsParams, IndexerEdgeServerMarketSnapshotsResponse, IndexerServerBacklogResponse, IndexerServerCandlesticksParams, IndexerServerCandlesticksResponse, IndexerServerDDAQueryParams, IndexerServerDDAResponse, IndexerServerEventsParams, IndexerServerEventsResponse, IndexerServerFastWithdrawalSignatureParams, IndexerServerFastWithdrawalSignatureResponse, IndexerServerFundingRate, IndexerServerFundingRateParams, IndexerServerFundingRateResponse, IndexerServerFundingRatesParams, IndexerServerFundingRatesResponse, IndexerServerInterestFundingParams, IndexerServerInterestFundingResponse, IndexerServerLeaderboardContestsParams, IndexerServerLeaderboardContestsResponse, IndexerServerLeaderboardParams, IndexerServerLeaderboardRankParams, IndexerServerLeaderboardRankResponse, IndexerServerLeaderboardRegistrationParams, IndexerServerLeaderboardRegistrationResponse, IndexerServerLeaderboardResponse, IndexerServerLinkedSignerParams, IndexerServerLinkedSignerResponse, IndexerServerListSubaccountsParams, IndexerServerListSubaccountsResponse, IndexerServerMakerStatisticsParams, IndexerServerMakerStatisticsResponse, IndexerServerMarketSnapshotsParams, IndexerServerMarketSnapshotsResponse, IndexerServerMatchEventsParams, IndexerServerMatchEventsResponse, IndexerServerMultiProductsParams, IndexerServerMultiProductsResponse, IndexerServerMultiSubaccountSnapshotsParams, IndexerServerMultiSubaccountSnapshotsResponse, IndexerServerNlpSnapshotsParams, IndexerServerNlpSnapshotsResponse, IndexerServerOraclePricesParams, IndexerServerOraclePricesResponse, IndexerServerOrdersParams, IndexerServerOrdersResponse, IndexerServerPerpPrices, IndexerServerPerpPricesParams, IndexerServerPerpPricesResponse, IndexerServerPriceParams, IndexerServerPriceResponse, IndexerServerProductsParams, IndexerServerProductsResponse, IndexerServerQueryRequestByType, IndexerServerQueryRequestType, IndexerServerQueryResponseByType, IndexerServerReferralCodeParams, IndexerServerReferralCodeResponse, IndexerServerUsdcPriceResponse } from './serverTypes.js';
|
|
4
|
-
export { IndexerServerBalance, IndexerServerCandlestick, IndexerServerEvent, IndexerServerLeaderboardContest, IndexerServerLeaderboardPosition, IndexerServerLeaderboardRegistration, IndexerServerMaker, IndexerServerMakerData, IndexerServerMarketSnapshot, IndexerServerMarketSnapshotInterval, IndexerServerMatchEvent, IndexerServerMatchEventBalances, IndexerServerNlpSnapshot, IndexerServerOraclePrice, IndexerServerOrder, IndexerServerProduct, IndexerServerProductPayment, IndexerServerProductSnapshot, IndexerServerSnapshotsInterval, IndexerServerTx } from './serverModelTypes.js';
|
|
5
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, GetIndexerProductSnapshotsParams, GetIndexerProductSnapshotsResponse, GetIndexerQuotePriceResponse, GetIndexerReferralCodeParams, GetIndexerReferralCodeResponse, GetIndexerSubaccountDDAParams, GetIndexerSubaccountDDAResponse, IndexerBalanceTrackedVars, IndexerEvent, IndexerEventBalanceStateSnapshot, IndexerEventPerpStateSnapshot, IndexerEventSpotStateSnapshot, IndexerEventWithTx, IndexerFundingRate, IndexerLeaderboardContest, IndexerLeaderboardParticipant, IndexerLeaderboardRegistration, IndexerMaker, IndexerMakerSnapshot, IndexerMarketSnapshot, IndexerMatchEvent, IndexerMatchEventBalances, IndexerNlpSnapshot, IndexerOraclePrice, IndexerOrder, IndexerPerpBalance, IndexerPerpPrices, IndexerProductPayment, IndexerProductSnapshot, IndexerSnapshotBalance, IndexerSnapshotsIntervalParams, IndexerSpotBalance, IndexerSubaccountSnapshot, ListIndexerSubaccountsParams, ListIndexerSubaccountsResponse, UpdateIndexerLeaderboardRegistrationParams, UpdateIndexerLeaderboardRegistrationResponse } from './clientTypes.js';
|
|
3
|
+
export { CollateralEventType } from './collateralEventType.js';
|
|
6
4
|
export { IndexerEventType } from './IndexerEventType.js';
|
|
7
5
|
export { IndexerLeaderboardRankType } from './IndexerLeaderboardType.js';
|
|
8
|
-
export { CollateralEventType } from './collateralEventType.js';
|
|
9
6
|
export { NadoDepositCollateralTx, NadoLiquidateSubaccountTx, NadoMatchOrdersRfqTx, NadoMatchOrdersTx, NadoTransferQuoteTx, NadoTx, NadoWithdrawCollateralTx } from './NadoTx.js';
|
|
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, IndexerServerBacklogResponse, IndexerServerCandlesticksParams, IndexerServerCandlesticksResponse, IndexerServerDDAQueryParams, IndexerServerDDAResponse, IndexerServerEventsParams, IndexerServerEventsResponse, IndexerServerFastWithdrawalSignatureParams, IndexerServerFastWithdrawalSignatureResponse, IndexerServerFundingRate, IndexerServerFundingRateParams, IndexerServerFundingRateResponse, IndexerServerFundingRatesParams, IndexerServerFundingRatesResponse, IndexerServerInterestFundingParams, IndexerServerInterestFundingResponse, IndexerServerLeaderboardContestsParams, IndexerServerLeaderboardContestsResponse, IndexerServerLeaderboardParams, IndexerServerLeaderboardRankParams, IndexerServerLeaderboardRankResponse, IndexerServerLeaderboardRegistrationParams, IndexerServerLeaderboardRegistrationResponse, IndexerServerLeaderboardResponse, IndexerServerLinkedSignerParams, IndexerServerLinkedSignerResponse, IndexerServerListSubaccountsParams, IndexerServerListSubaccountsResponse, IndexerServerMakerStatisticsParams, IndexerServerMakerStatisticsResponse, IndexerServerMarketSnapshotsParams, IndexerServerMarketSnapshotsResponse, IndexerServerMatchEventsParams, IndexerServerMatchEventsResponse, IndexerServerMultiProductsParams, IndexerServerMultiProductsResponse, IndexerServerMultiSubaccountSnapshotsParams, IndexerServerMultiSubaccountSnapshotsResponse, IndexerServerNlpSnapshotsParams, IndexerServerNlpSnapshotsResponse, IndexerServerOraclePricesParams, IndexerServerOraclePricesResponse, IndexerServerOrdersParams, IndexerServerOrdersResponse, IndexerServerPerpPrices, IndexerServerPerpPricesParams, IndexerServerPerpPricesResponse, IndexerServerPriceParams, IndexerServerPriceResponse, IndexerServerProductsParams, IndexerServerProductsResponse, IndexerServerQueryRequestByType, IndexerServerQueryRequestType, IndexerServerQueryResponseByType, IndexerServerReferralCodeParams, IndexerServerReferralCodeResponse, IndexerServerTriggerTypeFilter, IndexerServerUsdcPriceResponse } from './serverTypes.js';
|
|
10
10
|
import '@nadohq/shared';
|
|
11
11
|
import 'viem';
|
|
12
12
|
import '@nadohq/engine-client';
|
package/dist/types/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
// src/types/index.ts
|
|
2
|
-
export * from "./clientTypes.js";
|
|
3
|
-
export * from "./paginatedEventsTypes.js";
|
|
4
|
-
export * from "./serverTypes.js";
|
|
5
|
-
export * from "./serverModelTypes.js";
|
|
6
2
|
export * from "./CandlestickPeriod.js";
|
|
3
|
+
export * from "./clientTypes.js";
|
|
4
|
+
export * from "./collateralEventType.js";
|
|
7
5
|
export * from "./IndexerEventType.js";
|
|
8
6
|
export * from "./IndexerLeaderboardType.js";
|
|
9
|
-
export * from "./collateralEventType.js";
|
|
10
7
|
export * from "./NadoTx.js";
|
|
8
|
+
export * from "./paginatedEventsTypes.js";
|
|
9
|
+
export * from "./serverModelTypes.js";
|
|
10
|
+
export * from "./serverTypes.js";
|
|
11
11
|
//# sourceMappingURL=index.js.map
|
package/dist/types/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/types/index.ts"],"sourcesContent":["export * from './
|
|
1
|
+
{"version":3,"sources":["../../src/types/index.ts"],"sourcesContent":["export * from './CandlestickPeriod';\nexport * from './clientTypes';\nexport * from './collateralEventType';\nexport * from './IndexerEventType';\nexport * from './IndexerLeaderboardType';\nexport * from './NadoTx';\nexport * from './paginatedEventsTypes';\nexport * from './serverModelTypes';\nexport * from './serverTypes';\n"],"mappings":";AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;","names":[]}
|