@crypticdot/defituna-api 1.1.51 → 1.1.52

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.d.mts CHANGED
@@ -56,6 +56,13 @@ declare const LimitOrderStateSchema: z.ZodEnum<["open", ...("open" | "partially_
56
56
  declare const StakingPositionHistoryActionTypeSchema: z.ZodEnum<["stake", ...("stake" | "unstake" | "withdraw" | "claim_rewards" | "compound_rewards")[]]>;
57
57
  declare const PoolSubscriptionTopicSchema: z.ZodEnum<["order_book", ...("order_book" | "pool_prices" | "pool_swaps")[]]>;
58
58
  declare const WalletSubscriptionTopicSchema: z.ZodEnum<["tuna_positions", ...("staking_position" | "tuna_positions" | "lending_positions" | "fusion_limit_orders")[]]>;
59
+ declare const PaginationMeta$1: z.ZodObject<{
60
+ total: z.ZodNumber;
61
+ }, "strip", z.ZodTypeAny, {
62
+ total: number;
63
+ }, {
64
+ total: number;
65
+ }>;
59
66
  declare const Mint$1: z.ZodObject<{
60
67
  symbol: z.ZodString;
61
68
  mint: z.ZodString;
@@ -1461,6 +1468,103 @@ declare const StakingPosition$1: z.ZodObject<{
1461
1468
  lastUnstakedAt: Date | null;
1462
1469
  withdrawAvailableAt: Date | null;
1463
1470
  }>;
1471
+ declare const StakingLeaderboardPosition$1: z.ZodObject<{
1472
+ rank: z.ZodNumber;
1473
+ address: z.ZodString;
1474
+ owner: z.ZodString;
1475
+ staked: z.ZodObject<{
1476
+ amount: z.ZodBigInt;
1477
+ usd: z.ZodNumber;
1478
+ }, "strip", z.ZodTypeAny, {
1479
+ amount: bigint;
1480
+ usd: number;
1481
+ }, {
1482
+ amount: bigint;
1483
+ usd: number;
1484
+ }>;
1485
+ }, "strip", z.ZodTypeAny, {
1486
+ address: string;
1487
+ owner: string;
1488
+ staked: {
1489
+ amount: bigint;
1490
+ usd: number;
1491
+ };
1492
+ rank: number;
1493
+ }, {
1494
+ address: string;
1495
+ owner: string;
1496
+ staked: {
1497
+ amount: bigint;
1498
+ usd: number;
1499
+ };
1500
+ rank: number;
1501
+ }>;
1502
+ declare const StakingLeaderboardPage$1: z.ZodObject<{
1503
+ data: z.ZodArray<z.ZodObject<{
1504
+ rank: z.ZodNumber;
1505
+ address: z.ZodString;
1506
+ owner: z.ZodString;
1507
+ staked: z.ZodObject<{
1508
+ amount: z.ZodBigInt;
1509
+ usd: z.ZodNumber;
1510
+ }, "strip", z.ZodTypeAny, {
1511
+ amount: bigint;
1512
+ usd: number;
1513
+ }, {
1514
+ amount: bigint;
1515
+ usd: number;
1516
+ }>;
1517
+ }, "strip", z.ZodTypeAny, {
1518
+ address: string;
1519
+ owner: string;
1520
+ staked: {
1521
+ amount: bigint;
1522
+ usd: number;
1523
+ };
1524
+ rank: number;
1525
+ }, {
1526
+ address: string;
1527
+ owner: string;
1528
+ staked: {
1529
+ amount: bigint;
1530
+ usd: number;
1531
+ };
1532
+ rank: number;
1533
+ }>, "many">;
1534
+ meta: z.ZodObject<{
1535
+ total: z.ZodNumber;
1536
+ }, "strip", z.ZodTypeAny, {
1537
+ total: number;
1538
+ }, {
1539
+ total: number;
1540
+ }>;
1541
+ }, "strip", z.ZodTypeAny, {
1542
+ data: {
1543
+ address: string;
1544
+ owner: string;
1545
+ staked: {
1546
+ amount: bigint;
1547
+ usd: number;
1548
+ };
1549
+ rank: number;
1550
+ }[];
1551
+ meta: {
1552
+ total: number;
1553
+ };
1554
+ }, {
1555
+ data: {
1556
+ address: string;
1557
+ owner: string;
1558
+ staked: {
1559
+ amount: bigint;
1560
+ usd: number;
1561
+ };
1562
+ rank: number;
1563
+ }[];
1564
+ meta: {
1565
+ total: number;
1566
+ };
1567
+ }>;
1464
1568
  declare const StakingPositionHistoryAction$1: z.ZodObject<{
1465
1569
  position: z.ZodString;
1466
1570
  action: z.ZodEnum<["stake", ...("stake" | "unstake" | "withdraw" | "claim_rewards" | "compound_rewards")[]]>;
@@ -1697,8 +1801,6 @@ declare const PoolSwapNotification: z.ZodObject<{
1697
1801
  }, "strip", z.ZodTypeAny, {
1698
1802
  authority: string | null;
1699
1803
  id: string;
1700
- action: "create" | "update";
1701
- entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
1702
1804
  data: {
1703
1805
  time: Date;
1704
1806
  pool: string;
@@ -1708,12 +1810,12 @@ declare const PoolSwapNotification: z.ZodObject<{
1708
1810
  amountUsd: number;
1709
1811
  aToB: boolean;
1710
1812
  };
1813
+ action: "create" | "update";
1814
+ entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
1711
1815
  meta?: any;
1712
1816
  } | {
1713
1817
  authority: string | null;
1714
1818
  id: string;
1715
- action: "create" | "update";
1716
- entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
1717
1819
  data: {
1718
1820
  time: Date;
1719
1821
  pool: string;
@@ -1723,12 +1825,12 @@ declare const PoolSwapNotification: z.ZodObject<{
1723
1825
  amountUsd: number;
1724
1826
  aToB: boolean;
1725
1827
  };
1828
+ action: "create" | "update";
1829
+ entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
1726
1830
  meta?: any;
1727
1831
  }, {
1728
1832
  authority: string | null;
1729
1833
  id: string;
1730
- action: "create" | "update";
1731
- entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
1732
1834
  data: {
1733
1835
  time: Date;
1734
1836
  pool: string;
@@ -1738,12 +1840,12 @@ declare const PoolSwapNotification: z.ZodObject<{
1738
1840
  amountUsd: number;
1739
1841
  aToB: boolean;
1740
1842
  };
1843
+ action: "create" | "update";
1844
+ entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
1741
1845
  meta?: any;
1742
1846
  } | {
1743
1847
  authority: string | null;
1744
1848
  id: string;
1745
- action: "create" | "update";
1746
- entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
1747
1849
  data: {
1748
1850
  time: Date;
1749
1851
  pool: string;
@@ -1753,6 +1855,8 @@ declare const PoolSwapNotification: z.ZodObject<{
1753
1855
  amountUsd: number;
1754
1856
  aToB: boolean;
1755
1857
  };
1858
+ action: "create" | "update";
1859
+ entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
1756
1860
  meta?: any;
1757
1861
  }>;
1758
1862
  declare const PoolPriceUpdateNotification: z.ZodObject<{
@@ -1802,50 +1906,50 @@ declare const PoolPriceUpdateNotification: z.ZodObject<{
1802
1906
  }, "strip", z.ZodTypeAny, {
1803
1907
  authority: string | null;
1804
1908
  id: string;
1805
- action: "create" | "update";
1806
- entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
1807
1909
  data: {
1808
1910
  price: number;
1809
1911
  time: Date;
1810
1912
  sqrtPrice: bigint;
1811
1913
  pool: string;
1812
1914
  };
1915
+ action: "create" | "update";
1916
+ entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
1813
1917
  meta?: any;
1814
1918
  } | {
1815
1919
  authority: string | null;
1816
1920
  id: string;
1817
- action: "create" | "update";
1818
- entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
1819
1921
  data: {
1820
1922
  price: number;
1821
1923
  time: Date;
1822
1924
  sqrtPrice: bigint;
1823
1925
  pool: string;
1824
1926
  };
1927
+ action: "create" | "update";
1928
+ entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
1825
1929
  meta?: any;
1826
1930
  }, {
1827
1931
  authority: string | null;
1828
1932
  id: string;
1829
- action: "create" | "update";
1830
- entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
1831
1933
  data: {
1832
1934
  price: number;
1833
1935
  time: Date;
1834
1936
  sqrtPrice: bigint;
1835
1937
  pool: string;
1836
1938
  };
1939
+ action: "create" | "update";
1940
+ entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
1837
1941
  meta?: any;
1838
1942
  } | {
1839
1943
  authority: string | null;
1840
1944
  id: string;
1841
- action: "create" | "update";
1842
- entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
1843
1945
  data: {
1844
1946
  price: number;
1845
1947
  time: Date;
1846
1948
  sqrtPrice: bigint;
1847
1949
  pool: string;
1848
1950
  };
1951
+ action: "create" | "update";
1952
+ entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
1849
1953
  meta?: any;
1850
1954
  }>;
1851
1955
  declare const OrderBookNotification: z.ZodObject<{
@@ -2005,8 +2109,6 @@ declare const OrderBookNotification: z.ZodObject<{
2005
2109
  }, "strip", z.ZodTypeAny, {
2006
2110
  authority: string | null;
2007
2111
  id: string;
2008
- action: "create" | "update";
2009
- entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
2010
2112
  data: {
2011
2113
  entries: {
2012
2114
  price: number;
@@ -2027,11 +2129,11 @@ declare const OrderBookNotification: z.ZodObject<{
2027
2129
  priceStep: number;
2028
2130
  inverted: boolean;
2029
2131
  } | null | undefined;
2132
+ action: "create" | "update";
2133
+ entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
2030
2134
  } | {
2031
2135
  authority: string | null;
2032
2136
  id: string;
2033
- action: "create" | "update";
2034
- entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
2035
2137
  data: {
2036
2138
  entries: {
2037
2139
  price: number;
@@ -2052,11 +2154,11 @@ declare const OrderBookNotification: z.ZodObject<{
2052
2154
  priceStep: number;
2053
2155
  inverted: boolean;
2054
2156
  } | null | undefined;
2157
+ action: "create" | "update";
2158
+ entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
2055
2159
  }, {
2056
2160
  authority: string | null;
2057
2161
  id: string;
2058
- action: "create" | "update";
2059
- entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
2060
2162
  data: {
2061
2163
  entries: {
2062
2164
  price: number;
@@ -2077,11 +2179,11 @@ declare const OrderBookNotification: z.ZodObject<{
2077
2179
  priceStep: number;
2078
2180
  inverted: boolean;
2079
2181
  } | null | undefined;
2182
+ action: "create" | "update";
2183
+ entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
2080
2184
  } | {
2081
2185
  authority: string | null;
2082
2186
  id: string;
2083
- action: "create" | "update";
2084
- entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
2085
2187
  data: {
2086
2188
  entries: {
2087
2189
  price: number;
@@ -2102,6 +2204,8 @@ declare const OrderBookNotification: z.ZodObject<{
2102
2204
  priceStep: number;
2103
2205
  inverted: boolean;
2104
2206
  } | null | undefined;
2207
+ action: "create" | "update";
2208
+ entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
2105
2209
  }>;
2106
2210
  declare const TunaPositionNotification: z.ZodObject<{
2107
2211
  meta: z.ZodTypeAny;
@@ -2852,8 +2956,6 @@ declare const TunaPositionNotification: z.ZodObject<{
2852
2956
  }, "strip", z.ZodTypeAny, {
2853
2957
  authority: string | null;
2854
2958
  id: string;
2855
- action: "create" | "update";
2856
- entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
2857
2959
  data: {
2858
2960
  address: string;
2859
2961
  liquidity: bigint;
@@ -2943,12 +3045,12 @@ declare const TunaPositionNotification: z.ZodObject<{
2943
3045
  updatedAtSlot: bigint;
2944
3046
  closedAt: Date | null;
2945
3047
  };
3048
+ action: "create" | "update";
3049
+ entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
2946
3050
  meta?: any;
2947
3051
  } | {
2948
3052
  authority: string | null;
2949
3053
  id: string;
2950
- action: "create" | "update";
2951
- entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
2952
3054
  data: {
2953
3055
  address: string;
2954
3056
  liquidity: bigint;
@@ -3038,12 +3140,12 @@ declare const TunaPositionNotification: z.ZodObject<{
3038
3140
  updatedAtSlot: bigint;
3039
3141
  closedAt: Date | null;
3040
3142
  };
3143
+ action: "create" | "update";
3144
+ entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
3041
3145
  meta?: any;
3042
3146
  }, {
3043
3147
  authority: string | null;
3044
3148
  id: string;
3045
- action: "create" | "update";
3046
- entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
3047
3149
  data: {
3048
3150
  address: string;
3049
3151
  liquidity: bigint;
@@ -3133,12 +3235,12 @@ declare const TunaPositionNotification: z.ZodObject<{
3133
3235
  updatedAtSlot: bigint;
3134
3236
  closedAt: Date | null;
3135
3237
  };
3238
+ action: "create" | "update";
3239
+ entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
3136
3240
  meta?: any;
3137
3241
  } | {
3138
3242
  authority: string | null;
3139
3243
  id: string;
3140
- action: "create" | "update";
3141
- entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
3142
3244
  data: {
3143
3245
  address: string;
3144
3246
  liquidity: bigint;
@@ -3228,6 +3330,8 @@ declare const TunaPositionNotification: z.ZodObject<{
3228
3330
  updatedAtSlot: bigint;
3229
3331
  closedAt: Date | null;
3230
3332
  };
3333
+ action: "create" | "update";
3334
+ entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
3231
3335
  meta?: any;
3232
3336
  }>;
3233
3337
  declare const LendingPositionNotification: z.ZodObject<{
@@ -3355,8 +3459,6 @@ declare const LendingPositionNotification: z.ZodObject<{
3355
3459
  }, "strip", z.ZodTypeAny, {
3356
3460
  authority: string | null;
3357
3461
  id: string;
3358
- action: "create" | "update";
3359
- entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
3360
3462
  data: {
3361
3463
  mint: string;
3362
3464
  address: string;
@@ -3372,12 +3474,12 @@ declare const LendingPositionNotification: z.ZodObject<{
3372
3474
  usd: number;
3373
3475
  };
3374
3476
  };
3477
+ action: "create" | "update";
3478
+ entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
3375
3479
  meta?: any;
3376
3480
  } | {
3377
3481
  authority: string | null;
3378
3482
  id: string;
3379
- action: "create" | "update";
3380
- entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
3381
3483
  data: {
3382
3484
  mint: string;
3383
3485
  address: string;
@@ -3393,12 +3495,12 @@ declare const LendingPositionNotification: z.ZodObject<{
3393
3495
  usd: number;
3394
3496
  };
3395
3497
  };
3498
+ action: "create" | "update";
3499
+ entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
3396
3500
  meta?: any;
3397
3501
  }, {
3398
3502
  authority: string | null;
3399
3503
  id: string;
3400
- action: "create" | "update";
3401
- entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
3402
3504
  data: {
3403
3505
  mint: string;
3404
3506
  address: string;
@@ -3414,12 +3516,12 @@ declare const LendingPositionNotification: z.ZodObject<{
3414
3516
  usd: number;
3415
3517
  };
3416
3518
  };
3519
+ action: "create" | "update";
3520
+ entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
3417
3521
  meta?: any;
3418
3522
  } | {
3419
3523
  authority: string | null;
3420
3524
  id: string;
3421
- action: "create" | "update";
3422
- entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
3423
3525
  data: {
3424
3526
  mint: string;
3425
3527
  address: string;
@@ -3435,6 +3537,8 @@ declare const LendingPositionNotification: z.ZodObject<{
3435
3537
  usd: number;
3436
3538
  };
3437
3539
  };
3540
+ action: "create" | "update";
3541
+ entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
3438
3542
  meta?: any;
3439
3543
  }>;
3440
3544
  declare const LimitOrderNotification: z.ZodObject<{
@@ -3598,8 +3702,6 @@ declare const LimitOrderNotification: z.ZodObject<{
3598
3702
  }, "strip", z.ZodTypeAny, {
3599
3703
  authority: string | null;
3600
3704
  id: string;
3601
- action: "create" | "update";
3602
- entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
3603
3705
  data: {
3604
3706
  mint: string;
3605
3707
  address: string;
@@ -3621,12 +3723,12 @@ declare const LimitOrderNotification: z.ZodObject<{
3621
3723
  openTxSignature: string;
3622
3724
  closeTxSignature: string | null;
3623
3725
  };
3726
+ action: "create" | "update";
3727
+ entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
3624
3728
  meta?: any;
3625
3729
  } | {
3626
3730
  authority: string | null;
3627
3731
  id: string;
3628
- action: "create" | "update";
3629
- entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
3630
3732
  data: {
3631
3733
  mint: string;
3632
3734
  address: string;
@@ -3648,12 +3750,12 @@ declare const LimitOrderNotification: z.ZodObject<{
3648
3750
  openTxSignature: string;
3649
3751
  closeTxSignature: string | null;
3650
3752
  };
3753
+ action: "create" | "update";
3754
+ entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
3651
3755
  meta?: any;
3652
3756
  }, {
3653
3757
  authority: string | null;
3654
3758
  id: string;
3655
- action: "create" | "update";
3656
- entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
3657
3759
  data: {
3658
3760
  mint: string;
3659
3761
  address: string;
@@ -3675,12 +3777,12 @@ declare const LimitOrderNotification: z.ZodObject<{
3675
3777
  openTxSignature: string;
3676
3778
  closeTxSignature: string | null;
3677
3779
  };
3780
+ action: "create" | "update";
3781
+ entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
3678
3782
  meta?: any;
3679
3783
  } | {
3680
3784
  authority: string | null;
3681
3785
  id: string;
3682
- action: "create" | "update";
3683
- entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
3684
3786
  data: {
3685
3787
  mint: string;
3686
3788
  address: string;
@@ -3702,6 +3804,8 @@ declare const LimitOrderNotification: z.ZodObject<{
3702
3804
  openTxSignature: string;
3703
3805
  closeTxSignature: string | null;
3704
3806
  };
3807
+ action: "create" | "update";
3808
+ entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
3705
3809
  meta?: any;
3706
3810
  }>;
3707
3811
  declare const StakingPositionNotification: z.ZodObject<{
@@ -4055,8 +4159,6 @@ declare const StakingPositionNotification: z.ZodObject<{
4055
4159
  }, "strip", z.ZodTypeAny, {
4056
4160
  authority: string | null;
4057
4161
  id: string;
4058
- action: "create" | "update";
4059
- entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
4060
4162
  data: {
4061
4163
  address: string;
4062
4164
  owner: string;
@@ -4093,12 +4195,12 @@ declare const StakingPositionNotification: z.ZodObject<{
4093
4195
  lastUnstakedAt: Date | null;
4094
4196
  withdrawAvailableAt: Date | null;
4095
4197
  };
4198
+ action: "create" | "update";
4199
+ entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
4096
4200
  meta?: any;
4097
4201
  } | {
4098
4202
  authority: string | null;
4099
4203
  id: string;
4100
- action: "create" | "update";
4101
- entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
4102
4204
  data: {
4103
4205
  address: string;
4104
4206
  owner: string;
@@ -4135,12 +4237,12 @@ declare const StakingPositionNotification: z.ZodObject<{
4135
4237
  lastUnstakedAt: Date | null;
4136
4238
  withdrawAvailableAt: Date | null;
4137
4239
  };
4240
+ action: "create" | "update";
4241
+ entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
4138
4242
  meta?: any;
4139
4243
  }, {
4140
4244
  authority: string | null;
4141
4245
  id: string;
4142
- action: "create" | "update";
4143
- entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
4144
4246
  data: {
4145
4247
  address: string;
4146
4248
  owner: string;
@@ -4177,12 +4279,12 @@ declare const StakingPositionNotification: z.ZodObject<{
4177
4279
  lastUnstakedAt: Date | null;
4178
4280
  withdrawAvailableAt: Date | null;
4179
4281
  };
4282
+ action: "create" | "update";
4283
+ entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
4180
4284
  meta?: any;
4181
4285
  } | {
4182
4286
  authority: string | null;
4183
4287
  id: string;
4184
- action: "create" | "update";
4185
- entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
4186
4288
  data: {
4187
4289
  address: string;
4188
4290
  owner: string;
@@ -4219,6 +4321,8 @@ declare const StakingPositionNotification: z.ZodObject<{
4219
4321
  lastUnstakedAt: Date | null;
4220
4322
  withdrawAvailableAt: Date | null;
4221
4323
  };
4324
+ action: "create" | "update";
4325
+ entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
4222
4326
  meta?: any;
4223
4327
  }>;
4224
4328
 
@@ -4247,7 +4351,7 @@ declare const schemas_UpdateStreamSubscriptionResult: typeof UpdateStreamSubscri
4247
4351
  declare const schemas_WalletSubscriptionTopic: typeof WalletSubscriptionTopic;
4248
4352
  declare const schemas_WalletSubscriptionTopicSchema: typeof WalletSubscriptionTopicSchema;
4249
4353
  declare namespace schemas {
4250
- export { FeesStatsGroup$1 as FeesStatsGroup, LendingPosition$1 as LendingPosition, schemas_LendingPositionNotification as LendingPositionNotification, LimitOrder$1 as LimitOrder, schemas_LimitOrderNotification as LimitOrderNotification, schemas_LimitOrderState as LimitOrderState, schemas_LimitOrderStateSchema as LimitOrderStateSchema, Market$1 as Market, Mint$1 as Mint, schemas_NotificationAction as NotificationAction, schemas_NotificationActionSchema as NotificationActionSchema, schemas_NotificationEntity as NotificationEntity, schemas_NotificationEntitySchema as NotificationEntitySchema, OrderBook$1 as OrderBook, OrderBookEntry$1 as OrderBookEntry, schemas_OrderBookNotification as OrderBookNotification, schemas_OrderBookNotificationMeta as OrderBookNotificationMeta, Pool$1 as Pool, PoolPriceCandle$1 as PoolPriceCandle, PoolPriceUpdate$1 as PoolPriceUpdate, schemas_PoolPriceUpdateNotification as PoolPriceUpdateNotification, schemas_PoolProvider as PoolProvider, schemas_PoolProviderSchema as PoolProviderSchema, schemas_PoolSubscriptionTopic as PoolSubscriptionTopic, schemas_PoolSubscriptionTopicSchema as PoolSubscriptionTopicSchema, PoolSwap$1 as PoolSwap, schemas_PoolSwapNotification as PoolSwapNotification, PoolTicks$1 as PoolTicks, StakingPosition$1 as StakingPosition, StakingPositionHistoryAction$1 as StakingPositionHistoryAction, StakingPositionHistoryActionType$1 as StakingPositionHistoryActionType, schemas_StakingPositionHistoryActionTypeSchema as StakingPositionHistoryActionTypeSchema, schemas_StakingPositionNotification as StakingPositionNotification, StakingRevenueStatsGroup$1 as StakingRevenueStatsGroup, StakingTreasury$1 as StakingTreasury, Tick$1 as Tick, TokenOraclePrice$1 as TokenOraclePrice, TunaPosition$1 as TunaPosition, schemas_TunaPositionNotification as TunaPositionNotification, schemas_TunaPositionState as TunaPositionState, schemas_TunaPositionStateSchema as TunaPositionStateSchema, schemas_UpdateStreamSubscriptionResult as UpdateStreamSubscriptionResult, Vault$1 as Vault, VaultHistoricalStats$1 as VaultHistoricalStats, schemas_WalletSubscriptionTopic as WalletSubscriptionTopic, schemas_WalletSubscriptionTopicSchema as WalletSubscriptionTopicSchema };
4354
+ export { FeesStatsGroup$1 as FeesStatsGroup, LendingPosition$1 as LendingPosition, schemas_LendingPositionNotification as LendingPositionNotification, LimitOrder$1 as LimitOrder, schemas_LimitOrderNotification as LimitOrderNotification, schemas_LimitOrderState as LimitOrderState, schemas_LimitOrderStateSchema as LimitOrderStateSchema, Market$1 as Market, Mint$1 as Mint, schemas_NotificationAction as NotificationAction, schemas_NotificationActionSchema as NotificationActionSchema, schemas_NotificationEntity as NotificationEntity, schemas_NotificationEntitySchema as NotificationEntitySchema, OrderBook$1 as OrderBook, OrderBookEntry$1 as OrderBookEntry, schemas_OrderBookNotification as OrderBookNotification, schemas_OrderBookNotificationMeta as OrderBookNotificationMeta, PaginationMeta$1 as PaginationMeta, Pool$1 as Pool, PoolPriceCandle$1 as PoolPriceCandle, PoolPriceUpdate$1 as PoolPriceUpdate, schemas_PoolPriceUpdateNotification as PoolPriceUpdateNotification, schemas_PoolProvider as PoolProvider, schemas_PoolProviderSchema as PoolProviderSchema, schemas_PoolSubscriptionTopic as PoolSubscriptionTopic, schemas_PoolSubscriptionTopicSchema as PoolSubscriptionTopicSchema, PoolSwap$1 as PoolSwap, schemas_PoolSwapNotification as PoolSwapNotification, PoolTicks$1 as PoolTicks, StakingLeaderboardPage$1 as StakingLeaderboardPage, StakingLeaderboardPosition$1 as StakingLeaderboardPosition, StakingPosition$1 as StakingPosition, StakingPositionHistoryAction$1 as StakingPositionHistoryAction, StakingPositionHistoryActionType$1 as StakingPositionHistoryActionType, schemas_StakingPositionHistoryActionTypeSchema as StakingPositionHistoryActionTypeSchema, schemas_StakingPositionNotification as StakingPositionNotification, StakingRevenueStatsGroup$1 as StakingRevenueStatsGroup, StakingTreasury$1 as StakingTreasury, Tick$1 as Tick, TokenOraclePrice$1 as TokenOraclePrice, TunaPosition$1 as TunaPosition, schemas_TunaPositionNotification as TunaPositionNotification, schemas_TunaPositionState as TunaPositionState, schemas_TunaPositionStateSchema as TunaPositionStateSchema, schemas_UpdateStreamSubscriptionResult as UpdateStreamSubscriptionResult, Vault$1 as Vault, VaultHistoricalStats$1 as VaultHistoricalStats, schemas_WalletSubscriptionTopic as WalletSubscriptionTopic, schemas_WalletSubscriptionTopicSchema as WalletSubscriptionTopicSchema };
4251
4355
  }
4252
4356
 
4253
4357
  type PoolProviderType = z.infer<typeof PoolProviderSchema>;
@@ -4256,6 +4360,7 @@ type LimitOrderStateType = z.infer<typeof LimitOrderStateSchema>;
4256
4360
  type StakingPositionHistoryActionType = z.infer<typeof StakingPositionHistoryActionTypeSchema>;
4257
4361
  type PoolSubscriptionTopicType = z.infer<typeof PoolSubscriptionTopicSchema>;
4258
4362
  type WalletSubscriptionTopicType = z.infer<typeof WalletSubscriptionTopicSchema>;
4363
+ type PaginationMeta = z.infer<typeof PaginationMeta$1>;
4259
4364
  type Mint = z.infer<typeof Mint$1>;
4260
4365
  type Market = z.infer<typeof Market$1>;
4261
4366
  type TokenOraclePrice = z.infer<typeof TokenOraclePrice$1>;
@@ -4272,6 +4377,8 @@ type TunaPosition = z.infer<typeof TunaPosition$1>;
4272
4377
  type LimitOrder = z.infer<typeof LimitOrder$1>;
4273
4378
  type StakingPosition = z.infer<typeof StakingPosition$1>;
4274
4379
  type StakingTreasury = z.infer<typeof StakingTreasury$1>;
4380
+ type StakingLeaderboardPage = z.infer<typeof StakingLeaderboardPage$1>;
4381
+ type StakingLeaderboardPosition = z.infer<typeof StakingLeaderboardPosition$1>;
4275
4382
  type StakingPositionHistoryAction = z.infer<typeof StakingPositionHistoryAction$1>;
4276
4383
  type PoolPriceCandle = z.infer<typeof PoolPriceCandle$1>;
4277
4384
  type FeesStatsGroup = z.infer<typeof FeesStatsGroup$1>;
@@ -4351,6 +4458,7 @@ declare class TunaApiClient {
4351
4458
  getPoolOrderBook(poolAddress: string, priceStep: number, inverted: boolean): Promise<OrderBook>;
4352
4459
  getPoolPriceCandles(poolAddress: string, options: GetPoolPriceCandlesOptions): Promise<PoolPriceCandle[]>;
4353
4460
  getStakingTreasury(): Promise<StakingTreasury>;
4461
+ getStakingLeaderboard(page: number, pageSize: number): Promise<StakingLeaderboardPage>;
4354
4462
  getUserLendingPositions(userAddress: string): Promise<LendingPosition[]>;
4355
4463
  getUserLendingPositionByAddress(userAddress: string, lendingPositionAddress: string): Promise<LendingPosition>;
4356
4464
  getUserTunaPositions(userAddress: string): Promise<TunaPosition[]>;
@@ -4367,4 +4475,4 @@ declare class TunaApiClient {
4367
4475
  private appendUrlSearchParams;
4368
4476
  }
4369
4477
 
4370
- export { type DurationInMs, type FeesStatsGroup, type GetPoolPriceCandlesOptions, type LendingPosition, type LimitOrder, type LimitOrderStateType, type Market, type Mint, NotificationAction, NotificationEntity, type OrderBook, type OrderBookEntry, type Pool, type PoolPriceCandle, type PoolPriceUpdate, PoolProvider, type PoolProviderType, type PoolSubscriptionTopicType, type PoolSwap, type PoolTicks, ProviderFilter, type StakingPosition, type StakingPositionHistoryAction, type StakingPositionHistoryActionType, type StakingRevenueStatsGroup, type StakingTreasury, type SubscriptionPayload, type Tick, type TokenOraclePrice, TunaApiClient, type TunaApiClientConfig, type TunaPosition, TunaPositionState, type TunaPositionStateType, type Vault, type VaultHistoricalStats, type WalletSubscriptionTopicType, schemas };
4478
+ export { type DurationInMs, type FeesStatsGroup, type GetPoolPriceCandlesOptions, type LendingPosition, type LimitOrder, type LimitOrderStateType, type Market, type Mint, NotificationAction, NotificationEntity, type OrderBook, type OrderBookEntry, type PaginationMeta, type Pool, type PoolPriceCandle, type PoolPriceUpdate, PoolProvider, type PoolProviderType, type PoolSubscriptionTopicType, type PoolSwap, type PoolTicks, ProviderFilter, type StakingLeaderboardPage, type StakingLeaderboardPosition, type StakingPosition, type StakingPositionHistoryAction, type StakingPositionHistoryActionType, type StakingRevenueStatsGroup, type StakingTreasury, type SubscriptionPayload, type Tick, type TokenOraclePrice, TunaApiClient, type TunaApiClientConfig, type TunaPosition, TunaPositionState, type TunaPositionStateType, type Vault, type VaultHistoricalStats, type WalletSubscriptionTopicType, schemas };
package/dist/index.d.ts CHANGED
@@ -56,6 +56,13 @@ declare const LimitOrderStateSchema: z.ZodEnum<["open", ...("open" | "partially_
56
56
  declare const StakingPositionHistoryActionTypeSchema: z.ZodEnum<["stake", ...("stake" | "unstake" | "withdraw" | "claim_rewards" | "compound_rewards")[]]>;
57
57
  declare const PoolSubscriptionTopicSchema: z.ZodEnum<["order_book", ...("order_book" | "pool_prices" | "pool_swaps")[]]>;
58
58
  declare const WalletSubscriptionTopicSchema: z.ZodEnum<["tuna_positions", ...("staking_position" | "tuna_positions" | "lending_positions" | "fusion_limit_orders")[]]>;
59
+ declare const PaginationMeta$1: z.ZodObject<{
60
+ total: z.ZodNumber;
61
+ }, "strip", z.ZodTypeAny, {
62
+ total: number;
63
+ }, {
64
+ total: number;
65
+ }>;
59
66
  declare const Mint$1: z.ZodObject<{
60
67
  symbol: z.ZodString;
61
68
  mint: z.ZodString;
@@ -1461,6 +1468,103 @@ declare const StakingPosition$1: z.ZodObject<{
1461
1468
  lastUnstakedAt: Date | null;
1462
1469
  withdrawAvailableAt: Date | null;
1463
1470
  }>;
1471
+ declare const StakingLeaderboardPosition$1: z.ZodObject<{
1472
+ rank: z.ZodNumber;
1473
+ address: z.ZodString;
1474
+ owner: z.ZodString;
1475
+ staked: z.ZodObject<{
1476
+ amount: z.ZodBigInt;
1477
+ usd: z.ZodNumber;
1478
+ }, "strip", z.ZodTypeAny, {
1479
+ amount: bigint;
1480
+ usd: number;
1481
+ }, {
1482
+ amount: bigint;
1483
+ usd: number;
1484
+ }>;
1485
+ }, "strip", z.ZodTypeAny, {
1486
+ address: string;
1487
+ owner: string;
1488
+ staked: {
1489
+ amount: bigint;
1490
+ usd: number;
1491
+ };
1492
+ rank: number;
1493
+ }, {
1494
+ address: string;
1495
+ owner: string;
1496
+ staked: {
1497
+ amount: bigint;
1498
+ usd: number;
1499
+ };
1500
+ rank: number;
1501
+ }>;
1502
+ declare const StakingLeaderboardPage$1: z.ZodObject<{
1503
+ data: z.ZodArray<z.ZodObject<{
1504
+ rank: z.ZodNumber;
1505
+ address: z.ZodString;
1506
+ owner: z.ZodString;
1507
+ staked: z.ZodObject<{
1508
+ amount: z.ZodBigInt;
1509
+ usd: z.ZodNumber;
1510
+ }, "strip", z.ZodTypeAny, {
1511
+ amount: bigint;
1512
+ usd: number;
1513
+ }, {
1514
+ amount: bigint;
1515
+ usd: number;
1516
+ }>;
1517
+ }, "strip", z.ZodTypeAny, {
1518
+ address: string;
1519
+ owner: string;
1520
+ staked: {
1521
+ amount: bigint;
1522
+ usd: number;
1523
+ };
1524
+ rank: number;
1525
+ }, {
1526
+ address: string;
1527
+ owner: string;
1528
+ staked: {
1529
+ amount: bigint;
1530
+ usd: number;
1531
+ };
1532
+ rank: number;
1533
+ }>, "many">;
1534
+ meta: z.ZodObject<{
1535
+ total: z.ZodNumber;
1536
+ }, "strip", z.ZodTypeAny, {
1537
+ total: number;
1538
+ }, {
1539
+ total: number;
1540
+ }>;
1541
+ }, "strip", z.ZodTypeAny, {
1542
+ data: {
1543
+ address: string;
1544
+ owner: string;
1545
+ staked: {
1546
+ amount: bigint;
1547
+ usd: number;
1548
+ };
1549
+ rank: number;
1550
+ }[];
1551
+ meta: {
1552
+ total: number;
1553
+ };
1554
+ }, {
1555
+ data: {
1556
+ address: string;
1557
+ owner: string;
1558
+ staked: {
1559
+ amount: bigint;
1560
+ usd: number;
1561
+ };
1562
+ rank: number;
1563
+ }[];
1564
+ meta: {
1565
+ total: number;
1566
+ };
1567
+ }>;
1464
1568
  declare const StakingPositionHistoryAction$1: z.ZodObject<{
1465
1569
  position: z.ZodString;
1466
1570
  action: z.ZodEnum<["stake", ...("stake" | "unstake" | "withdraw" | "claim_rewards" | "compound_rewards")[]]>;
@@ -1697,8 +1801,6 @@ declare const PoolSwapNotification: z.ZodObject<{
1697
1801
  }, "strip", z.ZodTypeAny, {
1698
1802
  authority: string | null;
1699
1803
  id: string;
1700
- action: "create" | "update";
1701
- entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
1702
1804
  data: {
1703
1805
  time: Date;
1704
1806
  pool: string;
@@ -1708,12 +1810,12 @@ declare const PoolSwapNotification: z.ZodObject<{
1708
1810
  amountUsd: number;
1709
1811
  aToB: boolean;
1710
1812
  };
1813
+ action: "create" | "update";
1814
+ entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
1711
1815
  meta?: any;
1712
1816
  } | {
1713
1817
  authority: string | null;
1714
1818
  id: string;
1715
- action: "create" | "update";
1716
- entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
1717
1819
  data: {
1718
1820
  time: Date;
1719
1821
  pool: string;
@@ -1723,12 +1825,12 @@ declare const PoolSwapNotification: z.ZodObject<{
1723
1825
  amountUsd: number;
1724
1826
  aToB: boolean;
1725
1827
  };
1828
+ action: "create" | "update";
1829
+ entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
1726
1830
  meta?: any;
1727
1831
  }, {
1728
1832
  authority: string | null;
1729
1833
  id: string;
1730
- action: "create" | "update";
1731
- entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
1732
1834
  data: {
1733
1835
  time: Date;
1734
1836
  pool: string;
@@ -1738,12 +1840,12 @@ declare const PoolSwapNotification: z.ZodObject<{
1738
1840
  amountUsd: number;
1739
1841
  aToB: boolean;
1740
1842
  };
1843
+ action: "create" | "update";
1844
+ entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
1741
1845
  meta?: any;
1742
1846
  } | {
1743
1847
  authority: string | null;
1744
1848
  id: string;
1745
- action: "create" | "update";
1746
- entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
1747
1849
  data: {
1748
1850
  time: Date;
1749
1851
  pool: string;
@@ -1753,6 +1855,8 @@ declare const PoolSwapNotification: z.ZodObject<{
1753
1855
  amountUsd: number;
1754
1856
  aToB: boolean;
1755
1857
  };
1858
+ action: "create" | "update";
1859
+ entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
1756
1860
  meta?: any;
1757
1861
  }>;
1758
1862
  declare const PoolPriceUpdateNotification: z.ZodObject<{
@@ -1802,50 +1906,50 @@ declare const PoolPriceUpdateNotification: z.ZodObject<{
1802
1906
  }, "strip", z.ZodTypeAny, {
1803
1907
  authority: string | null;
1804
1908
  id: string;
1805
- action: "create" | "update";
1806
- entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
1807
1909
  data: {
1808
1910
  price: number;
1809
1911
  time: Date;
1810
1912
  sqrtPrice: bigint;
1811
1913
  pool: string;
1812
1914
  };
1915
+ action: "create" | "update";
1916
+ entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
1813
1917
  meta?: any;
1814
1918
  } | {
1815
1919
  authority: string | null;
1816
1920
  id: string;
1817
- action: "create" | "update";
1818
- entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
1819
1921
  data: {
1820
1922
  price: number;
1821
1923
  time: Date;
1822
1924
  sqrtPrice: bigint;
1823
1925
  pool: string;
1824
1926
  };
1927
+ action: "create" | "update";
1928
+ entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
1825
1929
  meta?: any;
1826
1930
  }, {
1827
1931
  authority: string | null;
1828
1932
  id: string;
1829
- action: "create" | "update";
1830
- entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
1831
1933
  data: {
1832
1934
  price: number;
1833
1935
  time: Date;
1834
1936
  sqrtPrice: bigint;
1835
1937
  pool: string;
1836
1938
  };
1939
+ action: "create" | "update";
1940
+ entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
1837
1941
  meta?: any;
1838
1942
  } | {
1839
1943
  authority: string | null;
1840
1944
  id: string;
1841
- action: "create" | "update";
1842
- entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
1843
1945
  data: {
1844
1946
  price: number;
1845
1947
  time: Date;
1846
1948
  sqrtPrice: bigint;
1847
1949
  pool: string;
1848
1950
  };
1951
+ action: "create" | "update";
1952
+ entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
1849
1953
  meta?: any;
1850
1954
  }>;
1851
1955
  declare const OrderBookNotification: z.ZodObject<{
@@ -2005,8 +2109,6 @@ declare const OrderBookNotification: z.ZodObject<{
2005
2109
  }, "strip", z.ZodTypeAny, {
2006
2110
  authority: string | null;
2007
2111
  id: string;
2008
- action: "create" | "update";
2009
- entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
2010
2112
  data: {
2011
2113
  entries: {
2012
2114
  price: number;
@@ -2027,11 +2129,11 @@ declare const OrderBookNotification: z.ZodObject<{
2027
2129
  priceStep: number;
2028
2130
  inverted: boolean;
2029
2131
  } | null | undefined;
2132
+ action: "create" | "update";
2133
+ entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
2030
2134
  } | {
2031
2135
  authority: string | null;
2032
2136
  id: string;
2033
- action: "create" | "update";
2034
- entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
2035
2137
  data: {
2036
2138
  entries: {
2037
2139
  price: number;
@@ -2052,11 +2154,11 @@ declare const OrderBookNotification: z.ZodObject<{
2052
2154
  priceStep: number;
2053
2155
  inverted: boolean;
2054
2156
  } | null | undefined;
2157
+ action: "create" | "update";
2158
+ entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
2055
2159
  }, {
2056
2160
  authority: string | null;
2057
2161
  id: string;
2058
- action: "create" | "update";
2059
- entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
2060
2162
  data: {
2061
2163
  entries: {
2062
2164
  price: number;
@@ -2077,11 +2179,11 @@ declare const OrderBookNotification: z.ZodObject<{
2077
2179
  priceStep: number;
2078
2180
  inverted: boolean;
2079
2181
  } | null | undefined;
2182
+ action: "create" | "update";
2183
+ entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
2080
2184
  } | {
2081
2185
  authority: string | null;
2082
2186
  id: string;
2083
- action: "create" | "update";
2084
- entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
2085
2187
  data: {
2086
2188
  entries: {
2087
2189
  price: number;
@@ -2102,6 +2204,8 @@ declare const OrderBookNotification: z.ZodObject<{
2102
2204
  priceStep: number;
2103
2205
  inverted: boolean;
2104
2206
  } | null | undefined;
2207
+ action: "create" | "update";
2208
+ entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
2105
2209
  }>;
2106
2210
  declare const TunaPositionNotification: z.ZodObject<{
2107
2211
  meta: z.ZodTypeAny;
@@ -2852,8 +2956,6 @@ declare const TunaPositionNotification: z.ZodObject<{
2852
2956
  }, "strip", z.ZodTypeAny, {
2853
2957
  authority: string | null;
2854
2958
  id: string;
2855
- action: "create" | "update";
2856
- entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
2857
2959
  data: {
2858
2960
  address: string;
2859
2961
  liquidity: bigint;
@@ -2943,12 +3045,12 @@ declare const TunaPositionNotification: z.ZodObject<{
2943
3045
  updatedAtSlot: bigint;
2944
3046
  closedAt: Date | null;
2945
3047
  };
3048
+ action: "create" | "update";
3049
+ entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
2946
3050
  meta?: any;
2947
3051
  } | {
2948
3052
  authority: string | null;
2949
3053
  id: string;
2950
- action: "create" | "update";
2951
- entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
2952
3054
  data: {
2953
3055
  address: string;
2954
3056
  liquidity: bigint;
@@ -3038,12 +3140,12 @@ declare const TunaPositionNotification: z.ZodObject<{
3038
3140
  updatedAtSlot: bigint;
3039
3141
  closedAt: Date | null;
3040
3142
  };
3143
+ action: "create" | "update";
3144
+ entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
3041
3145
  meta?: any;
3042
3146
  }, {
3043
3147
  authority: string | null;
3044
3148
  id: string;
3045
- action: "create" | "update";
3046
- entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
3047
3149
  data: {
3048
3150
  address: string;
3049
3151
  liquidity: bigint;
@@ -3133,12 +3235,12 @@ declare const TunaPositionNotification: z.ZodObject<{
3133
3235
  updatedAtSlot: bigint;
3134
3236
  closedAt: Date | null;
3135
3237
  };
3238
+ action: "create" | "update";
3239
+ entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
3136
3240
  meta?: any;
3137
3241
  } | {
3138
3242
  authority: string | null;
3139
3243
  id: string;
3140
- action: "create" | "update";
3141
- entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
3142
3244
  data: {
3143
3245
  address: string;
3144
3246
  liquidity: bigint;
@@ -3228,6 +3330,8 @@ declare const TunaPositionNotification: z.ZodObject<{
3228
3330
  updatedAtSlot: bigint;
3229
3331
  closedAt: Date | null;
3230
3332
  };
3333
+ action: "create" | "update";
3334
+ entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
3231
3335
  meta?: any;
3232
3336
  }>;
3233
3337
  declare const LendingPositionNotification: z.ZodObject<{
@@ -3355,8 +3459,6 @@ declare const LendingPositionNotification: z.ZodObject<{
3355
3459
  }, "strip", z.ZodTypeAny, {
3356
3460
  authority: string | null;
3357
3461
  id: string;
3358
- action: "create" | "update";
3359
- entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
3360
3462
  data: {
3361
3463
  mint: string;
3362
3464
  address: string;
@@ -3372,12 +3474,12 @@ declare const LendingPositionNotification: z.ZodObject<{
3372
3474
  usd: number;
3373
3475
  };
3374
3476
  };
3477
+ action: "create" | "update";
3478
+ entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
3375
3479
  meta?: any;
3376
3480
  } | {
3377
3481
  authority: string | null;
3378
3482
  id: string;
3379
- action: "create" | "update";
3380
- entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
3381
3483
  data: {
3382
3484
  mint: string;
3383
3485
  address: string;
@@ -3393,12 +3495,12 @@ declare const LendingPositionNotification: z.ZodObject<{
3393
3495
  usd: number;
3394
3496
  };
3395
3497
  };
3498
+ action: "create" | "update";
3499
+ entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
3396
3500
  meta?: any;
3397
3501
  }, {
3398
3502
  authority: string | null;
3399
3503
  id: string;
3400
- action: "create" | "update";
3401
- entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
3402
3504
  data: {
3403
3505
  mint: string;
3404
3506
  address: string;
@@ -3414,12 +3516,12 @@ declare const LendingPositionNotification: z.ZodObject<{
3414
3516
  usd: number;
3415
3517
  };
3416
3518
  };
3519
+ action: "create" | "update";
3520
+ entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
3417
3521
  meta?: any;
3418
3522
  } | {
3419
3523
  authority: string | null;
3420
3524
  id: string;
3421
- action: "create" | "update";
3422
- entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
3423
3525
  data: {
3424
3526
  mint: string;
3425
3527
  address: string;
@@ -3435,6 +3537,8 @@ declare const LendingPositionNotification: z.ZodObject<{
3435
3537
  usd: number;
3436
3538
  };
3437
3539
  };
3540
+ action: "create" | "update";
3541
+ entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
3438
3542
  meta?: any;
3439
3543
  }>;
3440
3544
  declare const LimitOrderNotification: z.ZodObject<{
@@ -3598,8 +3702,6 @@ declare const LimitOrderNotification: z.ZodObject<{
3598
3702
  }, "strip", z.ZodTypeAny, {
3599
3703
  authority: string | null;
3600
3704
  id: string;
3601
- action: "create" | "update";
3602
- entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
3603
3705
  data: {
3604
3706
  mint: string;
3605
3707
  address: string;
@@ -3621,12 +3723,12 @@ declare const LimitOrderNotification: z.ZodObject<{
3621
3723
  openTxSignature: string;
3622
3724
  closeTxSignature: string | null;
3623
3725
  };
3726
+ action: "create" | "update";
3727
+ entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
3624
3728
  meta?: any;
3625
3729
  } | {
3626
3730
  authority: string | null;
3627
3731
  id: string;
3628
- action: "create" | "update";
3629
- entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
3630
3732
  data: {
3631
3733
  mint: string;
3632
3734
  address: string;
@@ -3648,12 +3750,12 @@ declare const LimitOrderNotification: z.ZodObject<{
3648
3750
  openTxSignature: string;
3649
3751
  closeTxSignature: string | null;
3650
3752
  };
3753
+ action: "create" | "update";
3754
+ entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
3651
3755
  meta?: any;
3652
3756
  }, {
3653
3757
  authority: string | null;
3654
3758
  id: string;
3655
- action: "create" | "update";
3656
- entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
3657
3759
  data: {
3658
3760
  mint: string;
3659
3761
  address: string;
@@ -3675,12 +3777,12 @@ declare const LimitOrderNotification: z.ZodObject<{
3675
3777
  openTxSignature: string;
3676
3778
  closeTxSignature: string | null;
3677
3779
  };
3780
+ action: "create" | "update";
3781
+ entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
3678
3782
  meta?: any;
3679
3783
  } | {
3680
3784
  authority: string | null;
3681
3785
  id: string;
3682
- action: "create" | "update";
3683
- entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
3684
3786
  data: {
3685
3787
  mint: string;
3686
3788
  address: string;
@@ -3702,6 +3804,8 @@ declare const LimitOrderNotification: z.ZodObject<{
3702
3804
  openTxSignature: string;
3703
3805
  closeTxSignature: string | null;
3704
3806
  };
3807
+ action: "create" | "update";
3808
+ entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
3705
3809
  meta?: any;
3706
3810
  }>;
3707
3811
  declare const StakingPositionNotification: z.ZodObject<{
@@ -4055,8 +4159,6 @@ declare const StakingPositionNotification: z.ZodObject<{
4055
4159
  }, "strip", z.ZodTypeAny, {
4056
4160
  authority: string | null;
4057
4161
  id: string;
4058
- action: "create" | "update";
4059
- entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
4060
4162
  data: {
4061
4163
  address: string;
4062
4164
  owner: string;
@@ -4093,12 +4195,12 @@ declare const StakingPositionNotification: z.ZodObject<{
4093
4195
  lastUnstakedAt: Date | null;
4094
4196
  withdrawAvailableAt: Date | null;
4095
4197
  };
4198
+ action: "create" | "update";
4199
+ entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
4096
4200
  meta?: any;
4097
4201
  } | {
4098
4202
  authority: string | null;
4099
4203
  id: string;
4100
- action: "create" | "update";
4101
- entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
4102
4204
  data: {
4103
4205
  address: string;
4104
4206
  owner: string;
@@ -4135,12 +4237,12 @@ declare const StakingPositionNotification: z.ZodObject<{
4135
4237
  lastUnstakedAt: Date | null;
4136
4238
  withdrawAvailableAt: Date | null;
4137
4239
  };
4240
+ action: "create" | "update";
4241
+ entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
4138
4242
  meta?: any;
4139
4243
  }, {
4140
4244
  authority: string | null;
4141
4245
  id: string;
4142
- action: "create" | "update";
4143
- entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
4144
4246
  data: {
4145
4247
  address: string;
4146
4248
  owner: string;
@@ -4177,12 +4279,12 @@ declare const StakingPositionNotification: z.ZodObject<{
4177
4279
  lastUnstakedAt: Date | null;
4178
4280
  withdrawAvailableAt: Date | null;
4179
4281
  };
4282
+ action: "create" | "update";
4283
+ entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
4180
4284
  meta?: any;
4181
4285
  } | {
4182
4286
  authority: string | null;
4183
4287
  id: string;
4184
- action: "create" | "update";
4185
- entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
4186
4288
  data: {
4187
4289
  address: string;
4188
4290
  owner: string;
@@ -4219,6 +4321,8 @@ declare const StakingPositionNotification: z.ZodObject<{
4219
4321
  lastUnstakedAt: Date | null;
4220
4322
  withdrawAvailableAt: Date | null;
4221
4323
  };
4324
+ action: "create" | "update";
4325
+ entity: "pool_swap" | "pool_price" | "order_book" | "tuna_position" | "lending_position" | "staking_position" | "fusion_limit_order";
4222
4326
  meta?: any;
4223
4327
  }>;
4224
4328
 
@@ -4247,7 +4351,7 @@ declare const schemas_UpdateStreamSubscriptionResult: typeof UpdateStreamSubscri
4247
4351
  declare const schemas_WalletSubscriptionTopic: typeof WalletSubscriptionTopic;
4248
4352
  declare const schemas_WalletSubscriptionTopicSchema: typeof WalletSubscriptionTopicSchema;
4249
4353
  declare namespace schemas {
4250
- export { FeesStatsGroup$1 as FeesStatsGroup, LendingPosition$1 as LendingPosition, schemas_LendingPositionNotification as LendingPositionNotification, LimitOrder$1 as LimitOrder, schemas_LimitOrderNotification as LimitOrderNotification, schemas_LimitOrderState as LimitOrderState, schemas_LimitOrderStateSchema as LimitOrderStateSchema, Market$1 as Market, Mint$1 as Mint, schemas_NotificationAction as NotificationAction, schemas_NotificationActionSchema as NotificationActionSchema, schemas_NotificationEntity as NotificationEntity, schemas_NotificationEntitySchema as NotificationEntitySchema, OrderBook$1 as OrderBook, OrderBookEntry$1 as OrderBookEntry, schemas_OrderBookNotification as OrderBookNotification, schemas_OrderBookNotificationMeta as OrderBookNotificationMeta, Pool$1 as Pool, PoolPriceCandle$1 as PoolPriceCandle, PoolPriceUpdate$1 as PoolPriceUpdate, schemas_PoolPriceUpdateNotification as PoolPriceUpdateNotification, schemas_PoolProvider as PoolProvider, schemas_PoolProviderSchema as PoolProviderSchema, schemas_PoolSubscriptionTopic as PoolSubscriptionTopic, schemas_PoolSubscriptionTopicSchema as PoolSubscriptionTopicSchema, PoolSwap$1 as PoolSwap, schemas_PoolSwapNotification as PoolSwapNotification, PoolTicks$1 as PoolTicks, StakingPosition$1 as StakingPosition, StakingPositionHistoryAction$1 as StakingPositionHistoryAction, StakingPositionHistoryActionType$1 as StakingPositionHistoryActionType, schemas_StakingPositionHistoryActionTypeSchema as StakingPositionHistoryActionTypeSchema, schemas_StakingPositionNotification as StakingPositionNotification, StakingRevenueStatsGroup$1 as StakingRevenueStatsGroup, StakingTreasury$1 as StakingTreasury, Tick$1 as Tick, TokenOraclePrice$1 as TokenOraclePrice, TunaPosition$1 as TunaPosition, schemas_TunaPositionNotification as TunaPositionNotification, schemas_TunaPositionState as TunaPositionState, schemas_TunaPositionStateSchema as TunaPositionStateSchema, schemas_UpdateStreamSubscriptionResult as UpdateStreamSubscriptionResult, Vault$1 as Vault, VaultHistoricalStats$1 as VaultHistoricalStats, schemas_WalletSubscriptionTopic as WalletSubscriptionTopic, schemas_WalletSubscriptionTopicSchema as WalletSubscriptionTopicSchema };
4354
+ export { FeesStatsGroup$1 as FeesStatsGroup, LendingPosition$1 as LendingPosition, schemas_LendingPositionNotification as LendingPositionNotification, LimitOrder$1 as LimitOrder, schemas_LimitOrderNotification as LimitOrderNotification, schemas_LimitOrderState as LimitOrderState, schemas_LimitOrderStateSchema as LimitOrderStateSchema, Market$1 as Market, Mint$1 as Mint, schemas_NotificationAction as NotificationAction, schemas_NotificationActionSchema as NotificationActionSchema, schemas_NotificationEntity as NotificationEntity, schemas_NotificationEntitySchema as NotificationEntitySchema, OrderBook$1 as OrderBook, OrderBookEntry$1 as OrderBookEntry, schemas_OrderBookNotification as OrderBookNotification, schemas_OrderBookNotificationMeta as OrderBookNotificationMeta, PaginationMeta$1 as PaginationMeta, Pool$1 as Pool, PoolPriceCandle$1 as PoolPriceCandle, PoolPriceUpdate$1 as PoolPriceUpdate, schemas_PoolPriceUpdateNotification as PoolPriceUpdateNotification, schemas_PoolProvider as PoolProvider, schemas_PoolProviderSchema as PoolProviderSchema, schemas_PoolSubscriptionTopic as PoolSubscriptionTopic, schemas_PoolSubscriptionTopicSchema as PoolSubscriptionTopicSchema, PoolSwap$1 as PoolSwap, schemas_PoolSwapNotification as PoolSwapNotification, PoolTicks$1 as PoolTicks, StakingLeaderboardPage$1 as StakingLeaderboardPage, StakingLeaderboardPosition$1 as StakingLeaderboardPosition, StakingPosition$1 as StakingPosition, StakingPositionHistoryAction$1 as StakingPositionHistoryAction, StakingPositionHistoryActionType$1 as StakingPositionHistoryActionType, schemas_StakingPositionHistoryActionTypeSchema as StakingPositionHistoryActionTypeSchema, schemas_StakingPositionNotification as StakingPositionNotification, StakingRevenueStatsGroup$1 as StakingRevenueStatsGroup, StakingTreasury$1 as StakingTreasury, Tick$1 as Tick, TokenOraclePrice$1 as TokenOraclePrice, TunaPosition$1 as TunaPosition, schemas_TunaPositionNotification as TunaPositionNotification, schemas_TunaPositionState as TunaPositionState, schemas_TunaPositionStateSchema as TunaPositionStateSchema, schemas_UpdateStreamSubscriptionResult as UpdateStreamSubscriptionResult, Vault$1 as Vault, VaultHistoricalStats$1 as VaultHistoricalStats, schemas_WalletSubscriptionTopic as WalletSubscriptionTopic, schemas_WalletSubscriptionTopicSchema as WalletSubscriptionTopicSchema };
4251
4355
  }
4252
4356
 
4253
4357
  type PoolProviderType = z.infer<typeof PoolProviderSchema>;
@@ -4256,6 +4360,7 @@ type LimitOrderStateType = z.infer<typeof LimitOrderStateSchema>;
4256
4360
  type StakingPositionHistoryActionType = z.infer<typeof StakingPositionHistoryActionTypeSchema>;
4257
4361
  type PoolSubscriptionTopicType = z.infer<typeof PoolSubscriptionTopicSchema>;
4258
4362
  type WalletSubscriptionTopicType = z.infer<typeof WalletSubscriptionTopicSchema>;
4363
+ type PaginationMeta = z.infer<typeof PaginationMeta$1>;
4259
4364
  type Mint = z.infer<typeof Mint$1>;
4260
4365
  type Market = z.infer<typeof Market$1>;
4261
4366
  type TokenOraclePrice = z.infer<typeof TokenOraclePrice$1>;
@@ -4272,6 +4377,8 @@ type TunaPosition = z.infer<typeof TunaPosition$1>;
4272
4377
  type LimitOrder = z.infer<typeof LimitOrder$1>;
4273
4378
  type StakingPosition = z.infer<typeof StakingPosition$1>;
4274
4379
  type StakingTreasury = z.infer<typeof StakingTreasury$1>;
4380
+ type StakingLeaderboardPage = z.infer<typeof StakingLeaderboardPage$1>;
4381
+ type StakingLeaderboardPosition = z.infer<typeof StakingLeaderboardPosition$1>;
4275
4382
  type StakingPositionHistoryAction = z.infer<typeof StakingPositionHistoryAction$1>;
4276
4383
  type PoolPriceCandle = z.infer<typeof PoolPriceCandle$1>;
4277
4384
  type FeesStatsGroup = z.infer<typeof FeesStatsGroup$1>;
@@ -4351,6 +4458,7 @@ declare class TunaApiClient {
4351
4458
  getPoolOrderBook(poolAddress: string, priceStep: number, inverted: boolean): Promise<OrderBook>;
4352
4459
  getPoolPriceCandles(poolAddress: string, options: GetPoolPriceCandlesOptions): Promise<PoolPriceCandle[]>;
4353
4460
  getStakingTreasury(): Promise<StakingTreasury>;
4461
+ getStakingLeaderboard(page: number, pageSize: number): Promise<StakingLeaderboardPage>;
4354
4462
  getUserLendingPositions(userAddress: string): Promise<LendingPosition[]>;
4355
4463
  getUserLendingPositionByAddress(userAddress: string, lendingPositionAddress: string): Promise<LendingPosition>;
4356
4464
  getUserTunaPositions(userAddress: string): Promise<TunaPosition[]>;
@@ -4367,4 +4475,4 @@ declare class TunaApiClient {
4367
4475
  private appendUrlSearchParams;
4368
4476
  }
4369
4477
 
4370
- export { type DurationInMs, type FeesStatsGroup, type GetPoolPriceCandlesOptions, type LendingPosition, type LimitOrder, type LimitOrderStateType, type Market, type Mint, NotificationAction, NotificationEntity, type OrderBook, type OrderBookEntry, type Pool, type PoolPriceCandle, type PoolPriceUpdate, PoolProvider, type PoolProviderType, type PoolSubscriptionTopicType, type PoolSwap, type PoolTicks, ProviderFilter, type StakingPosition, type StakingPositionHistoryAction, type StakingPositionHistoryActionType, type StakingRevenueStatsGroup, type StakingTreasury, type SubscriptionPayload, type Tick, type TokenOraclePrice, TunaApiClient, type TunaApiClientConfig, type TunaPosition, TunaPositionState, type TunaPositionStateType, type Vault, type VaultHistoricalStats, type WalletSubscriptionTopicType, schemas };
4478
+ export { type DurationInMs, type FeesStatsGroup, type GetPoolPriceCandlesOptions, type LendingPosition, type LimitOrder, type LimitOrderStateType, type Market, type Mint, NotificationAction, NotificationEntity, type OrderBook, type OrderBookEntry, type PaginationMeta, type Pool, type PoolPriceCandle, type PoolPriceUpdate, PoolProvider, type PoolProviderType, type PoolSubscriptionTopicType, type PoolSwap, type PoolTicks, ProviderFilter, type StakingLeaderboardPage, type StakingLeaderboardPosition, type StakingPosition, type StakingPositionHistoryAction, type StakingPositionHistoryActionType, type StakingRevenueStatsGroup, type StakingTreasury, type SubscriptionPayload, type Tick, type TokenOraclePrice, TunaApiClient, type TunaApiClientConfig, type TunaPosition, TunaPositionState, type TunaPositionStateType, type Vault, type VaultHistoricalStats, type WalletSubscriptionTopicType, schemas };
package/dist/index.js CHANGED
@@ -63,6 +63,7 @@ __export(schemas_exports, {
63
63
  OrderBookEntry: () => OrderBookEntry,
64
64
  OrderBookNotification: () => OrderBookNotification,
65
65
  OrderBookNotificationMeta: () => OrderBookNotificationMeta,
66
+ PaginationMeta: () => PaginationMeta,
66
67
  Pool: () => Pool,
67
68
  PoolPriceCandle: () => PoolPriceCandle,
68
69
  PoolPriceUpdate: () => PoolPriceUpdate,
@@ -74,6 +75,8 @@ __export(schemas_exports, {
74
75
  PoolSwap: () => PoolSwap,
75
76
  PoolSwapNotification: () => PoolSwapNotification,
76
77
  PoolTicks: () => PoolTicks,
78
+ StakingLeaderboardPage: () => StakingLeaderboardPage,
79
+ StakingLeaderboardPosition: () => StakingLeaderboardPosition,
77
80
  StakingPosition: () => StakingPosition,
78
81
  StakingPositionHistoryAction: () => StakingPositionHistoryAction,
79
82
  StakingPositionHistoryActionType: () => StakingPositionHistoryActionType,
@@ -174,6 +177,9 @@ var WalletSubscriptionTopicSchema = import_zod.z.enum([
174
177
  WalletSubscriptionTopic.TUNA_POSITIONS,
175
178
  ...Object.values(WalletSubscriptionTopic)
176
179
  ]);
180
+ var PaginationMeta = import_zod.z.object({
181
+ total: import_zod.z.number()
182
+ });
177
183
  var Mint = import_zod.z.object({
178
184
  symbol: import_zod.z.string(),
179
185
  mint: import_zod.z.string(),
@@ -411,6 +417,16 @@ var StakingPosition = import_zod.z.object({
411
417
  lastUnstakedAt: import_zod.z.nullable(import_zod.z.coerce.date()),
412
418
  withdrawAvailableAt: import_zod.z.nullable(import_zod.z.coerce.date())
413
419
  });
420
+ var StakingLeaderboardPosition = import_zod.z.object({
421
+ rank: import_zod.z.number(),
422
+ address: import_zod.z.string(),
423
+ owner: import_zod.z.string(),
424
+ staked: amountWithUsd
425
+ });
426
+ var StakingLeaderboardPage = import_zod.z.object({
427
+ data: StakingLeaderboardPosition.array(),
428
+ meta: PaginationMeta
429
+ });
414
430
  var StakingPositionHistoryAction = import_zod.z.object({
415
431
  position: import_zod.z.string(),
416
432
  action: StakingPositionHistoryActionTypeSchema,
@@ -543,6 +559,9 @@ var TunaApiClient = class {
543
559
  }
544
560
  const data = await response.json();
545
561
  const transformed = (0, import_camelcase_keys.default)(data, { deep: true, exclude: ["24h", "7d", "30d"] });
562
+ if (options?.parseRoot) {
563
+ return schema.parse(transformed);
564
+ }
546
565
  return schema.parse(transformed.data);
547
566
  } catch (error) {
548
567
  if (retries > 0 && !(error instanceof Error && error.name === "AbortError")) {
@@ -637,6 +656,14 @@ var TunaApiClient = class {
637
656
  const url = this.buildURL(`staking/treasury`);
638
657
  return await this.httpRequest(url.toString(), StakingTreasury);
639
658
  }
659
+ async getStakingLeaderboard(page, pageSize) {
660
+ const url = this.buildURL(`staking/leaderboard`);
661
+ this.appendUrlSearchParams(url, {
662
+ page: page.toString(),
663
+ page_size: pageSize.toString()
664
+ });
665
+ return await this.httpRequest(url.toString(), StakingLeaderboardPage, { parseRoot: true });
666
+ }
640
667
  async getUserLendingPositions(userAddress) {
641
668
  const url = this.buildURL(`users/${userAddress}/lending-positions`);
642
669
  return await this.httpRequest(url.toString(), LendingPosition.array());
package/dist/index.mjs CHANGED
@@ -28,6 +28,7 @@ __export(schemas_exports, {
28
28
  OrderBookEntry: () => OrderBookEntry,
29
29
  OrderBookNotification: () => OrderBookNotification,
30
30
  OrderBookNotificationMeta: () => OrderBookNotificationMeta,
31
+ PaginationMeta: () => PaginationMeta,
31
32
  Pool: () => Pool,
32
33
  PoolPriceCandle: () => PoolPriceCandle,
33
34
  PoolPriceUpdate: () => PoolPriceUpdate,
@@ -39,6 +40,8 @@ __export(schemas_exports, {
39
40
  PoolSwap: () => PoolSwap,
40
41
  PoolSwapNotification: () => PoolSwapNotification,
41
42
  PoolTicks: () => PoolTicks,
43
+ StakingLeaderboardPage: () => StakingLeaderboardPage,
44
+ StakingLeaderboardPosition: () => StakingLeaderboardPosition,
42
45
  StakingPosition: () => StakingPosition,
43
46
  StakingPositionHistoryAction: () => StakingPositionHistoryAction,
44
47
  StakingPositionHistoryActionType: () => StakingPositionHistoryActionType,
@@ -139,6 +142,9 @@ var WalletSubscriptionTopicSchema = z.enum([
139
142
  WalletSubscriptionTopic.TUNA_POSITIONS,
140
143
  ...Object.values(WalletSubscriptionTopic)
141
144
  ]);
145
+ var PaginationMeta = z.object({
146
+ total: z.number()
147
+ });
142
148
  var Mint = z.object({
143
149
  symbol: z.string(),
144
150
  mint: z.string(),
@@ -376,6 +382,16 @@ var StakingPosition = z.object({
376
382
  lastUnstakedAt: z.nullable(z.coerce.date()),
377
383
  withdrawAvailableAt: z.nullable(z.coerce.date())
378
384
  });
385
+ var StakingLeaderboardPosition = z.object({
386
+ rank: z.number(),
387
+ address: z.string(),
388
+ owner: z.string(),
389
+ staked: amountWithUsd
390
+ });
391
+ var StakingLeaderboardPage = z.object({
392
+ data: StakingLeaderboardPosition.array(),
393
+ meta: PaginationMeta
394
+ });
379
395
  var StakingPositionHistoryAction = z.object({
380
396
  position: z.string(),
381
397
  action: StakingPositionHistoryActionTypeSchema,
@@ -508,6 +524,9 @@ var TunaApiClient = class {
508
524
  }
509
525
  const data = await response.json();
510
526
  const transformed = camelcaseKeys(data, { deep: true, exclude: ["24h", "7d", "30d"] });
527
+ if (options?.parseRoot) {
528
+ return schema.parse(transformed);
529
+ }
511
530
  return schema.parse(transformed.data);
512
531
  } catch (error) {
513
532
  if (retries > 0 && !(error instanceof Error && error.name === "AbortError")) {
@@ -602,6 +621,14 @@ var TunaApiClient = class {
602
621
  const url = this.buildURL(`staking/treasury`);
603
622
  return await this.httpRequest(url.toString(), StakingTreasury);
604
623
  }
624
+ async getStakingLeaderboard(page, pageSize) {
625
+ const url = this.buildURL(`staking/leaderboard`);
626
+ this.appendUrlSearchParams(url, {
627
+ page: page.toString(),
628
+ page_size: pageSize.toString()
629
+ });
630
+ return await this.httpRequest(url.toString(), StakingLeaderboardPage, { parseRoot: true });
631
+ }
605
632
  async getUserLendingPositions(userAddress) {
606
633
  const url = this.buildURL(`users/${userAddress}/lending-positions`);
607
634
  return await this.httpRequest(url.toString(), LendingPosition.array());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crypticdot/defituna-api",
3
- "version": "1.1.51",
3
+ "version": "1.1.52",
4
4
  "private": false,
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",