@crypticdot/defituna-api 1.10.11 → 1.10.13
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/README.md +7 -1
- package/dist/index.d.mts +1010 -407
- package/dist/index.d.ts +1010 -407
- package/dist/index.js +331 -351
- package/dist/index.mjs +331 -351
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -90,7 +90,6 @@ __export(schemas_exports, {
|
|
|
90
90
|
PoolPriceCandle: () => PoolPriceCandle,
|
|
91
91
|
PoolProvider: () => PoolProvider,
|
|
92
92
|
PoolProviderSchema: () => PoolProviderSchema,
|
|
93
|
-
PoolSnapshot: () => PoolSnapshot,
|
|
94
93
|
PoolSubscriptionTopic: () => PoolSubscriptionTopic,
|
|
95
94
|
PoolSubscriptionTopicSchema: () => PoolSubscriptionTopicSchema,
|
|
96
95
|
PoolSwap: () => PoolSwap,
|
|
@@ -139,7 +138,6 @@ __export(schemas_exports, {
|
|
|
139
138
|
TunaLpPositionTransfer: () => TunaLpPositionTransfer,
|
|
140
139
|
TunaLpPositionValue: () => TunaLpPositionValue,
|
|
141
140
|
TunaPositionLegacy: () => TunaPositionLegacy,
|
|
142
|
-
TunaPositionPoolSchema: () => TunaPositionPoolSchema,
|
|
143
141
|
TunaPositionPoolToken: () => TunaPositionPoolToken,
|
|
144
142
|
TunaPositionPoolTokenSchema: () => TunaPositionPoolTokenSchema,
|
|
145
143
|
TunaPositionState: () => TunaPositionState,
|
|
@@ -155,7 +153,7 @@ __export(schemas_exports, {
|
|
|
155
153
|
WalletSubscriptionTopic: () => WalletSubscriptionTopic,
|
|
156
154
|
WalletSubscriptionTopicSchema: () => WalletSubscriptionTopicSchema
|
|
157
155
|
});
|
|
158
|
-
var
|
|
156
|
+
var import_zod11 = require("zod");
|
|
159
157
|
|
|
160
158
|
// src/client/schemas/basic.ts
|
|
161
159
|
var import_zod = require("zod");
|
|
@@ -176,67 +174,60 @@ var UsdPnlSchema = import_zod.z.object({
|
|
|
176
174
|
});
|
|
177
175
|
|
|
178
176
|
// src/client/schemas/pool.ts
|
|
179
|
-
var
|
|
177
|
+
var import_zod3 = __toESM(require("zod"));
|
|
178
|
+
|
|
179
|
+
// src/client/schemas/mint.ts
|
|
180
|
+
var import_zod2 = require("zod");
|
|
181
|
+
var Mint = import_zod2.z.object({
|
|
182
|
+
address: import_zod2.z.string(),
|
|
183
|
+
symbol: import_zod2.z.string(),
|
|
184
|
+
name: import_zod2.z.string(),
|
|
185
|
+
logo: import_zod2.z.string(),
|
|
186
|
+
decimals: import_zod2.z.number()
|
|
187
|
+
});
|
|
188
|
+
|
|
189
|
+
// src/client/schemas/pool.ts
|
|
180
190
|
var PoolProvider = {
|
|
181
191
|
ORCA: "orca",
|
|
182
192
|
FUSION: "fusion"
|
|
183
193
|
};
|
|
184
|
-
var PoolProviderSchema =
|
|
185
|
-
var Pool =
|
|
186
|
-
address:
|
|
194
|
+
var PoolProviderSchema = import_zod3.default.enum([PoolProvider.ORCA, ...Object.values(PoolProvider)]);
|
|
195
|
+
var Pool = import_zod3.default.object({
|
|
196
|
+
address: import_zod3.default.string(),
|
|
187
197
|
provider: PoolProviderSchema,
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
tokenAVault:
|
|
191
|
-
tokenBVault:
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
198
|
+
mintA: Mint,
|
|
199
|
+
mintB: Mint,
|
|
200
|
+
tokenAVault: import_zod3.default.string(),
|
|
201
|
+
tokenBVault: import_zod3.default.string(),
|
|
202
|
+
tickSpacing: import_zod3.default.number(),
|
|
203
|
+
feeRate: import_zod3.default.number(),
|
|
204
|
+
protocolFeeRate: import_zod3.default.number(),
|
|
205
|
+
olpFeeRate: import_zod3.default.nullable(import_zod3.default.number()),
|
|
206
|
+
liquidity: import_zod3.default.coerce.bigint(),
|
|
207
|
+
sqrtPrice: import_zod3.default.coerce.bigint(),
|
|
208
|
+
price: import_zod3.default.number(),
|
|
209
|
+
tickCurrentIndex: import_zod3.default.number(),
|
|
210
|
+
stats: import_zod3.default.optional(
|
|
211
|
+
import_zod3.default.nullable(
|
|
212
|
+
import_zod3.default.object({
|
|
213
|
+
tvlUsd: import_zod3.default.coerce.number(),
|
|
214
|
+
groups: import_zod3.default.object({
|
|
215
|
+
"24h": import_zod3.default.object({
|
|
216
|
+
volumeUsd: import_zod3.default.number(),
|
|
217
|
+
feesUsd: import_zod3.default.number(),
|
|
218
|
+
priceChange: import_zod3.default.number()
|
|
219
|
+
})
|
|
220
|
+
})
|
|
221
|
+
})
|
|
222
|
+
)
|
|
223
|
+
)
|
|
208
224
|
});
|
|
209
225
|
|
|
210
226
|
// src/client/schemas/state_snapshot.ts
|
|
211
|
-
var
|
|
212
|
-
|
|
213
|
-
// src/client/schemas/limit_orders.ts
|
|
214
|
-
var import_zod5 = require("zod");
|
|
215
|
-
|
|
216
|
-
// src/client/schemas/mint.ts
|
|
217
|
-
var import_zod3 = require("zod");
|
|
218
|
-
var Mint = import_zod3.z.object({
|
|
219
|
-
mint: import_zod3.z.string(),
|
|
220
|
-
symbol: import_zod3.z.string(),
|
|
221
|
-
name: import_zod3.z.string(),
|
|
222
|
-
logo: import_zod3.z.string(),
|
|
223
|
-
decimals: import_zod3.z.number()
|
|
224
|
-
});
|
|
225
|
-
|
|
226
|
-
// src/client/schemas/positions_shared.ts
|
|
227
|
-
var import_zod4 = __toESM(require("zod"));
|
|
228
|
-
var TunaPositionPoolSchema = import_zod4.default.object({
|
|
229
|
-
addr: import_zod4.default.string(),
|
|
230
|
-
price: import_zod4.default.number(),
|
|
231
|
-
tickSpacing: import_zod4.default.number()
|
|
232
|
-
});
|
|
233
|
-
var TunaPositionPoolToken = {
|
|
234
|
-
A: "a",
|
|
235
|
-
B: "b"
|
|
236
|
-
};
|
|
237
|
-
var TunaPositionPoolTokenSchema = import_zod4.default.enum(Object.values(TunaPositionPoolToken));
|
|
227
|
+
var import_zod10 = __toESM(require("zod"));
|
|
238
228
|
|
|
239
229
|
// src/client/schemas/limit_orders.ts
|
|
230
|
+
var import_zod4 = require("zod");
|
|
240
231
|
var LimitOrderState = {
|
|
241
232
|
OPEN: "open",
|
|
242
233
|
PARTIALLY_FILLED: "partially_filled",
|
|
@@ -244,28 +235,36 @@ var LimitOrderState = {
|
|
|
244
235
|
COMPLETE: "complete",
|
|
245
236
|
CANCELLED: "cancelled"
|
|
246
237
|
};
|
|
247
|
-
var LimitOrderStateSchema =
|
|
248
|
-
var LimitOrder =
|
|
249
|
-
address:
|
|
250
|
-
orderMint:
|
|
251
|
-
authority:
|
|
252
|
-
|
|
253
|
-
mintB: Mint,
|
|
254
|
-
pool: TunaPositionPoolSchema,
|
|
238
|
+
var LimitOrderStateSchema = import_zod4.z.enum([LimitOrderState.OPEN, ...Object.values(LimitOrderState)]);
|
|
239
|
+
var LimitOrder = import_zod4.z.object({
|
|
240
|
+
address: import_zod4.z.string(),
|
|
241
|
+
orderMint: import_zod4.z.string(),
|
|
242
|
+
authority: import_zod4.z.string(),
|
|
243
|
+
pool: Pool,
|
|
255
244
|
state: LimitOrderStateSchema,
|
|
256
|
-
aToB:
|
|
257
|
-
tickIndex:
|
|
258
|
-
fillRatio:
|
|
259
|
-
openTxSignature:
|
|
260
|
-
closeTxSignature:
|
|
245
|
+
aToB: import_zod4.z.boolean(),
|
|
246
|
+
tickIndex: import_zod4.z.number(),
|
|
247
|
+
fillRatio: import_zod4.z.number(),
|
|
248
|
+
openTxSignature: import_zod4.z.string(),
|
|
249
|
+
closeTxSignature: import_zod4.z.nullable(import_zod4.z.string()),
|
|
261
250
|
amountIn: AmountWithUsdSchema,
|
|
262
251
|
amountOut: AmountWithUsdSchema,
|
|
263
|
-
openedAt:
|
|
264
|
-
closedAt:
|
|
252
|
+
openedAt: import_zod4.z.coerce.date(),
|
|
253
|
+
closedAt: import_zod4.z.nullable(import_zod4.z.coerce.date())
|
|
265
254
|
});
|
|
266
255
|
|
|
267
256
|
// src/client/schemas/lp_positions.ts
|
|
268
257
|
var import_zod6 = __toESM(require("zod"));
|
|
258
|
+
|
|
259
|
+
// src/client/schemas/positions_shared.ts
|
|
260
|
+
var import_zod5 = __toESM(require("zod"));
|
|
261
|
+
var TunaPositionPoolToken = {
|
|
262
|
+
A: "a",
|
|
263
|
+
B: "b"
|
|
264
|
+
};
|
|
265
|
+
var TunaPositionPoolTokenSchema = import_zod5.default.enum(Object.values(TunaPositionPoolToken));
|
|
266
|
+
|
|
267
|
+
// src/client/schemas/lp_positions.ts
|
|
269
268
|
var LpPositionLimitOrderSwap = {
|
|
270
269
|
NO_SWAP: "no_swap",
|
|
271
270
|
SWAP_TO_TOKEN_A: "swap_to_token_a",
|
|
@@ -337,9 +336,7 @@ var TunaLpPositionDtoSchema = import_zod6.default.object({
|
|
|
337
336
|
upperLimitOrderPrice: import_zod6.default.number(),
|
|
338
337
|
entryPrice: import_zod6.default.number(),
|
|
339
338
|
flags: TunaLpPositionFlagsSchema,
|
|
340
|
-
|
|
341
|
-
mintB: Mint,
|
|
342
|
-
pool: TunaPositionPoolSchema,
|
|
339
|
+
pool: Pool,
|
|
343
340
|
marketMaker: PoolProviderSchema,
|
|
344
341
|
depositedCollateralA: AmountWithUsdSchema,
|
|
345
342
|
depositedCollateralB: AmountWithUsdSchema,
|
|
@@ -551,47 +548,69 @@ var TunaLpPositionAction = import_zod6.default.object({
|
|
|
551
548
|
})
|
|
552
549
|
});
|
|
553
550
|
|
|
551
|
+
// src/client/schemas/market.ts
|
|
552
|
+
var import_zod7 = require("zod");
|
|
553
|
+
var Market = import_zod7.z.object({
|
|
554
|
+
address: import_zod7.z.string(),
|
|
555
|
+
addressLookupTable: import_zod7.z.string(),
|
|
556
|
+
maxLeverage: import_zod7.z.number(),
|
|
557
|
+
maxSwapSlippage: import_zod7.z.number(),
|
|
558
|
+
protocolFee: import_zod7.z.number(),
|
|
559
|
+
protocolFeeOnCollateral: import_zod7.z.number(),
|
|
560
|
+
liquidationFee: import_zod7.z.number(),
|
|
561
|
+
liquidationThreshold: import_zod7.z.number(),
|
|
562
|
+
oraclePriceDeviationThreshold: import_zod7.z.number(),
|
|
563
|
+
rebalanceProtocolFee: import_zod7.z.number(),
|
|
564
|
+
borrowedFundsA: AmountWithUsdSchema,
|
|
565
|
+
borrowedFundsB: AmountWithUsdSchema,
|
|
566
|
+
borrowLimitA: AmountWithUsdSchema,
|
|
567
|
+
borrowLimitB: AmountWithUsdSchema,
|
|
568
|
+
maxSpotPositionSizeA: AmountWithUsdSchema,
|
|
569
|
+
maxSpotPositionSizeB: AmountWithUsdSchema,
|
|
570
|
+
pool: Pool,
|
|
571
|
+
disabled: import_zod7.z.boolean(),
|
|
572
|
+
createdAt: import_zod7.z.coerce.date()
|
|
573
|
+
});
|
|
574
|
+
|
|
554
575
|
// src/client/schemas/order_book.ts
|
|
555
|
-
var
|
|
556
|
-
var OrderBookEntry =
|
|
557
|
-
concentratedAmount:
|
|
558
|
-
concentratedAmountQuote:
|
|
559
|
-
concentratedTotal:
|
|
560
|
-
concentratedTotalQuote:
|
|
561
|
-
limitAmount:
|
|
562
|
-
limitAmountQuote:
|
|
563
|
-
limitTotal:
|
|
564
|
-
limitTotalQuote:
|
|
565
|
-
price:
|
|
566
|
-
askSide:
|
|
576
|
+
var import_zod8 = __toESM(require("zod"));
|
|
577
|
+
var OrderBookEntry = import_zod8.default.object({
|
|
578
|
+
concentratedAmount: import_zod8.default.coerce.bigint(),
|
|
579
|
+
concentratedAmountQuote: import_zod8.default.coerce.bigint(),
|
|
580
|
+
concentratedTotal: import_zod8.default.coerce.bigint(),
|
|
581
|
+
concentratedTotalQuote: import_zod8.default.coerce.bigint(),
|
|
582
|
+
limitAmount: import_zod8.default.coerce.bigint(),
|
|
583
|
+
limitAmountQuote: import_zod8.default.coerce.bigint(),
|
|
584
|
+
limitTotal: import_zod8.default.coerce.bigint(),
|
|
585
|
+
limitTotalQuote: import_zod8.default.coerce.bigint(),
|
|
586
|
+
price: import_zod8.default.number(),
|
|
587
|
+
askSide: import_zod8.default.boolean()
|
|
567
588
|
});
|
|
568
|
-
var OrderBook =
|
|
589
|
+
var OrderBook = import_zod8.default.object({
|
|
569
590
|
entries: OrderBookEntry.array(),
|
|
570
|
-
poolPrice:
|
|
571
|
-
poolAddress:
|
|
591
|
+
poolPrice: import_zod8.default.number(),
|
|
592
|
+
poolAddress: import_zod8.default.string()
|
|
572
593
|
});
|
|
573
594
|
|
|
574
595
|
// src/client/schemas/spot_positions.ts
|
|
575
|
-
var
|
|
596
|
+
var import_zod9 = require("zod");
|
|
576
597
|
var TunaSpotPositionState = {
|
|
577
598
|
OPEN: "open",
|
|
578
599
|
CLOSED: "closed"
|
|
579
600
|
};
|
|
580
|
-
var TunaSpotPositionStateSchema =
|
|
601
|
+
var TunaSpotPositionStateSchema = import_zod9.z.enum([
|
|
581
602
|
TunaSpotPositionState.OPEN,
|
|
582
603
|
...Object.values(TunaSpotPositionState)
|
|
583
604
|
]);
|
|
584
|
-
var TunaSpotPosition =
|
|
585
|
-
address:
|
|
586
|
-
authority:
|
|
587
|
-
version:
|
|
605
|
+
var TunaSpotPosition = import_zod9.z.object({
|
|
606
|
+
address: import_zod9.z.string(),
|
|
607
|
+
authority: import_zod9.z.string(),
|
|
608
|
+
version: import_zod9.z.number(),
|
|
588
609
|
state: TunaSpotPositionStateSchema,
|
|
589
|
-
lowerLimitOrderPrice:
|
|
590
|
-
upperLimitOrderPrice:
|
|
591
|
-
entryPrice:
|
|
592
|
-
|
|
593
|
-
mintB: Mint,
|
|
594
|
-
pool: TunaPositionPoolSchema,
|
|
610
|
+
lowerLimitOrderPrice: import_zod9.z.number(),
|
|
611
|
+
upperLimitOrderPrice: import_zod9.z.number(),
|
|
612
|
+
entryPrice: import_zod9.z.number(),
|
|
613
|
+
pool: Pool,
|
|
595
614
|
positionToken: TunaPositionPoolTokenSchema,
|
|
596
615
|
collateralToken: TunaPositionPoolTokenSchema,
|
|
597
616
|
marketMaker: PoolProviderSchema,
|
|
@@ -599,97 +618,79 @@ var TunaSpotPosition = import_zod8.z.object({
|
|
|
599
618
|
initialDebt: AmountWithUsdSchema,
|
|
600
619
|
currentDebt: AmountWithUsdSchema,
|
|
601
620
|
total: AmountWithUsdSchema,
|
|
602
|
-
leverage:
|
|
603
|
-
maxLeverage:
|
|
604
|
-
liquidationPrice:
|
|
621
|
+
leverage: import_zod9.z.number(),
|
|
622
|
+
maxLeverage: import_zod9.z.number(),
|
|
623
|
+
liquidationPrice: import_zod9.z.number(),
|
|
605
624
|
pnlUsd: UsdPnlSchema,
|
|
606
|
-
openedAt:
|
|
607
|
-
closedAt:
|
|
625
|
+
openedAt: import_zod9.z.coerce.date(),
|
|
626
|
+
closedAt: import_zod9.z.nullable(import_zod9.z.coerce.date())
|
|
608
627
|
});
|
|
609
|
-
var IncreaseSpotPositionQuote =
|
|
628
|
+
var IncreaseSpotPositionQuote = import_zod9.z.object({
|
|
610
629
|
/** Required collateral amount */
|
|
611
|
-
collateralAmount:
|
|
630
|
+
collateralAmount: import_zod9.z.coerce.bigint(),
|
|
612
631
|
/** Required amount to borrow */
|
|
613
|
-
borrowAmount:
|
|
632
|
+
borrowAmount: import_zod9.z.coerce.bigint(),
|
|
614
633
|
/** Estimated position size in the position token. */
|
|
615
|
-
estimatedAmount:
|
|
634
|
+
estimatedAmount: import_zod9.z.coerce.bigint(),
|
|
616
635
|
/** Swap input amount. */
|
|
617
|
-
swapInputAmount:
|
|
636
|
+
swapInputAmount: import_zod9.z.coerce.bigint(),
|
|
618
637
|
/** Minimum swap output amount according to the provided slippage. */
|
|
619
|
-
minSwapOutputAmount:
|
|
638
|
+
minSwapOutputAmount: import_zod9.z.coerce.bigint(),
|
|
620
639
|
/** Protocol fee in token A */
|
|
621
|
-
protocolFeeA:
|
|
640
|
+
protocolFeeA: import_zod9.z.coerce.bigint(),
|
|
622
641
|
/** Protocol fee in token B */
|
|
623
|
-
protocolFeeB:
|
|
642
|
+
protocolFeeB: import_zod9.z.coerce.bigint(),
|
|
624
643
|
/** Price impact in percents */
|
|
625
|
-
priceImpact:
|
|
644
|
+
priceImpact: import_zod9.z.number(),
|
|
626
645
|
/** Liquidation price */
|
|
627
|
-
liquidationPrice:
|
|
646
|
+
liquidationPrice: import_zod9.z.number()
|
|
628
647
|
});
|
|
629
|
-
var DecreaseSpotPositionQuote =
|
|
648
|
+
var DecreaseSpotPositionQuote = import_zod9.z.object({
|
|
630
649
|
/** Confirmed position decrease percentage (100% = 1.0) */
|
|
631
|
-
decreasePercent:
|
|
650
|
+
decreasePercent: import_zod9.z.number(),
|
|
632
651
|
/** The maximum acceptable swap input amount for position decrease according to the provided slippage
|
|
633
652
|
* (if collateral_token == position_token) OR the minimum swap output amount (if collateral_token != position_token).
|
|
634
653
|
*/
|
|
635
|
-
requiredSwapAmount:
|
|
654
|
+
requiredSwapAmount: import_zod9.z.coerce.bigint(),
|
|
636
655
|
/** Estimated total amount of the adjusted position */
|
|
637
|
-
estimatedAmount:
|
|
656
|
+
estimatedAmount: import_zod9.z.coerce.bigint(),
|
|
638
657
|
/** Estimated amount of the withdrawn collateral */
|
|
639
|
-
estimatedWithdrawnCollateral:
|
|
658
|
+
estimatedWithdrawnCollateral: import_zod9.z.coerce.bigint(),
|
|
640
659
|
/** Price impact in percents */
|
|
641
|
-
priceImpact:
|
|
660
|
+
priceImpact: import_zod9.z.number(),
|
|
642
661
|
/** Liquidation price */
|
|
643
|
-
liquidationPrice:
|
|
662
|
+
liquidationPrice: import_zod9.z.number()
|
|
644
663
|
});
|
|
645
|
-
var CloseSpotPositionQuote =
|
|
664
|
+
var CloseSpotPositionQuote = import_zod9.z.object({
|
|
646
665
|
/** Position decrease percentage */
|
|
647
|
-
decreasePercent:
|
|
666
|
+
decreasePercent: import_zod9.z.number(),
|
|
648
667
|
/** The maximum acceptable swap input amount for position decrease according to the provided slippage
|
|
649
668
|
* (if collateral_token == position_token) OR the minimum swap output amount (if collateral_token != position_token).
|
|
650
669
|
*/
|
|
651
|
-
requiredSwapAmount:
|
|
670
|
+
requiredSwapAmount: import_zod9.z.coerce.bigint(),
|
|
652
671
|
/** Estimated amount of the withdrawn collateral */
|
|
653
|
-
estimatedWithdrawnCollateral:
|
|
672
|
+
estimatedWithdrawnCollateral: import_zod9.z.coerce.bigint(),
|
|
654
673
|
/** Price impact in percents */
|
|
655
|
-
priceImpact:
|
|
674
|
+
priceImpact: import_zod9.z.number()
|
|
656
675
|
});
|
|
657
676
|
|
|
658
677
|
// src/client/schemas/state_snapshot.ts
|
|
659
|
-
var
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
fees24H: import_zod9.default.number(),
|
|
668
|
-
borrowedFundsA: AmountWithUsdSchema,
|
|
669
|
-
borrowedFundsB: AmountWithUsdSchema,
|
|
670
|
-
borrowLimitA: AmountWithUsdSchema,
|
|
671
|
-
borrowLimitB: AmountWithUsdSchema
|
|
672
|
-
});
|
|
673
|
-
var StateSnapshot = import_zod9.default.object({
|
|
674
|
-
slot: import_zod9.default.coerce.bigint(),
|
|
675
|
-
blockTime: import_zod9.default.coerce.date(),
|
|
676
|
-
pools: import_zod9.default.optional(import_zod9.default.record(import_zod9.default.string(), PoolSnapshot)),
|
|
677
|
-
tunaSpotPositions: import_zod9.default.optional(import_zod9.default.array(TunaSpotPosition)),
|
|
678
|
-
tunaLpPositions: import_zod9.default.optional(import_zod9.default.array(TunaLpPositionDtoSchema)),
|
|
679
|
-
fusionLimitOrders: import_zod9.default.optional(import_zod9.default.array(LimitOrder)),
|
|
680
|
-
orderBooks: import_zod9.default.optional(import_zod9.default.record(import_zod9.default.string(), OrderBook))
|
|
678
|
+
var StateSnapshot = import_zod10.default.object({
|
|
679
|
+
slot: import_zod10.default.coerce.bigint(),
|
|
680
|
+
blockTime: import_zod10.default.coerce.date(),
|
|
681
|
+
markets: import_zod10.default.optional(import_zod10.default.array(Market)),
|
|
682
|
+
tunaSpotPositions: import_zod10.default.optional(import_zod10.default.array(TunaSpotPosition)),
|
|
683
|
+
tunaLpPositions: import_zod10.default.optional(import_zod10.default.array(TunaLpPositionDtoSchema)),
|
|
684
|
+
fusionLimitOrders: import_zod10.default.optional(import_zod10.default.array(LimitOrder)),
|
|
685
|
+
orderBooks: import_zod10.default.optional(import_zod10.default.array(OrderBook))
|
|
681
686
|
});
|
|
682
687
|
|
|
683
688
|
// src/client/schemas.ts
|
|
684
689
|
var NotificationEntity = {
|
|
685
690
|
POOL_SWAP: "pool_swap",
|
|
686
|
-
POOL_PRICE: "pool_price",
|
|
687
|
-
ORDER_BOOK: "order_book",
|
|
688
|
-
TUNA_POSITION: "tuna_position",
|
|
689
|
-
TUNA_SPOT_POSITION: "tuna_spot_position",
|
|
690
691
|
LENDING_POSITION: "lending_position",
|
|
691
692
|
STAKING_POSITION: "staking_position",
|
|
692
|
-
|
|
693
|
+
MARKET: "market",
|
|
693
694
|
TRADE_HISTORY_ENTRY: "trade_history_entry",
|
|
694
695
|
ORDER_HISTORY_ENTRY: "order_history_entry",
|
|
695
696
|
STATE_SNAPSHOT: "state_snapshot"
|
|
@@ -757,81 +758,60 @@ var WalletSubscriptionTopic = {
|
|
|
757
758
|
TRADE_HISTORY: "trade_history",
|
|
758
759
|
ORDER_HISTORY: "order_history"
|
|
759
760
|
};
|
|
760
|
-
var NotificationEntitySchema =
|
|
761
|
-
var NotificationActionSchema =
|
|
762
|
-
var TradeHistoryActionSchema =
|
|
763
|
-
var TradeHistoryUIDirectionSchema =
|
|
761
|
+
var NotificationEntitySchema = import_zod11.z.enum([NotificationEntity.POOL_SWAP, ...Object.values(NotificationEntity)]);
|
|
762
|
+
var NotificationActionSchema = import_zod11.z.enum([NotificationAction.CREATE, ...Object.values(NotificationAction)]);
|
|
763
|
+
var TradeHistoryActionSchema = import_zod11.z.enum([TradeHistoryAction.SWAP, ...Object.values(TradeHistoryAction)]);
|
|
764
|
+
var TradeHistoryUIDirectionSchema = import_zod11.z.enum([
|
|
764
765
|
TradeHistoryUIDirection.BUY,
|
|
765
766
|
...Object.values(TradeHistoryUIDirection)
|
|
766
767
|
]);
|
|
767
|
-
var OrderHistoryOrderTypeSchema =
|
|
768
|
+
var OrderHistoryOrderTypeSchema = import_zod11.z.enum([
|
|
768
769
|
OrderHistoryOrderType.MARKET,
|
|
769
770
|
...Object.values(OrderHistoryOrderType)
|
|
770
771
|
]);
|
|
771
|
-
var OrderHistoryStatusSchema =
|
|
772
|
-
var OrderHistoryUIDirectionSchema =
|
|
772
|
+
var OrderHistoryStatusSchema = import_zod11.z.enum([OrderHistoryStatus.OPEN, ...Object.values(OrderHistoryStatus)]);
|
|
773
|
+
var OrderHistoryUIDirectionSchema = import_zod11.z.enum([
|
|
773
774
|
OrderHistoryUIDirection.BUY,
|
|
774
775
|
...Object.values(OrderHistoryUIDirection)
|
|
775
776
|
]);
|
|
776
|
-
var StakingPositionHistoryActionTypeSchema =
|
|
777
|
+
var StakingPositionHistoryActionTypeSchema = import_zod11.z.enum([
|
|
777
778
|
StakingPositionHistoryActionType.STAKE,
|
|
778
779
|
...Object.values(StakingPositionHistoryActionType)
|
|
779
780
|
]);
|
|
780
|
-
var PoolSubscriptionTopicSchema =
|
|
781
|
+
var PoolSubscriptionTopicSchema = import_zod11.z.enum([
|
|
781
782
|
PoolSubscriptionTopic.ORDER_BOOK,
|
|
782
783
|
...Object.values(PoolSubscriptionTopic)
|
|
783
784
|
]);
|
|
784
|
-
var WalletSubscriptionTopicSchema =
|
|
785
|
+
var WalletSubscriptionTopicSchema = import_zod11.z.enum([
|
|
785
786
|
WalletSubscriptionTopic.TUNA_POSITIONS,
|
|
786
787
|
...Object.values(WalletSubscriptionTopic)
|
|
787
788
|
]);
|
|
788
|
-
var PaginationMeta =
|
|
789
|
-
total:
|
|
789
|
+
var PaginationMeta = import_zod11.z.object({
|
|
790
|
+
total: import_zod11.z.number()
|
|
790
791
|
});
|
|
791
|
-
var
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
protocolFee: import_zod10.z.number(),
|
|
797
|
-
protocolFeeOnCollateral: import_zod10.z.number(),
|
|
798
|
-
liquidationFee: import_zod10.z.number(),
|
|
799
|
-
liquidationThreshold: import_zod10.z.number(),
|
|
800
|
-
oraclePriceDeviationThreshold: import_zod10.z.number(),
|
|
801
|
-
rebalanceProtocolFee: import_zod10.z.number(),
|
|
802
|
-
borrowedFundsA: AmountWithUsdSchema,
|
|
803
|
-
borrowedFundsB: AmountWithUsdSchema,
|
|
804
|
-
borrowLimitA: AmountWithUsdSchema,
|
|
805
|
-
borrowLimitB: AmountWithUsdSchema,
|
|
806
|
-
maxSpotPositionSizeA: AmountWithUsdSchema,
|
|
807
|
-
maxSpotPositionSizeB: AmountWithUsdSchema,
|
|
808
|
-
pool: Pool,
|
|
809
|
-
disabled: import_zod10.z.boolean(),
|
|
810
|
-
createdAt: import_zod10.z.coerce.date()
|
|
792
|
+
var TokenOraclePrice = import_zod11.z.object({
|
|
793
|
+
mint: import_zod11.z.string(),
|
|
794
|
+
price: import_zod11.z.coerce.bigint(),
|
|
795
|
+
decimals: import_zod11.z.number(),
|
|
796
|
+
time: import_zod11.z.coerce.date()
|
|
811
797
|
});
|
|
812
|
-
var
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
decimals: import_zod10.z.number(),
|
|
816
|
-
time: import_zod10.z.coerce.date()
|
|
817
|
-
});
|
|
818
|
-
var Vault = import_zod10.z.object({
|
|
819
|
-
address: import_zod10.z.string(),
|
|
820
|
-
mint: import_zod10.z.string(),
|
|
798
|
+
var Vault = import_zod11.z.object({
|
|
799
|
+
address: import_zod11.z.string(),
|
|
800
|
+
mint: import_zod11.z.string(),
|
|
821
801
|
depositedFunds: AmountWithUsdSchema,
|
|
822
802
|
borrowedFunds: AmountWithUsdSchema,
|
|
823
803
|
supplyLimit: AmountWithUsdSchema,
|
|
824
|
-
borrowedShares:
|
|
825
|
-
depositedShares:
|
|
826
|
-
supplyApy:
|
|
827
|
-
borrowApy:
|
|
828
|
-
interestRate:
|
|
829
|
-
utilization:
|
|
830
|
-
pythOracleFeedId:
|
|
831
|
-
pythOraclePriceUpdate:
|
|
804
|
+
borrowedShares: import_zod11.z.coerce.bigint(),
|
|
805
|
+
depositedShares: import_zod11.z.coerce.bigint(),
|
|
806
|
+
supplyApy: import_zod11.z.number(),
|
|
807
|
+
borrowApy: import_zod11.z.number(),
|
|
808
|
+
interestRate: import_zod11.z.coerce.bigint(),
|
|
809
|
+
utilization: import_zod11.z.number(),
|
|
810
|
+
pythOracleFeedId: import_zod11.z.string(),
|
|
811
|
+
pythOraclePriceUpdate: import_zod11.z.string()
|
|
832
812
|
});
|
|
833
|
-
var VaultHistoricalStats =
|
|
834
|
-
date:
|
|
813
|
+
var VaultHistoricalStats = import_zod11.z.object({
|
|
814
|
+
date: import_zod11.z.preprocess((val, ctx) => {
|
|
835
815
|
if (typeof val === "string") {
|
|
836
816
|
const [year, month, day] = val.split("-").map(Number);
|
|
837
817
|
return new Date(year, month - 1, day);
|
|
@@ -840,214 +820,214 @@ var VaultHistoricalStats = import_zod10.z.object({
|
|
|
840
820
|
code: "custom",
|
|
841
821
|
message: "Not a valid date string"
|
|
842
822
|
});
|
|
843
|
-
return
|
|
844
|
-
},
|
|
823
|
+
return import_zod11.z.NEVER;
|
|
824
|
+
}, import_zod11.z.date()),
|
|
845
825
|
supply: AmountWithUsdSchema,
|
|
846
826
|
borrow: AmountWithUsdSchema,
|
|
847
|
-
supplyApy:
|
|
848
|
-
borrowApr:
|
|
827
|
+
supplyApy: import_zod11.z.number(),
|
|
828
|
+
borrowApr: import_zod11.z.number()
|
|
849
829
|
});
|
|
850
|
-
var Tick =
|
|
851
|
-
index:
|
|
852
|
-
liquidity:
|
|
830
|
+
var Tick = import_zod11.z.object({
|
|
831
|
+
index: import_zod11.z.number(),
|
|
832
|
+
liquidity: import_zod11.z.coerce.bigint()
|
|
853
833
|
});
|
|
854
|
-
var PoolTicks =
|
|
855
|
-
tickSpacing:
|
|
834
|
+
var PoolTicks = import_zod11.z.object({
|
|
835
|
+
tickSpacing: import_zod11.z.number(),
|
|
856
836
|
ticks: Tick.array()
|
|
857
837
|
});
|
|
858
|
-
var LendingPosition =
|
|
859
|
-
address:
|
|
860
|
-
authority:
|
|
861
|
-
mint:
|
|
862
|
-
vault:
|
|
863
|
-
shares:
|
|
838
|
+
var LendingPosition = import_zod11.z.object({
|
|
839
|
+
address: import_zod11.z.string(),
|
|
840
|
+
authority: import_zod11.z.string(),
|
|
841
|
+
mint: import_zod11.z.string(),
|
|
842
|
+
vault: import_zod11.z.string(),
|
|
843
|
+
shares: import_zod11.z.coerce.bigint(),
|
|
864
844
|
funds: AmountWithUsdSchema,
|
|
865
845
|
earned: AmountWithUsdSchema
|
|
866
846
|
});
|
|
867
|
-
var PoolSwap =
|
|
868
|
-
id:
|
|
869
|
-
amountIn:
|
|
870
|
-
amountOut:
|
|
871
|
-
amountUsd:
|
|
872
|
-
aToB:
|
|
873
|
-
pool:
|
|
874
|
-
time:
|
|
847
|
+
var PoolSwap = import_zod11.z.object({
|
|
848
|
+
id: import_zod11.z.string(),
|
|
849
|
+
amountIn: import_zod11.z.coerce.bigint(),
|
|
850
|
+
amountOut: import_zod11.z.coerce.bigint(),
|
|
851
|
+
amountUsd: import_zod11.z.number(),
|
|
852
|
+
aToB: import_zod11.z.boolean(),
|
|
853
|
+
pool: import_zod11.z.string(),
|
|
854
|
+
time: import_zod11.z.coerce.date()
|
|
875
855
|
});
|
|
876
|
-
var TradeHistoryEntry =
|
|
856
|
+
var TradeHistoryEntry = import_zod11.z.object({
|
|
877
857
|
// Internal entry ID
|
|
878
|
-
id:
|
|
879
|
-
pool:
|
|
880
|
-
authority:
|
|
881
|
-
aToB:
|
|
858
|
+
id: import_zod11.z.string(),
|
|
859
|
+
pool: Pool,
|
|
860
|
+
authority: import_zod11.z.string(),
|
|
861
|
+
aToB: import_zod11.z.boolean(),
|
|
882
862
|
// Trade action which created entry
|
|
883
863
|
action: TradeHistoryActionSchema,
|
|
884
864
|
// Trade direction formatted for ui display
|
|
885
865
|
uiDirection: TradeHistoryUIDirectionSchema,
|
|
886
866
|
// Trade price formatted for ui display
|
|
887
|
-
uiPrice:
|
|
867
|
+
uiPrice: import_zod11.z.number(),
|
|
888
868
|
baseToken: AmountWithUsdSchema,
|
|
889
869
|
quoteToken: AmountWithUsdSchema,
|
|
890
870
|
fee: AmountWithUsdSchema,
|
|
891
|
-
pnl:
|
|
892
|
-
|
|
893
|
-
usd:
|
|
894
|
-
bps:
|
|
871
|
+
pnl: import_zod11.z.nullable(
|
|
872
|
+
import_zod11.z.object({
|
|
873
|
+
usd: import_zod11.z.number(),
|
|
874
|
+
bps: import_zod11.z.number()
|
|
895
875
|
})
|
|
896
876
|
),
|
|
897
|
-
txSignature:
|
|
898
|
-
positionAddress:
|
|
899
|
-
slot:
|
|
900
|
-
ts:
|
|
877
|
+
txSignature: import_zod11.z.nullable(import_zod11.z.string()),
|
|
878
|
+
positionAddress: import_zod11.z.nullable(import_zod11.z.string()),
|
|
879
|
+
slot: import_zod11.z.coerce.bigint(),
|
|
880
|
+
ts: import_zod11.z.coerce.date()
|
|
901
881
|
});
|
|
902
|
-
var OrderHistoryEntry =
|
|
882
|
+
var OrderHistoryEntry = import_zod11.z.object({
|
|
903
883
|
// Internal entry ID
|
|
904
|
-
id:
|
|
905
|
-
pool:
|
|
906
|
-
authority:
|
|
884
|
+
id: import_zod11.z.string(),
|
|
885
|
+
pool: Pool,
|
|
886
|
+
authority: import_zod11.z.string(),
|
|
907
887
|
orderType: OrderHistoryOrderTypeSchema,
|
|
908
|
-
isReduceOnly:
|
|
909
|
-
aToB:
|
|
888
|
+
isReduceOnly: import_zod11.z.nullable(import_zod11.z.boolean()),
|
|
889
|
+
aToB: import_zod11.z.boolean(),
|
|
910
890
|
uiDirection: OrderHistoryUIDirectionSchema,
|
|
911
|
-
uiPrice:
|
|
912
|
-
uiExecutionPrice:
|
|
891
|
+
uiPrice: import_zod11.z.nullable(import_zod11.z.number()),
|
|
892
|
+
uiExecutionPrice: import_zod11.z.nullable(import_zod11.z.number()),
|
|
913
893
|
status: OrderHistoryStatusSchema,
|
|
914
894
|
baseToken: AmountWithUsdSchema,
|
|
915
895
|
quoteToken: AmountWithUsdSchema,
|
|
916
|
-
baseTokenConsumedAmount:
|
|
917
|
-
quoteTokenFilledAmount:
|
|
918
|
-
txSignature:
|
|
919
|
-
positionAddress:
|
|
920
|
-
slot:
|
|
921
|
-
ts:
|
|
896
|
+
baseTokenConsumedAmount: import_zod11.z.nullable(AmountWithUsdSchema),
|
|
897
|
+
quoteTokenFilledAmount: import_zod11.z.nullable(AmountWithUsdSchema),
|
|
898
|
+
txSignature: import_zod11.z.nullable(import_zod11.z.string()),
|
|
899
|
+
positionAddress: import_zod11.z.nullable(import_zod11.z.string()),
|
|
900
|
+
slot: import_zod11.z.coerce.bigint(),
|
|
901
|
+
ts: import_zod11.z.coerce.date()
|
|
922
902
|
});
|
|
923
|
-
var StakingTreasury =
|
|
924
|
-
address:
|
|
925
|
-
stakedTokenMint:
|
|
926
|
-
rewardTokenMint:
|
|
927
|
-
apy:
|
|
928
|
-
uniqueStakers:
|
|
903
|
+
var StakingTreasury = import_zod11.z.object({
|
|
904
|
+
address: import_zod11.z.string(),
|
|
905
|
+
stakedTokenMint: import_zod11.z.string(),
|
|
906
|
+
rewardTokenMint: import_zod11.z.string(),
|
|
907
|
+
apy: import_zod11.z.number(),
|
|
908
|
+
uniqueStakers: import_zod11.z.number(),
|
|
929
909
|
totalStaked: AmountWithUsdSchema,
|
|
930
910
|
totalReward: AmountWithUsdSchema,
|
|
931
|
-
unstakeCooldownSeconds:
|
|
932
|
-
isStakingEnabled:
|
|
933
|
-
isUnstakingEnabled:
|
|
934
|
-
isWithdrawEnabled:
|
|
911
|
+
unstakeCooldownSeconds: import_zod11.z.number(),
|
|
912
|
+
isStakingEnabled: import_zod11.z.boolean(),
|
|
913
|
+
isUnstakingEnabled: import_zod11.z.boolean(),
|
|
914
|
+
isWithdrawEnabled: import_zod11.z.boolean()
|
|
935
915
|
});
|
|
936
|
-
var StakingPosition =
|
|
937
|
-
address:
|
|
938
|
-
owner:
|
|
916
|
+
var StakingPosition = import_zod11.z.object({
|
|
917
|
+
address: import_zod11.z.string(),
|
|
918
|
+
owner: import_zod11.z.string(),
|
|
939
919
|
staked: AmountWithUsdSchema,
|
|
940
920
|
unstaked: AmountWithUsdSchema,
|
|
941
921
|
claimedReward: AmountWithUsdSchema,
|
|
942
922
|
unclaimedReward: AmountWithUsdSchema,
|
|
943
|
-
rank:
|
|
944
|
-
vesting:
|
|
923
|
+
rank: import_zod11.z.nullable(import_zod11.z.number()),
|
|
924
|
+
vesting: import_zod11.z.object({
|
|
945
925
|
locked: AmountWithUsdSchema,
|
|
946
926
|
unlocked: AmountWithUsdSchema,
|
|
947
|
-
unlockRate:
|
|
948
|
-
unlockEverySeconds:
|
|
949
|
-
unlockCliffSeconds:
|
|
950
|
-
lockedAt:
|
|
927
|
+
unlockRate: import_zod11.z.coerce.bigint(),
|
|
928
|
+
unlockEverySeconds: import_zod11.z.number(),
|
|
929
|
+
unlockCliffSeconds: import_zod11.z.number(),
|
|
930
|
+
lockedAt: import_zod11.z.nullable(import_zod11.z.coerce.date())
|
|
951
931
|
}),
|
|
952
|
-
lastUnstakedAt:
|
|
953
|
-
withdrawAvailableAt:
|
|
932
|
+
lastUnstakedAt: import_zod11.z.nullable(import_zod11.z.coerce.date()),
|
|
933
|
+
withdrawAvailableAt: import_zod11.z.nullable(import_zod11.z.coerce.date())
|
|
954
934
|
});
|
|
955
|
-
var StakingLeaderboardPosition =
|
|
956
|
-
rank:
|
|
957
|
-
address:
|
|
958
|
-
owner:
|
|
935
|
+
var StakingLeaderboardPosition = import_zod11.z.object({
|
|
936
|
+
rank: import_zod11.z.number(),
|
|
937
|
+
address: import_zod11.z.string(),
|
|
938
|
+
owner: import_zod11.z.string(),
|
|
959
939
|
staked: AmountWithUsdSchema
|
|
960
940
|
});
|
|
961
|
-
var StakingLeaderboardPage =
|
|
941
|
+
var StakingLeaderboardPage = import_zod11.z.object({
|
|
962
942
|
data: StakingLeaderboardPosition.array(),
|
|
963
943
|
meta: PaginationMeta
|
|
964
944
|
});
|
|
965
|
-
var StakingPositionHistoryAction =
|
|
966
|
-
position:
|
|
945
|
+
var StakingPositionHistoryAction = import_zod11.z.object({
|
|
946
|
+
position: import_zod11.z.string(),
|
|
967
947
|
action: StakingPositionHistoryActionTypeSchema,
|
|
968
|
-
txSignature:
|
|
969
|
-
amount:
|
|
970
|
-
time:
|
|
948
|
+
txSignature: import_zod11.z.string(),
|
|
949
|
+
amount: import_zod11.z.coerce.bigint(),
|
|
950
|
+
time: import_zod11.z.coerce.date()
|
|
971
951
|
});
|
|
972
|
-
var PoolPriceCandle =
|
|
973
|
-
time:
|
|
974
|
-
open:
|
|
975
|
-
close:
|
|
976
|
-
high:
|
|
977
|
-
low:
|
|
978
|
-
volume:
|
|
952
|
+
var PoolPriceCandle = import_zod11.z.object({
|
|
953
|
+
time: import_zod11.z.number(),
|
|
954
|
+
open: import_zod11.z.number(),
|
|
955
|
+
close: import_zod11.z.number(),
|
|
956
|
+
high: import_zod11.z.number(),
|
|
957
|
+
low: import_zod11.z.number(),
|
|
958
|
+
volume: import_zod11.z.number()
|
|
979
959
|
});
|
|
980
|
-
var FeesStatsGroup =
|
|
981
|
-
time:
|
|
982
|
-
addLiquidityFees:
|
|
983
|
-
limitOrderFees:
|
|
984
|
-
yieldCompoundingFees:
|
|
985
|
-
liquidationFees:
|
|
986
|
-
totalLiquidationsNetworkFees:
|
|
987
|
-
totalLimitOrdersNetworkFees:
|
|
988
|
-
totalYieldCompoundingNetworkFees:
|
|
989
|
-
failedNetworkFees:
|
|
990
|
-
processedNetworkFees:
|
|
991
|
-
totalCollectedFees:
|
|
992
|
-
totalNetworkFees:
|
|
993
|
-
jitoLiquidationFees:
|
|
994
|
-
jitoLimitOrderFees:
|
|
995
|
-
jitoYieldCompoundingFees:
|
|
996
|
-
runningAddLiquidityFees:
|
|
997
|
-
runningLimitOrderFees:
|
|
998
|
-
runningYieldCompoundingFees:
|
|
999
|
-
runningLiquidationFees:
|
|
1000
|
-
runningTotalLiquidationsNetworkFees:
|
|
1001
|
-
runningTotalLimitOrdersNetworkFees:
|
|
1002
|
-
runningTotalYieldCompoundingNetworkFees:
|
|
1003
|
-
runningFailedNetworkFees:
|
|
1004
|
-
runningProcessedNetworkFees:
|
|
1005
|
-
runningJitoLiquidationFees:
|
|
1006
|
-
runningJitoLimitOrderFees:
|
|
1007
|
-
runningJitoYieldCompoundingFees:
|
|
1008
|
-
runningTotalCollectedFees:
|
|
1009
|
-
runningTotalNetworkFees:
|
|
960
|
+
var FeesStatsGroup = import_zod11.z.object({
|
|
961
|
+
time: import_zod11.z.coerce.date(),
|
|
962
|
+
addLiquidityFees: import_zod11.z.number(),
|
|
963
|
+
limitOrderFees: import_zod11.z.number(),
|
|
964
|
+
yieldCompoundingFees: import_zod11.z.number(),
|
|
965
|
+
liquidationFees: import_zod11.z.number(),
|
|
966
|
+
totalLiquidationsNetworkFees: import_zod11.z.number(),
|
|
967
|
+
totalLimitOrdersNetworkFees: import_zod11.z.number(),
|
|
968
|
+
totalYieldCompoundingNetworkFees: import_zod11.z.number(),
|
|
969
|
+
failedNetworkFees: import_zod11.z.number(),
|
|
970
|
+
processedNetworkFees: import_zod11.z.number(),
|
|
971
|
+
totalCollectedFees: import_zod11.z.number(),
|
|
972
|
+
totalNetworkFees: import_zod11.z.number(),
|
|
973
|
+
jitoLiquidationFees: import_zod11.z.number(),
|
|
974
|
+
jitoLimitOrderFees: import_zod11.z.number(),
|
|
975
|
+
jitoYieldCompoundingFees: import_zod11.z.number(),
|
|
976
|
+
runningAddLiquidityFees: import_zod11.z.number(),
|
|
977
|
+
runningLimitOrderFees: import_zod11.z.number(),
|
|
978
|
+
runningYieldCompoundingFees: import_zod11.z.number(),
|
|
979
|
+
runningLiquidationFees: import_zod11.z.number(),
|
|
980
|
+
runningTotalLiquidationsNetworkFees: import_zod11.z.number(),
|
|
981
|
+
runningTotalLimitOrdersNetworkFees: import_zod11.z.number(),
|
|
982
|
+
runningTotalYieldCompoundingNetworkFees: import_zod11.z.number(),
|
|
983
|
+
runningFailedNetworkFees: import_zod11.z.number(),
|
|
984
|
+
runningProcessedNetworkFees: import_zod11.z.number(),
|
|
985
|
+
runningJitoLiquidationFees: import_zod11.z.number(),
|
|
986
|
+
runningJitoLimitOrderFees: import_zod11.z.number(),
|
|
987
|
+
runningJitoYieldCompoundingFees: import_zod11.z.number(),
|
|
988
|
+
runningTotalCollectedFees: import_zod11.z.number(),
|
|
989
|
+
runningTotalNetworkFees: import_zod11.z.number()
|
|
1010
990
|
});
|
|
1011
|
-
var StakingRevenueStatsGroup =
|
|
1012
|
-
time:
|
|
1013
|
-
totalDepositsUsd:
|
|
1014
|
-
totalDepositsSol:
|
|
1015
|
-
runningTotalDepositsUsd:
|
|
1016
|
-
runningTotalDepositsSol:
|
|
991
|
+
var StakingRevenueStatsGroup = import_zod11.z.object({
|
|
992
|
+
time: import_zod11.z.coerce.date(),
|
|
993
|
+
totalDepositsUsd: import_zod11.z.number(),
|
|
994
|
+
totalDepositsSol: import_zod11.z.coerce.bigint(),
|
|
995
|
+
runningTotalDepositsUsd: import_zod11.z.number(),
|
|
996
|
+
runningTotalDepositsSol: import_zod11.z.coerce.bigint()
|
|
1017
997
|
});
|
|
1018
|
-
var SwapQuoteByInput =
|
|
1019
|
-
estimatedAmountOut:
|
|
1020
|
-
minAmountOut:
|
|
1021
|
-
feeAmount:
|
|
1022
|
-
feeUsd:
|
|
998
|
+
var SwapQuoteByInput = import_zod11.z.object({
|
|
999
|
+
estimatedAmountOut: import_zod11.z.coerce.bigint(),
|
|
1000
|
+
minAmountOut: import_zod11.z.coerce.bigint(),
|
|
1001
|
+
feeAmount: import_zod11.z.coerce.bigint(),
|
|
1002
|
+
feeUsd: import_zod11.z.number(),
|
|
1023
1003
|
/** Price impact in percents */
|
|
1024
|
-
priceImpact:
|
|
1004
|
+
priceImpact: import_zod11.z.number()
|
|
1025
1005
|
});
|
|
1026
|
-
var SwapQuoteByOutput =
|
|
1027
|
-
estimatedAmountIn:
|
|
1028
|
-
maxAmountIn:
|
|
1029
|
-
feeAmount:
|
|
1030
|
-
feeUsd:
|
|
1006
|
+
var SwapQuoteByOutput = import_zod11.z.object({
|
|
1007
|
+
estimatedAmountIn: import_zod11.z.coerce.bigint(),
|
|
1008
|
+
maxAmountIn: import_zod11.z.coerce.bigint(),
|
|
1009
|
+
feeAmount: import_zod11.z.coerce.bigint(),
|
|
1010
|
+
feeUsd: import_zod11.z.number(),
|
|
1031
1011
|
/** Price impact in percents */
|
|
1032
|
-
priceImpact:
|
|
1012
|
+
priceImpact: import_zod11.z.number()
|
|
1033
1013
|
});
|
|
1034
|
-
var LimitOrderQuoteByInput =
|
|
1035
|
-
amountOut:
|
|
1014
|
+
var LimitOrderQuoteByInput = import_zod11.z.object({
|
|
1015
|
+
amountOut: import_zod11.z.coerce.bigint()
|
|
1036
1016
|
});
|
|
1037
|
-
var LimitOrderQuoteByOutput =
|
|
1038
|
-
amountIn:
|
|
1017
|
+
var LimitOrderQuoteByOutput = import_zod11.z.object({
|
|
1018
|
+
amountIn: import_zod11.z.coerce.bigint()
|
|
1039
1019
|
});
|
|
1040
1020
|
var TradableAmount = AmountWithUsdSchema;
|
|
1041
|
-
var UpdateStreamSubscriptionResult =
|
|
1042
|
-
status:
|
|
1021
|
+
var UpdateStreamSubscriptionResult = import_zod11.z.object({
|
|
1022
|
+
status: import_zod11.z.string()
|
|
1043
1023
|
});
|
|
1044
|
-
var createNotificationSchema = (dataSchema, metaSchema) =>
|
|
1024
|
+
var createNotificationSchema = (dataSchema, metaSchema) => import_zod11.z.object({
|
|
1045
1025
|
entity: NotificationEntitySchema,
|
|
1046
1026
|
action: NotificationActionSchema,
|
|
1047
1027
|
data: dataSchema,
|
|
1048
|
-
id:
|
|
1049
|
-
authority:
|
|
1050
|
-
...metaSchema ? { meta: metaSchema } : { meta:
|
|
1028
|
+
id: import_zod11.z.string(),
|
|
1029
|
+
authority: import_zod11.z.nullish(import_zod11.z.string()),
|
|
1030
|
+
...metaSchema ? { meta: metaSchema } : { meta: import_zod11.z.undefined().nullable() }
|
|
1051
1031
|
});
|
|
1052
1032
|
var PoolSwapNotification = createNotificationSchema(PoolSwap);
|
|
1053
1033
|
var LendingPositionNotification = createNotificationSchema(LendingPosition);
|