@crypticdot/defituna-api 1.7.0 → 1.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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,
@@ -148,7 +151,8 @@ var NotificationEntity = {
148
151
  STAKING_POSITION: "staking_position",
149
152
  FUSION_LIMIT_ORDER: "fusion_limit_order",
150
153
  TRADE_HISTORY_ENTRY: "trade_history_entry",
151
- ORDER_HISTORY_ENTRY: "order_history_entry"
154
+ ORDER_HISTORY_ENTRY: "order_history_entry",
155
+ STATE_SNAPSHOT: "state_snapshot"
152
156
  };
153
157
  var NotificationAction = {
154
158
  CREATE: "create",
@@ -713,6 +717,19 @@ var SwapQuoteByOutput = import_zod.z.object({
713
717
  /** Price impact in percents */
714
718
  priceImpact: import_zod.z.number()
715
719
  });
720
+ var ShortPoolPriceUpdate = import_zod.z.object({
721
+ price: import_zod.z.number(),
722
+ uiPrice: import_zod.z.number(),
723
+ sqrtPrice: import_zod.z.coerce.bigint()
724
+ });
725
+ var StateSnapshot = import_zod.z.object({
726
+ slot: import_zod.z.coerce.bigint(),
727
+ blockTime: import_zod.z.coerce.date(),
728
+ poolPrices: import_zod.z.optional(import_zod.z.map(import_zod.z.string(), ShortPoolPriceUpdate)),
729
+ tunaSpotPositions: import_zod.z.optional(import_zod.z.array(TunaSpotPosition)),
730
+ tunaLpPositions: import_zod.z.optional(import_zod.z.array(TunaPosition)),
731
+ fusionLimitOrders: import_zod.z.optional(import_zod.z.array(LimitOrder))
732
+ });
716
733
  var LimitOrderQuoteByInput = import_zod.z.object({
717
734
  amountOut: import_zod.z.coerce.bigint()
718
735
  });
@@ -746,6 +763,7 @@ var LimitOrderNotification = createNotificationSchema(LimitOrder);
746
763
  var TradeHistoryEntryNotification = createNotificationSchema(TradeHistoryEntry);
747
764
  var OrderHistoryEntryNotification = createNotificationSchema(OrderHistoryEntry);
748
765
  var StakingPositionNotification = createNotificationSchema(StakingPosition);
766
+ var StateSnapshotNotification = createNotificationSchema(StateSnapshot);
749
767
 
750
768
  // src/client/client.ts
751
769
  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,
@@ -113,7 +116,8 @@ var NotificationEntity = {
113
116
  STAKING_POSITION: "staking_position",
114
117
  FUSION_LIMIT_ORDER: "fusion_limit_order",
115
118
  TRADE_HISTORY_ENTRY: "trade_history_entry",
116
- ORDER_HISTORY_ENTRY: "order_history_entry"
119
+ ORDER_HISTORY_ENTRY: "order_history_entry",
120
+ STATE_SNAPSHOT: "state_snapshot"
117
121
  };
118
122
  var NotificationAction = {
119
123
  CREATE: "create",
@@ -678,6 +682,19 @@ var SwapQuoteByOutput = z.object({
678
682
  /** Price impact in percents */
679
683
  priceImpact: z.number()
680
684
  });
685
+ var ShortPoolPriceUpdate = z.object({
686
+ price: z.number(),
687
+ uiPrice: z.number(),
688
+ sqrtPrice: z.coerce.bigint()
689
+ });
690
+ var StateSnapshot = z.object({
691
+ slot: z.coerce.bigint(),
692
+ blockTime: z.coerce.date(),
693
+ poolPrices: z.optional(z.map(z.string(), ShortPoolPriceUpdate)),
694
+ tunaSpotPositions: z.optional(z.array(TunaSpotPosition)),
695
+ tunaLpPositions: z.optional(z.array(TunaPosition)),
696
+ fusionLimitOrders: z.optional(z.array(LimitOrder))
697
+ });
681
698
  var LimitOrderQuoteByInput = z.object({
682
699
  amountOut: z.coerce.bigint()
683
700
  });
@@ -711,6 +728,7 @@ var LimitOrderNotification = createNotificationSchema(LimitOrder);
711
728
  var TradeHistoryEntryNotification = createNotificationSchema(TradeHistoryEntry);
712
729
  var OrderHistoryEntryNotification = createNotificationSchema(OrderHistoryEntry);
713
730
  var StakingPositionNotification = createNotificationSchema(StakingPosition);
731
+ var StateSnapshotNotification = createNotificationSchema(StateSnapshot);
714
732
 
715
733
  // src/client/client.ts
716
734
  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.1",
4
4
  "private": false,
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",