@crypticdot/defituna-api 1.10.1 → 1.10.2

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