@crypticdot/defituna-api 1.10.12 → 1.10.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -53,7 +53,6 @@ __export(schemas_exports, {
53
53
  PoolPriceCandle: () => PoolPriceCandle,
54
54
  PoolProvider: () => PoolProvider,
55
55
  PoolProviderSchema: () => PoolProviderSchema,
56
- PoolSnapshot: () => PoolSnapshot,
57
56
  PoolSubscriptionTopic: () => PoolSubscriptionTopic,
58
57
  PoolSubscriptionTopicSchema: () => PoolSubscriptionTopicSchema,
59
58
  PoolSwap: () => PoolSwap,
@@ -117,7 +116,7 @@ __export(schemas_exports, {
117
116
  WalletSubscriptionTopic: () => WalletSubscriptionTopic,
118
117
  WalletSubscriptionTopicSchema: () => WalletSubscriptionTopicSchema
119
118
  });
120
- import { z as z10 } from "zod";
119
+ import { z as z11 } from "zod";
121
120
 
122
121
  // src/client/schemas/basic.ts
123
122
  import { z } from "zod";
@@ -188,7 +187,7 @@ var Pool = z3.object({
188
187
  });
189
188
 
190
189
  // src/client/schemas/state_snapshot.ts
191
- import z9 from "zod";
190
+ import z10 from "zod";
192
191
 
193
192
  // src/client/schemas/limit_orders.ts
194
193
  import { z as z4 } from "zod";
@@ -512,44 +511,68 @@ var TunaLpPositionAction = z6.object({
512
511
  })
513
512
  });
514
513
 
514
+ // src/client/schemas/market.ts
515
+ import { z as z7 } from "zod";
516
+ var Market = z7.object({
517
+ address: z7.string(),
518
+ addressLookupTable: z7.string(),
519
+ maxLeverage: z7.number(),
520
+ maxSwapSlippage: z7.number(),
521
+ protocolFee: z7.number(),
522
+ protocolFeeOnCollateral: z7.number(),
523
+ liquidationFee: z7.number(),
524
+ liquidationThreshold: z7.number(),
525
+ oraclePriceDeviationThreshold: z7.number(),
526
+ rebalanceProtocolFee: z7.number(),
527
+ borrowedFundsA: AmountWithUsdSchema,
528
+ borrowedFundsB: AmountWithUsdSchema,
529
+ borrowLimitA: AmountWithUsdSchema,
530
+ borrowLimitB: AmountWithUsdSchema,
531
+ maxSpotPositionSizeA: AmountWithUsdSchema,
532
+ maxSpotPositionSizeB: AmountWithUsdSchema,
533
+ pool: Pool,
534
+ disabled: z7.boolean(),
535
+ createdAt: z7.coerce.date()
536
+ });
537
+
515
538
  // src/client/schemas/order_book.ts
516
- import z7 from "zod";
517
- var OrderBookEntry = z7.object({
518
- concentratedAmount: z7.coerce.bigint(),
519
- concentratedAmountQuote: z7.coerce.bigint(),
520
- concentratedTotal: z7.coerce.bigint(),
521
- concentratedTotalQuote: z7.coerce.bigint(),
522
- limitAmount: z7.coerce.bigint(),
523
- limitAmountQuote: z7.coerce.bigint(),
524
- limitTotal: z7.coerce.bigint(),
525
- limitTotalQuote: z7.coerce.bigint(),
526
- price: z7.number(),
527
- askSide: z7.boolean()
539
+ import z8 from "zod";
540
+ var OrderBookEntry = z8.object({
541
+ concentratedAmount: z8.coerce.bigint(),
542
+ concentratedAmountQuote: z8.coerce.bigint(),
543
+ concentratedTotal: z8.coerce.bigint(),
544
+ concentratedTotalQuote: z8.coerce.bigint(),
545
+ limitAmount: z8.coerce.bigint(),
546
+ limitAmountQuote: z8.coerce.bigint(),
547
+ limitTotal: z8.coerce.bigint(),
548
+ limitTotalQuote: z8.coerce.bigint(),
549
+ price: z8.number(),
550
+ askSide: z8.boolean()
528
551
  });
529
- var OrderBook = z7.object({
552
+ var OrderBook = z8.object({
530
553
  entries: OrderBookEntry.array(),
531
- poolPrice: z7.number(),
532
- poolAddress: z7.string()
554
+ poolPrice: z8.number(),
555
+ poolAddress: z8.string()
533
556
  });
534
557
 
535
558
  // src/client/schemas/spot_positions.ts
536
- import { z as z8 } from "zod";
559
+ import { z as z9 } from "zod";
537
560
  var TunaSpotPositionState = {
538
561
  OPEN: "open",
539
562
  CLOSED: "closed"
540
563
  };
541
- var TunaSpotPositionStateSchema = z8.enum([
564
+ var TunaSpotPositionStateSchema = z9.enum([
542
565
  TunaSpotPositionState.OPEN,
543
566
  ...Object.values(TunaSpotPositionState)
544
567
  ]);
545
- var TunaSpotPosition = z8.object({
546
- address: z8.string(),
547
- authority: z8.string(),
548
- version: z8.number(),
568
+ var TunaSpotPosition = z9.object({
569
+ address: z9.string(),
570
+ authority: z9.string(),
571
+ version: z9.number(),
549
572
  state: TunaSpotPositionStateSchema,
550
- lowerLimitOrderPrice: z8.number(),
551
- upperLimitOrderPrice: z8.number(),
552
- entryPrice: z8.number(),
573
+ lowerLimitOrderPrice: z9.number(),
574
+ upperLimitOrderPrice: z9.number(),
575
+ entryPrice: z9.number(),
553
576
  pool: Pool,
554
577
  positionToken: TunaPositionPoolTokenSchema,
555
578
  collateralToken: TunaPositionPoolTokenSchema,
@@ -558,85 +581,71 @@ var TunaSpotPosition = z8.object({
558
581
  initialDebt: AmountWithUsdSchema,
559
582
  currentDebt: AmountWithUsdSchema,
560
583
  total: AmountWithUsdSchema,
561
- leverage: z8.number(),
562
- maxLeverage: z8.number(),
563
- liquidationPrice: z8.number(),
584
+ leverage: z9.number(),
585
+ maxLeverage: z9.number(),
586
+ liquidationPrice: z9.number(),
564
587
  pnlUsd: UsdPnlSchema,
565
- openedAt: z8.coerce.date(),
566
- closedAt: z8.nullable(z8.coerce.date())
588
+ openedAt: z9.coerce.date(),
589
+ closedAt: z9.nullable(z9.coerce.date())
567
590
  });
568
- var IncreaseSpotPositionQuote = z8.object({
591
+ var IncreaseSpotPositionQuote = z9.object({
569
592
  /** Required collateral amount */
570
- collateralAmount: z8.coerce.bigint(),
593
+ collateralAmount: z9.coerce.bigint(),
571
594
  /** Required amount to borrow */
572
- borrowAmount: z8.coerce.bigint(),
595
+ borrowAmount: z9.coerce.bigint(),
573
596
  /** Estimated position size in the position token. */
574
- estimatedAmount: z8.coerce.bigint(),
597
+ estimatedAmount: z9.coerce.bigint(),
575
598
  /** Swap input amount. */
576
- swapInputAmount: z8.coerce.bigint(),
599
+ swapInputAmount: z9.coerce.bigint(),
577
600
  /** Minimum swap output amount according to the provided slippage. */
578
- minSwapOutputAmount: z8.coerce.bigint(),
601
+ minSwapOutputAmount: z9.coerce.bigint(),
579
602
  /** Protocol fee in token A */
580
- protocolFeeA: z8.coerce.bigint(),
603
+ protocolFeeA: z9.coerce.bigint(),
581
604
  /** Protocol fee in token B */
582
- protocolFeeB: z8.coerce.bigint(),
605
+ protocolFeeB: z9.coerce.bigint(),
583
606
  /** Price impact in percents */
584
- priceImpact: z8.number(),
607
+ priceImpact: z9.number(),
585
608
  /** Liquidation price */
586
- liquidationPrice: z8.number()
609
+ liquidationPrice: z9.number()
587
610
  });
588
- var DecreaseSpotPositionQuote = z8.object({
611
+ var DecreaseSpotPositionQuote = z9.object({
589
612
  /** Confirmed position decrease percentage (100% = 1.0) */
590
- decreasePercent: z8.number(),
613
+ decreasePercent: z9.number(),
591
614
  /** The maximum acceptable swap input amount for position decrease according to the provided slippage
592
615
  * (if collateral_token == position_token) OR the minimum swap output amount (if collateral_token != position_token).
593
616
  */
594
- requiredSwapAmount: z8.coerce.bigint(),
617
+ requiredSwapAmount: z9.coerce.bigint(),
595
618
  /** Estimated total amount of the adjusted position */
596
- estimatedAmount: z8.coerce.bigint(),
619
+ estimatedAmount: z9.coerce.bigint(),
597
620
  /** Estimated amount of the withdrawn collateral */
598
- estimatedWithdrawnCollateral: z8.coerce.bigint(),
621
+ estimatedWithdrawnCollateral: z9.coerce.bigint(),
599
622
  /** Price impact in percents */
600
- priceImpact: z8.number(),
623
+ priceImpact: z9.number(),
601
624
  /** Liquidation price */
602
- liquidationPrice: z8.number()
625
+ liquidationPrice: z9.number()
603
626
  });
604
- var CloseSpotPositionQuote = z8.object({
627
+ var CloseSpotPositionQuote = z9.object({
605
628
  /** Position decrease percentage */
606
- decreasePercent: z8.number(),
629
+ decreasePercent: z9.number(),
607
630
  /** The maximum acceptable swap input amount for position decrease according to the provided slippage
608
631
  * (if collateral_token == position_token) OR the minimum swap output amount (if collateral_token != position_token).
609
632
  */
610
- requiredSwapAmount: z8.coerce.bigint(),
633
+ requiredSwapAmount: z9.coerce.bigint(),
611
634
  /** Estimated amount of the withdrawn collateral */
612
- estimatedWithdrawnCollateral: z8.coerce.bigint(),
635
+ estimatedWithdrawnCollateral: z9.coerce.bigint(),
613
636
  /** Price impact in percents */
614
- priceImpact: z8.number()
637
+ priceImpact: z9.number()
615
638
  });
616
639
 
617
640
  // src/client/schemas/state_snapshot.ts
618
- var PoolSnapshot = z9.object({
619
- liquidity: z9.coerce.bigint(),
620
- tickCurrentIndex: z9.number(),
621
- price: z9.number(),
622
- sqrtPrice: z9.coerce.bigint(),
623
- tvl: z9.number(),
624
- priceChange24H: z9.number(),
625
- volume24H: z9.number(),
626
- fees24H: z9.number(),
627
- borrowedFundsA: AmountWithUsdSchema,
628
- borrowedFundsB: AmountWithUsdSchema,
629
- borrowLimitA: AmountWithUsdSchema,
630
- borrowLimitB: AmountWithUsdSchema
631
- });
632
- var StateSnapshot = z9.object({
633
- slot: z9.coerce.bigint(),
634
- blockTime: z9.coerce.date(),
635
- pools: z9.optional(z9.record(z9.string(), PoolSnapshot)),
636
- tunaSpotPositions: z9.optional(z9.array(TunaSpotPosition)),
637
- tunaLpPositions: z9.optional(z9.array(TunaLpPositionDtoSchema)),
638
- fusionLimitOrders: z9.optional(z9.array(LimitOrder)),
639
- orderBooks: z9.optional(z9.record(z9.string(), OrderBook))
641
+ var StateSnapshot = z10.object({
642
+ slot: z10.coerce.bigint(),
643
+ blockTime: z10.coerce.date(),
644
+ markets: z10.optional(z10.array(Market)),
645
+ tunaSpotPositions: z10.optional(z10.array(TunaSpotPosition)),
646
+ tunaLpPositions: z10.optional(z10.array(TunaLpPositionDtoSchema)),
647
+ fusionLimitOrders: z10.optional(z10.array(LimitOrder)),
648
+ orderBooks: z10.optional(z10.array(OrderBook))
640
649
  });
641
650
 
642
651
  // src/client/schemas.ts
@@ -700,7 +709,6 @@ var StakingPositionHistoryActionType = {
700
709
  };
701
710
  var PoolSubscriptionTopic = {
702
711
  ORDER_BOOK: "order_book",
703
- POOL: "pool",
704
712
  POOL_SWAPS: "pool_swaps"
705
713
  };
706
714
  var WalletSubscriptionTopic = {
@@ -712,81 +720,60 @@ var WalletSubscriptionTopic = {
712
720
  TRADE_HISTORY: "trade_history",
713
721
  ORDER_HISTORY: "order_history"
714
722
  };
715
- var NotificationEntitySchema = z10.enum([NotificationEntity.POOL_SWAP, ...Object.values(NotificationEntity)]);
716
- var NotificationActionSchema = z10.enum([NotificationAction.CREATE, ...Object.values(NotificationAction)]);
717
- var TradeHistoryActionSchema = z10.enum([TradeHistoryAction.SWAP, ...Object.values(TradeHistoryAction)]);
718
- var TradeHistoryUIDirectionSchema = z10.enum([
723
+ var NotificationEntitySchema = z11.enum([NotificationEntity.POOL_SWAP, ...Object.values(NotificationEntity)]);
724
+ var NotificationActionSchema = z11.enum([NotificationAction.CREATE, ...Object.values(NotificationAction)]);
725
+ var TradeHistoryActionSchema = z11.enum([TradeHistoryAction.SWAP, ...Object.values(TradeHistoryAction)]);
726
+ var TradeHistoryUIDirectionSchema = z11.enum([
719
727
  TradeHistoryUIDirection.BUY,
720
728
  ...Object.values(TradeHistoryUIDirection)
721
729
  ]);
722
- var OrderHistoryOrderTypeSchema = z10.enum([
730
+ var OrderHistoryOrderTypeSchema = z11.enum([
723
731
  OrderHistoryOrderType.MARKET,
724
732
  ...Object.values(OrderHistoryOrderType)
725
733
  ]);
726
- var OrderHistoryStatusSchema = z10.enum([OrderHistoryStatus.OPEN, ...Object.values(OrderHistoryStatus)]);
727
- var OrderHistoryUIDirectionSchema = z10.enum([
734
+ var OrderHistoryStatusSchema = z11.enum([OrderHistoryStatus.OPEN, ...Object.values(OrderHistoryStatus)]);
735
+ var OrderHistoryUIDirectionSchema = z11.enum([
728
736
  OrderHistoryUIDirection.BUY,
729
737
  ...Object.values(OrderHistoryUIDirection)
730
738
  ]);
731
- var StakingPositionHistoryActionTypeSchema = z10.enum([
739
+ var StakingPositionHistoryActionTypeSchema = z11.enum([
732
740
  StakingPositionHistoryActionType.STAKE,
733
741
  ...Object.values(StakingPositionHistoryActionType)
734
742
  ]);
735
- var PoolSubscriptionTopicSchema = z10.enum([
743
+ var PoolSubscriptionTopicSchema = z11.enum([
736
744
  PoolSubscriptionTopic.ORDER_BOOK,
737
745
  ...Object.values(PoolSubscriptionTopic)
738
746
  ]);
739
- var WalletSubscriptionTopicSchema = z10.enum([
747
+ var WalletSubscriptionTopicSchema = z11.enum([
740
748
  WalletSubscriptionTopic.TUNA_POSITIONS,
741
749
  ...Object.values(WalletSubscriptionTopic)
742
750
  ]);
743
- var PaginationMeta = z10.object({
744
- total: z10.number()
745
- });
746
- var Market = z10.object({
747
- address: z10.string(),
748
- addressLookupTable: z10.string(),
749
- maxLeverage: z10.number(),
750
- maxSwapSlippage: z10.number(),
751
- protocolFee: z10.number(),
752
- protocolFeeOnCollateral: z10.number(),
753
- liquidationFee: z10.number(),
754
- liquidationThreshold: z10.number(),
755
- oraclePriceDeviationThreshold: z10.number(),
756
- rebalanceProtocolFee: z10.number(),
757
- borrowedFundsA: AmountWithUsdSchema,
758
- borrowedFundsB: AmountWithUsdSchema,
759
- borrowLimitA: AmountWithUsdSchema,
760
- borrowLimitB: AmountWithUsdSchema,
761
- maxSpotPositionSizeA: AmountWithUsdSchema,
762
- maxSpotPositionSizeB: AmountWithUsdSchema,
763
- pool: Pool,
764
- disabled: z10.boolean(),
765
- createdAt: z10.coerce.date()
751
+ var PaginationMeta = z11.object({
752
+ total: z11.number()
766
753
  });
767
- var TokenOraclePrice = z10.object({
768
- mint: z10.string(),
769
- price: z10.coerce.bigint(),
770
- decimals: z10.number(),
771
- time: z10.coerce.date()
754
+ var TokenOraclePrice = z11.object({
755
+ mint: z11.string(),
756
+ price: z11.coerce.bigint(),
757
+ decimals: z11.number(),
758
+ time: z11.coerce.date()
772
759
  });
773
- var Vault = z10.object({
774
- address: z10.string(),
775
- mint: z10.string(),
760
+ var Vault = z11.object({
761
+ address: z11.string(),
762
+ mint: z11.string(),
776
763
  depositedFunds: AmountWithUsdSchema,
777
764
  borrowedFunds: AmountWithUsdSchema,
778
765
  supplyLimit: AmountWithUsdSchema,
779
- borrowedShares: z10.coerce.bigint(),
780
- depositedShares: z10.coerce.bigint(),
781
- supplyApy: z10.number(),
782
- borrowApy: z10.number(),
783
- interestRate: z10.coerce.bigint(),
784
- utilization: z10.number(),
785
- pythOracleFeedId: z10.string(),
786
- pythOraclePriceUpdate: z10.string()
766
+ borrowedShares: z11.coerce.bigint(),
767
+ depositedShares: z11.coerce.bigint(),
768
+ supplyApy: z11.number(),
769
+ borrowApy: z11.number(),
770
+ interestRate: z11.coerce.bigint(),
771
+ utilization: z11.number(),
772
+ pythOracleFeedId: z11.string(),
773
+ pythOraclePriceUpdate: z11.string()
787
774
  });
788
- var VaultHistoricalStats = z10.object({
789
- date: z10.preprocess((val, ctx) => {
775
+ var VaultHistoricalStats = z11.object({
776
+ date: z11.preprocess((val, ctx) => {
790
777
  if (typeof val === "string") {
791
778
  const [year, month, day] = val.split("-").map(Number);
792
779
  return new Date(year, month - 1, day);
@@ -795,214 +782,214 @@ var VaultHistoricalStats = z10.object({
795
782
  code: "custom",
796
783
  message: "Not a valid date string"
797
784
  });
798
- return z10.NEVER;
799
- }, z10.date()),
785
+ return z11.NEVER;
786
+ }, z11.date()),
800
787
  supply: AmountWithUsdSchema,
801
788
  borrow: AmountWithUsdSchema,
802
- supplyApy: z10.number(),
803
- borrowApr: z10.number()
789
+ supplyApy: z11.number(),
790
+ borrowApr: z11.number()
804
791
  });
805
- var Tick = z10.object({
806
- index: z10.number(),
807
- liquidity: z10.coerce.bigint()
792
+ var Tick = z11.object({
793
+ index: z11.number(),
794
+ liquidity: z11.coerce.bigint()
808
795
  });
809
- var PoolTicks = z10.object({
810
- tickSpacing: z10.number(),
796
+ var PoolTicks = z11.object({
797
+ tickSpacing: z11.number(),
811
798
  ticks: Tick.array()
812
799
  });
813
- var LendingPosition = z10.object({
814
- address: z10.string(),
815
- authority: z10.string(),
816
- mint: z10.string(),
817
- vault: z10.string(),
818
- shares: z10.coerce.bigint(),
800
+ var LendingPosition = z11.object({
801
+ address: z11.string(),
802
+ authority: z11.string(),
803
+ mint: z11.string(),
804
+ vault: z11.string(),
805
+ shares: z11.coerce.bigint(),
819
806
  funds: AmountWithUsdSchema,
820
807
  earned: AmountWithUsdSchema
821
808
  });
822
- var PoolSwap = z10.object({
823
- id: z10.string(),
824
- amountIn: z10.coerce.bigint(),
825
- amountOut: z10.coerce.bigint(),
826
- amountUsd: z10.number(),
827
- aToB: z10.boolean(),
828
- pool: z10.string(),
829
- time: z10.coerce.date()
809
+ var PoolSwap = z11.object({
810
+ id: z11.string(),
811
+ amountIn: z11.coerce.bigint(),
812
+ amountOut: z11.coerce.bigint(),
813
+ amountUsd: z11.number(),
814
+ aToB: z11.boolean(),
815
+ pool: z11.string(),
816
+ time: z11.coerce.date()
830
817
  });
831
- var TradeHistoryEntry = z10.object({
818
+ var TradeHistoryEntry = z11.object({
832
819
  // Internal entry ID
833
- id: z10.string(),
820
+ id: z11.string(),
834
821
  pool: Pool,
835
- authority: z10.string(),
836
- aToB: z10.boolean(),
822
+ authority: z11.string(),
823
+ aToB: z11.boolean(),
837
824
  // Trade action which created entry
838
825
  action: TradeHistoryActionSchema,
839
826
  // Trade direction formatted for ui display
840
827
  uiDirection: TradeHistoryUIDirectionSchema,
841
828
  // Trade price formatted for ui display
842
- uiPrice: z10.number(),
829
+ uiPrice: z11.number(),
843
830
  baseToken: AmountWithUsdSchema,
844
831
  quoteToken: AmountWithUsdSchema,
845
832
  fee: AmountWithUsdSchema,
846
- pnl: z10.nullable(
847
- z10.object({
848
- usd: z10.number(),
849
- bps: z10.number()
833
+ pnl: z11.nullable(
834
+ z11.object({
835
+ usd: z11.number(),
836
+ bps: z11.number()
850
837
  })
851
838
  ),
852
- txSignature: z10.nullable(z10.string()),
853
- positionAddress: z10.nullable(z10.string()),
854
- slot: z10.coerce.bigint(),
855
- ts: z10.coerce.date()
839
+ txSignature: z11.nullable(z11.string()),
840
+ positionAddress: z11.nullable(z11.string()),
841
+ slot: z11.coerce.bigint(),
842
+ ts: z11.coerce.date()
856
843
  });
857
- var OrderHistoryEntry = z10.object({
844
+ var OrderHistoryEntry = z11.object({
858
845
  // Internal entry ID
859
- id: z10.string(),
846
+ id: z11.string(),
860
847
  pool: Pool,
861
- authority: z10.string(),
848
+ authority: z11.string(),
862
849
  orderType: OrderHistoryOrderTypeSchema,
863
- isReduceOnly: z10.nullable(z10.boolean()),
864
- aToB: z10.boolean(),
850
+ isReduceOnly: z11.nullable(z11.boolean()),
851
+ aToB: z11.boolean(),
865
852
  uiDirection: OrderHistoryUIDirectionSchema,
866
- uiPrice: z10.nullable(z10.number()),
867
- uiExecutionPrice: z10.nullable(z10.number()),
853
+ uiPrice: z11.nullable(z11.number()),
854
+ uiExecutionPrice: z11.nullable(z11.number()),
868
855
  status: OrderHistoryStatusSchema,
869
856
  baseToken: AmountWithUsdSchema,
870
857
  quoteToken: AmountWithUsdSchema,
871
- baseTokenConsumedAmount: z10.nullable(AmountWithUsdSchema),
872
- quoteTokenFilledAmount: z10.nullable(AmountWithUsdSchema),
873
- txSignature: z10.nullable(z10.string()),
874
- positionAddress: z10.nullable(z10.string()),
875
- slot: z10.coerce.bigint(),
876
- ts: z10.coerce.date()
858
+ baseTokenConsumedAmount: z11.nullable(AmountWithUsdSchema),
859
+ quoteTokenFilledAmount: z11.nullable(AmountWithUsdSchema),
860
+ txSignature: z11.nullable(z11.string()),
861
+ positionAddress: z11.nullable(z11.string()),
862
+ slot: z11.coerce.bigint(),
863
+ ts: z11.coerce.date()
877
864
  });
878
- var StakingTreasury = z10.object({
879
- address: z10.string(),
880
- stakedTokenMint: z10.string(),
881
- rewardTokenMint: z10.string(),
882
- apy: z10.number(),
883
- uniqueStakers: z10.number(),
865
+ var StakingTreasury = z11.object({
866
+ address: z11.string(),
867
+ stakedTokenMint: z11.string(),
868
+ rewardTokenMint: z11.string(),
869
+ apy: z11.number(),
870
+ uniqueStakers: z11.number(),
884
871
  totalStaked: AmountWithUsdSchema,
885
872
  totalReward: AmountWithUsdSchema,
886
- unstakeCooldownSeconds: z10.number(),
887
- isStakingEnabled: z10.boolean(),
888
- isUnstakingEnabled: z10.boolean(),
889
- isWithdrawEnabled: z10.boolean()
873
+ unstakeCooldownSeconds: z11.number(),
874
+ isStakingEnabled: z11.boolean(),
875
+ isUnstakingEnabled: z11.boolean(),
876
+ isWithdrawEnabled: z11.boolean()
890
877
  });
891
- var StakingPosition = z10.object({
892
- address: z10.string(),
893
- owner: z10.string(),
878
+ var StakingPosition = z11.object({
879
+ address: z11.string(),
880
+ owner: z11.string(),
894
881
  staked: AmountWithUsdSchema,
895
882
  unstaked: AmountWithUsdSchema,
896
883
  claimedReward: AmountWithUsdSchema,
897
884
  unclaimedReward: AmountWithUsdSchema,
898
- rank: z10.nullable(z10.number()),
899
- vesting: z10.object({
885
+ rank: z11.nullable(z11.number()),
886
+ vesting: z11.object({
900
887
  locked: AmountWithUsdSchema,
901
888
  unlocked: AmountWithUsdSchema,
902
- unlockRate: z10.coerce.bigint(),
903
- unlockEverySeconds: z10.number(),
904
- unlockCliffSeconds: z10.number(),
905
- lockedAt: z10.nullable(z10.coerce.date())
889
+ unlockRate: z11.coerce.bigint(),
890
+ unlockEverySeconds: z11.number(),
891
+ unlockCliffSeconds: z11.number(),
892
+ lockedAt: z11.nullable(z11.coerce.date())
906
893
  }),
907
- lastUnstakedAt: z10.nullable(z10.coerce.date()),
908
- withdrawAvailableAt: z10.nullable(z10.coerce.date())
894
+ lastUnstakedAt: z11.nullable(z11.coerce.date()),
895
+ withdrawAvailableAt: z11.nullable(z11.coerce.date())
909
896
  });
910
- var StakingLeaderboardPosition = z10.object({
911
- rank: z10.number(),
912
- address: z10.string(),
913
- owner: z10.string(),
897
+ var StakingLeaderboardPosition = z11.object({
898
+ rank: z11.number(),
899
+ address: z11.string(),
900
+ owner: z11.string(),
914
901
  staked: AmountWithUsdSchema
915
902
  });
916
- var StakingLeaderboardPage = z10.object({
903
+ var StakingLeaderboardPage = z11.object({
917
904
  data: StakingLeaderboardPosition.array(),
918
905
  meta: PaginationMeta
919
906
  });
920
- var StakingPositionHistoryAction = z10.object({
921
- position: z10.string(),
907
+ var StakingPositionHistoryAction = z11.object({
908
+ position: z11.string(),
922
909
  action: StakingPositionHistoryActionTypeSchema,
923
- txSignature: z10.string(),
924
- amount: z10.coerce.bigint(),
925
- time: z10.coerce.date()
910
+ txSignature: z11.string(),
911
+ amount: z11.coerce.bigint(),
912
+ time: z11.coerce.date()
926
913
  });
927
- var PoolPriceCandle = z10.object({
928
- time: z10.number(),
929
- open: z10.number(),
930
- close: z10.number(),
931
- high: z10.number(),
932
- low: z10.number(),
933
- volume: z10.number()
914
+ var PoolPriceCandle = z11.object({
915
+ time: z11.number(),
916
+ open: z11.number(),
917
+ close: z11.number(),
918
+ high: z11.number(),
919
+ low: z11.number(),
920
+ volume: z11.number()
934
921
  });
935
- var FeesStatsGroup = z10.object({
936
- time: z10.coerce.date(),
937
- addLiquidityFees: z10.number(),
938
- limitOrderFees: z10.number(),
939
- yieldCompoundingFees: z10.number(),
940
- liquidationFees: z10.number(),
941
- totalLiquidationsNetworkFees: z10.number(),
942
- totalLimitOrdersNetworkFees: z10.number(),
943
- totalYieldCompoundingNetworkFees: z10.number(),
944
- failedNetworkFees: z10.number(),
945
- processedNetworkFees: z10.number(),
946
- totalCollectedFees: z10.number(),
947
- totalNetworkFees: z10.number(),
948
- jitoLiquidationFees: z10.number(),
949
- jitoLimitOrderFees: z10.number(),
950
- jitoYieldCompoundingFees: z10.number(),
951
- runningAddLiquidityFees: z10.number(),
952
- runningLimitOrderFees: z10.number(),
953
- runningYieldCompoundingFees: z10.number(),
954
- runningLiquidationFees: z10.number(),
955
- runningTotalLiquidationsNetworkFees: z10.number(),
956
- runningTotalLimitOrdersNetworkFees: z10.number(),
957
- runningTotalYieldCompoundingNetworkFees: z10.number(),
958
- runningFailedNetworkFees: z10.number(),
959
- runningProcessedNetworkFees: z10.number(),
960
- runningJitoLiquidationFees: z10.number(),
961
- runningJitoLimitOrderFees: z10.number(),
962
- runningJitoYieldCompoundingFees: z10.number(),
963
- runningTotalCollectedFees: z10.number(),
964
- runningTotalNetworkFees: z10.number()
922
+ var FeesStatsGroup = z11.object({
923
+ time: z11.coerce.date(),
924
+ addLiquidityFees: z11.number(),
925
+ limitOrderFees: z11.number(),
926
+ yieldCompoundingFees: z11.number(),
927
+ liquidationFees: z11.number(),
928
+ totalLiquidationsNetworkFees: z11.number(),
929
+ totalLimitOrdersNetworkFees: z11.number(),
930
+ totalYieldCompoundingNetworkFees: z11.number(),
931
+ failedNetworkFees: z11.number(),
932
+ processedNetworkFees: z11.number(),
933
+ totalCollectedFees: z11.number(),
934
+ totalNetworkFees: z11.number(),
935
+ jitoLiquidationFees: z11.number(),
936
+ jitoLimitOrderFees: z11.number(),
937
+ jitoYieldCompoundingFees: z11.number(),
938
+ runningAddLiquidityFees: z11.number(),
939
+ runningLimitOrderFees: z11.number(),
940
+ runningYieldCompoundingFees: z11.number(),
941
+ runningLiquidationFees: z11.number(),
942
+ runningTotalLiquidationsNetworkFees: z11.number(),
943
+ runningTotalLimitOrdersNetworkFees: z11.number(),
944
+ runningTotalYieldCompoundingNetworkFees: z11.number(),
945
+ runningFailedNetworkFees: z11.number(),
946
+ runningProcessedNetworkFees: z11.number(),
947
+ runningJitoLiquidationFees: z11.number(),
948
+ runningJitoLimitOrderFees: z11.number(),
949
+ runningJitoYieldCompoundingFees: z11.number(),
950
+ runningTotalCollectedFees: z11.number(),
951
+ runningTotalNetworkFees: z11.number()
965
952
  });
966
- var StakingRevenueStatsGroup = z10.object({
967
- time: z10.coerce.date(),
968
- totalDepositsUsd: z10.number(),
969
- totalDepositsSol: z10.coerce.bigint(),
970
- runningTotalDepositsUsd: z10.number(),
971
- runningTotalDepositsSol: z10.coerce.bigint()
953
+ var StakingRevenueStatsGroup = z11.object({
954
+ time: z11.coerce.date(),
955
+ totalDepositsUsd: z11.number(),
956
+ totalDepositsSol: z11.coerce.bigint(),
957
+ runningTotalDepositsUsd: z11.number(),
958
+ runningTotalDepositsSol: z11.coerce.bigint()
972
959
  });
973
- var SwapQuoteByInput = z10.object({
974
- estimatedAmountOut: z10.coerce.bigint(),
975
- minAmountOut: z10.coerce.bigint(),
976
- feeAmount: z10.coerce.bigint(),
977
- feeUsd: z10.number(),
960
+ var SwapQuoteByInput = z11.object({
961
+ estimatedAmountOut: z11.coerce.bigint(),
962
+ minAmountOut: z11.coerce.bigint(),
963
+ feeAmount: z11.coerce.bigint(),
964
+ feeUsd: z11.number(),
978
965
  /** Price impact in percents */
979
- priceImpact: z10.number()
966
+ priceImpact: z11.number()
980
967
  });
981
- var SwapQuoteByOutput = z10.object({
982
- estimatedAmountIn: z10.coerce.bigint(),
983
- maxAmountIn: z10.coerce.bigint(),
984
- feeAmount: z10.coerce.bigint(),
985
- feeUsd: z10.number(),
968
+ var SwapQuoteByOutput = z11.object({
969
+ estimatedAmountIn: z11.coerce.bigint(),
970
+ maxAmountIn: z11.coerce.bigint(),
971
+ feeAmount: z11.coerce.bigint(),
972
+ feeUsd: z11.number(),
986
973
  /** Price impact in percents */
987
- priceImpact: z10.number()
974
+ priceImpact: z11.number()
988
975
  });
989
- var LimitOrderQuoteByInput = z10.object({
990
- amountOut: z10.coerce.bigint()
976
+ var LimitOrderQuoteByInput = z11.object({
977
+ amountOut: z11.coerce.bigint()
991
978
  });
992
- var LimitOrderQuoteByOutput = z10.object({
993
- amountIn: z10.coerce.bigint()
979
+ var LimitOrderQuoteByOutput = z11.object({
980
+ amountIn: z11.coerce.bigint()
994
981
  });
995
982
  var TradableAmount = AmountWithUsdSchema;
996
- var UpdateStreamSubscriptionResult = z10.object({
997
- status: z10.string()
983
+ var UpdateStreamSubscriptionResult = z11.object({
984
+ status: z11.string()
998
985
  });
999
- var createNotificationSchema = (dataSchema, metaSchema) => z10.object({
986
+ var createNotificationSchema = (dataSchema, metaSchema) => z11.object({
1000
987
  entity: NotificationEntitySchema,
1001
988
  action: NotificationActionSchema,
1002
989
  data: dataSchema,
1003
- id: z10.string(),
1004
- authority: z10.nullish(z10.string()),
1005
- ...metaSchema ? { meta: metaSchema } : { meta: z10.undefined().nullable() }
990
+ id: z11.string(),
991
+ authority: z11.nullish(z11.string()),
992
+ ...metaSchema ? { meta: metaSchema } : { meta: z11.undefined().nullable() }
1006
993
  });
1007
994
  var PoolSwapNotification = createNotificationSchema(PoolSwap);
1008
995
  var LendingPositionNotification = createNotificationSchema(LendingPosition);