@crypticdot/defituna-api 1.7.0 → 1.8.0

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.js CHANGED
@@ -88,6 +88,7 @@ __export(schemas_exports, {
88
88
  PoolSwap: () => PoolSwap,
89
89
  PoolSwapNotification: () => PoolSwapNotification,
90
90
  PoolTicks: () => PoolTicks,
91
+ ShortPoolPriceUpdate: () => ShortPoolPriceUpdate,
91
92
  StakingLeaderboardPage: () => StakingLeaderboardPage,
92
93
  StakingLeaderboardPosition: () => StakingLeaderboardPosition,
93
94
  StakingPosition: () => StakingPosition,
@@ -97,6 +98,8 @@ __export(schemas_exports, {
97
98
  StakingPositionNotification: () => StakingPositionNotification,
98
99
  StakingRevenueStatsGroup: () => StakingRevenueStatsGroup,
99
100
  StakingTreasury: () => StakingTreasury,
101
+ StateSnapshot: () => StateSnapshot,
102
+ StateSnapshotNotification: () => StateSnapshotNotification,
100
103
  SwapQuoteByInput: () => SwapQuoteByInput,
101
104
  SwapQuoteByOutput: () => SwapQuoteByOutput,
102
105
  Tick: () => Tick,
@@ -713,6 +716,19 @@ var SwapQuoteByOutput = import_zod.z.object({
713
716
  /** Price impact in percents */
714
717
  priceImpact: import_zod.z.number()
715
718
  });
719
+ var ShortPoolPriceUpdate = import_zod.z.object({
720
+ price: import_zod.z.number(),
721
+ uiPrice: import_zod.z.number(),
722
+ sqrtPrice: import_zod.z.coerce.bigint()
723
+ });
724
+ var StateSnapshot = import_zod.z.object({
725
+ slot: import_zod.z.coerce.bigint(),
726
+ blockTime: import_zod.z.coerce.date(),
727
+ poolPrices: import_zod.z.optional(import_zod.z.map(import_zod.z.string(), ShortPoolPriceUpdate)),
728
+ tunaSpotPositions: import_zod.z.optional(import_zod.z.array(TunaSpotPosition)),
729
+ tunaLpPositions: import_zod.z.optional(import_zod.z.array(TunaPosition)),
730
+ fusionLimitOrders: import_zod.z.optional(import_zod.z.array(LimitOrder))
731
+ });
716
732
  var LimitOrderQuoteByInput = import_zod.z.object({
717
733
  amountOut: import_zod.z.coerce.bigint()
718
734
  });
@@ -746,6 +762,7 @@ var LimitOrderNotification = createNotificationSchema(LimitOrder);
746
762
  var TradeHistoryEntryNotification = createNotificationSchema(TradeHistoryEntry);
747
763
  var OrderHistoryEntryNotification = createNotificationSchema(OrderHistoryEntry);
748
764
  var StakingPositionNotification = createNotificationSchema(StakingPosition);
765
+ var StateSnapshotNotification = createNotificationSchema(StateSnapshot);
749
766
 
750
767
  // src/client/client.ts
751
768
  var DEFAULT_TIMEOUT = 5e3;
package/dist/index.mjs CHANGED
@@ -53,6 +53,7 @@ __export(schemas_exports, {
53
53
  PoolSwap: () => PoolSwap,
54
54
  PoolSwapNotification: () => PoolSwapNotification,
55
55
  PoolTicks: () => PoolTicks,
56
+ ShortPoolPriceUpdate: () => ShortPoolPriceUpdate,
56
57
  StakingLeaderboardPage: () => StakingLeaderboardPage,
57
58
  StakingLeaderboardPosition: () => StakingLeaderboardPosition,
58
59
  StakingPosition: () => StakingPosition,
@@ -62,6 +63,8 @@ __export(schemas_exports, {
62
63
  StakingPositionNotification: () => StakingPositionNotification,
63
64
  StakingRevenueStatsGroup: () => StakingRevenueStatsGroup,
64
65
  StakingTreasury: () => StakingTreasury,
66
+ StateSnapshot: () => StateSnapshot,
67
+ StateSnapshotNotification: () => StateSnapshotNotification,
65
68
  SwapQuoteByInput: () => SwapQuoteByInput,
66
69
  SwapQuoteByOutput: () => SwapQuoteByOutput,
67
70
  Tick: () => Tick,
@@ -678,6 +681,19 @@ var SwapQuoteByOutput = z.object({
678
681
  /** Price impact in percents */
679
682
  priceImpact: z.number()
680
683
  });
684
+ var ShortPoolPriceUpdate = z.object({
685
+ price: z.number(),
686
+ uiPrice: z.number(),
687
+ sqrtPrice: z.coerce.bigint()
688
+ });
689
+ var StateSnapshot = z.object({
690
+ slot: z.coerce.bigint(),
691
+ blockTime: z.coerce.date(),
692
+ poolPrices: z.optional(z.map(z.string(), ShortPoolPriceUpdate)),
693
+ tunaSpotPositions: z.optional(z.array(TunaSpotPosition)),
694
+ tunaLpPositions: z.optional(z.array(TunaPosition)),
695
+ fusionLimitOrders: z.optional(z.array(LimitOrder))
696
+ });
681
697
  var LimitOrderQuoteByInput = z.object({
682
698
  amountOut: z.coerce.bigint()
683
699
  });
@@ -711,6 +727,7 @@ var LimitOrderNotification = createNotificationSchema(LimitOrder);
711
727
  var TradeHistoryEntryNotification = createNotificationSchema(TradeHistoryEntry);
712
728
  var OrderHistoryEntryNotification = createNotificationSchema(OrderHistoryEntry);
713
729
  var StakingPositionNotification = createNotificationSchema(StakingPosition);
730
+ var StateSnapshotNotification = createNotificationSchema(StateSnapshot);
714
731
 
715
732
  // src/client/client.ts
716
733
  var DEFAULT_TIMEOUT = 5e3;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crypticdot/defituna-api",
3
- "version": "1.7.0",
3
+ "version": "1.8.0",
4
4
  "private": false,
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",