@nadohq/indexer-client 0.1.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (121) hide show
  1. package/README.md +2 -0
  2. package/dist/IndexerBaseClient.cjs +608 -0
  3. package/dist/IndexerBaseClient.cjs.map +1 -0
  4. package/dist/IndexerBaseClient.d.cts +183 -0
  5. package/dist/IndexerBaseClient.d.ts +183 -0
  6. package/dist/IndexerBaseClient.js +605 -0
  7. package/dist/IndexerBaseClient.js.map +1 -0
  8. package/dist/IndexerClient.cjs +368 -0
  9. package/dist/IndexerClient.cjs.map +1 -0
  10. package/dist/IndexerClient.d.cts +50 -0
  11. package/dist/IndexerClient.d.ts +50 -0
  12. package/dist/IndexerClient.js +348 -0
  13. package/dist/IndexerClient.js.map +1 -0
  14. package/dist/dataMappers.cjs +324 -0
  15. package/dist/dataMappers.cjs.map +1 -0
  16. package/dist/dataMappers.d.cts +31 -0
  17. package/dist/dataMappers.d.ts +31 -0
  18. package/dist/dataMappers.js +296 -0
  19. package/dist/dataMappers.js.map +1 -0
  20. package/dist/endpoints.cjs +35 -0
  21. package/dist/endpoints.cjs.map +1 -0
  22. package/dist/endpoints.d.cts +5 -0
  23. package/dist/endpoints.d.ts +5 -0
  24. package/dist/endpoints.js +10 -0
  25. package/dist/endpoints.js.map +1 -0
  26. package/dist/index.cjs +31 -0
  27. package/dist/index.cjs.map +1 -0
  28. package/dist/index.d.cts +18 -0
  29. package/dist/index.d.ts +18 -0
  30. package/dist/index.js +6 -0
  31. package/dist/index.js.map +1 -0
  32. package/dist/types/CandlestickPeriod.cjs +42 -0
  33. package/dist/types/CandlestickPeriod.cjs.map +1 -0
  34. package/dist/types/CandlestickPeriod.d.cts +13 -0
  35. package/dist/types/CandlestickPeriod.d.ts +13 -0
  36. package/dist/types/CandlestickPeriod.js +17 -0
  37. package/dist/types/CandlestickPeriod.js.map +1 -0
  38. package/dist/types/IndexerEventType.cjs +19 -0
  39. package/dist/types/IndexerEventType.cjs.map +1 -0
  40. package/dist/types/IndexerEventType.d.cts +3 -0
  41. package/dist/types/IndexerEventType.d.ts +3 -0
  42. package/dist/types/IndexerEventType.js +1 -0
  43. package/dist/types/IndexerEventType.js.map +1 -0
  44. package/dist/types/IndexerLeaderboardType.cjs +19 -0
  45. package/dist/types/IndexerLeaderboardType.cjs.map +1 -0
  46. package/dist/types/IndexerLeaderboardType.d.cts +3 -0
  47. package/dist/types/IndexerLeaderboardType.d.ts +3 -0
  48. package/dist/types/IndexerLeaderboardType.js +1 -0
  49. package/dist/types/IndexerLeaderboardType.js.map +1 -0
  50. package/dist/types/NadoTx.cjs +19 -0
  51. package/dist/types/NadoTx.cjs.map +1 -0
  52. package/dist/types/NadoTx.d.cts +49 -0
  53. package/dist/types/NadoTx.d.ts +49 -0
  54. package/dist/types/NadoTx.js +1 -0
  55. package/dist/types/NadoTx.js.map +1 -0
  56. package/dist/types/clientTypes.cjs +19 -0
  57. package/dist/types/clientTypes.cjs.map +1 -0
  58. package/dist/types/clientTypes.d.cts +467 -0
  59. package/dist/types/clientTypes.d.ts +467 -0
  60. package/dist/types/clientTypes.js +1 -0
  61. package/dist/types/clientTypes.js.map +1 -0
  62. package/dist/types/collateralEventType.cjs +19 -0
  63. package/dist/types/collateralEventType.cjs.map +1 -0
  64. package/dist/types/collateralEventType.d.cts +3 -0
  65. package/dist/types/collateralEventType.d.ts +3 -0
  66. package/dist/types/collateralEventType.js +1 -0
  67. package/dist/types/collateralEventType.js.map +1 -0
  68. package/dist/types/index.cjs +41 -0
  69. package/dist/types/index.cjs.map +1 -0
  70. package/dist/types/index.d.cts +13 -0
  71. package/dist/types/index.d.ts +13 -0
  72. package/dist/types/index.js +11 -0
  73. package/dist/types/index.js.map +1 -0
  74. package/dist/types/paginatedEventsTypes.cjs +19 -0
  75. package/dist/types/paginatedEventsTypes.cjs.map +1 -0
  76. package/dist/types/paginatedEventsTypes.d.cts +115 -0
  77. package/dist/types/paginatedEventsTypes.d.ts +115 -0
  78. package/dist/types/paginatedEventsTypes.js +1 -0
  79. package/dist/types/paginatedEventsTypes.js.map +1 -0
  80. package/dist/types/serverModelTypes.cjs +19 -0
  81. package/dist/types/serverModelTypes.cjs.map +1 -0
  82. package/dist/types/serverModelTypes.d.cts +224 -0
  83. package/dist/types/serverModelTypes.d.ts +224 -0
  84. package/dist/types/serverModelTypes.js +1 -0
  85. package/dist/types/serverModelTypes.js.map +1 -0
  86. package/dist/types/serverTypes.cjs +19 -0
  87. package/dist/types/serverTypes.cjs.map +1 -0
  88. package/dist/types/serverTypes.d.cts +304 -0
  89. package/dist/types/serverTypes.d.ts +304 -0
  90. package/dist/types/serverTypes.js +1 -0
  91. package/dist/types/serverTypes.js.map +1 -0
  92. package/dist/utils/index.cjs +25 -0
  93. package/dist/utils/index.cjs.map +1 -0
  94. package/dist/utils/index.d.cts +12 -0
  95. package/dist/utils/index.d.ts +12 -0
  96. package/dist/utils/index.js +3 -0
  97. package/dist/utils/index.js.map +1 -0
  98. package/dist/utils/indexerBalanceValue.cjs +43 -0
  99. package/dist/utils/indexerBalanceValue.cjs.map +1 -0
  100. package/dist/utils/indexerBalanceValue.d.cts +39 -0
  101. package/dist/utils/indexerBalanceValue.d.ts +39 -0
  102. package/dist/utils/indexerBalanceValue.js +16 -0
  103. package/dist/utils/indexerBalanceValue.js.map +1 -0
  104. package/package.json +53 -0
  105. package/src/IndexerBaseClient.ts +851 -0
  106. package/src/IndexerClient.ts +468 -0
  107. package/src/dataMappers.ts +362 -0
  108. package/src/endpoints.ts +7 -0
  109. package/src/index.ts +4 -0
  110. package/src/types/CandlestickPeriod.ts +11 -0
  111. package/src/types/IndexerEventType.ts +9 -0
  112. package/src/types/IndexerLeaderboardType.ts +2 -0
  113. package/src/types/NadoTx.ts +63 -0
  114. package/src/types/clientTypes.ts +679 -0
  115. package/src/types/collateralEventType.ts +4 -0
  116. package/src/types/index.ts +9 -0
  117. package/src/types/paginatedEventsTypes.ts +194 -0
  118. package/src/types/serverModelTypes.ts +271 -0
  119. package/src/types/serverTypes.ts +427 -0
  120. package/src/utils/index.ts +1 -0
  121. package/src/utils/indexerBalanceValue.ts +46 -0
@@ -0,0 +1,467 @@
1
+ import { Subaccount, ProductEngineType, SpotBalance, SpotMarket, PerpBalance, PerpMarket, Market, OrderExpirationType, EIP712OrderValues } from '@nadohq/contracts';
2
+ import { BigDecimal } from '@nadohq/utils';
3
+ import { Hex } from 'viem';
4
+ import { CandlestickPeriod } from './CandlestickPeriod.js';
5
+ import { IndexerEventType } from './IndexerEventType.js';
6
+ import { IndexerLeaderboardRankType } from './IndexerLeaderboardType.js';
7
+ import { IndexerServerListSubaccountsParams, IndexerServerFastWithdrawalSignatureParams } from './serverTypes.js';
8
+ import { NadoTx, NadoWithdrawCollateralTx } from './NadoTx.js';
9
+ import './serverModelTypes.js';
10
+ import '@nadohq/engine-client';
11
+
12
+ /**
13
+ * Base types
14
+ */
15
+ type IndexerSpotBalance = Omit<SpotBalance, 'healthContributions'>;
16
+ type IndexerPerpBalance = Omit<PerpBalance, 'healthContributions'>;
17
+ interface IndexerEventSpotStateSnapshot {
18
+ type: ProductEngineType.SPOT;
19
+ preBalance: IndexerSpotBalance;
20
+ postBalance: IndexerSpotBalance;
21
+ market: SpotMarket;
22
+ }
23
+ interface IndexerEventPerpStateSnapshot {
24
+ type: ProductEngineType.PERP;
25
+ preBalance: IndexerPerpBalance;
26
+ postBalance: IndexerPerpBalance;
27
+ market: PerpMarket;
28
+ }
29
+ type IndexerEventBalanceStateSnapshot = IndexerEventSpotStateSnapshot | IndexerEventPerpStateSnapshot;
30
+ interface IndexerBalanceTrackedVars {
31
+ netInterestUnrealized: BigDecimal;
32
+ netInterestCumulative: BigDecimal;
33
+ netFundingUnrealized: BigDecimal;
34
+ netFundingCumulative: BigDecimal;
35
+ netEntryUnrealized: BigDecimal;
36
+ netEntryCumulative: BigDecimal;
37
+ }
38
+ interface IndexerEvent<TStateType extends IndexerEventBalanceStateSnapshot = IndexerEventBalanceStateSnapshot> {
39
+ subaccount: string;
40
+ isolated: boolean;
41
+ isolatedProductId: number | null;
42
+ productId: number;
43
+ submissionIndex: string;
44
+ eventType: IndexerEventType;
45
+ state: TStateType;
46
+ trackedVars: IndexerBalanceTrackedVars;
47
+ }
48
+ interface IndexerEventWithTx<TStateType extends IndexerEventBalanceStateSnapshot = IndexerEventBalanceStateSnapshot> extends IndexerEvent<TStateType> {
49
+ timestamp: BigDecimal;
50
+ tx: NadoTx;
51
+ }
52
+ /**
53
+ * List subaccounts
54
+ */
55
+ type ListIndexerSubaccountsParams = IndexerServerListSubaccountsParams;
56
+ type ListIndexerSubaccountsResponse = ({
57
+ hexId: string;
58
+ } & Subaccount)[];
59
+ /**
60
+ * Subaccount snapshots
61
+ */
62
+ interface GetIndexerMultiSubaccountSnapshotsParams {
63
+ subaccounts: Subaccount[];
64
+ timestamps: number[];
65
+ isolated?: boolean;
66
+ }
67
+ type IndexerSnapshotBalance<TStateType extends IndexerEventBalanceStateSnapshot = IndexerEventBalanceStateSnapshot> = IndexerEvent<TStateType>;
68
+ interface IndexerSubaccountSnapshot {
69
+ timestamp: BigDecimal;
70
+ balances: IndexerSnapshotBalance[];
71
+ }
72
+ interface GetIndexerMultiSubaccountSnapshotsResponse {
73
+ subaccountHexIds: string[];
74
+ snapshots: Record<string, Record<string, IndexerSubaccountSnapshot>>;
75
+ }
76
+ /**
77
+ * Perp prices
78
+ */
79
+ interface GetIndexerPerpPricesParams {
80
+ productId: number;
81
+ }
82
+ interface IndexerPerpPrices {
83
+ productId: number;
84
+ indexPrice: BigDecimal;
85
+ markPrice: BigDecimal;
86
+ updateTime: BigDecimal;
87
+ }
88
+ type GetIndexerPerpPricesResponse = IndexerPerpPrices;
89
+ interface GetIndexerMultiProductPerpPricesParams {
90
+ productIds: number[];
91
+ }
92
+ type GetIndexerMultiProductPerpPricesResponse = Record<number, IndexerPerpPrices>;
93
+ /**
94
+ * Oracle prices
95
+ */
96
+ interface GetIndexerOraclePricesParams {
97
+ productIds: number[];
98
+ }
99
+ interface IndexerOraclePrice {
100
+ productId: number;
101
+ oraclePrice: BigDecimal;
102
+ updateTime: BigDecimal;
103
+ }
104
+ type GetIndexerOraclePricesResponse = IndexerOraclePrice[];
105
+ /**
106
+ * Funding rates
107
+ */
108
+ interface GetIndexerFundingRateParams {
109
+ productId: number;
110
+ }
111
+ interface IndexerFundingRate {
112
+ productId: number;
113
+ fundingRate: BigDecimal;
114
+ updateTime: BigDecimal;
115
+ }
116
+ type GetIndexerFundingRateResponse = IndexerFundingRate;
117
+ interface GetIndexerMultiProductFundingRatesParams {
118
+ productIds: number[];
119
+ }
120
+ type GetIndexerMultiProductFundingRatesResponse = Record<number, IndexerFundingRate>;
121
+ /**
122
+ * Candlesticks
123
+ */
124
+ interface GetIndexerCandlesticksParams {
125
+ productId: number;
126
+ period: CandlestickPeriod;
127
+ maxTimeInclusive?: number;
128
+ limit: number;
129
+ }
130
+ interface Candlestick {
131
+ time: BigDecimal;
132
+ open: BigDecimal;
133
+ high: BigDecimal;
134
+ low: BigDecimal;
135
+ close: BigDecimal;
136
+ volume: BigDecimal;
137
+ }
138
+ type GetIndexerCandlesticksResponse = Candlestick[];
139
+ type GetIndexerEdgeCandlesticksResponse = GetIndexerCandlesticksResponse;
140
+ type GetIndexerEdgeCandlesticksParams = GetIndexerCandlesticksParams;
141
+ /**
142
+ * Product snapshots
143
+ */
144
+ interface GetIndexerProductSnapshotsParams {
145
+ startCursor?: string;
146
+ productId: number;
147
+ maxTimestampInclusive?: number;
148
+ limit: number;
149
+ }
150
+ interface IndexerProductSnapshot extends Market {
151
+ submissionIndex: string;
152
+ }
153
+ type GetIndexerProductSnapshotsResponse = IndexerProductSnapshot[];
154
+ interface GetIndexerMultiProductSnapshotsParams {
155
+ productIds: number[];
156
+ maxTimestampInclusive?: number[];
157
+ }
158
+ type GetIndexerMultiProductSnapshotsResponse = Record<string, Record<number, IndexerProductSnapshot>>;
159
+ interface IndexerSnapshotsIntervalParams {
160
+ /** Currently accepts all integers, in seconds */
161
+ granularity: number;
162
+ /**
163
+ * Optional upper bound for snapshot timestamps (in seconds).
164
+ * Without this, snapshots will default to align with last UTC midnight,
165
+ * which can make "Last 24h" metrics inaccurate.
166
+ */
167
+ maxTimeInclusive?: number;
168
+ limit: number;
169
+ }
170
+ /**
171
+ * Market snapshots
172
+ */
173
+ interface GetIndexerMarketSnapshotsParams extends IndexerSnapshotsIntervalParams {
174
+ productIds?: number[];
175
+ }
176
+ interface IndexerMarketSnapshot {
177
+ timestamp: BigDecimal;
178
+ cumulativeUsers: BigDecimal;
179
+ dailyActiveUsers: BigDecimal;
180
+ tvl: BigDecimal;
181
+ cumulativeVolumes: Record<number, BigDecimal>;
182
+ cumulativeTakerFees: Record<number, BigDecimal>;
183
+ cumulativeSequencerFees: Record<number, BigDecimal>;
184
+ cumulativeMakerFees: Record<number, BigDecimal>;
185
+ cumulativeTrades: Record<number, BigDecimal>;
186
+ cumulativeLiquidationAmounts: Record<number, BigDecimal>;
187
+ openInterestsQuote: Record<number, BigDecimal>;
188
+ totalDeposits: Record<number, BigDecimal>;
189
+ totalBorrows: Record<number, BigDecimal>;
190
+ fundingRates: Record<number, BigDecimal>;
191
+ depositRates: Record<number, BigDecimal>;
192
+ borrowRates: Record<number, BigDecimal>;
193
+ cumulativeTradeSizes: Record<number, BigDecimal>;
194
+ cumulativeInflows: Record<number, BigDecimal>;
195
+ cumulativeOutflows: Record<number, BigDecimal>;
196
+ oraclePrices: Record<number, BigDecimal>;
197
+ }
198
+ type GetIndexerMarketSnapshotsResponse = IndexerMarketSnapshot[];
199
+ type GetIndexerEdgeMarketSnapshotsParams = IndexerSnapshotsIntervalParams;
200
+ type GetIndexerEdgeMarketSnapshotResponse = Record<number, IndexerMarketSnapshot[]>;
201
+ /**
202
+ * Events
203
+ */
204
+ type GetIndexerEventsLimitType = 'events' | 'txs';
205
+ interface GetIndexerEventsParams {
206
+ startCursor?: string;
207
+ subaccount?: Subaccount;
208
+ productIds?: number[];
209
+ isolated?: boolean;
210
+ eventTypes?: IndexerEventType[];
211
+ maxTimestampInclusive?: number;
212
+ desc?: boolean;
213
+ limit?: {
214
+ type: GetIndexerEventsLimitType;
215
+ value: number;
216
+ };
217
+ }
218
+ type GetIndexerEventsResponse = IndexerEventWithTx[];
219
+ /**
220
+ * Historical orders
221
+ */
222
+ interface GetIndexerOrdersParams {
223
+ startCursor?: string;
224
+ subaccount?: Subaccount;
225
+ minTimestampInclusive?: number;
226
+ maxTimestampInclusive?: number;
227
+ limit?: number;
228
+ productIds?: number[];
229
+ isolated?: boolean;
230
+ digests?: string[];
231
+ }
232
+ interface IndexerOrder {
233
+ digest: string;
234
+ subaccount: string;
235
+ isolated: boolean;
236
+ productId: number;
237
+ submissionIndex: string;
238
+ amount: BigDecimal;
239
+ price: BigDecimal;
240
+ rawExpiration: BigDecimal;
241
+ isReduceOnly: boolean;
242
+ orderType: OrderExpirationType;
243
+ expiration: number;
244
+ nonce: BigDecimal;
245
+ recvTimeSeconds: number;
246
+ baseFilled: BigDecimal;
247
+ quoteFilled: BigDecimal;
248
+ totalFee: BigDecimal;
249
+ }
250
+ type GetIndexerOrdersResponse = IndexerOrder[];
251
+ /**
252
+ * Match events
253
+ */
254
+ interface GetIndexerMatchEventsParams {
255
+ subaccount?: Subaccount;
256
+ productIds?: number[];
257
+ isolated?: boolean;
258
+ maxTimestampInclusive?: number;
259
+ limit: number;
260
+ startCursor?: string;
261
+ }
262
+ interface IndexerMatchEventBalances {
263
+ base: IndexerSpotBalance | IndexerPerpBalance;
264
+ quote?: IndexerSpotBalance;
265
+ }
266
+ interface IndexerMatchEvent extends Subaccount {
267
+ productId: number;
268
+ digest: string;
269
+ isolated: boolean;
270
+ order: EIP712OrderValues;
271
+ baseFilled: BigDecimal;
272
+ quoteFilled: BigDecimal;
273
+ totalFee: BigDecimal;
274
+ sequencerFee: BigDecimal;
275
+ cumulativeBaseFilled: BigDecimal;
276
+ cumulativeQuoteFilled: BigDecimal;
277
+ cumulativeFee: BigDecimal;
278
+ submissionIndex: string;
279
+ timestamp: BigDecimal;
280
+ preEventTrackedVars: Pick<IndexerBalanceTrackedVars, 'netEntryCumulative' | 'netEntryUnrealized'>;
281
+ preBalances: IndexerMatchEventBalances;
282
+ postBalances: IndexerMatchEventBalances;
283
+ tx: NadoTx;
284
+ }
285
+ type GetIndexerMatchEventsResponse = IndexerMatchEvent[];
286
+ /**
287
+ * Quote price
288
+ */
289
+ interface GetIndexerQuotePriceResponse {
290
+ price: BigDecimal;
291
+ }
292
+ /**
293
+ * Linked Signer
294
+ */
295
+ interface GetIndexerLinkedSignerParams {
296
+ subaccount: Subaccount;
297
+ }
298
+ interface GetIndexerLinkedSignerResponse {
299
+ totalTxLimit: BigDecimal;
300
+ remainingTxs: BigDecimal;
301
+ waitTimeUntilNextTx: BigDecimal;
302
+ signer: string;
303
+ }
304
+ /**
305
+ * Interest / funding payments
306
+ */
307
+ interface GetIndexerInterestFundingPaymentsParams {
308
+ subaccount: Subaccount;
309
+ productIds: number[];
310
+ maxTimestampInclusive?: number;
311
+ limit: number;
312
+ startCursor?: string;
313
+ }
314
+ interface IndexerProductPayment {
315
+ productId: number;
316
+ submissionIndex: string;
317
+ timestamp: BigDecimal;
318
+ paymentAmount: BigDecimal;
319
+ balanceAmount: BigDecimal;
320
+ annualPaymentRate: BigDecimal;
321
+ oraclePrice: BigDecimal;
322
+ isolated: boolean;
323
+ isolatedProductId: number | null;
324
+ }
325
+ interface GetIndexerInterestFundingPaymentsResponse {
326
+ interestPayments: IndexerProductPayment[];
327
+ fundingPayments: IndexerProductPayment[];
328
+ nextCursor: string | null;
329
+ }
330
+ /**
331
+ * Referral code
332
+ */
333
+ interface GetIndexerReferralCodeParams {
334
+ subaccount: Subaccount;
335
+ }
336
+ interface GetIndexerReferralCodeResponse {
337
+ referralCode: string | null;
338
+ }
339
+ /**
340
+ * Maker stats
341
+ */
342
+ interface GetIndexerMakerStatisticsParams {
343
+ productId: number;
344
+ epoch: number;
345
+ interval: number;
346
+ }
347
+ interface IndexerMakerSnapshot {
348
+ timestamp: BigDecimal;
349
+ makerFee: BigDecimal;
350
+ uptime: BigDecimal;
351
+ sumQMin: BigDecimal;
352
+ qScore: BigDecimal;
353
+ makerShare: BigDecimal;
354
+ expectedMakerReward: BigDecimal;
355
+ }
356
+ interface IndexerMaker {
357
+ address: string;
358
+ snapshots: IndexerMakerSnapshot[];
359
+ }
360
+ interface GetIndexerMakerStatisticsResponse {
361
+ rewardCoefficient: BigDecimal;
362
+ makers: IndexerMaker[];
363
+ }
364
+ /**
365
+ * Leaderboards
366
+ */
367
+ interface GetIndexerLeaderboardParams {
368
+ contestId: number;
369
+ rankType: IndexerLeaderboardRankType;
370
+ startCursor?: string;
371
+ limit?: number;
372
+ }
373
+ interface IndexerLeaderboardParticipant {
374
+ subaccount: Subaccount;
375
+ contestId: number;
376
+ pnl: BigDecimal;
377
+ pnlRank: BigDecimal;
378
+ percentRoi: BigDecimal;
379
+ roiRank: BigDecimal;
380
+ accountValue: BigDecimal;
381
+ volume?: BigDecimal;
382
+ updateTime: BigDecimal;
383
+ }
384
+ interface GetIndexerLeaderboardResponse {
385
+ participants: IndexerLeaderboardParticipant[];
386
+ }
387
+ interface GetIndexerLeaderboardParticipantParams {
388
+ contestIds: number[];
389
+ subaccount: Subaccount;
390
+ }
391
+ interface GetIndexerLeaderboardParticipantResponse {
392
+ participant: Record<string, IndexerLeaderboardParticipant>;
393
+ }
394
+ interface LeaderboardSignatureParams {
395
+ verifyingAddr: string;
396
+ chainId: number;
397
+ }
398
+ interface GetIndexerLeaderboardRegistrationParams extends Subaccount {
399
+ contestId: number;
400
+ }
401
+ interface UpdateIndexerLeaderboardRegistrationParams extends GetIndexerLeaderboardRegistrationParams {
402
+ updateRegistration: LeaderboardSignatureParams;
403
+ recvTime?: BigDecimal;
404
+ }
405
+ interface IndexerLeaderboardRegistration {
406
+ subaccount: Subaccount;
407
+ contestId: number;
408
+ updateTime: BigDecimal;
409
+ }
410
+ interface GetIndexerLeaderboardRegistrationResponse {
411
+ registration: IndexerLeaderboardRegistration | null;
412
+ }
413
+ type UpdateIndexerLeaderboardRegistrationResponse = GetIndexerLeaderboardRegistrationResponse;
414
+ interface GetIndexerLeaderboardContestsParams {
415
+ contestIds: number[];
416
+ }
417
+ interface IndexerLeaderboardContest {
418
+ contestId: number;
419
+ startTime: BigDecimal;
420
+ endTime: BigDecimal;
421
+ period: BigDecimal;
422
+ lastUpdated: BigDecimal;
423
+ totalParticipants: BigDecimal;
424
+ minRequiredAccountValue: BigDecimal;
425
+ minRequiredVolume: BigDecimal;
426
+ requiredProductIds: number[];
427
+ active: boolean;
428
+ }
429
+ interface GetIndexerLeaderboardContestsResponse {
430
+ contests: IndexerLeaderboardContest[];
431
+ }
432
+ type GetIndexerFastWithdrawalSignatureParams = IndexerServerFastWithdrawalSignatureParams;
433
+ interface GetIndexerFastWithdrawalSignatureResponse {
434
+ idx: bigint;
435
+ tx: NadoWithdrawCollateralTx['withdraw_collateral'];
436
+ txBytes: Hex;
437
+ signatures: Hex[];
438
+ }
439
+ /**
440
+ * VLP
441
+ */
442
+ type GetIndexerVlpSnapshotsParams = IndexerSnapshotsIntervalParams;
443
+ interface IndexerVlpSnapshot {
444
+ submissionIndex: string;
445
+ timestamp: BigDecimal;
446
+ cumulativeVolume: BigDecimal;
447
+ cumulativeTrades: BigDecimal;
448
+ cumulativeMintAmountUsdc: BigDecimal;
449
+ cumulativeBurnAmountUsdc: BigDecimal;
450
+ cumulativePnl: BigDecimal;
451
+ tvl: BigDecimal;
452
+ oraclePrice: BigDecimal;
453
+ depositors: BigDecimal;
454
+ }
455
+ interface GetIndexerVlpSnapshotsResponse {
456
+ snapshots: IndexerVlpSnapshot[];
457
+ }
458
+ interface GetIndexerBacklogResponse {
459
+ totalTxs: BigDecimal;
460
+ totalSubmissions: BigDecimal;
461
+ backlogSize: BigDecimal;
462
+ updatedAt: BigDecimal;
463
+ backlogEtaInSeconds: BigDecimal | null;
464
+ txsPerSecond: BigDecimal | null;
465
+ }
466
+
467
+ export type { Candlestick, GetIndexerBacklogResponse, GetIndexerCandlesticksParams, GetIndexerCandlesticksResponse, GetIndexerEdgeCandlesticksParams, GetIndexerEdgeCandlesticksResponse, GetIndexerEdgeMarketSnapshotResponse, GetIndexerEdgeMarketSnapshotsParams, GetIndexerEventsLimitType, GetIndexerEventsParams, GetIndexerEventsResponse, GetIndexerFastWithdrawalSignatureParams, GetIndexerFastWithdrawalSignatureResponse, GetIndexerFundingRateParams, GetIndexerFundingRateResponse, GetIndexerInterestFundingPaymentsParams, GetIndexerInterestFundingPaymentsResponse, GetIndexerLeaderboardContestsParams, GetIndexerLeaderboardContestsResponse, GetIndexerLeaderboardParams, GetIndexerLeaderboardParticipantParams, GetIndexerLeaderboardParticipantResponse, GetIndexerLeaderboardRegistrationParams, GetIndexerLeaderboardRegistrationResponse, GetIndexerLeaderboardResponse, GetIndexerLinkedSignerParams, GetIndexerLinkedSignerResponse, GetIndexerMakerStatisticsParams, GetIndexerMakerStatisticsResponse, GetIndexerMarketSnapshotsParams, GetIndexerMarketSnapshotsResponse, GetIndexerMatchEventsParams, GetIndexerMatchEventsResponse, GetIndexerMultiProductFundingRatesParams, GetIndexerMultiProductFundingRatesResponse, GetIndexerMultiProductPerpPricesParams, GetIndexerMultiProductPerpPricesResponse, GetIndexerMultiProductSnapshotsParams, GetIndexerMultiProductSnapshotsResponse, GetIndexerMultiSubaccountSnapshotsParams, GetIndexerMultiSubaccountSnapshotsResponse, GetIndexerOraclePricesParams, GetIndexerOraclePricesResponse, GetIndexerOrdersParams, GetIndexerOrdersResponse, GetIndexerPerpPricesParams, GetIndexerPerpPricesResponse, GetIndexerProductSnapshotsParams, GetIndexerProductSnapshotsResponse, GetIndexerQuotePriceResponse, GetIndexerReferralCodeParams, GetIndexerReferralCodeResponse, GetIndexerVlpSnapshotsParams, GetIndexerVlpSnapshotsResponse, IndexerBalanceTrackedVars, IndexerEvent, IndexerEventBalanceStateSnapshot, IndexerEventPerpStateSnapshot, IndexerEventSpotStateSnapshot, IndexerEventWithTx, IndexerFundingRate, IndexerLeaderboardContest, IndexerLeaderboardParticipant, IndexerLeaderboardRegistration, IndexerMaker, IndexerMakerSnapshot, IndexerMarketSnapshot, IndexerMatchEvent, IndexerMatchEventBalances, IndexerOraclePrice, IndexerOrder, IndexerPerpBalance, IndexerPerpPrices, IndexerProductPayment, IndexerProductSnapshot, IndexerSnapshotBalance, IndexerSnapshotsIntervalParams, IndexerSpotBalance, IndexerSubaccountSnapshot, IndexerVlpSnapshot, ListIndexerSubaccountsParams, ListIndexerSubaccountsResponse, UpdateIndexerLeaderboardRegistrationParams, UpdateIndexerLeaderboardRegistrationResponse };
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=clientTypes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+
16
+ // src/types/collateralEventType.ts
17
+ var collateralEventType_exports = {};
18
+ module.exports = __toCommonJS(collateralEventType_exports);
19
+ //# sourceMappingURL=collateralEventType.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/types/collateralEventType.ts"],"sourcesContent":["export type CollateralEventType =\n | 'deposit_collateral'\n | 'withdraw_collateral'\n | 'transfer_quote';\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
@@ -0,0 +1,3 @@
1
+ type CollateralEventType = 'deposit_collateral' | 'withdraw_collateral' | 'transfer_quote';
2
+
3
+ export type { CollateralEventType };
@@ -0,0 +1,3 @@
1
+ type CollateralEventType = 'deposit_collateral' | 'withdraw_collateral' | 'transfer_quote';
2
+
3
+ export type { CollateralEventType };
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=collateralEventType.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
15
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
16
+
17
+ // src/types/index.ts
18
+ var types_exports = {};
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
+ __reExport(types_exports, require("./CandlestickPeriod.cjs"), module.exports);
25
+ __reExport(types_exports, require("./IndexerEventType.cjs"), module.exports);
26
+ __reExport(types_exports, require("./IndexerLeaderboardType.cjs"), module.exports);
27
+ __reExport(types_exports, require("./collateralEventType.cjs"), module.exports);
28
+ __reExport(types_exports, require("./NadoTx.cjs"), module.exports);
29
+ // Annotate the CommonJS export names for ESM import in node:
30
+ 0 && (module.exports = {
31
+ ...require("./clientTypes.cjs"),
32
+ ...require("./paginatedEventsTypes.cjs"),
33
+ ...require("./serverTypes.cjs"),
34
+ ...require("./serverModelTypes.cjs"),
35
+ ...require("./CandlestickPeriod.cjs"),
36
+ ...require("./IndexerEventType.cjs"),
37
+ ...require("./IndexerLeaderboardType.cjs"),
38
+ ...require("./collateralEventType.cjs"),
39
+ ...require("./NadoTx.cjs")
40
+ });
41
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/types/index.ts"],"sourcesContent":["export * from './clientTypes';\nexport * from './paginatedEventsTypes';\nexport * from './serverTypes';\nexport * from './serverModelTypes';\nexport * from './CandlestickPeriod';\nexport * from './IndexerEventType';\nexport * from './IndexerLeaderboardType';\nexport * from './collateralEventType';\nexport * from './NadoTx';\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,0BAAc,8BAAd;AACA,0BAAc,uCADd;AAEA,0BAAc,8BAFd;AAGA,0BAAc,mCAHd;AAIA,0BAAc,oCAJd;AAKA,0BAAc,mCALd;AAMA,0BAAc,yCANd;AAOA,0BAAc,sCAPd;AAQA,0BAAc,yBARd;","names":[]}
@@ -0,0 +1,13 @@
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, GetIndexerOraclePricesParams, GetIndexerOraclePricesResponse, GetIndexerOrdersParams, GetIndexerOrdersResponse, GetIndexerPerpPricesParams, GetIndexerPerpPricesResponse, GetIndexerProductSnapshotsParams, GetIndexerProductSnapshotsResponse, GetIndexerQuotePriceResponse, GetIndexerReferralCodeParams, GetIndexerReferralCodeResponse, GetIndexerVlpSnapshotsParams, GetIndexerVlpSnapshotsResponse, IndexerBalanceTrackedVars, IndexerEvent, IndexerEventBalanceStateSnapshot, IndexerEventPerpStateSnapshot, IndexerEventSpotStateSnapshot, IndexerEventWithTx, IndexerFundingRate, IndexerLeaderboardContest, IndexerLeaderboardParticipant, IndexerLeaderboardRegistration, IndexerMaker, IndexerMakerSnapshot, IndexerMarketSnapshot, IndexerMatchEvent, IndexerMatchEventBalances, IndexerOraclePrice, IndexerOrder, IndexerPerpBalance, IndexerPerpPrices, IndexerProductPayment, IndexerProductSnapshot, IndexerSnapshotBalance, IndexerSnapshotsIntervalParams, IndexerSpotBalance, IndexerSubaccountSnapshot, IndexerVlpSnapshot, ListIndexerSubaccountsParams, ListIndexerSubaccountsResponse, UpdateIndexerLeaderboardRegistrationParams, UpdateIndexerLeaderboardRegistrationResponse } from './clientTypes.cjs';
2
+ export { BaseIndexerPaginatedEvent, GetIndexerPaginatedInterestFundingPaymentsResponse, GetIndexerPaginatedLeaderboardParams, GetIndexerPaginatedLeaderboardResponse, GetIndexerPaginatedOrdersParams, GetIndexerPaginatedOrdersResponse, GetIndexerSubaccountCollateralEventsParams, GetIndexerSubaccountCollateralEventsResponse, GetIndexerSubaccountInterestFundingPaymentsParams, GetIndexerSubaccountLiquidationEventsParams, GetIndexerSubaccountLiquidationEventsResponse, GetIndexerSubaccountMatchEventParams, GetIndexerSubaccountMatchEventsResponse, GetIndexerSubaccountSettlementEventsParams, GetIndexerSubaccountSettlementEventsResponse, GetIndexerSubaccountVlpEventsParams, GetIndexerSubaccountVlpEventsResponse, IndexerCollateralEvent, IndexerLiquidationEvent, IndexerPaginationMeta, IndexerPaginationParams, IndexerSettlementEvent, IndexerVlpEvent, PaginatedIndexerEventsResponse, WithPaginationMeta } from './paginatedEventsTypes.cjs';
3
+ export { IndexerEdgeServerCandlesticksParams, IndexerEdgeServerCandlesticksResponse, IndexerEdgeServerMarketSnapshotsParams, IndexerEdgeServerMarketSnapshotsResponse, IndexerServerBacklogResponse, IndexerServerCandlesticksParams, IndexerServerCandlesticksResponse, IndexerServerEventsParams, IndexerServerEventsResponse, IndexerServerFastWithdrawalSignatureParams, IndexerServerFastWithdrawalSignatureResponse, IndexerServerFundingRate, IndexerServerFundingRateParams, IndexerServerFundingRateResponse, IndexerServerFundingRatesParams, IndexerServerFundingRatesResponse, IndexerServerInterestFundingParams, IndexerServerInterestFundingResponse, IndexerServerLeaderboardContestsParams, IndexerServerLeaderboardContestsResponse, IndexerServerLeaderboardParams, IndexerServerLeaderboardRankParams, IndexerServerLeaderboardRankResponse, IndexerServerLeaderboardRegistrationParams, IndexerServerLeaderboardRegistrationResponse, IndexerServerLeaderboardResponse, IndexerServerLinkedSignerParams, IndexerServerLinkedSignerResponse, IndexerServerListSubaccountsParams, IndexerServerListSubaccountsResponse, IndexerServerMakerStatisticsParams, IndexerServerMakerStatisticsResponse, IndexerServerMarketSnapshotsParams, IndexerServerMarketSnapshotsResponse, IndexerServerMatchEventsParams, IndexerServerMatchEventsResponse, IndexerServerMultiProductsParams, IndexerServerMultiProductsResponse, IndexerServerMultiSubaccountSnapshotsParams, IndexerServerMultiSubaccountSnapshotsResponse, IndexerServerOraclePricesParams, IndexerServerOraclePricesResponse, IndexerServerOrdersParams, IndexerServerOrdersResponse, IndexerServerPerpPrices, IndexerServerPerpPricesParams, IndexerServerPerpPricesResponse, IndexerServerPriceParams, IndexerServerPriceResponse, IndexerServerProductsParams, IndexerServerProductsResponse, IndexerServerQueryRequestByType, IndexerServerQueryRequestType, IndexerServerQueryResponseByType, IndexerServerReferralCodeParams, IndexerServerReferralCodeResponse, IndexerServerUsdcPriceResponse, IndexerServerVlpSnapshotsParams, IndexerServerVlpSnapshotsResponse } from './serverTypes.cjs';
4
+ export { IndexerServerBalance, IndexerServerCandlestick, IndexerServerEvent, IndexerServerLeaderboardContest, IndexerServerLeaderboardPosition, IndexerServerLeaderboardRegistration, IndexerServerMaker, IndexerServerMakerData, IndexerServerMarketSnapshot, IndexerServerMarketSnapshotInterval, IndexerServerMatchEvent, IndexerServerMatchEventBalances, IndexerServerOraclePrice, IndexerServerOrder, IndexerServerProduct, IndexerServerProductPayment, IndexerServerProductSnapshot, IndexerServerSnapshotsInterval, IndexerServerTx, IndexerServerVlpSnapshot } from './serverModelTypes.cjs';
5
+ export { CandlestickPeriod } from './CandlestickPeriod.cjs';
6
+ export { IndexerEventType } from './IndexerEventType.cjs';
7
+ export { IndexerLeaderboardRankType } from './IndexerLeaderboardType.cjs';
8
+ export { CollateralEventType } from './collateralEventType.cjs';
9
+ export { NadoDepositCollateralTx, NadoLiquidateSubaccountTx, NadoMatchOrdersRfqTx, NadoMatchOrdersTx, NadoTransferQuoteTx, NadoTx, NadoWithdrawCollateralTx } from './NadoTx.cjs';
10
+ import '@nadohq/contracts';
11
+ import '@nadohq/utils';
12
+ import 'viem';
13
+ import '@nadohq/engine-client';
@@ -0,0 +1,13 @@
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, GetIndexerOraclePricesParams, GetIndexerOraclePricesResponse, GetIndexerOrdersParams, GetIndexerOrdersResponse, GetIndexerPerpPricesParams, GetIndexerPerpPricesResponse, GetIndexerProductSnapshotsParams, GetIndexerProductSnapshotsResponse, GetIndexerQuotePriceResponse, GetIndexerReferralCodeParams, GetIndexerReferralCodeResponse, GetIndexerVlpSnapshotsParams, GetIndexerVlpSnapshotsResponse, IndexerBalanceTrackedVars, IndexerEvent, IndexerEventBalanceStateSnapshot, IndexerEventPerpStateSnapshot, IndexerEventSpotStateSnapshot, IndexerEventWithTx, IndexerFundingRate, IndexerLeaderboardContest, IndexerLeaderboardParticipant, IndexerLeaderboardRegistration, IndexerMaker, IndexerMakerSnapshot, IndexerMarketSnapshot, IndexerMatchEvent, IndexerMatchEventBalances, IndexerOraclePrice, IndexerOrder, IndexerPerpBalance, IndexerPerpPrices, IndexerProductPayment, IndexerProductSnapshot, IndexerSnapshotBalance, IndexerSnapshotsIntervalParams, IndexerSpotBalance, IndexerSubaccountSnapshot, IndexerVlpSnapshot, ListIndexerSubaccountsParams, ListIndexerSubaccountsResponse, UpdateIndexerLeaderboardRegistrationParams, UpdateIndexerLeaderboardRegistrationResponse } from './clientTypes.js';
2
+ export { BaseIndexerPaginatedEvent, GetIndexerPaginatedInterestFundingPaymentsResponse, GetIndexerPaginatedLeaderboardParams, GetIndexerPaginatedLeaderboardResponse, GetIndexerPaginatedOrdersParams, GetIndexerPaginatedOrdersResponse, GetIndexerSubaccountCollateralEventsParams, GetIndexerSubaccountCollateralEventsResponse, GetIndexerSubaccountInterestFundingPaymentsParams, GetIndexerSubaccountLiquidationEventsParams, GetIndexerSubaccountLiquidationEventsResponse, GetIndexerSubaccountMatchEventParams, GetIndexerSubaccountMatchEventsResponse, GetIndexerSubaccountSettlementEventsParams, GetIndexerSubaccountSettlementEventsResponse, GetIndexerSubaccountVlpEventsParams, GetIndexerSubaccountVlpEventsResponse, IndexerCollateralEvent, IndexerLiquidationEvent, IndexerPaginationMeta, IndexerPaginationParams, IndexerSettlementEvent, IndexerVlpEvent, PaginatedIndexerEventsResponse, WithPaginationMeta } from './paginatedEventsTypes.js';
3
+ export { IndexerEdgeServerCandlesticksParams, IndexerEdgeServerCandlesticksResponse, IndexerEdgeServerMarketSnapshotsParams, IndexerEdgeServerMarketSnapshotsResponse, IndexerServerBacklogResponse, IndexerServerCandlesticksParams, IndexerServerCandlesticksResponse, IndexerServerEventsParams, IndexerServerEventsResponse, IndexerServerFastWithdrawalSignatureParams, IndexerServerFastWithdrawalSignatureResponse, IndexerServerFundingRate, IndexerServerFundingRateParams, IndexerServerFundingRateResponse, IndexerServerFundingRatesParams, IndexerServerFundingRatesResponse, IndexerServerInterestFundingParams, IndexerServerInterestFundingResponse, IndexerServerLeaderboardContestsParams, IndexerServerLeaderboardContestsResponse, IndexerServerLeaderboardParams, IndexerServerLeaderboardRankParams, IndexerServerLeaderboardRankResponse, IndexerServerLeaderboardRegistrationParams, IndexerServerLeaderboardRegistrationResponse, IndexerServerLeaderboardResponse, IndexerServerLinkedSignerParams, IndexerServerLinkedSignerResponse, IndexerServerListSubaccountsParams, IndexerServerListSubaccountsResponse, IndexerServerMakerStatisticsParams, IndexerServerMakerStatisticsResponse, IndexerServerMarketSnapshotsParams, IndexerServerMarketSnapshotsResponse, IndexerServerMatchEventsParams, IndexerServerMatchEventsResponse, IndexerServerMultiProductsParams, IndexerServerMultiProductsResponse, IndexerServerMultiSubaccountSnapshotsParams, IndexerServerMultiSubaccountSnapshotsResponse, IndexerServerOraclePricesParams, IndexerServerOraclePricesResponse, IndexerServerOrdersParams, IndexerServerOrdersResponse, IndexerServerPerpPrices, IndexerServerPerpPricesParams, IndexerServerPerpPricesResponse, IndexerServerPriceParams, IndexerServerPriceResponse, IndexerServerProductsParams, IndexerServerProductsResponse, IndexerServerQueryRequestByType, IndexerServerQueryRequestType, IndexerServerQueryResponseByType, IndexerServerReferralCodeParams, IndexerServerReferralCodeResponse, IndexerServerUsdcPriceResponse, IndexerServerVlpSnapshotsParams, IndexerServerVlpSnapshotsResponse } from './serverTypes.js';
4
+ export { IndexerServerBalance, IndexerServerCandlestick, IndexerServerEvent, IndexerServerLeaderboardContest, IndexerServerLeaderboardPosition, IndexerServerLeaderboardRegistration, IndexerServerMaker, IndexerServerMakerData, IndexerServerMarketSnapshot, IndexerServerMarketSnapshotInterval, IndexerServerMatchEvent, IndexerServerMatchEventBalances, IndexerServerOraclePrice, IndexerServerOrder, IndexerServerProduct, IndexerServerProductPayment, IndexerServerProductSnapshot, IndexerServerSnapshotsInterval, IndexerServerTx, IndexerServerVlpSnapshot } from './serverModelTypes.js';
5
+ export { CandlestickPeriod } from './CandlestickPeriod.js';
6
+ export { IndexerEventType } from './IndexerEventType.js';
7
+ export { IndexerLeaderboardRankType } from './IndexerLeaderboardType.js';
8
+ export { CollateralEventType } from './collateralEventType.js';
9
+ export { NadoDepositCollateralTx, NadoLiquidateSubaccountTx, NadoMatchOrdersRfqTx, NadoMatchOrdersTx, NadoTransferQuoteTx, NadoTx, NadoWithdrawCollateralTx } from './NadoTx.js';
10
+ import '@nadohq/contracts';
11
+ import '@nadohq/utils';
12
+ import 'viem';
13
+ import '@nadohq/engine-client';
@@ -0,0 +1,11 @@
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
+ export * from "./CandlestickPeriod.js";
7
+ export * from "./IndexerEventType.js";
8
+ export * from "./IndexerLeaderboardType.js";
9
+ export * from "./collateralEventType.js";
10
+ export * from "./NadoTx.js";
11
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/types/index.ts"],"sourcesContent":["export * from './clientTypes';\nexport * from './paginatedEventsTypes';\nexport * from './serverTypes';\nexport * from './serverModelTypes';\nexport * from './CandlestickPeriod';\nexport * from './IndexerEventType';\nexport * from './IndexerLeaderboardType';\nexport * from './collateralEventType';\nexport * from './NadoTx';\n"],"mappings":";AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;","names":[]}
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+
16
+ // src/types/paginatedEventsTypes.ts
17
+ var paginatedEventsTypes_exports = {};
18
+ module.exports = __toCommonJS(paginatedEventsTypes_exports);
19
+ //# sourceMappingURL=paginatedEventsTypes.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/types/paginatedEventsTypes.ts"],"sourcesContent":["import { Subaccount } from '@nadohq/contracts';\nimport { BigDecimal } from '@nadohq/utils';\nimport {\n GetIndexerInterestFundingPaymentsParams,\n GetIndexerInterestFundingPaymentsResponse,\n GetIndexerLeaderboardParams,\n GetIndexerLeaderboardResponse,\n GetIndexerMatchEventsParams,\n GetIndexerOrdersParams,\n IndexerEventBalanceStateSnapshot,\n IndexerEventPerpStateSnapshot,\n IndexerEventSpotStateSnapshot,\n IndexerEventWithTx,\n IndexerMatchEvent,\n IndexerOrder,\n} from './clientTypes';\nimport { CollateralEventType } from './collateralEventType';\nimport { NadoTx } from './NadoTx';\n\nexport interface IndexerPaginationParams {\n limit: number;\n // Retrieves events inclusive of this start cursor\n startCursor?: string;\n}\n\nexport interface IndexerPaginationMeta {\n hasMore: boolean;\n nextCursor?: string;\n}\n\nexport type WithPaginationMeta = { meta: IndexerPaginationMeta };\n\ntype BaseSubaccountPaginationParams = Subaccount &\n IndexerPaginationParams & {\n /**\n * If provided, only events with a timestamp in seconds <= this value will be returned\n * Specifying `startCursor` will supercede this value\n */\n maxTimestampInclusive?: number;\n };\n\nexport interface BaseIndexerPaginatedEvent extends Subaccount {\n timestamp: BigDecimal;\n submissionIndex: string;\n tx: NadoTx;\n}\n\nexport interface PaginatedIndexerEventsResponse<\n T extends BaseIndexerPaginatedEvent,\n> extends WithPaginationMeta {\n events: T[];\n}\n\n/**\n * Collateral\n */\n\nexport interface GetIndexerSubaccountCollateralEventsParams\n extends BaseSubaccountPaginationParams {\n eventTypes?: CollateralEventType[];\n // If not given, will return both isolated & non-iso events\n isolated?: boolean;\n}\n\nexport interface IndexerCollateralEvent extends BaseIndexerPaginatedEvent {\n eventType: CollateralEventType;\n // Positive for deposits, negative for withdrawals\n amount: BigDecimal;\n // The collateral balance after the event\n newAmount: BigDecimal;\n snapshot: IndexerEventSpotStateSnapshot;\n}\n\nexport type GetIndexerSubaccountCollateralEventsResponse =\n PaginatedIndexerEventsResponse<IndexerCollateralEvent>;\n\n/**\n * VLP\n */\nexport type GetIndexerSubaccountVlpEventsParams =\n BaseSubaccountPaginationParams;\n\nexport interface IndexerVlpEvent extends BaseIndexerPaginatedEvent {\n vlpDelta: BigDecimal;\n primaryQuoteDelta: BigDecimal;\n}\n\nexport type GetIndexerSubaccountVlpEventsResponse =\n PaginatedIndexerEventsResponse<IndexerVlpEvent>;\n\n/**\n * Match events\n */\n\nexport type GetIndexerSubaccountMatchEventParams =\n BaseSubaccountPaginationParams &\n Pick<GetIndexerMatchEventsParams, 'productIds' | 'isolated'>;\n\nexport type GetIndexerSubaccountMatchEventsResponse =\n PaginatedIndexerEventsResponse<IndexerMatchEvent>;\n\n/**\n * Orders\n */\n\nexport type GetIndexerPaginatedOrdersParams = BaseSubaccountPaginationParams &\n Pick<GetIndexerOrdersParams, 'productIds' | 'isolated'>;\n\nexport interface GetIndexerPaginatedOrdersResponse {\n orders: IndexerOrder[];\n meta: IndexerPaginationMeta;\n}\n\n/**\n * Liquidations\n */\n\nexport type GetIndexerSubaccountLiquidationEventsParams =\n BaseSubaccountPaginationParams;\n\ntype WithIndexerEvent<\n TData,\n TStateType extends IndexerEventBalanceStateSnapshot,\n> = TData & {\n indexerEvent: IndexerEventWithTx<TStateType>;\n};\n\nexport interface IndexerLiquidationEvent extends BaseIndexerPaginatedEvent {\n // Either spot or perp will then be liquidated if the subaccount maint. health is below 0\n // Both spot & perp can be liquidated in the same event from a spread liquidation\n spot?: WithIndexerEvent<\n {\n // The original balance that was liquidated\n // ex. if it was originally a short, amount is negative, but the net delta from the liquidation is positive\n amountLiquidated: BigDecimal;\n },\n IndexerEventSpotStateSnapshot\n >;\n perp?: WithIndexerEvent<\n {\n // The original balance that was liquidated\n // ex. if it was originally a short, amount is negative, but the net delta from the liquidation is positive\n amountLiquidated: BigDecimal;\n },\n IndexerEventPerpStateSnapshot\n >;\n // Quote delta for the subaccount\n // Only the SPOT QUOTE payment made for the liquidation. Does not include the perp vQuote balance change\n quote: WithIndexerEvent<\n {\n balanceDelta: BigDecimal;\n },\n IndexerEventSpotStateSnapshot\n >;\n}\n\nexport type GetIndexerSubaccountLiquidationEventsResponse =\n PaginatedIndexerEventsResponse<IndexerLiquidationEvent>;\n\n/**\n * Settlement\n */\n\nexport type GetIndexerSubaccountSettlementEventsParams =\n BaseSubaccountPaginationParams;\n\nexport interface IndexerSettlementEvent extends BaseIndexerPaginatedEvent {\n // Quote delta for the subaccount being settled\n quoteDelta: BigDecimal;\n snapshot: IndexerEventPerpStateSnapshot;\n isolated: boolean;\n}\n\nexport type GetIndexerSubaccountSettlementEventsResponse =\n PaginatedIndexerEventsResponse<IndexerSettlementEvent>;\n\n/**\n * Interest / Funding\n */\n\nexport type GetIndexerSubaccountInterestFundingPaymentsParams =\n BaseSubaccountPaginationParams &\n Pick<GetIndexerInterestFundingPaymentsParams, 'productIds' | 'startCursor'>;\n\nexport interface GetIndexerPaginatedInterestFundingPaymentsResponse\n extends GetIndexerInterestFundingPaymentsResponse {\n meta: IndexerPaginationMeta;\n}\n\nexport type GetIndexerPaginatedLeaderboardParams = IndexerPaginationParams &\n Pick<GetIndexerLeaderboardParams, 'contestId' | 'rankType'>;\n\nexport type GetIndexerPaginatedLeaderboardResponse = WithPaginationMeta &\n GetIndexerLeaderboardResponse;\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}