@crypticdot/defituna-api 1.1.45 → 1.1.47
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 +26 -2
- package/dist/index.d.ts +26 -2
- package/dist/index.js +17 -0
- package/dist/index.mjs +17 -0
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -381,6 +381,7 @@ declare const Pool$1: z.ZodObject<{
|
|
|
381
381
|
priceChange24H: z.ZodNumber;
|
|
382
382
|
tickSpacing: z.ZodNumber;
|
|
383
383
|
feeRate: z.ZodNumber;
|
|
384
|
+
olpFeeRate: z.ZodNullable<z.ZodNumber>;
|
|
384
385
|
protocolFeeRate: z.ZodNumber;
|
|
385
386
|
liquidity: z.ZodBigInt;
|
|
386
387
|
sqrtPrice: z.ZodBigInt;
|
|
@@ -484,6 +485,7 @@ declare const Pool$1: z.ZodObject<{
|
|
|
484
485
|
priceChange24H: number;
|
|
485
486
|
tickSpacing: number;
|
|
486
487
|
feeRate: number;
|
|
488
|
+
olpFeeRate: number | null;
|
|
487
489
|
protocolFeeRate: number;
|
|
488
490
|
liquidity: bigint;
|
|
489
491
|
sqrtPrice: bigint;
|
|
@@ -519,6 +521,7 @@ declare const Pool$1: z.ZodObject<{
|
|
|
519
521
|
priceChange24H: number;
|
|
520
522
|
tickSpacing: number;
|
|
521
523
|
feeRate: number;
|
|
524
|
+
olpFeeRate: number | null;
|
|
522
525
|
protocolFeeRate: number;
|
|
523
526
|
liquidity: bigint;
|
|
524
527
|
sqrtPrice: bigint;
|
|
@@ -1569,6 +1572,25 @@ declare const FeesStatsGroup$1: z.ZodObject<{
|
|
|
1569
1572
|
runningTotalCollectedFees: number;
|
|
1570
1573
|
runningTotalNetworkFees: number;
|
|
1571
1574
|
}>;
|
|
1575
|
+
declare const StakingRevenueStatsGroup$1: z.ZodObject<{
|
|
1576
|
+
time: z.ZodDate;
|
|
1577
|
+
totalDepositsUsd: z.ZodNumber;
|
|
1578
|
+
totalDepositsSol: z.ZodBigInt;
|
|
1579
|
+
runningTotalDepositsUsd: z.ZodNumber;
|
|
1580
|
+
runningtotalDepositsSol: z.ZodBigInt;
|
|
1581
|
+
}, "strip", z.ZodTypeAny, {
|
|
1582
|
+
time: Date;
|
|
1583
|
+
totalDepositsUsd: number;
|
|
1584
|
+
totalDepositsSol: bigint;
|
|
1585
|
+
runningTotalDepositsUsd: number;
|
|
1586
|
+
runningtotalDepositsSol: bigint;
|
|
1587
|
+
}, {
|
|
1588
|
+
time: Date;
|
|
1589
|
+
totalDepositsUsd: number;
|
|
1590
|
+
totalDepositsSol: bigint;
|
|
1591
|
+
runningTotalDepositsUsd: number;
|
|
1592
|
+
runningtotalDepositsSol: bigint;
|
|
1593
|
+
}>;
|
|
1572
1594
|
declare const UpdateStreamSubscriptionResult: z.ZodObject<{
|
|
1573
1595
|
status: z.ZodString;
|
|
1574
1596
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -4204,7 +4226,7 @@ declare const schemas_UpdateStreamSubscriptionResult: typeof UpdateStreamSubscri
|
|
|
4204
4226
|
declare const schemas_WalletSubscriptionTopic: typeof WalletSubscriptionTopic;
|
|
4205
4227
|
declare const schemas_WalletSubscriptionTopicSchema: typeof WalletSubscriptionTopicSchema;
|
|
4206
4228
|
declare namespace schemas {
|
|
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 };
|
|
4229
|
+
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 };
|
|
4208
4230
|
}
|
|
4209
4231
|
|
|
4210
4232
|
type PoolProviderType = z.infer<typeof PoolProviderSchema>;
|
|
@@ -4232,6 +4254,7 @@ type StakingTreasury = z.infer<typeof StakingTreasury$1>;
|
|
|
4232
4254
|
type StakingPositionHistoryAction = z.infer<typeof StakingPositionHistoryAction$1>;
|
|
4233
4255
|
type PoolPriceCandle = z.infer<typeof PoolPriceCandle$1>;
|
|
4234
4256
|
type FeesStatsGroup = z.infer<typeof FeesStatsGroup$1>;
|
|
4257
|
+
type StakingRevenueStatsGroup = z.infer<typeof StakingRevenueStatsGroup$1>;
|
|
4235
4258
|
type PoolPriceUpdate = z.infer<typeof PoolPriceUpdate$1>;
|
|
4236
4259
|
type SubscriptionPayload = {
|
|
4237
4260
|
pools?: {
|
|
@@ -4316,10 +4339,11 @@ declare class TunaApiClient {
|
|
|
4316
4339
|
getUserStakingPosition(userAddress: string): Promise<StakingPosition>;
|
|
4317
4340
|
getUserStakingPositionHistory(userAddress: string): Promise<StakingPositionHistoryAction[]>;
|
|
4318
4341
|
getFeesStats(from: Date, to: Date, interval: string): Promise<FeesStatsGroup[]>;
|
|
4342
|
+
getStakingRevenueStats(from: Date, to: Date): Promise<StakingRevenueStatsGroup[]>;
|
|
4319
4343
|
getUpdatesStream(): Promise<EventSource>;
|
|
4320
4344
|
updateStreamSubscription(streamId: string, subscription: SubscriptionPayload): Promise<unknown>;
|
|
4321
4345
|
private buildURL;
|
|
4322
4346
|
private appendUrlSearchParams;
|
|
4323
4347
|
}
|
|
4324
4348
|
|
|
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 };
|
|
4349
|
+
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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -381,6 +381,7 @@ declare const Pool$1: z.ZodObject<{
|
|
|
381
381
|
priceChange24H: z.ZodNumber;
|
|
382
382
|
tickSpacing: z.ZodNumber;
|
|
383
383
|
feeRate: z.ZodNumber;
|
|
384
|
+
olpFeeRate: z.ZodNullable<z.ZodNumber>;
|
|
384
385
|
protocolFeeRate: z.ZodNumber;
|
|
385
386
|
liquidity: z.ZodBigInt;
|
|
386
387
|
sqrtPrice: z.ZodBigInt;
|
|
@@ -484,6 +485,7 @@ declare const Pool$1: z.ZodObject<{
|
|
|
484
485
|
priceChange24H: number;
|
|
485
486
|
tickSpacing: number;
|
|
486
487
|
feeRate: number;
|
|
488
|
+
olpFeeRate: number | null;
|
|
487
489
|
protocolFeeRate: number;
|
|
488
490
|
liquidity: bigint;
|
|
489
491
|
sqrtPrice: bigint;
|
|
@@ -519,6 +521,7 @@ declare const Pool$1: z.ZodObject<{
|
|
|
519
521
|
priceChange24H: number;
|
|
520
522
|
tickSpacing: number;
|
|
521
523
|
feeRate: number;
|
|
524
|
+
olpFeeRate: number | null;
|
|
522
525
|
protocolFeeRate: number;
|
|
523
526
|
liquidity: bigint;
|
|
524
527
|
sqrtPrice: bigint;
|
|
@@ -1569,6 +1572,25 @@ declare const FeesStatsGroup$1: z.ZodObject<{
|
|
|
1569
1572
|
runningTotalCollectedFees: number;
|
|
1570
1573
|
runningTotalNetworkFees: number;
|
|
1571
1574
|
}>;
|
|
1575
|
+
declare const StakingRevenueStatsGroup$1: z.ZodObject<{
|
|
1576
|
+
time: z.ZodDate;
|
|
1577
|
+
totalDepositsUsd: z.ZodNumber;
|
|
1578
|
+
totalDepositsSol: z.ZodBigInt;
|
|
1579
|
+
runningTotalDepositsUsd: z.ZodNumber;
|
|
1580
|
+
runningtotalDepositsSol: z.ZodBigInt;
|
|
1581
|
+
}, "strip", z.ZodTypeAny, {
|
|
1582
|
+
time: Date;
|
|
1583
|
+
totalDepositsUsd: number;
|
|
1584
|
+
totalDepositsSol: bigint;
|
|
1585
|
+
runningTotalDepositsUsd: number;
|
|
1586
|
+
runningtotalDepositsSol: bigint;
|
|
1587
|
+
}, {
|
|
1588
|
+
time: Date;
|
|
1589
|
+
totalDepositsUsd: number;
|
|
1590
|
+
totalDepositsSol: bigint;
|
|
1591
|
+
runningTotalDepositsUsd: number;
|
|
1592
|
+
runningtotalDepositsSol: bigint;
|
|
1593
|
+
}>;
|
|
1572
1594
|
declare const UpdateStreamSubscriptionResult: z.ZodObject<{
|
|
1573
1595
|
status: z.ZodString;
|
|
1574
1596
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -4204,7 +4226,7 @@ declare const schemas_UpdateStreamSubscriptionResult: typeof UpdateStreamSubscri
|
|
|
4204
4226
|
declare const schemas_WalletSubscriptionTopic: typeof WalletSubscriptionTopic;
|
|
4205
4227
|
declare const schemas_WalletSubscriptionTopicSchema: typeof WalletSubscriptionTopicSchema;
|
|
4206
4228
|
declare namespace schemas {
|
|
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 };
|
|
4229
|
+
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 };
|
|
4208
4230
|
}
|
|
4209
4231
|
|
|
4210
4232
|
type PoolProviderType = z.infer<typeof PoolProviderSchema>;
|
|
@@ -4232,6 +4254,7 @@ type StakingTreasury = z.infer<typeof StakingTreasury$1>;
|
|
|
4232
4254
|
type StakingPositionHistoryAction = z.infer<typeof StakingPositionHistoryAction$1>;
|
|
4233
4255
|
type PoolPriceCandle = z.infer<typeof PoolPriceCandle$1>;
|
|
4234
4256
|
type FeesStatsGroup = z.infer<typeof FeesStatsGroup$1>;
|
|
4257
|
+
type StakingRevenueStatsGroup = z.infer<typeof StakingRevenueStatsGroup$1>;
|
|
4235
4258
|
type PoolPriceUpdate = z.infer<typeof PoolPriceUpdate$1>;
|
|
4236
4259
|
type SubscriptionPayload = {
|
|
4237
4260
|
pools?: {
|
|
@@ -4316,10 +4339,11 @@ declare class TunaApiClient {
|
|
|
4316
4339
|
getUserStakingPosition(userAddress: string): Promise<StakingPosition>;
|
|
4317
4340
|
getUserStakingPositionHistory(userAddress: string): Promise<StakingPositionHistoryAction[]>;
|
|
4318
4341
|
getFeesStats(from: Date, to: Date, interval: string): Promise<FeesStatsGroup[]>;
|
|
4342
|
+
getStakingRevenueStats(from: Date, to: Date): Promise<StakingRevenueStatsGroup[]>;
|
|
4319
4343
|
getUpdatesStream(): Promise<EventSource>;
|
|
4320
4344
|
updateStreamSubscription(streamId: string, subscription: SubscriptionPayload): Promise<unknown>;
|
|
4321
4345
|
private buildURL;
|
|
4322
4346
|
private appendUrlSearchParams;
|
|
4323
4347
|
}
|
|
4324
4348
|
|
|
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 };
|
|
4349
|
+
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 };
|
package/dist/index.js
CHANGED
|
@@ -79,6 +79,7 @@ __export(schemas_exports, {
|
|
|
79
79
|
StakingPositionHistoryActionType: () => StakingPositionHistoryActionType,
|
|
80
80
|
StakingPositionHistoryActionTypeSchema: () => StakingPositionHistoryActionTypeSchema,
|
|
81
81
|
StakingPositionNotification: () => StakingPositionNotification,
|
|
82
|
+
StakingRevenueStatsGroup: () => StakingRevenueStatsGroup,
|
|
82
83
|
StakingTreasury: () => StakingTreasury,
|
|
83
84
|
Tick: () => Tick,
|
|
84
85
|
TokenOraclePrice: () => TokenOraclePrice,
|
|
@@ -247,6 +248,7 @@ var Pool = import_zod.z.object({
|
|
|
247
248
|
priceChange24H: import_zod.z.number(),
|
|
248
249
|
tickSpacing: import_zod.z.number(),
|
|
249
250
|
feeRate: import_zod.z.number(),
|
|
251
|
+
olpFeeRate: import_zod.z.nullable(import_zod.z.number()),
|
|
250
252
|
protocolFeeRate: import_zod.z.number(),
|
|
251
253
|
liquidity: import_zod.z.coerce.bigint(),
|
|
252
254
|
sqrtPrice: import_zod.z.coerce.bigint(),
|
|
@@ -448,6 +450,13 @@ var FeesStatsGroup = import_zod.z.object({
|
|
|
448
450
|
runningTotalCollectedFees: import_zod.z.number(),
|
|
449
451
|
runningTotalNetworkFees: import_zod.z.number()
|
|
450
452
|
});
|
|
453
|
+
var StakingRevenueStatsGroup = import_zod.z.object({
|
|
454
|
+
time: import_zod.z.coerce.date(),
|
|
455
|
+
totalDepositsUsd: import_zod.z.number(),
|
|
456
|
+
totalDepositsSol: import_zod.z.coerce.bigint(),
|
|
457
|
+
runningTotalDepositsUsd: import_zod.z.number(),
|
|
458
|
+
runningtotalDepositsSol: import_zod.z.coerce.bigint()
|
|
459
|
+
});
|
|
451
460
|
var UpdateStreamSubscriptionResult = import_zod.z.object({
|
|
452
461
|
status: import_zod.z.string()
|
|
453
462
|
});
|
|
@@ -665,6 +674,14 @@ var TunaApiClient = class {
|
|
|
665
674
|
});
|
|
666
675
|
return await this.httpRequest(url.toString(), FeesStatsGroup.array());
|
|
667
676
|
}
|
|
677
|
+
async getStakingRevenueStats(from, to) {
|
|
678
|
+
const url = this.buildURL(`stats/staking/revenue`);
|
|
679
|
+
this.appendUrlSearchParams(url, {
|
|
680
|
+
from: from.toISOString(),
|
|
681
|
+
to: to.toISOString()
|
|
682
|
+
});
|
|
683
|
+
return await this.httpRequest(url.toString(), StakingRevenueStatsGroup.array());
|
|
684
|
+
}
|
|
668
685
|
async getUpdatesStream() {
|
|
669
686
|
const url = this.buildURL(`streams/sse`);
|
|
670
687
|
return new EventSource(url.toString());
|
package/dist/index.mjs
CHANGED
|
@@ -44,6 +44,7 @@ __export(schemas_exports, {
|
|
|
44
44
|
StakingPositionHistoryActionType: () => StakingPositionHistoryActionType,
|
|
45
45
|
StakingPositionHistoryActionTypeSchema: () => StakingPositionHistoryActionTypeSchema,
|
|
46
46
|
StakingPositionNotification: () => StakingPositionNotification,
|
|
47
|
+
StakingRevenueStatsGroup: () => StakingRevenueStatsGroup,
|
|
47
48
|
StakingTreasury: () => StakingTreasury,
|
|
48
49
|
Tick: () => Tick,
|
|
49
50
|
TokenOraclePrice: () => TokenOraclePrice,
|
|
@@ -212,6 +213,7 @@ var Pool = z.object({
|
|
|
212
213
|
priceChange24H: z.number(),
|
|
213
214
|
tickSpacing: z.number(),
|
|
214
215
|
feeRate: z.number(),
|
|
216
|
+
olpFeeRate: z.nullable(z.number()),
|
|
215
217
|
protocolFeeRate: z.number(),
|
|
216
218
|
liquidity: z.coerce.bigint(),
|
|
217
219
|
sqrtPrice: z.coerce.bigint(),
|
|
@@ -413,6 +415,13 @@ var FeesStatsGroup = z.object({
|
|
|
413
415
|
runningTotalCollectedFees: z.number(),
|
|
414
416
|
runningTotalNetworkFees: z.number()
|
|
415
417
|
});
|
|
418
|
+
var StakingRevenueStatsGroup = z.object({
|
|
419
|
+
time: z.coerce.date(),
|
|
420
|
+
totalDepositsUsd: z.number(),
|
|
421
|
+
totalDepositsSol: z.coerce.bigint(),
|
|
422
|
+
runningTotalDepositsUsd: z.number(),
|
|
423
|
+
runningtotalDepositsSol: z.coerce.bigint()
|
|
424
|
+
});
|
|
416
425
|
var UpdateStreamSubscriptionResult = z.object({
|
|
417
426
|
status: z.string()
|
|
418
427
|
});
|
|
@@ -630,6 +639,14 @@ var TunaApiClient = class {
|
|
|
630
639
|
});
|
|
631
640
|
return await this.httpRequest(url.toString(), FeesStatsGroup.array());
|
|
632
641
|
}
|
|
642
|
+
async getStakingRevenueStats(from, to) {
|
|
643
|
+
const url = this.buildURL(`stats/staking/revenue`);
|
|
644
|
+
this.appendUrlSearchParams(url, {
|
|
645
|
+
from: from.toISOString(),
|
|
646
|
+
to: to.toISOString()
|
|
647
|
+
});
|
|
648
|
+
return await this.httpRequest(url.toString(), StakingRevenueStatsGroup.array());
|
|
649
|
+
}
|
|
633
650
|
async getUpdatesStream() {
|
|
634
651
|
const url = this.buildURL(`streams/sse`);
|
|
635
652
|
return new EventSource(url.toString());
|