@crypticdot/defituna-api 1.10.4 → 1.10.6

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/index.mjs CHANGED
@@ -42,6 +42,7 @@ __export(schemas_exports, {
42
42
  OrderBookEntry: () => OrderBookEntry,
43
43
  OrderBookNotification: () => OrderBookNotification,
44
44
  OrderBookNotificationMeta: () => OrderBookNotificationMeta,
45
+ OrderBookWrapper: () => OrderBookWrapper,
45
46
  OrderHistoryEntry: () => OrderHistoryEntry,
46
47
  OrderHistoryEntryNotification: () => OrderHistoryEntryNotification,
47
48
  OrderHistoryOrderType: () => OrderHistoryOrderType,
@@ -120,7 +121,7 @@ __export(schemas_exports, {
120
121
  WalletSubscriptionTopic: () => WalletSubscriptionTopic,
121
122
  WalletSubscriptionTopicSchema: () => WalletSubscriptionTopicSchema
122
123
  });
123
- import { z as z8 } from "zod";
124
+ import { z as z9 } from "zod";
124
125
 
125
126
  // src/client/schemas/basic.ts
126
127
  import { z } from "zod";
@@ -145,34 +146,53 @@ var PoolProvider = {
145
146
  };
146
147
  var PoolProviderSchema = z.enum([PoolProvider.ORCA, ...Object.values(PoolProvider)]);
147
148
 
149
+ // src/client/schemas/order_book.ts
150
+ import z2 from "zod";
151
+ var OrderBookEntry = z2.object({
152
+ concentratedAmount: z2.coerce.bigint(),
153
+ concentratedAmountQuote: z2.coerce.bigint(),
154
+ concentratedTotal: z2.coerce.bigint(),
155
+ concentratedTotalQuote: z2.coerce.bigint(),
156
+ limitAmount: z2.coerce.bigint(),
157
+ limitAmountQuote: z2.coerce.bigint(),
158
+ limitTotal: z2.coerce.bigint(),
159
+ limitTotalQuote: z2.coerce.bigint(),
160
+ price: z2.number(),
161
+ askSide: z2.boolean()
162
+ });
163
+ var OrderBook = z2.object({
164
+ entries: OrderBookEntry.array(),
165
+ poolPrice: z2.number()
166
+ });
167
+
148
168
  // src/client/schemas/state_snapshot.ts
149
- import z7 from "zod";
169
+ import z8 from "zod";
150
170
 
151
171
  // src/client/schemas/limit_orders.ts
152
- import { z as z4 } from "zod";
172
+ import { z as z5 } from "zod";
153
173
 
154
174
  // src/client/schemas/mint.ts
155
- import { z as z2 } from "zod";
156
- var Mint = z2.object({
157
- mint: z2.string(),
158
- symbol: z2.string(),
159
- name: z2.string(),
160
- logo: z2.string(),
161
- decimals: z2.number()
175
+ import { z as z3 } from "zod";
176
+ var Mint = z3.object({
177
+ mint: z3.string(),
178
+ symbol: z3.string(),
179
+ name: z3.string(),
180
+ logo: z3.string(),
181
+ decimals: z3.number()
162
182
  });
163
183
 
164
184
  // src/client/schemas/positions_shared.ts
165
- import z3 from "zod";
166
- var TunaPositionPoolSchema = z3.object({
167
- addr: z3.string(),
168
- price: z3.number(),
169
- tickSpacing: z3.number()
185
+ import z4 from "zod";
186
+ var TunaPositionPoolSchema = z4.object({
187
+ addr: z4.string(),
188
+ price: z4.number(),
189
+ tickSpacing: z4.number()
170
190
  });
171
191
  var TunaPositionPoolToken = {
172
192
  A: "a",
173
193
  B: "b"
174
194
  };
175
- var TunaPositionPoolTokenSchema = z3.enum(Object.values(TunaPositionPoolToken));
195
+ var TunaPositionPoolTokenSchema = z4.enum(Object.values(TunaPositionPoolToken));
176
196
 
177
197
  // src/client/schemas/limit_orders.ts
178
198
  var LimitOrderState = {
@@ -182,26 +202,27 @@ var LimitOrderState = {
182
202
  COMPLETE: "complete",
183
203
  CANCELLED: "cancelled"
184
204
  };
185
- var LimitOrderStateSchema = z4.enum([LimitOrderState.OPEN, ...Object.values(LimitOrderState)]);
186
- var LimitOrder = z4.object({
187
- address: z4.string(),
205
+ var LimitOrderStateSchema = z5.enum([LimitOrderState.OPEN, ...Object.values(LimitOrderState)]);
206
+ var LimitOrder = z5.object({
207
+ address: z5.string(),
208
+ orderMint: z5.string(),
188
209
  mintA: Mint,
189
210
  mintB: Mint,
190
211
  pool: TunaPositionPoolSchema,
191
212
  state: LimitOrderStateSchema,
192
- aToB: z4.boolean(),
193
- tickIndex: z4.number(),
194
- fillRatio: z4.number(),
195
- openTxSignature: z4.string(),
196
- closeTxSignature: z4.nullable(z4.string()),
213
+ aToB: z5.boolean(),
214
+ tickIndex: z5.number(),
215
+ fillRatio: z5.number(),
216
+ openTxSignature: z5.string(),
217
+ closeTxSignature: z5.nullable(z5.string()),
197
218
  amountIn: AmountWithUsdSchema,
198
219
  amountOut: AmountWithUsdSchema,
199
- openedAt: z4.coerce.date(),
200
- closedAt: z4.nullable(z4.coerce.date())
220
+ openedAt: z5.coerce.date(),
221
+ closedAt: z5.nullable(z5.coerce.date())
201
222
  });
202
223
 
203
224
  // src/client/schemas/lp_positions.ts
204
- import z5 from "zod";
225
+ import z6 from "zod";
205
226
  var LpPositionLimitOrderSwap = {
206
227
  NO_SWAP: "no_swap",
207
228
  SWAP_TO_TOKEN_A: "swap_to_token_a",
@@ -232,46 +253,46 @@ var LpPositionsActionType = {
232
253
  SET_FLAGS: "set_flags",
233
254
  SET_REBALANCE_THRESHOLD: "set_rebalance_threshold"
234
255
  };
235
- var LpPositionLimitOrderSwapSchema = z5.enum(Object.values(LpPositionLimitOrderSwap));
236
- var LpPositionAutoCompoundSchema = z5.enum(Object.values(LpPositionAutoCompound));
237
- var LpPositionRebalanceSchema = z5.enum(Object.values(LpPositionRebalance));
238
- var LpPositionsActionTypeSchema = z5.enum(Object.values(LpPositionsActionType));
256
+ var LpPositionLimitOrderSwapSchema = z6.enum(Object.values(LpPositionLimitOrderSwap));
257
+ var LpPositionAutoCompoundSchema = z6.enum(Object.values(LpPositionAutoCompound));
258
+ var LpPositionRebalanceSchema = z6.enum(Object.values(LpPositionRebalance));
259
+ var LpPositionsActionTypeSchema = z6.enum(Object.values(LpPositionsActionType));
239
260
  var TunaPositionState = {
240
261
  OPEN: "open",
241
262
  LIQUIDATED: "liquidated",
242
263
  CLOSED_BY_LIMIT_ORDER: "closed_by_limit_order",
243
264
  CLOSED: "closed"
244
265
  };
245
- var TunaPositionStateSchema = z5.enum([TunaPositionState.OPEN, ...Object.values(TunaPositionState)]);
266
+ var TunaPositionStateSchema = z6.enum([TunaPositionState.OPEN, ...Object.values(TunaPositionState)]);
246
267
  var TunaLpPositionAutoCompounding = {
247
268
  WITH_LEVERAGE: "with_leverage",
248
269
  WITHOUT_LEVERAGE: "without_leverage"
249
270
  };
250
- var TunaLpPositionAutoCompoundingSchema = z5.enum(
271
+ var TunaLpPositionAutoCompoundingSchema = z6.enum(
251
272
  Object.values(TunaLpPositionAutoCompounding)
252
273
  );
253
- var TunaPositionTokenPnlSchema = z5.object({
254
- amount: z5.coerce.bigint(),
255
- bps: z5.number()
274
+ var TunaPositionTokenPnlSchema = z6.object({
275
+ amount: z6.coerce.bigint(),
276
+ bps: z6.number()
256
277
  });
257
- var TunaLpPositionFlagsSchema = z5.object({
258
- lowerLimitOrderSwapToToken: z5.nullable(TunaPositionPoolTokenSchema),
259
- upperLimitOrderSwapToToken: z5.nullable(TunaPositionPoolTokenSchema),
260
- autoCompounding: z5.nullable(TunaLpPositionAutoCompoundingSchema),
261
- autoRebalancing: z5.boolean()
278
+ var TunaLpPositionFlagsSchema = z6.object({
279
+ lowerLimitOrderSwapToToken: z6.nullable(TunaPositionPoolTokenSchema),
280
+ upperLimitOrderSwapToToken: z6.nullable(TunaPositionPoolTokenSchema),
281
+ autoCompounding: z6.nullable(TunaLpPositionAutoCompoundingSchema),
282
+ autoRebalancing: z6.boolean()
262
283
  });
263
- var TunaLpPositionDtoSchema = z5.object({
264
- address: z5.string(),
265
- authority: z5.string(),
266
- version: z5.number(),
284
+ var TunaLpPositionDtoSchema = z6.object({
285
+ address: z6.string(),
286
+ authority: z6.string(),
287
+ version: z6.number(),
267
288
  state: TunaPositionStateSchema,
268
- positionMint: z5.string(),
269
- liquidity: z5.coerce.bigint(),
270
- tickLowerIndex: z5.number(),
271
- tickUpperIndex: z5.number(),
272
- lowerLimitOrderPrice: z5.number(),
273
- upperLimitOrderPrice: z5.number(),
274
- entryPrice: z5.number(),
289
+ positionMint: z6.string(),
290
+ liquidity: z6.coerce.bigint(),
291
+ tickLowerIndex: z6.number(),
292
+ tickUpperIndex: z6.number(),
293
+ lowerLimitOrderPrice: z6.number(),
294
+ upperLimitOrderPrice: z6.number(),
295
+ entryPrice: z6.number(),
275
296
  flags: TunaLpPositionFlagsSchema,
276
297
  mintA: Mint,
277
298
  mintB: Mint,
@@ -279,10 +300,10 @@ var TunaLpPositionDtoSchema = z5.object({
279
300
  marketMaker: PoolProviderSchema,
280
301
  depositedCollateralA: AmountWithUsdSchema,
281
302
  depositedCollateralB: AmountWithUsdSchema,
282
- leverage: z5.number(),
283
- maxLeverage: z5.number(),
284
- liquidationPriceLower: z5.number(),
285
- liquidationPriceUpper: z5.number(),
303
+ leverage: z6.number(),
304
+ maxLeverage: z6.number(),
305
+ liquidationPriceLower: z6.number(),
306
+ liquidationPriceUpper: z6.number(),
286
307
  initialDebtA: AmountWithUsdSchema,
287
308
  initialDebtB: AmountWithUsdSchema,
288
309
  currentDebtA: AmountWithUsdSchema,
@@ -298,50 +319,50 @@ var TunaLpPositionDtoSchema = z5.object({
298
319
  pnlA: TokensPnlSchema,
299
320
  pnlB: TokensPnlSchema,
300
321
  pnlUsd: UsdPnlSchema,
301
- openedAt: z5.coerce.date(),
302
- closedAt: z5.nullable(z5.coerce.date())
322
+ openedAt: z6.coerce.date(),
323
+ closedAt: z6.nullable(z6.coerce.date())
303
324
  });
304
- var TunaLpPositionHistorical = z5.object({
305
- positionAddress: z5.string(),
306
- authority: z5.string(),
307
- pool: z5.string(),
325
+ var TunaLpPositionHistorical = z6.object({
326
+ positionAddress: z6.string(),
327
+ authority: z6.string(),
328
+ pool: z6.string(),
308
329
  state: TunaPositionStateSchema,
309
- lowerPrice: z5.number(),
310
- upperPrice: z5.number(),
311
- lowerLimitOrder: z5.number().nullable(),
312
- upperLimitOrder: z5.number().nullable(),
330
+ lowerPrice: z6.number(),
331
+ upperPrice: z6.number(),
332
+ lowerLimitOrder: z6.number().nullable(),
333
+ upperLimitOrder: z6.number().nullable(),
313
334
  marketMaker: PoolProviderSchema,
314
- openedAt: z5.coerce.date(),
315
- closedAt: z5.coerce.date().nullable(),
316
- totalValueUsd: z5.number(),
317
- leverage: z5.number(),
318
- initialLeverage: z5.number(),
319
- totalDepositUsd: z5.number(),
320
- totalWithdrawnUsd: z5.number(),
321
- feesSumUsd: z5.number(),
322
- closedPnlSumUsd: z5.number(),
323
- entryPrice: z5.number(),
324
- exitPrice: z5.number().nullable()
335
+ openedAt: z6.coerce.date(),
336
+ closedAt: z6.coerce.date().nullable(),
337
+ totalValueUsd: z6.number(),
338
+ leverage: z6.number(),
339
+ initialLeverage: z6.number(),
340
+ totalDepositUsd: z6.number(),
341
+ totalWithdrawnUsd: z6.number(),
342
+ feesSumUsd: z6.number(),
343
+ closedPnlSumUsd: z6.number(),
344
+ entryPrice: z6.number(),
345
+ exitPrice: z6.number().nullable()
325
346
  });
326
- var TunaPositionLegacy = z5.object({
327
- address: z5.string(),
328
- authority: z5.string(),
329
- version: z5.number(),
347
+ var TunaPositionLegacy = z6.object({
348
+ address: z6.string(),
349
+ authority: z6.string(),
350
+ version: z6.number(),
330
351
  state: TunaPositionStateSchema,
331
- positionMint: z5.string(),
332
- liquidity: z5.coerce.bigint(),
333
- tickLowerIndex: z5.number(),
334
- tickUpperIndex: z5.number(),
335
- entrySqrtPrice: z5.coerce.bigint(),
336
- lowerLimitOrderSqrtPrice: z5.coerce.bigint(),
337
- upperLimitOrderSqrtPrice: z5.coerce.bigint(),
338
- flags: z5.number(),
339
- pool: z5.string(),
340
- poolSqrtPrice: z5.coerce.bigint(),
352
+ positionMint: z6.string(),
353
+ liquidity: z6.coerce.bigint(),
354
+ tickLowerIndex: z6.number(),
355
+ tickUpperIndex: z6.number(),
356
+ entrySqrtPrice: z6.coerce.bigint(),
357
+ lowerLimitOrderSqrtPrice: z6.coerce.bigint(),
358
+ upperLimitOrderSqrtPrice: z6.coerce.bigint(),
359
+ flags: z6.number(),
360
+ pool: z6.string(),
361
+ poolSqrtPrice: z6.coerce.bigint(),
341
362
  depositedCollateralA: AmountWithoutUsdSchema,
342
363
  depositedCollateralB: AmountWithoutUsdSchema,
343
- depositedCollateralUsd: z5.object({
344
- amount: z5.number()
364
+ depositedCollateralUsd: z6.object({
365
+ amount: z6.number()
345
366
  }),
346
367
  loanFundsA: AmountWithUsdSchema,
347
368
  loanFundsB: AmountWithUsdSchema,
@@ -358,47 +379,47 @@ var TunaPositionLegacy = z5.object({
358
379
  pnlA: TokensPnlSchema,
359
380
  pnlB: TokensPnlSchema,
360
381
  pnlUsd: UsdPnlSchema,
361
- openedAt: z5.coerce.date(),
362
- updatedAtSlot: z5.coerce.bigint(),
363
- closedAt: z5.nullable(z5.coerce.date())
382
+ openedAt: z6.coerce.date(),
383
+ updatedAtSlot: z6.coerce.bigint(),
384
+ closedAt: z6.nullable(z6.coerce.date())
364
385
  });
365
- var TunaLpPositionParameters = z5.object({
366
- lowerPrice: z5.number(),
367
- upperPrice: z5.number(),
368
- lowerLimitOrder: z5.number().nullable(),
369
- upperLimitOrder: z5.number().nullable(),
386
+ var TunaLpPositionParameters = z6.object({
387
+ lowerPrice: z6.number(),
388
+ upperPrice: z6.number(),
389
+ lowerLimitOrder: z6.number().nullable(),
390
+ upperLimitOrder: z6.number().nullable(),
370
391
  lowerLimitOrderSwap: LpPositionLimitOrderSwapSchema,
371
392
  upperLimitOrderSwap: LpPositionLimitOrderSwapSchema,
372
393
  autoCompound: LpPositionAutoCompoundSchema,
373
394
  rebalance: LpPositionRebalanceSchema,
374
- rebalanceThresholdTicks: z5.number()
395
+ rebalanceThresholdTicks: z6.number()
375
396
  });
376
- var TunaLpPositionValue = z5.object({
377
- totalValueA: z5.number(),
378
- totalValueB: z5.number(),
379
- totalValueUsd: z5.number(),
380
- loanFundsA: z5.number(),
381
- loanFundsB: z5.number(),
382
- loanFundsUsd: z5.number(),
383
- leverage: z5.number()
397
+ var TunaLpPositionValue = z6.object({
398
+ totalValueA: z6.number(),
399
+ totalValueB: z6.number(),
400
+ totalValueUsd: z6.number(),
401
+ loanFundsA: z6.number(),
402
+ loanFundsB: z6.number(),
403
+ loanFundsUsd: z6.number(),
404
+ leverage: z6.number()
384
405
  });
385
- var TunaLpPositionTransfer = z5.object({
386
- amountA: z5.number(),
387
- amountB: z5.number(),
388
- amountUsd: z5.number()
406
+ var TunaLpPositionTransfer = z6.object({
407
+ amountA: z6.number(),
408
+ amountB: z6.number(),
409
+ amountUsd: z6.number()
389
410
  });
390
- var TunaLpPositionTokenPrices = z5.object({
391
- tokenPriceA: z5.number(),
392
- tokenPriceB: z5.number()
411
+ var TunaLpPositionTokenPrices = z6.object({
412
+ tokenPriceA: z6.number(),
413
+ tokenPriceB: z6.number()
393
414
  });
394
- var TunaLpPositionActionOpen = z5.object({
415
+ var TunaLpPositionActionOpen = z6.object({
395
416
  parameters: TunaLpPositionParameters
396
417
  });
397
- var TunaLpPositionActionClose = z5.object({
418
+ var TunaLpPositionActionClose = z6.object({
398
419
  toOwner: TunaLpPositionTransfer.nullable(),
399
420
  prices: TunaLpPositionTokenPrices.nullable()
400
421
  });
401
- var TunaLpPositionActionIncreaseLiquidity = z5.object({
422
+ var TunaLpPositionActionIncreaseLiquidity = z6.object({
402
423
  fromPosition: TunaLpPositionValue.nullable(),
403
424
  toPosition: TunaLpPositionValue,
404
425
  fromOwner: TunaLpPositionTransfer,
@@ -406,9 +427,9 @@ var TunaLpPositionActionIncreaseLiquidity = z5.object({
406
427
  protocolFees: TunaLpPositionTransfer,
407
428
  prices: TunaLpPositionTokenPrices
408
429
  });
409
- var TunaLpPositionActionDecreaseLiquidity = z5.object({
410
- withdrawPercent: z5.number(),
411
- closedPnlUsd: z5.number(),
430
+ var TunaLpPositionActionDecreaseLiquidity = z6.object({
431
+ withdrawPercent: z6.number(),
432
+ closedPnlUsd: z6.number(),
412
433
  fromPosition: TunaLpPositionValue,
413
434
  toPosition: TunaLpPositionValue.nullable(),
414
435
  toOwner: TunaLpPositionTransfer,
@@ -416,28 +437,28 @@ var TunaLpPositionActionDecreaseLiquidity = z5.object({
416
437
  collectedFees: TunaLpPositionTransfer,
417
438
  prices: TunaLpPositionTokenPrices
418
439
  });
419
- var TunaLpPositionActionLiquidate = z5.object({
420
- withdrawPercent: z5.number(),
440
+ var TunaLpPositionActionLiquidate = z6.object({
441
+ withdrawPercent: z6.number(),
421
442
  fromPosition: TunaLpPositionValue,
422
443
  toLending: TunaLpPositionTransfer,
423
444
  protocolFees: TunaLpPositionTransfer,
424
445
  prices: TunaLpPositionTokenPrices
425
446
  });
426
- var TunaLpPositionActionRepayDebt = z5.object({
447
+ var TunaLpPositionActionRepayDebt = z6.object({
427
448
  fromPosition: TunaLpPositionValue,
428
449
  toPosition: TunaLpPositionValue,
429
450
  fromOwner: TunaLpPositionTransfer,
430
451
  toLending: TunaLpPositionTransfer,
431
452
  prices: TunaLpPositionTokenPrices
432
453
  });
433
- var TunaLpPositionActionCollectFees = z5.object({
434
- closedPnlUsd: z5.number(),
454
+ var TunaLpPositionActionCollectFees = z6.object({
455
+ closedPnlUsd: z6.number(),
435
456
  position: TunaLpPositionValue,
436
457
  collectedFees: TunaLpPositionTransfer,
437
458
  toOwner: TunaLpPositionTransfer,
438
459
  prices: TunaLpPositionTokenPrices
439
460
  });
440
- var TunaLpPositionActionCollectAndCompoundFees = z5.object({
461
+ var TunaLpPositionActionCollectAndCompoundFees = z6.object({
441
462
  fromPosition: TunaLpPositionValue,
442
463
  toPosition: TunaLpPositionValue,
443
464
  collectedFees: TunaLpPositionTransfer,
@@ -445,15 +466,15 @@ var TunaLpPositionActionCollectAndCompoundFees = z5.object({
445
466
  protocolFees: TunaLpPositionTransfer,
446
467
  prices: TunaLpPositionTokenPrices
447
468
  });
448
- var TunaLpPositionActionParametersUpdate = z5.object({
469
+ var TunaLpPositionActionParametersUpdate = z6.object({
449
470
  fromParameters: TunaLpPositionParameters,
450
471
  toParameters: TunaLpPositionParameters
451
472
  });
452
- var TunaLpPositionAction = z5.object({
473
+ var TunaLpPositionAction = z6.object({
453
474
  action: LpPositionsActionTypeSchema,
454
- txSignature: z5.string(),
455
- txTimestamp: z5.coerce.date(),
456
- data: z5.object({
475
+ txSignature: z6.string(),
476
+ txTimestamp: z6.coerce.date(),
477
+ data: z6.object({
457
478
  /** defined for: IncreaseLiquidity, DecreaseLiquidity, Liquidate, ExecuteLimitOrder, RepayDebt, CollectAndCompoundFees */
458
479
  fromPosition: TunaLpPositionValue.optional().nullable(),
459
480
  /** defined for: IncreaseLiquidity, DecreaseLiquidity, Liquidate, ExecuteLimitOrder, RepayDebt, CollectAndCompoundFees */
@@ -481,30 +502,30 @@ var TunaLpPositionAction = z5.object({
481
502
  /** defined for: ParametersUpdate */
482
503
  toParameters: TunaLpPositionParameters.optional(),
483
504
  /** defined for: DecreaseLiquidity */
484
- withdrawPercent: z5.number().optional(),
505
+ withdrawPercent: z6.number().optional(),
485
506
  /** defined for: DecreaseLiquidity, CollectFees */
486
- closedPnlUsd: z5.number().optional()
507
+ closedPnlUsd: z6.number().optional()
487
508
  })
488
509
  });
489
510
 
490
511
  // src/client/schemas/spot_positions.ts
491
- import { z as z6 } from "zod";
512
+ import { z as z7 } from "zod";
492
513
  var TunaSpotPositionState = {
493
514
  OPEN: "open",
494
515
  CLOSED: "closed"
495
516
  };
496
- var TunaSpotPositionStateSchema = z6.enum([
517
+ var TunaSpotPositionStateSchema = z7.enum([
497
518
  TunaSpotPositionState.OPEN,
498
519
  ...Object.values(TunaSpotPositionState)
499
520
  ]);
500
- var TunaSpotPosition = z6.object({
501
- address: z6.string(),
502
- authority: z6.string(),
503
- version: z6.number(),
521
+ var TunaSpotPosition = z7.object({
522
+ address: z7.string(),
523
+ authority: z7.string(),
524
+ version: z7.number(),
504
525
  state: TunaSpotPositionStateSchema,
505
- lowerLimitOrderPrice: z6.number(),
506
- upperLimitOrderPrice: z6.number(),
507
- entryPrice: z6.number(),
526
+ lowerLimitOrderPrice: z7.number(),
527
+ upperLimitOrderPrice: z7.number(),
528
+ entryPrice: z7.number(),
508
529
  mintA: Mint,
509
530
  mintB: Mint,
510
531
  pool: TunaPositionPoolSchema,
@@ -515,76 +536,81 @@ var TunaSpotPosition = z6.object({
515
536
  initialDebt: AmountWithUsdSchema,
516
537
  currentDebt: AmountWithUsdSchema,
517
538
  total: AmountWithUsdSchema,
518
- leverage: z6.number(),
519
- maxLeverage: z6.number(),
520
- liquidationPrice: z6.number(),
539
+ leverage: z7.number(),
540
+ maxLeverage: z7.number(),
541
+ liquidationPrice: z7.number(),
521
542
  pnlUsd: UsdPnlSchema,
522
- openedAt: z6.coerce.date(),
523
- closedAt: z6.nullable(z6.coerce.date())
543
+ openedAt: z7.coerce.date(),
544
+ closedAt: z7.nullable(z7.coerce.date())
524
545
  });
525
- var IncreaseSpotPositionQuote = z6.object({
546
+ var IncreaseSpotPositionQuote = z7.object({
526
547
  /** Required collateral amount */
527
- collateralAmount: z6.coerce.bigint(),
548
+ collateralAmount: z7.coerce.bigint(),
528
549
  /** Required amount to borrow */
529
- borrowAmount: z6.coerce.bigint(),
550
+ borrowAmount: z7.coerce.bigint(),
530
551
  /** Estimated position size in the position token. */
531
- estimatedAmount: z6.coerce.bigint(),
552
+ estimatedAmount: z7.coerce.bigint(),
532
553
  /** Swap input amount. */
533
- swapInputAmount: z6.coerce.bigint(),
554
+ swapInputAmount: z7.coerce.bigint(),
534
555
  /** Minimum swap output amount according to the provided slippage. */
535
- minSwapOutputAmount: z6.coerce.bigint(),
556
+ minSwapOutputAmount: z7.coerce.bigint(),
536
557
  /** Protocol fee in token A */
537
- protocolFeeA: z6.coerce.bigint(),
558
+ protocolFeeA: z7.coerce.bigint(),
538
559
  /** Protocol fee in token B */
539
- protocolFeeB: z6.coerce.bigint(),
560
+ protocolFeeB: z7.coerce.bigint(),
540
561
  /** Price impact in percents */
541
- priceImpact: z6.number(),
562
+ priceImpact: z7.number(),
542
563
  /** Liquidation price */
543
- liquidationPrice: z6.number()
564
+ liquidationPrice: z7.number()
544
565
  });
545
- var DecreaseSpotPositionQuote = z6.object({
566
+ var DecreaseSpotPositionQuote = z7.object({
546
567
  /** Confirmed position decrease percentage (100% = 1.0) */
547
- decreasePercent: z6.number(),
568
+ decreasePercent: z7.number(),
548
569
  /** The maximum acceptable swap input amount for position decrease according to the provided slippage
549
570
  * (if collateral_token == position_token) OR the minimum swap output amount (if collateral_token != position_token).
550
571
  */
551
- requiredSwapAmount: z6.coerce.bigint(),
572
+ requiredSwapAmount: z7.coerce.bigint(),
552
573
  /** Estimated total amount of the adjusted position */
553
- estimatedAmount: z6.coerce.bigint(),
574
+ estimatedAmount: z7.coerce.bigint(),
554
575
  /** Estimated amount of the withdrawn collateral */
555
- estimatedWithdrawnCollateral: z6.coerce.bigint(),
576
+ estimatedWithdrawnCollateral: z7.coerce.bigint(),
556
577
  /** Price impact in percents */
557
- priceImpact: z6.number(),
578
+ priceImpact: z7.number(),
558
579
  /** Liquidation price */
559
- liquidationPrice: z6.number()
580
+ liquidationPrice: z7.number()
560
581
  });
561
- var CloseSpotPositionQuote = z6.object({
582
+ var CloseSpotPositionQuote = z7.object({
562
583
  /** Position decrease percentage */
563
- decreasePercent: z6.number(),
584
+ decreasePercent: z7.number(),
564
585
  /** The maximum acceptable swap input amount for position decrease according to the provided slippage
565
586
  * (if collateral_token == position_token) OR the minimum swap output amount (if collateral_token != position_token).
566
587
  */
567
- requiredSwapAmount: z6.coerce.bigint(),
588
+ requiredSwapAmount: z7.coerce.bigint(),
568
589
  /** Estimated amount of the withdrawn collateral */
569
- estimatedWithdrawnCollateral: z6.coerce.bigint(),
590
+ estimatedWithdrawnCollateral: z7.coerce.bigint(),
570
591
  /** Price impact in percents */
571
- priceImpact: z6.number()
592
+ priceImpact: z7.number()
572
593
  });
573
594
 
574
595
  // src/client/schemas/state_snapshot.ts
575
- var PoolPriceUpdate = z7.object({
576
- pool: z7.string(),
577
- price: z7.number(),
578
- sqrtPrice: z7.coerce.bigint(),
579
- time: z7.coerce.date()
596
+ var PoolPriceUpdate = z8.object({
597
+ pool: z8.string(),
598
+ price: z8.number(),
599
+ sqrtPrice: z8.coerce.bigint(),
600
+ time: z8.coerce.date()
601
+ });
602
+ var OrderBookWrapper = z8.object({
603
+ priceStep: z8.number(),
604
+ entries: z8.array(OrderBookEntry)
580
605
  });
581
- var StateSnapshot = z7.object({
582
- slot: z7.coerce.bigint(),
583
- blockTime: z7.coerce.date(),
584
- poolPrices: z7.optional(z7.record(z7.string(), PoolPriceUpdate)),
585
- tunaSpotPositions: z7.optional(z7.array(TunaSpotPosition)),
586
- tunaLpPositions: z7.optional(z7.array(TunaLpPositionDtoSchema)),
587
- fusionLimitOrders: z7.optional(z7.array(LimitOrder))
606
+ var StateSnapshot = z8.object({
607
+ slot: z8.coerce.bigint(),
608
+ blockTime: z8.coerce.date(),
609
+ poolPrices: z8.optional(z8.record(z8.string(), PoolPriceUpdate)),
610
+ tunaSpotPositions: z8.optional(z8.array(TunaSpotPosition)),
611
+ tunaLpPositions: z8.optional(z8.array(TunaLpPositionDtoSchema)),
612
+ fusionLimitOrders: z8.optional(z8.array(LimitOrder)),
613
+ orderBooks: z8.optional(z8.record(z8.string(), OrderBookWrapper))
588
614
  });
589
615
 
590
616
  // src/client/schemas.ts
@@ -664,51 +690,51 @@ var WalletSubscriptionTopic = {
664
690
  TRADE_HISTORY: "trade_history",
665
691
  ORDER_HISTORY: "order_history"
666
692
  };
667
- var NotificationEntitySchema = z8.enum([NotificationEntity.POOL_SWAP, ...Object.values(NotificationEntity)]);
668
- var NotificationActionSchema = z8.enum([NotificationAction.CREATE, ...Object.values(NotificationAction)]);
669
- var TradeHistoryActionSchema = z8.enum([TradeHistoryAction.SWAP, ...Object.values(TradeHistoryAction)]);
670
- var TradeHistoryUIDirectionSchema = z8.enum([
693
+ var NotificationEntitySchema = z9.enum([NotificationEntity.POOL_SWAP, ...Object.values(NotificationEntity)]);
694
+ var NotificationActionSchema = z9.enum([NotificationAction.CREATE, ...Object.values(NotificationAction)]);
695
+ var TradeHistoryActionSchema = z9.enum([TradeHistoryAction.SWAP, ...Object.values(TradeHistoryAction)]);
696
+ var TradeHistoryUIDirectionSchema = z9.enum([
671
697
  TradeHistoryUIDirection.BUY,
672
698
  ...Object.values(TradeHistoryUIDirection)
673
699
  ]);
674
- var OrderHistoryOrderTypeSchema = z8.enum([
700
+ var OrderHistoryOrderTypeSchema = z9.enum([
675
701
  OrderHistoryOrderType.MARKET,
676
702
  ...Object.values(OrderHistoryOrderType)
677
703
  ]);
678
- var OrderHistoryStatusSchema = z8.enum([OrderHistoryStatus.OPEN, ...Object.values(OrderHistoryStatus)]);
679
- var OrderHistoryUIDirectionSchema = z8.enum([
704
+ var OrderHistoryStatusSchema = z9.enum([OrderHistoryStatus.OPEN, ...Object.values(OrderHistoryStatus)]);
705
+ var OrderHistoryUIDirectionSchema = z9.enum([
680
706
  OrderHistoryUIDirection.BUY,
681
707
  ...Object.values(OrderHistoryUIDirection)
682
708
  ]);
683
- var StakingPositionHistoryActionTypeSchema = z8.enum([
709
+ var StakingPositionHistoryActionTypeSchema = z9.enum([
684
710
  StakingPositionHistoryActionType.STAKE,
685
711
  ...Object.values(StakingPositionHistoryActionType)
686
712
  ]);
687
- var PoolSubscriptionTopicSchema = z8.enum([
713
+ var PoolSubscriptionTopicSchema = z9.enum([
688
714
  PoolSubscriptionTopic.ORDER_BOOK,
689
715
  ...Object.values(PoolSubscriptionTopic)
690
716
  ]);
691
- var WalletSubscriptionTopicSchema = z8.enum([
717
+ var WalletSubscriptionTopicSchema = z9.enum([
692
718
  WalletSubscriptionTopic.TUNA_POSITIONS,
693
719
  ...Object.values(WalletSubscriptionTopic)
694
720
  ]);
695
- var PaginationMeta = z8.object({
696
- total: z8.number()
721
+ var PaginationMeta = z9.object({
722
+ total: z9.number()
697
723
  });
698
- var Market = z8.object({
699
- address: z8.string(),
700
- addressLookupTable: z8.string(),
701
- poolAddress: z8.string(),
702
- poolFeeRate: z8.number(),
724
+ var Market = z9.object({
725
+ address: z9.string(),
726
+ addressLookupTable: z9.string(),
727
+ poolAddress: z9.string(),
728
+ poolFeeRate: z9.number(),
703
729
  provider: PoolProviderSchema,
704
- maxLeverage: z8.number(),
705
- maxSwapSlippage: z8.number(),
706
- protocolFee: z8.number(),
707
- rebalanceProtocolFee: z8.number(),
708
- protocolFeeOnCollateral: z8.number(),
709
- liquidationFee: z8.number(),
710
- liquidationThreshold: z8.number(),
711
- oraclePriceDeviationThreshold: z8.number(),
730
+ maxLeverage: z9.number(),
731
+ maxSwapSlippage: z9.number(),
732
+ protocolFee: z9.number(),
733
+ rebalanceProtocolFee: z9.number(),
734
+ protocolFeeOnCollateral: z9.number(),
735
+ liquidationFee: z9.number(),
736
+ liquidationThreshold: z9.number(),
737
+ oraclePriceDeviationThreshold: z9.number(),
712
738
  maxSpotPositionSizeA: AmountWithUsdSchema,
713
739
  maxSpotPositionSizeB: AmountWithUsdSchema,
714
740
  borrowedFundsA: AmountWithUsdSchema,
@@ -717,32 +743,32 @@ var Market = z8.object({
717
743
  availableBorrowB: AmountWithUsdSchema,
718
744
  borrowLimitA: AmountWithUsdSchema,
719
745
  borrowLimitB: AmountWithUsdSchema,
720
- disabled: z8.boolean(),
721
- createdAt: z8.coerce.date()
746
+ disabled: z9.boolean(),
747
+ createdAt: z9.coerce.date()
722
748
  });
723
- var TokenOraclePrice = z8.object({
724
- mint: z8.string(),
725
- price: z8.coerce.bigint(),
726
- decimals: z8.number(),
727
- time: z8.coerce.date()
749
+ var TokenOraclePrice = z9.object({
750
+ mint: z9.string(),
751
+ price: z9.coerce.bigint(),
752
+ decimals: z9.number(),
753
+ time: z9.coerce.date()
728
754
  });
729
- var Vault = z8.object({
730
- address: z8.string(),
731
- mint: z8.string(),
755
+ var Vault = z9.object({
756
+ address: z9.string(),
757
+ mint: z9.string(),
732
758
  depositedFunds: AmountWithUsdSchema,
733
759
  borrowedFunds: AmountWithUsdSchema,
734
760
  supplyLimit: AmountWithUsdSchema,
735
- borrowedShares: z8.coerce.bigint(),
736
- depositedShares: z8.coerce.bigint(),
737
- supplyApy: z8.number(),
738
- borrowApy: z8.number(),
739
- interestRate: z8.coerce.bigint(),
740
- utilization: z8.number(),
741
- pythOracleFeedId: z8.string(),
742
- pythOraclePriceUpdate: z8.string()
761
+ borrowedShares: z9.coerce.bigint(),
762
+ depositedShares: z9.coerce.bigint(),
763
+ supplyApy: z9.number(),
764
+ borrowApy: z9.number(),
765
+ interestRate: z9.coerce.bigint(),
766
+ utilization: z9.number(),
767
+ pythOracleFeedId: z9.string(),
768
+ pythOraclePriceUpdate: z9.string()
743
769
  });
744
- var VaultHistoricalStats = z8.object({
745
- date: z8.preprocess((val, ctx) => {
770
+ var VaultHistoricalStats = z9.object({
771
+ date: z9.preprocess((val, ctx) => {
746
772
  if (typeof val === "string") {
747
773
  const [year, month, day] = val.split("-").map(Number);
748
774
  return new Date(year, month - 1, day);
@@ -751,272 +777,256 @@ var VaultHistoricalStats = z8.object({
751
777
  code: "custom",
752
778
  message: "Not a valid date string"
753
779
  });
754
- return z8.NEVER;
755
- }, z8.date()),
780
+ return z9.NEVER;
781
+ }, z9.date()),
756
782
  supply: AmountWithUsdSchema,
757
783
  borrow: AmountWithUsdSchema,
758
- supplyApy: z8.number(),
759
- borrowApr: z8.number()
784
+ supplyApy: z9.number(),
785
+ borrowApr: z9.number()
760
786
  });
761
- var Pool = z8.object({
762
- address: z8.string(),
787
+ var Pool = z9.object({
788
+ address: z9.string(),
763
789
  provider: PoolProviderSchema,
764
- tokenAMint: z8.string(),
765
- tokenBMint: z8.string(),
766
- tokenAVault: z8.string(),
767
- tokenBVault: z8.string(),
768
- tvlUsdc: z8.coerce.number(),
769
- priceChange24H: z8.number(),
770
- tickSpacing: z8.number(),
771
- feeRate: z8.number(),
772
- olpFeeRate: z8.nullable(z8.number()),
773
- protocolFeeRate: z8.number(),
774
- liquidity: z8.coerce.bigint(),
775
- sqrtPrice: z8.coerce.bigint(),
776
- tickCurrentIndex: z8.number(),
777
- stats: z8.object({
778
- "24h": z8.object({
779
- volume: z8.coerce.number(),
780
- fees: z8.coerce.number(),
781
- rewards: z8.coerce.number(),
782
- yieldOverTvl: z8.coerce.number()
790
+ tokenAMint: z9.string(),
791
+ tokenBMint: z9.string(),
792
+ tokenAVault: z9.string(),
793
+ tokenBVault: z9.string(),
794
+ tvlUsdc: z9.coerce.number(),
795
+ priceChange24H: z9.number(),
796
+ tickSpacing: z9.number(),
797
+ feeRate: z9.number(),
798
+ olpFeeRate: z9.nullable(z9.number()),
799
+ protocolFeeRate: z9.number(),
800
+ liquidity: z9.coerce.bigint(),
801
+ sqrtPrice: z9.coerce.bigint(),
802
+ tickCurrentIndex: z9.number(),
803
+ stats: z9.object({
804
+ "24h": z9.object({
805
+ volume: z9.coerce.number(),
806
+ fees: z9.coerce.number(),
807
+ rewards: z9.coerce.number(),
808
+ yieldOverTvl: z9.coerce.number()
783
809
  }),
784
- "7d": z8.object({
785
- volume: z8.coerce.number(),
786
- fees: z8.coerce.number(),
787
- rewards: z8.coerce.number(),
788
- yieldOverTvl: z8.coerce.number()
810
+ "7d": z9.object({
811
+ volume: z9.coerce.number(),
812
+ fees: z9.coerce.number(),
813
+ rewards: z9.coerce.number(),
814
+ yieldOverTvl: z9.coerce.number()
789
815
  }),
790
- "30d": z8.object({
791
- volume: z8.coerce.number(),
792
- fees: z8.coerce.number(),
793
- rewards: z8.coerce.number(),
794
- yieldOverTvl: z8.coerce.number()
816
+ "30d": z9.object({
817
+ volume: z9.coerce.number(),
818
+ fees: z9.coerce.number(),
819
+ rewards: z9.coerce.number(),
820
+ yieldOverTvl: z9.coerce.number()
795
821
  })
796
822
  })
797
823
  });
798
- var Tick = z8.object({
799
- index: z8.number(),
800
- liquidity: z8.coerce.bigint()
824
+ var Tick = z9.object({
825
+ index: z9.number(),
826
+ liquidity: z9.coerce.bigint()
801
827
  });
802
- var PoolTicks = z8.object({
803
- tickSpacing: z8.number(),
828
+ var PoolTicks = z9.object({
829
+ tickSpacing: z9.number(),
804
830
  ticks: Tick.array()
805
831
  });
806
- var LendingPosition = z8.object({
807
- address: z8.string(),
808
- authority: z8.string(),
809
- mint: z8.string(),
810
- vault: z8.string(),
811
- shares: z8.coerce.bigint(),
832
+ var LendingPosition = z9.object({
833
+ address: z9.string(),
834
+ authority: z9.string(),
835
+ mint: z9.string(),
836
+ vault: z9.string(),
837
+ shares: z9.coerce.bigint(),
812
838
  funds: AmountWithUsdSchema,
813
839
  earned: AmountWithUsdSchema
814
840
  });
815
- var PoolSwap = z8.object({
816
- id: z8.string(),
817
- amountIn: z8.coerce.bigint(),
818
- amountOut: z8.coerce.bigint(),
819
- amountUsd: z8.number(),
820
- aToB: z8.boolean(),
821
- pool: z8.string(),
822
- time: z8.coerce.date()
823
- });
824
- var OrderBookEntry = z8.object({
825
- concentratedAmount: z8.coerce.bigint(),
826
- concentratedAmountQuote: z8.coerce.bigint(),
827
- concentratedTotal: z8.coerce.bigint(),
828
- concentratedTotalQuote: z8.coerce.bigint(),
829
- limitAmount: z8.coerce.bigint(),
830
- limitAmountQuote: z8.coerce.bigint(),
831
- limitTotal: z8.coerce.bigint(),
832
- limitTotalQuote: z8.coerce.bigint(),
833
- price: z8.number(),
834
- askSide: z8.boolean()
835
- });
836
- var OrderBook = z8.object({
837
- entries: OrderBookEntry.array(),
838
- poolPrice: z8.number()
841
+ var PoolSwap = z9.object({
842
+ id: z9.string(),
843
+ amountIn: z9.coerce.bigint(),
844
+ amountOut: z9.coerce.bigint(),
845
+ amountUsd: z9.number(),
846
+ aToB: z9.boolean(),
847
+ pool: z9.string(),
848
+ time: z9.coerce.date()
839
849
  });
840
- var TradeHistoryEntry = z8.object({
850
+ var TradeHistoryEntry = z9.object({
841
851
  // Internal entry ID
842
- id: z8.string(),
843
- pool: z8.string(),
844
- authority: z8.string(),
845
- aToB: z8.boolean(),
852
+ id: z9.string(),
853
+ pool: z9.string(),
854
+ authority: z9.string(),
855
+ aToB: z9.boolean(),
846
856
  // Trade action which created entry
847
857
  action: TradeHistoryActionSchema,
848
858
  // Trade direction formatted for ui display
849
859
  uiDirection: TradeHistoryUIDirectionSchema,
850
860
  // Trade price formatted for ui display
851
- uiPrice: z8.number(),
861
+ uiPrice: z9.number(),
852
862
  baseToken: AmountWithUsdSchema,
853
863
  quoteToken: AmountWithUsdSchema,
854
864
  fee: AmountWithUsdSchema,
855
- pnl: z8.nullable(
856
- z8.object({
857
- usd: z8.number(),
858
- bps: z8.number()
865
+ pnl: z9.nullable(
866
+ z9.object({
867
+ usd: z9.number(),
868
+ bps: z9.number()
859
869
  })
860
870
  ),
861
- txSignature: z8.nullable(z8.string()),
862
- positionAddress: z8.nullable(z8.string()),
863
- slot: z8.coerce.bigint(),
864
- ts: z8.coerce.date()
871
+ txSignature: z9.nullable(z9.string()),
872
+ positionAddress: z9.nullable(z9.string()),
873
+ slot: z9.coerce.bigint(),
874
+ ts: z9.coerce.date()
865
875
  });
866
- var OrderHistoryEntry = z8.object({
876
+ var OrderHistoryEntry = z9.object({
867
877
  // Internal entry ID
868
- id: z8.string(),
869
- pool: z8.string(),
870
- authority: z8.string(),
878
+ id: z9.string(),
879
+ pool: z9.string(),
880
+ authority: z9.string(),
871
881
  orderType: OrderHistoryOrderTypeSchema,
872
- isReduceOnly: z8.nullable(z8.boolean()),
873
- aToB: z8.boolean(),
882
+ isReduceOnly: z9.nullable(z9.boolean()),
883
+ aToB: z9.boolean(),
874
884
  uiDirection: OrderHistoryUIDirectionSchema,
875
- uiPrice: z8.nullable(z8.number()),
876
- uiExecutionPrice: z8.nullable(z8.number()),
885
+ uiPrice: z9.nullable(z9.number()),
886
+ uiExecutionPrice: z9.nullable(z9.number()),
877
887
  status: OrderHistoryStatusSchema,
878
888
  baseToken: AmountWithUsdSchema,
879
889
  quoteToken: AmountWithUsdSchema,
880
- baseTokenConsumedAmount: z8.nullable(AmountWithUsdSchema),
881
- quoteTokenFilledAmount: z8.nullable(AmountWithUsdSchema),
882
- txSignature: z8.nullable(z8.string()),
883
- positionAddress: z8.nullable(z8.string()),
884
- slot: z8.coerce.bigint(),
885
- ts: z8.coerce.date()
890
+ baseTokenConsumedAmount: z9.nullable(AmountWithUsdSchema),
891
+ quoteTokenFilledAmount: z9.nullable(AmountWithUsdSchema),
892
+ txSignature: z9.nullable(z9.string()),
893
+ positionAddress: z9.nullable(z9.string()),
894
+ slot: z9.coerce.bigint(),
895
+ ts: z9.coerce.date()
886
896
  });
887
- var StakingTreasury = z8.object({
888
- address: z8.string(),
889
- stakedTokenMint: z8.string(),
890
- rewardTokenMint: z8.string(),
891
- apy: z8.number(),
892
- uniqueStakers: z8.number(),
897
+ var StakingTreasury = z9.object({
898
+ address: z9.string(),
899
+ stakedTokenMint: z9.string(),
900
+ rewardTokenMint: z9.string(),
901
+ apy: z9.number(),
902
+ uniqueStakers: z9.number(),
893
903
  totalStaked: AmountWithUsdSchema,
894
904
  totalReward: AmountWithUsdSchema,
895
- unstakeCooldownSeconds: z8.number(),
896
- isStakingEnabled: z8.boolean(),
897
- isUnstakingEnabled: z8.boolean(),
898
- isWithdrawEnabled: z8.boolean()
905
+ unstakeCooldownSeconds: z9.number(),
906
+ isStakingEnabled: z9.boolean(),
907
+ isUnstakingEnabled: z9.boolean(),
908
+ isWithdrawEnabled: z9.boolean()
899
909
  });
900
- var StakingPosition = z8.object({
901
- address: z8.string(),
902
- owner: z8.string(),
910
+ var StakingPosition = z9.object({
911
+ address: z9.string(),
912
+ owner: z9.string(),
903
913
  staked: AmountWithUsdSchema,
904
914
  unstaked: AmountWithUsdSchema,
905
915
  claimedReward: AmountWithUsdSchema,
906
916
  unclaimedReward: AmountWithUsdSchema,
907
- rank: z8.nullable(z8.number()),
908
- vesting: z8.object({
917
+ rank: z9.nullable(z9.number()),
918
+ vesting: z9.object({
909
919
  locked: AmountWithUsdSchema,
910
920
  unlocked: AmountWithUsdSchema,
911
- unlockRate: z8.coerce.bigint(),
912
- unlockEverySeconds: z8.number(),
913
- unlockCliffSeconds: z8.number(),
914
- lockedAt: z8.nullable(z8.coerce.date())
921
+ unlockRate: z9.coerce.bigint(),
922
+ unlockEverySeconds: z9.number(),
923
+ unlockCliffSeconds: z9.number(),
924
+ lockedAt: z9.nullable(z9.coerce.date())
915
925
  }),
916
- lastUnstakedAt: z8.nullable(z8.coerce.date()),
917
- withdrawAvailableAt: z8.nullable(z8.coerce.date())
926
+ lastUnstakedAt: z9.nullable(z9.coerce.date()),
927
+ withdrawAvailableAt: z9.nullable(z9.coerce.date())
918
928
  });
919
- var StakingLeaderboardPosition = z8.object({
920
- rank: z8.number(),
921
- address: z8.string(),
922
- owner: z8.string(),
929
+ var StakingLeaderboardPosition = z9.object({
930
+ rank: z9.number(),
931
+ address: z9.string(),
932
+ owner: z9.string(),
923
933
  staked: AmountWithUsdSchema
924
934
  });
925
- var StakingLeaderboardPage = z8.object({
935
+ var StakingLeaderboardPage = z9.object({
926
936
  data: StakingLeaderboardPosition.array(),
927
937
  meta: PaginationMeta
928
938
  });
929
- var StakingPositionHistoryAction = z8.object({
930
- position: z8.string(),
939
+ var StakingPositionHistoryAction = z9.object({
940
+ position: z9.string(),
931
941
  action: StakingPositionHistoryActionTypeSchema,
932
- txSignature: z8.string(),
933
- amount: z8.coerce.bigint(),
934
- time: z8.coerce.date()
942
+ txSignature: z9.string(),
943
+ amount: z9.coerce.bigint(),
944
+ time: z9.coerce.date()
935
945
  });
936
- var PoolPriceCandle = z8.object({
937
- time: z8.number(),
938
- open: z8.number(),
939
- close: z8.number(),
940
- high: z8.number(),
941
- low: z8.number(),
942
- volume: z8.number()
946
+ var PoolPriceCandle = z9.object({
947
+ time: z9.number(),
948
+ open: z9.number(),
949
+ close: z9.number(),
950
+ high: z9.number(),
951
+ low: z9.number(),
952
+ volume: z9.number()
943
953
  });
944
- var FeesStatsGroup = z8.object({
945
- time: z8.coerce.date(),
946
- addLiquidityFees: z8.number(),
947
- limitOrderFees: z8.number(),
948
- yieldCompoundingFees: z8.number(),
949
- liquidationFees: z8.number(),
950
- totalLiquidationsNetworkFees: z8.number(),
951
- totalLimitOrdersNetworkFees: z8.number(),
952
- totalYieldCompoundingNetworkFees: z8.number(),
953
- failedNetworkFees: z8.number(),
954
- processedNetworkFees: z8.number(),
955
- totalCollectedFees: z8.number(),
956
- totalNetworkFees: z8.number(),
957
- jitoLiquidationFees: z8.number(),
958
- jitoLimitOrderFees: z8.number(),
959
- jitoYieldCompoundingFees: z8.number(),
960
- runningAddLiquidityFees: z8.number(),
961
- runningLimitOrderFees: z8.number(),
962
- runningYieldCompoundingFees: z8.number(),
963
- runningLiquidationFees: z8.number(),
964
- runningTotalLiquidationsNetworkFees: z8.number(),
965
- runningTotalLimitOrdersNetworkFees: z8.number(),
966
- runningTotalYieldCompoundingNetworkFees: z8.number(),
967
- runningFailedNetworkFees: z8.number(),
968
- runningProcessedNetworkFees: z8.number(),
969
- runningJitoLiquidationFees: z8.number(),
970
- runningJitoLimitOrderFees: z8.number(),
971
- runningJitoYieldCompoundingFees: z8.number(),
972
- runningTotalCollectedFees: z8.number(),
973
- runningTotalNetworkFees: z8.number()
954
+ var FeesStatsGroup = z9.object({
955
+ time: z9.coerce.date(),
956
+ addLiquidityFees: z9.number(),
957
+ limitOrderFees: z9.number(),
958
+ yieldCompoundingFees: z9.number(),
959
+ liquidationFees: z9.number(),
960
+ totalLiquidationsNetworkFees: z9.number(),
961
+ totalLimitOrdersNetworkFees: z9.number(),
962
+ totalYieldCompoundingNetworkFees: z9.number(),
963
+ failedNetworkFees: z9.number(),
964
+ processedNetworkFees: z9.number(),
965
+ totalCollectedFees: z9.number(),
966
+ totalNetworkFees: z9.number(),
967
+ jitoLiquidationFees: z9.number(),
968
+ jitoLimitOrderFees: z9.number(),
969
+ jitoYieldCompoundingFees: z9.number(),
970
+ runningAddLiquidityFees: z9.number(),
971
+ runningLimitOrderFees: z9.number(),
972
+ runningYieldCompoundingFees: z9.number(),
973
+ runningLiquidationFees: z9.number(),
974
+ runningTotalLiquidationsNetworkFees: z9.number(),
975
+ runningTotalLimitOrdersNetworkFees: z9.number(),
976
+ runningTotalYieldCompoundingNetworkFees: z9.number(),
977
+ runningFailedNetworkFees: z9.number(),
978
+ runningProcessedNetworkFees: z9.number(),
979
+ runningJitoLiquidationFees: z9.number(),
980
+ runningJitoLimitOrderFees: z9.number(),
981
+ runningJitoYieldCompoundingFees: z9.number(),
982
+ runningTotalCollectedFees: z9.number(),
983
+ runningTotalNetworkFees: z9.number()
974
984
  });
975
- var StakingRevenueStatsGroup = z8.object({
976
- time: z8.coerce.date(),
977
- totalDepositsUsd: z8.number(),
978
- totalDepositsSol: z8.coerce.bigint(),
979
- runningTotalDepositsUsd: z8.number(),
980
- runningTotalDepositsSol: z8.coerce.bigint()
985
+ var StakingRevenueStatsGroup = z9.object({
986
+ time: z9.coerce.date(),
987
+ totalDepositsUsd: z9.number(),
988
+ totalDepositsSol: z9.coerce.bigint(),
989
+ runningTotalDepositsUsd: z9.number(),
990
+ runningTotalDepositsSol: z9.coerce.bigint()
981
991
  });
982
- var SwapQuoteByInput = z8.object({
983
- estimatedAmountOut: z8.coerce.bigint(),
984
- minAmountOut: z8.coerce.bigint(),
985
- feeAmount: z8.coerce.bigint(),
986
- feeUsd: z8.number(),
992
+ var SwapQuoteByInput = z9.object({
993
+ estimatedAmountOut: z9.coerce.bigint(),
994
+ minAmountOut: z9.coerce.bigint(),
995
+ feeAmount: z9.coerce.bigint(),
996
+ feeUsd: z9.number(),
987
997
  /** Price impact in percents */
988
- priceImpact: z8.number()
998
+ priceImpact: z9.number()
989
999
  });
990
- var SwapQuoteByOutput = z8.object({
991
- estimatedAmountIn: z8.coerce.bigint(),
992
- maxAmountIn: z8.coerce.bigint(),
993
- feeAmount: z8.coerce.bigint(),
994
- feeUsd: z8.number(),
1000
+ var SwapQuoteByOutput = z9.object({
1001
+ estimatedAmountIn: z9.coerce.bigint(),
1002
+ maxAmountIn: z9.coerce.bigint(),
1003
+ feeAmount: z9.coerce.bigint(),
1004
+ feeUsd: z9.number(),
995
1005
  /** Price impact in percents */
996
- priceImpact: z8.number()
1006
+ priceImpact: z9.number()
997
1007
  });
998
- var LimitOrderQuoteByInput = z8.object({
999
- amountOut: z8.coerce.bigint()
1008
+ var LimitOrderQuoteByInput = z9.object({
1009
+ amountOut: z9.coerce.bigint()
1000
1010
  });
1001
- var LimitOrderQuoteByOutput = z8.object({
1002
- amountIn: z8.coerce.bigint()
1011
+ var LimitOrderQuoteByOutput = z9.object({
1012
+ amountIn: z9.coerce.bigint()
1003
1013
  });
1004
1014
  var TradableAmount = AmountWithUsdSchema;
1005
- var UpdateStreamSubscriptionResult = z8.object({
1006
- status: z8.string()
1015
+ var UpdateStreamSubscriptionResult = z9.object({
1016
+ status: z9.string()
1007
1017
  });
1008
- var createNotificationSchema = (dataSchema, metaSchema) => z8.object({
1018
+ var createNotificationSchema = (dataSchema, metaSchema) => z9.object({
1009
1019
  entity: NotificationEntitySchema,
1010
1020
  action: NotificationActionSchema,
1011
1021
  data: dataSchema,
1012
- id: z8.string(),
1013
- authority: z8.nullish(z8.string()),
1014
- ...metaSchema ? { meta: metaSchema } : { meta: z8.undefined().nullable() }
1022
+ id: z9.string(),
1023
+ authority: z9.nullish(z9.string()),
1024
+ ...metaSchema ? { meta: metaSchema } : { meta: z9.undefined().nullable() }
1015
1025
  });
1016
- var OrderBookNotificationMeta = z8.object({
1017
- pool: z8.string(),
1018
- priceStep: z8.number(),
1019
- inverted: z8.boolean()
1026
+ var OrderBookNotificationMeta = z9.object({
1027
+ pool: z9.string(),
1028
+ priceStep: z9.number(),
1029
+ inverted: z9.boolean()
1020
1030
  });
1021
1031
  var PoolSwapNotification = createNotificationSchema(PoolSwap);
1022
1032
  var OrderBookNotification = createNotificationSchema(OrderBook, OrderBookNotificationMeta);