@crypticdot/defituna-api 1.1.43 → 1.1.45
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 +100 -10
- package/dist/index.d.ts +100 -10
- package/dist/index.js +42 -15
- package/dist/index.mjs +42 -15
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -35,6 +35,7 @@ declare const StakingPositionHistoryActionType$1: {
|
|
|
35
35
|
readonly UNSTAKE: "unstake";
|
|
36
36
|
readonly WITHDRAW: "withdraw";
|
|
37
37
|
readonly CLAIM_REWARDS: "claim_rewards";
|
|
38
|
+
readonly COMPOUND_REWARDS: "compound_rewards";
|
|
38
39
|
};
|
|
39
40
|
declare const PoolSubscriptionTopic: {
|
|
40
41
|
readonly ORDER_BOOK: "order_book";
|
|
@@ -52,7 +53,7 @@ declare const NotificationActionSchema: z.ZodEnum<["create", ...("create" | "upd
|
|
|
52
53
|
declare const PoolProviderSchema: z.ZodEnum<["orca", ...("orca" | "fusion")[]]>;
|
|
53
54
|
declare const TunaPositionStateSchema: z.ZodEnum<["open", ...("open" | "liquidated" | "closed_by_limit_order" | "closed")[]]>;
|
|
54
55
|
declare const LimitOrderStateSchema: z.ZodEnum<["open", ...("open" | "partially_filled" | "filled" | "complete" | "cancelled")[]]>;
|
|
55
|
-
declare const StakingPositionHistoryActionTypeSchema: z.ZodEnum<["stake", ...("stake" | "unstake" | "withdraw" | "claim_rewards")[]]>;
|
|
56
|
+
declare const StakingPositionHistoryActionTypeSchema: z.ZodEnum<["stake", ...("stake" | "unstake" | "withdraw" | "claim_rewards" | "compound_rewards")[]]>;
|
|
56
57
|
declare const PoolSubscriptionTopicSchema: z.ZodEnum<["order_book", ...("order_book" | "pool_prices" | "pool_swaps")[]]>;
|
|
57
58
|
declare const WalletSubscriptionTopicSchema: z.ZodEnum<["tuna_positions", ...("staking_position" | "tuna_positions" | "lending_positions" | "fusion_limit_orders")[]]>;
|
|
58
59
|
declare const Mint$1: z.ZodObject<{
|
|
@@ -1438,7 +1439,7 @@ declare const StakingPosition$1: z.ZodObject<{
|
|
|
1438
1439
|
}>;
|
|
1439
1440
|
declare const StakingPositionHistoryAction$1: z.ZodObject<{
|
|
1440
1441
|
position: z.ZodString;
|
|
1441
|
-
action: z.ZodEnum<["stake", ...("stake" | "unstake" | "withdraw" | "claim_rewards")[]]>;
|
|
1442
|
+
action: z.ZodEnum<["stake", ...("stake" | "unstake" | "withdraw" | "claim_rewards" | "compound_rewards")[]]>;
|
|
1442
1443
|
txSignature: z.ZodString;
|
|
1443
1444
|
amount: z.ZodBigInt;
|
|
1444
1445
|
time: z.ZodDate;
|
|
@@ -1446,13 +1447,13 @@ declare const StakingPositionHistoryAction$1: z.ZodObject<{
|
|
|
1446
1447
|
amount: bigint;
|
|
1447
1448
|
time: Date;
|
|
1448
1449
|
position: string;
|
|
1449
|
-
action: "stake" | "unstake" | "withdraw" | "claim_rewards";
|
|
1450
|
+
action: "stake" | "unstake" | "withdraw" | "claim_rewards" | "compound_rewards";
|
|
1450
1451
|
txSignature: string;
|
|
1451
1452
|
}, {
|
|
1452
1453
|
amount: bigint;
|
|
1453
1454
|
time: Date;
|
|
1454
1455
|
position: string;
|
|
1455
|
-
action: "stake" | "unstake" | "withdraw" | "claim_rewards";
|
|
1456
|
+
action: "stake" | "unstake" | "withdraw" | "claim_rewards" | "compound_rewards";
|
|
1456
1457
|
txSignature: string;
|
|
1457
1458
|
}>;
|
|
1458
1459
|
declare const PoolPriceCandle$1: z.ZodObject<{
|
|
@@ -1477,6 +1478,97 @@ declare const PoolPriceCandle$1: z.ZodObject<{
|
|
|
1477
1478
|
high: number;
|
|
1478
1479
|
low: number;
|
|
1479
1480
|
}>;
|
|
1481
|
+
declare const FeesStatsGroup$1: z.ZodObject<{
|
|
1482
|
+
time: z.ZodDate;
|
|
1483
|
+
addLiquidityFees: z.ZodNumber;
|
|
1484
|
+
limitOrderFees: z.ZodNumber;
|
|
1485
|
+
yieldCompoundingFees: z.ZodNumber;
|
|
1486
|
+
liquidationFees: z.ZodNumber;
|
|
1487
|
+
totalLiquidationsNetworkFees: z.ZodNumber;
|
|
1488
|
+
totalLimitOrdersNetworkFees: z.ZodNumber;
|
|
1489
|
+
totalYieldCompoundingNetworkFees: z.ZodNumber;
|
|
1490
|
+
failedNetworkFees: z.ZodNumber;
|
|
1491
|
+
processedNetworkFees: z.ZodNumber;
|
|
1492
|
+
totalCollectedFees: z.ZodNumber;
|
|
1493
|
+
totalNetworkFees: z.ZodNumber;
|
|
1494
|
+
jitoLiquidationFees: z.ZodNumber;
|
|
1495
|
+
jitoLimitOrderFees: z.ZodNumber;
|
|
1496
|
+
jitoYieldCompoundingFees: z.ZodNumber;
|
|
1497
|
+
runningAddLiquidityFees: z.ZodNumber;
|
|
1498
|
+
runningLimitOrderFees: z.ZodNumber;
|
|
1499
|
+
runningYieldCompoundingFees: z.ZodNumber;
|
|
1500
|
+
runningLiquidationFees: z.ZodNumber;
|
|
1501
|
+
runningTotalLiquidationsNetworkFees: z.ZodNumber;
|
|
1502
|
+
runningTotalLimitOrdersNetworkFees: z.ZodNumber;
|
|
1503
|
+
runningTotalYieldCompoundingNetworkFees: z.ZodNumber;
|
|
1504
|
+
runningFailedNetworkFees: z.ZodNumber;
|
|
1505
|
+
runningProcessedNetworkFees: z.ZodNumber;
|
|
1506
|
+
runningJitoLiquidationFees: z.ZodNumber;
|
|
1507
|
+
runningJitoLimitOrderFees: z.ZodNumber;
|
|
1508
|
+
runningJitoYieldCompoundingFees: z.ZodNumber;
|
|
1509
|
+
runningTotalCollectedFees: z.ZodNumber;
|
|
1510
|
+
runningTotalNetworkFees: z.ZodNumber;
|
|
1511
|
+
}, "strip", z.ZodTypeAny, {
|
|
1512
|
+
time: Date;
|
|
1513
|
+
addLiquidityFees: number;
|
|
1514
|
+
limitOrderFees: number;
|
|
1515
|
+
yieldCompoundingFees: number;
|
|
1516
|
+
liquidationFees: number;
|
|
1517
|
+
totalLiquidationsNetworkFees: number;
|
|
1518
|
+
totalLimitOrdersNetworkFees: number;
|
|
1519
|
+
totalYieldCompoundingNetworkFees: number;
|
|
1520
|
+
failedNetworkFees: number;
|
|
1521
|
+
processedNetworkFees: number;
|
|
1522
|
+
totalCollectedFees: number;
|
|
1523
|
+
totalNetworkFees: number;
|
|
1524
|
+
jitoLiquidationFees: number;
|
|
1525
|
+
jitoLimitOrderFees: number;
|
|
1526
|
+
jitoYieldCompoundingFees: number;
|
|
1527
|
+
runningAddLiquidityFees: number;
|
|
1528
|
+
runningLimitOrderFees: number;
|
|
1529
|
+
runningYieldCompoundingFees: number;
|
|
1530
|
+
runningLiquidationFees: number;
|
|
1531
|
+
runningTotalLiquidationsNetworkFees: number;
|
|
1532
|
+
runningTotalLimitOrdersNetworkFees: number;
|
|
1533
|
+
runningTotalYieldCompoundingNetworkFees: number;
|
|
1534
|
+
runningFailedNetworkFees: number;
|
|
1535
|
+
runningProcessedNetworkFees: number;
|
|
1536
|
+
runningJitoLiquidationFees: number;
|
|
1537
|
+
runningJitoLimitOrderFees: number;
|
|
1538
|
+
runningJitoYieldCompoundingFees: number;
|
|
1539
|
+
runningTotalCollectedFees: number;
|
|
1540
|
+
runningTotalNetworkFees: number;
|
|
1541
|
+
}, {
|
|
1542
|
+
time: Date;
|
|
1543
|
+
addLiquidityFees: number;
|
|
1544
|
+
limitOrderFees: number;
|
|
1545
|
+
yieldCompoundingFees: number;
|
|
1546
|
+
liquidationFees: number;
|
|
1547
|
+
totalLiquidationsNetworkFees: number;
|
|
1548
|
+
totalLimitOrdersNetworkFees: number;
|
|
1549
|
+
totalYieldCompoundingNetworkFees: number;
|
|
1550
|
+
failedNetworkFees: number;
|
|
1551
|
+
processedNetworkFees: number;
|
|
1552
|
+
totalCollectedFees: number;
|
|
1553
|
+
totalNetworkFees: number;
|
|
1554
|
+
jitoLiquidationFees: number;
|
|
1555
|
+
jitoLimitOrderFees: number;
|
|
1556
|
+
jitoYieldCompoundingFees: number;
|
|
1557
|
+
runningAddLiquidityFees: number;
|
|
1558
|
+
runningLimitOrderFees: number;
|
|
1559
|
+
runningYieldCompoundingFees: number;
|
|
1560
|
+
runningLiquidationFees: number;
|
|
1561
|
+
runningTotalLiquidationsNetworkFees: number;
|
|
1562
|
+
runningTotalLimitOrdersNetworkFees: number;
|
|
1563
|
+
runningTotalYieldCompoundingNetworkFees: number;
|
|
1564
|
+
runningFailedNetworkFees: number;
|
|
1565
|
+
runningProcessedNetworkFees: number;
|
|
1566
|
+
runningJitoLiquidationFees: number;
|
|
1567
|
+
runningJitoLimitOrderFees: number;
|
|
1568
|
+
runningJitoYieldCompoundingFees: number;
|
|
1569
|
+
runningTotalCollectedFees: number;
|
|
1570
|
+
runningTotalNetworkFees: number;
|
|
1571
|
+
}>;
|
|
1480
1572
|
declare const UpdateStreamSubscriptionResult: z.ZodObject<{
|
|
1481
1573
|
status: z.ZodString;
|
|
1482
1574
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -4112,7 +4204,7 @@ declare const schemas_UpdateStreamSubscriptionResult: typeof UpdateStreamSubscri
|
|
|
4112
4204
|
declare const schemas_WalletSubscriptionTopic: typeof WalletSubscriptionTopic;
|
|
4113
4205
|
declare const schemas_WalletSubscriptionTopicSchema: typeof WalletSubscriptionTopicSchema;
|
|
4114
4206
|
declare namespace schemas {
|
|
4115
|
-
export { 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, 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 };
|
|
4207
|
+
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, 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 };
|
|
4116
4208
|
}
|
|
4117
4209
|
|
|
4118
4210
|
type PoolProviderType = z.infer<typeof PoolProviderSchema>;
|
|
@@ -4139,6 +4231,7 @@ type StakingPosition = z.infer<typeof StakingPosition$1>;
|
|
|
4139
4231
|
type StakingTreasury = z.infer<typeof StakingTreasury$1>;
|
|
4140
4232
|
type StakingPositionHistoryAction = z.infer<typeof StakingPositionHistoryAction$1>;
|
|
4141
4233
|
type PoolPriceCandle = z.infer<typeof PoolPriceCandle$1>;
|
|
4234
|
+
type FeesStatsGroup = z.infer<typeof FeesStatsGroup$1>;
|
|
4142
4235
|
type PoolPriceUpdate = z.infer<typeof PoolPriceUpdate$1>;
|
|
4143
4236
|
type SubscriptionPayload = {
|
|
4144
4237
|
pools?: {
|
|
@@ -4222,14 +4315,11 @@ declare class TunaApiClient {
|
|
|
4222
4315
|
getUserLimitOrderByAddress(userAddress: string, limitOrderAddress: string): Promise<LimitOrder>;
|
|
4223
4316
|
getUserStakingPosition(userAddress: string): Promise<StakingPosition>;
|
|
4224
4317
|
getUserStakingPositionHistory(userAddress: string): Promise<StakingPositionHistoryAction[]>;
|
|
4225
|
-
|
|
4226
|
-
* @deprecated Use getUpdatesStream instead
|
|
4227
|
-
*/
|
|
4228
|
-
getPoolUpdatesStream(poolAddress: string, priceStep?: number, inverted?: boolean): Promise<EventSource>;
|
|
4318
|
+
getFeesStats(from: Date, to: Date, interval: string): Promise<FeesStatsGroup[]>;
|
|
4229
4319
|
getUpdatesStream(): Promise<EventSource>;
|
|
4230
4320
|
updateStreamSubscription(streamId: string, subscription: SubscriptionPayload): Promise<unknown>;
|
|
4231
4321
|
private buildURL;
|
|
4232
4322
|
private appendUrlSearchParams;
|
|
4233
4323
|
}
|
|
4234
4324
|
|
|
4235
|
-
export { type DurationInMs, 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 StakingTreasury, type SubscriptionPayload, type Tick, type TokenOraclePrice, TunaApiClient, type TunaApiClientConfig, type TunaPosition, TunaPositionState, type TunaPositionStateType, type Vault, type VaultHistoricalStats, type WalletSubscriptionTopicType, schemas };
|
|
4325
|
+
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 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
|
@@ -35,6 +35,7 @@ declare const StakingPositionHistoryActionType$1: {
|
|
|
35
35
|
readonly UNSTAKE: "unstake";
|
|
36
36
|
readonly WITHDRAW: "withdraw";
|
|
37
37
|
readonly CLAIM_REWARDS: "claim_rewards";
|
|
38
|
+
readonly COMPOUND_REWARDS: "compound_rewards";
|
|
38
39
|
};
|
|
39
40
|
declare const PoolSubscriptionTopic: {
|
|
40
41
|
readonly ORDER_BOOK: "order_book";
|
|
@@ -52,7 +53,7 @@ declare const NotificationActionSchema: z.ZodEnum<["create", ...("create" | "upd
|
|
|
52
53
|
declare const PoolProviderSchema: z.ZodEnum<["orca", ...("orca" | "fusion")[]]>;
|
|
53
54
|
declare const TunaPositionStateSchema: z.ZodEnum<["open", ...("open" | "liquidated" | "closed_by_limit_order" | "closed")[]]>;
|
|
54
55
|
declare const LimitOrderStateSchema: z.ZodEnum<["open", ...("open" | "partially_filled" | "filled" | "complete" | "cancelled")[]]>;
|
|
55
|
-
declare const StakingPositionHistoryActionTypeSchema: z.ZodEnum<["stake", ...("stake" | "unstake" | "withdraw" | "claim_rewards")[]]>;
|
|
56
|
+
declare const StakingPositionHistoryActionTypeSchema: z.ZodEnum<["stake", ...("stake" | "unstake" | "withdraw" | "claim_rewards" | "compound_rewards")[]]>;
|
|
56
57
|
declare const PoolSubscriptionTopicSchema: z.ZodEnum<["order_book", ...("order_book" | "pool_prices" | "pool_swaps")[]]>;
|
|
57
58
|
declare const WalletSubscriptionTopicSchema: z.ZodEnum<["tuna_positions", ...("staking_position" | "tuna_positions" | "lending_positions" | "fusion_limit_orders")[]]>;
|
|
58
59
|
declare const Mint$1: z.ZodObject<{
|
|
@@ -1438,7 +1439,7 @@ declare const StakingPosition$1: z.ZodObject<{
|
|
|
1438
1439
|
}>;
|
|
1439
1440
|
declare const StakingPositionHistoryAction$1: z.ZodObject<{
|
|
1440
1441
|
position: z.ZodString;
|
|
1441
|
-
action: z.ZodEnum<["stake", ...("stake" | "unstake" | "withdraw" | "claim_rewards")[]]>;
|
|
1442
|
+
action: z.ZodEnum<["stake", ...("stake" | "unstake" | "withdraw" | "claim_rewards" | "compound_rewards")[]]>;
|
|
1442
1443
|
txSignature: z.ZodString;
|
|
1443
1444
|
amount: z.ZodBigInt;
|
|
1444
1445
|
time: z.ZodDate;
|
|
@@ -1446,13 +1447,13 @@ declare const StakingPositionHistoryAction$1: z.ZodObject<{
|
|
|
1446
1447
|
amount: bigint;
|
|
1447
1448
|
time: Date;
|
|
1448
1449
|
position: string;
|
|
1449
|
-
action: "stake" | "unstake" | "withdraw" | "claim_rewards";
|
|
1450
|
+
action: "stake" | "unstake" | "withdraw" | "claim_rewards" | "compound_rewards";
|
|
1450
1451
|
txSignature: string;
|
|
1451
1452
|
}, {
|
|
1452
1453
|
amount: bigint;
|
|
1453
1454
|
time: Date;
|
|
1454
1455
|
position: string;
|
|
1455
|
-
action: "stake" | "unstake" | "withdraw" | "claim_rewards";
|
|
1456
|
+
action: "stake" | "unstake" | "withdraw" | "claim_rewards" | "compound_rewards";
|
|
1456
1457
|
txSignature: string;
|
|
1457
1458
|
}>;
|
|
1458
1459
|
declare const PoolPriceCandle$1: z.ZodObject<{
|
|
@@ -1477,6 +1478,97 @@ declare const PoolPriceCandle$1: z.ZodObject<{
|
|
|
1477
1478
|
high: number;
|
|
1478
1479
|
low: number;
|
|
1479
1480
|
}>;
|
|
1481
|
+
declare const FeesStatsGroup$1: z.ZodObject<{
|
|
1482
|
+
time: z.ZodDate;
|
|
1483
|
+
addLiquidityFees: z.ZodNumber;
|
|
1484
|
+
limitOrderFees: z.ZodNumber;
|
|
1485
|
+
yieldCompoundingFees: z.ZodNumber;
|
|
1486
|
+
liquidationFees: z.ZodNumber;
|
|
1487
|
+
totalLiquidationsNetworkFees: z.ZodNumber;
|
|
1488
|
+
totalLimitOrdersNetworkFees: z.ZodNumber;
|
|
1489
|
+
totalYieldCompoundingNetworkFees: z.ZodNumber;
|
|
1490
|
+
failedNetworkFees: z.ZodNumber;
|
|
1491
|
+
processedNetworkFees: z.ZodNumber;
|
|
1492
|
+
totalCollectedFees: z.ZodNumber;
|
|
1493
|
+
totalNetworkFees: z.ZodNumber;
|
|
1494
|
+
jitoLiquidationFees: z.ZodNumber;
|
|
1495
|
+
jitoLimitOrderFees: z.ZodNumber;
|
|
1496
|
+
jitoYieldCompoundingFees: z.ZodNumber;
|
|
1497
|
+
runningAddLiquidityFees: z.ZodNumber;
|
|
1498
|
+
runningLimitOrderFees: z.ZodNumber;
|
|
1499
|
+
runningYieldCompoundingFees: z.ZodNumber;
|
|
1500
|
+
runningLiquidationFees: z.ZodNumber;
|
|
1501
|
+
runningTotalLiquidationsNetworkFees: z.ZodNumber;
|
|
1502
|
+
runningTotalLimitOrdersNetworkFees: z.ZodNumber;
|
|
1503
|
+
runningTotalYieldCompoundingNetworkFees: z.ZodNumber;
|
|
1504
|
+
runningFailedNetworkFees: z.ZodNumber;
|
|
1505
|
+
runningProcessedNetworkFees: z.ZodNumber;
|
|
1506
|
+
runningJitoLiquidationFees: z.ZodNumber;
|
|
1507
|
+
runningJitoLimitOrderFees: z.ZodNumber;
|
|
1508
|
+
runningJitoYieldCompoundingFees: z.ZodNumber;
|
|
1509
|
+
runningTotalCollectedFees: z.ZodNumber;
|
|
1510
|
+
runningTotalNetworkFees: z.ZodNumber;
|
|
1511
|
+
}, "strip", z.ZodTypeAny, {
|
|
1512
|
+
time: Date;
|
|
1513
|
+
addLiquidityFees: number;
|
|
1514
|
+
limitOrderFees: number;
|
|
1515
|
+
yieldCompoundingFees: number;
|
|
1516
|
+
liquidationFees: number;
|
|
1517
|
+
totalLiquidationsNetworkFees: number;
|
|
1518
|
+
totalLimitOrdersNetworkFees: number;
|
|
1519
|
+
totalYieldCompoundingNetworkFees: number;
|
|
1520
|
+
failedNetworkFees: number;
|
|
1521
|
+
processedNetworkFees: number;
|
|
1522
|
+
totalCollectedFees: number;
|
|
1523
|
+
totalNetworkFees: number;
|
|
1524
|
+
jitoLiquidationFees: number;
|
|
1525
|
+
jitoLimitOrderFees: number;
|
|
1526
|
+
jitoYieldCompoundingFees: number;
|
|
1527
|
+
runningAddLiquidityFees: number;
|
|
1528
|
+
runningLimitOrderFees: number;
|
|
1529
|
+
runningYieldCompoundingFees: number;
|
|
1530
|
+
runningLiquidationFees: number;
|
|
1531
|
+
runningTotalLiquidationsNetworkFees: number;
|
|
1532
|
+
runningTotalLimitOrdersNetworkFees: number;
|
|
1533
|
+
runningTotalYieldCompoundingNetworkFees: number;
|
|
1534
|
+
runningFailedNetworkFees: number;
|
|
1535
|
+
runningProcessedNetworkFees: number;
|
|
1536
|
+
runningJitoLiquidationFees: number;
|
|
1537
|
+
runningJitoLimitOrderFees: number;
|
|
1538
|
+
runningJitoYieldCompoundingFees: number;
|
|
1539
|
+
runningTotalCollectedFees: number;
|
|
1540
|
+
runningTotalNetworkFees: number;
|
|
1541
|
+
}, {
|
|
1542
|
+
time: Date;
|
|
1543
|
+
addLiquidityFees: number;
|
|
1544
|
+
limitOrderFees: number;
|
|
1545
|
+
yieldCompoundingFees: number;
|
|
1546
|
+
liquidationFees: number;
|
|
1547
|
+
totalLiquidationsNetworkFees: number;
|
|
1548
|
+
totalLimitOrdersNetworkFees: number;
|
|
1549
|
+
totalYieldCompoundingNetworkFees: number;
|
|
1550
|
+
failedNetworkFees: number;
|
|
1551
|
+
processedNetworkFees: number;
|
|
1552
|
+
totalCollectedFees: number;
|
|
1553
|
+
totalNetworkFees: number;
|
|
1554
|
+
jitoLiquidationFees: number;
|
|
1555
|
+
jitoLimitOrderFees: number;
|
|
1556
|
+
jitoYieldCompoundingFees: number;
|
|
1557
|
+
runningAddLiquidityFees: number;
|
|
1558
|
+
runningLimitOrderFees: number;
|
|
1559
|
+
runningYieldCompoundingFees: number;
|
|
1560
|
+
runningLiquidationFees: number;
|
|
1561
|
+
runningTotalLiquidationsNetworkFees: number;
|
|
1562
|
+
runningTotalLimitOrdersNetworkFees: number;
|
|
1563
|
+
runningTotalYieldCompoundingNetworkFees: number;
|
|
1564
|
+
runningFailedNetworkFees: number;
|
|
1565
|
+
runningProcessedNetworkFees: number;
|
|
1566
|
+
runningJitoLiquidationFees: number;
|
|
1567
|
+
runningJitoLimitOrderFees: number;
|
|
1568
|
+
runningJitoYieldCompoundingFees: number;
|
|
1569
|
+
runningTotalCollectedFees: number;
|
|
1570
|
+
runningTotalNetworkFees: number;
|
|
1571
|
+
}>;
|
|
1480
1572
|
declare const UpdateStreamSubscriptionResult: z.ZodObject<{
|
|
1481
1573
|
status: z.ZodString;
|
|
1482
1574
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -4112,7 +4204,7 @@ declare const schemas_UpdateStreamSubscriptionResult: typeof UpdateStreamSubscri
|
|
|
4112
4204
|
declare const schemas_WalletSubscriptionTopic: typeof WalletSubscriptionTopic;
|
|
4113
4205
|
declare const schemas_WalletSubscriptionTopicSchema: typeof WalletSubscriptionTopicSchema;
|
|
4114
4206
|
declare namespace schemas {
|
|
4115
|
-
export { 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, 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 };
|
|
4207
|
+
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, 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 };
|
|
4116
4208
|
}
|
|
4117
4209
|
|
|
4118
4210
|
type PoolProviderType = z.infer<typeof PoolProviderSchema>;
|
|
@@ -4139,6 +4231,7 @@ type StakingPosition = z.infer<typeof StakingPosition$1>;
|
|
|
4139
4231
|
type StakingTreasury = z.infer<typeof StakingTreasury$1>;
|
|
4140
4232
|
type StakingPositionHistoryAction = z.infer<typeof StakingPositionHistoryAction$1>;
|
|
4141
4233
|
type PoolPriceCandle = z.infer<typeof PoolPriceCandle$1>;
|
|
4234
|
+
type FeesStatsGroup = z.infer<typeof FeesStatsGroup$1>;
|
|
4142
4235
|
type PoolPriceUpdate = z.infer<typeof PoolPriceUpdate$1>;
|
|
4143
4236
|
type SubscriptionPayload = {
|
|
4144
4237
|
pools?: {
|
|
@@ -4222,14 +4315,11 @@ declare class TunaApiClient {
|
|
|
4222
4315
|
getUserLimitOrderByAddress(userAddress: string, limitOrderAddress: string): Promise<LimitOrder>;
|
|
4223
4316
|
getUserStakingPosition(userAddress: string): Promise<StakingPosition>;
|
|
4224
4317
|
getUserStakingPositionHistory(userAddress: string): Promise<StakingPositionHistoryAction[]>;
|
|
4225
|
-
|
|
4226
|
-
* @deprecated Use getUpdatesStream instead
|
|
4227
|
-
*/
|
|
4228
|
-
getPoolUpdatesStream(poolAddress: string, priceStep?: number, inverted?: boolean): Promise<EventSource>;
|
|
4318
|
+
getFeesStats(from: Date, to: Date, interval: string): Promise<FeesStatsGroup[]>;
|
|
4229
4319
|
getUpdatesStream(): Promise<EventSource>;
|
|
4230
4320
|
updateStreamSubscription(streamId: string, subscription: SubscriptionPayload): Promise<unknown>;
|
|
4231
4321
|
private buildURL;
|
|
4232
4322
|
private appendUrlSearchParams;
|
|
4233
4323
|
}
|
|
4234
4324
|
|
|
4235
|
-
export { type DurationInMs, 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 StakingTreasury, type SubscriptionPayload, type Tick, type TokenOraclePrice, TunaApiClient, type TunaApiClientConfig, type TunaPosition, TunaPositionState, type TunaPositionStateType, type Vault, type VaultHistoricalStats, type WalletSubscriptionTopicType, schemas };
|
|
4325
|
+
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 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
|
@@ -46,6 +46,7 @@ var import_snakecase_keys = __toESM(require("snakecase-keys"));
|
|
|
46
46
|
// src/client/schemas.ts
|
|
47
47
|
var schemas_exports = {};
|
|
48
48
|
__export(schemas_exports, {
|
|
49
|
+
FeesStatsGroup: () => FeesStatsGroup,
|
|
49
50
|
LendingPosition: () => LendingPosition,
|
|
50
51
|
LendingPositionNotification: () => LendingPositionNotification,
|
|
51
52
|
LimitOrder: () => LimitOrder,
|
|
@@ -141,7 +142,8 @@ var StakingPositionHistoryActionType = {
|
|
|
141
142
|
STAKE: "stake",
|
|
142
143
|
UNSTAKE: "unstake",
|
|
143
144
|
WITHDRAW: "withdraw",
|
|
144
|
-
CLAIM_REWARDS: "claim_rewards"
|
|
145
|
+
CLAIM_REWARDS: "claim_rewards",
|
|
146
|
+
COMPOUND_REWARDS: "compound_rewards"
|
|
145
147
|
};
|
|
146
148
|
var PoolSubscriptionTopic = {
|
|
147
149
|
ORDER_BOOK: "order_book",
|
|
@@ -415,6 +417,37 @@ var PoolPriceCandle = import_zod.z.object({
|
|
|
415
417
|
low: import_zod.z.number(),
|
|
416
418
|
volume: import_zod.z.number()
|
|
417
419
|
});
|
|
420
|
+
var FeesStatsGroup = import_zod.z.object({
|
|
421
|
+
time: import_zod.z.coerce.date(),
|
|
422
|
+
addLiquidityFees: import_zod.z.number(),
|
|
423
|
+
limitOrderFees: import_zod.z.number(),
|
|
424
|
+
yieldCompoundingFees: import_zod.z.number(),
|
|
425
|
+
liquidationFees: import_zod.z.number(),
|
|
426
|
+
totalLiquidationsNetworkFees: import_zod.z.number(),
|
|
427
|
+
totalLimitOrdersNetworkFees: import_zod.z.number(),
|
|
428
|
+
totalYieldCompoundingNetworkFees: import_zod.z.number(),
|
|
429
|
+
failedNetworkFees: import_zod.z.number(),
|
|
430
|
+
processedNetworkFees: import_zod.z.number(),
|
|
431
|
+
totalCollectedFees: import_zod.z.number(),
|
|
432
|
+
totalNetworkFees: import_zod.z.number(),
|
|
433
|
+
jitoLiquidationFees: import_zod.z.number(),
|
|
434
|
+
jitoLimitOrderFees: import_zod.z.number(),
|
|
435
|
+
jitoYieldCompoundingFees: import_zod.z.number(),
|
|
436
|
+
runningAddLiquidityFees: import_zod.z.number(),
|
|
437
|
+
runningLimitOrderFees: import_zod.z.number(),
|
|
438
|
+
runningYieldCompoundingFees: import_zod.z.number(),
|
|
439
|
+
runningLiquidationFees: import_zod.z.number(),
|
|
440
|
+
runningTotalLiquidationsNetworkFees: import_zod.z.number(),
|
|
441
|
+
runningTotalLimitOrdersNetworkFees: import_zod.z.number(),
|
|
442
|
+
runningTotalYieldCompoundingNetworkFees: import_zod.z.number(),
|
|
443
|
+
runningFailedNetworkFees: import_zod.z.number(),
|
|
444
|
+
runningProcessedNetworkFees: import_zod.z.number(),
|
|
445
|
+
runningJitoLiquidationFees: import_zod.z.number(),
|
|
446
|
+
runningJitoLimitOrderFees: import_zod.z.number(),
|
|
447
|
+
runningJitoYieldCompoundingFees: import_zod.z.number(),
|
|
448
|
+
runningTotalCollectedFees: import_zod.z.number(),
|
|
449
|
+
runningTotalNetworkFees: import_zod.z.number()
|
|
450
|
+
});
|
|
418
451
|
var UpdateStreamSubscriptionResult = import_zod.z.object({
|
|
419
452
|
status: import_zod.z.string()
|
|
420
453
|
});
|
|
@@ -623,20 +656,14 @@ var TunaApiClient = class {
|
|
|
623
656
|
const url = this.buildURL(`users/${userAddress}/staking-position/history`);
|
|
624
657
|
return await this.httpRequest(url.toString(), StakingPositionHistoryAction.array());
|
|
625
658
|
}
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
}
|
|
635
|
-
if (inverted) {
|
|
636
|
-
this.appendUrlSearchParams(url, { inverted: inverted.toString() });
|
|
637
|
-
}
|
|
638
|
-
this.appendUrlSearchParams(url, { ts: Date.now().toString() });
|
|
639
|
-
return new EventSource(url.toString());
|
|
659
|
+
async getFeesStats(from, to, interval) {
|
|
660
|
+
const url = this.buildURL(`stats/fees`);
|
|
661
|
+
this.appendUrlSearchParams(url, {
|
|
662
|
+
from: from.toISOString(),
|
|
663
|
+
to: to.toISOString(),
|
|
664
|
+
interval
|
|
665
|
+
});
|
|
666
|
+
return await this.httpRequest(url.toString(), FeesStatsGroup.array());
|
|
640
667
|
}
|
|
641
668
|
async getUpdatesStream() {
|
|
642
669
|
const url = this.buildURL(`streams/sse`);
|
package/dist/index.mjs
CHANGED
|
@@ -11,6 +11,7 @@ import snakecaseKeys from "snakecase-keys";
|
|
|
11
11
|
// src/client/schemas.ts
|
|
12
12
|
var schemas_exports = {};
|
|
13
13
|
__export(schemas_exports, {
|
|
14
|
+
FeesStatsGroup: () => FeesStatsGroup,
|
|
14
15
|
LendingPosition: () => LendingPosition,
|
|
15
16
|
LendingPositionNotification: () => LendingPositionNotification,
|
|
16
17
|
LimitOrder: () => LimitOrder,
|
|
@@ -106,7 +107,8 @@ var StakingPositionHistoryActionType = {
|
|
|
106
107
|
STAKE: "stake",
|
|
107
108
|
UNSTAKE: "unstake",
|
|
108
109
|
WITHDRAW: "withdraw",
|
|
109
|
-
CLAIM_REWARDS: "claim_rewards"
|
|
110
|
+
CLAIM_REWARDS: "claim_rewards",
|
|
111
|
+
COMPOUND_REWARDS: "compound_rewards"
|
|
110
112
|
};
|
|
111
113
|
var PoolSubscriptionTopic = {
|
|
112
114
|
ORDER_BOOK: "order_book",
|
|
@@ -380,6 +382,37 @@ var PoolPriceCandle = z.object({
|
|
|
380
382
|
low: z.number(),
|
|
381
383
|
volume: z.number()
|
|
382
384
|
});
|
|
385
|
+
var FeesStatsGroup = z.object({
|
|
386
|
+
time: z.coerce.date(),
|
|
387
|
+
addLiquidityFees: z.number(),
|
|
388
|
+
limitOrderFees: z.number(),
|
|
389
|
+
yieldCompoundingFees: z.number(),
|
|
390
|
+
liquidationFees: z.number(),
|
|
391
|
+
totalLiquidationsNetworkFees: z.number(),
|
|
392
|
+
totalLimitOrdersNetworkFees: z.number(),
|
|
393
|
+
totalYieldCompoundingNetworkFees: z.number(),
|
|
394
|
+
failedNetworkFees: z.number(),
|
|
395
|
+
processedNetworkFees: z.number(),
|
|
396
|
+
totalCollectedFees: z.number(),
|
|
397
|
+
totalNetworkFees: z.number(),
|
|
398
|
+
jitoLiquidationFees: z.number(),
|
|
399
|
+
jitoLimitOrderFees: z.number(),
|
|
400
|
+
jitoYieldCompoundingFees: z.number(),
|
|
401
|
+
runningAddLiquidityFees: z.number(),
|
|
402
|
+
runningLimitOrderFees: z.number(),
|
|
403
|
+
runningYieldCompoundingFees: z.number(),
|
|
404
|
+
runningLiquidationFees: z.number(),
|
|
405
|
+
runningTotalLiquidationsNetworkFees: z.number(),
|
|
406
|
+
runningTotalLimitOrdersNetworkFees: z.number(),
|
|
407
|
+
runningTotalYieldCompoundingNetworkFees: z.number(),
|
|
408
|
+
runningFailedNetworkFees: z.number(),
|
|
409
|
+
runningProcessedNetworkFees: z.number(),
|
|
410
|
+
runningJitoLiquidationFees: z.number(),
|
|
411
|
+
runningJitoLimitOrderFees: z.number(),
|
|
412
|
+
runningJitoYieldCompoundingFees: z.number(),
|
|
413
|
+
runningTotalCollectedFees: z.number(),
|
|
414
|
+
runningTotalNetworkFees: z.number()
|
|
415
|
+
});
|
|
383
416
|
var UpdateStreamSubscriptionResult = z.object({
|
|
384
417
|
status: z.string()
|
|
385
418
|
});
|
|
@@ -588,20 +621,14 @@ var TunaApiClient = class {
|
|
|
588
621
|
const url = this.buildURL(`users/${userAddress}/staking-position/history`);
|
|
589
622
|
return await this.httpRequest(url.toString(), StakingPositionHistoryAction.array());
|
|
590
623
|
}
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
}
|
|
600
|
-
if (inverted) {
|
|
601
|
-
this.appendUrlSearchParams(url, { inverted: inverted.toString() });
|
|
602
|
-
}
|
|
603
|
-
this.appendUrlSearchParams(url, { ts: Date.now().toString() });
|
|
604
|
-
return new EventSource(url.toString());
|
|
624
|
+
async getFeesStats(from, to, interval) {
|
|
625
|
+
const url = this.buildURL(`stats/fees`);
|
|
626
|
+
this.appendUrlSearchParams(url, {
|
|
627
|
+
from: from.toISOString(),
|
|
628
|
+
to: to.toISOString(),
|
|
629
|
+
interval
|
|
630
|
+
});
|
|
631
|
+
return await this.httpRequest(url.toString(), FeesStatsGroup.array());
|
|
605
632
|
}
|
|
606
633
|
async getUpdatesStream() {
|
|
607
634
|
const url = this.buildURL(`streams/sse`);
|