@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.mjs
CHANGED
|
@@ -53,7 +53,6 @@ __export(schemas_exports, {
|
|
|
53
53
|
PoolPriceCandle: () => PoolPriceCandle,
|
|
54
54
|
PoolProvider: () => PoolProvider,
|
|
55
55
|
PoolProviderSchema: () => PoolProviderSchema,
|
|
56
|
-
PoolSnapshot: () => PoolSnapshot,
|
|
57
56
|
PoolSubscriptionTopic: () => PoolSubscriptionTopic,
|
|
58
57
|
PoolSubscriptionTopicSchema: () => PoolSubscriptionTopicSchema,
|
|
59
58
|
PoolSwap: () => PoolSwap,
|
|
@@ -102,7 +101,6 @@ __export(schemas_exports, {
|
|
|
102
101
|
TunaLpPositionTransfer: () => TunaLpPositionTransfer,
|
|
103
102
|
TunaLpPositionValue: () => TunaLpPositionValue,
|
|
104
103
|
TunaPositionLegacy: () => TunaPositionLegacy,
|
|
105
|
-
TunaPositionPoolSchema: () => TunaPositionPoolSchema,
|
|
106
104
|
TunaPositionPoolToken: () => TunaPositionPoolToken,
|
|
107
105
|
TunaPositionPoolTokenSchema: () => TunaPositionPoolTokenSchema,
|
|
108
106
|
TunaPositionState: () => TunaPositionState,
|
|
@@ -118,7 +116,7 @@ __export(schemas_exports, {
|
|
|
118
116
|
WalletSubscriptionTopic: () => WalletSubscriptionTopic,
|
|
119
117
|
WalletSubscriptionTopicSchema: () => WalletSubscriptionTopicSchema
|
|
120
118
|
});
|
|
121
|
-
import { z as
|
|
119
|
+
import { z as z11 } from "zod";
|
|
122
120
|
|
|
123
121
|
// src/client/schemas/basic.ts
|
|
124
122
|
import { z } from "zod";
|
|
@@ -139,67 +137,60 @@ var UsdPnlSchema = z.object({
|
|
|
139
137
|
});
|
|
140
138
|
|
|
141
139
|
// src/client/schemas/pool.ts
|
|
142
|
-
import
|
|
140
|
+
import z3 from "zod";
|
|
141
|
+
|
|
142
|
+
// src/client/schemas/mint.ts
|
|
143
|
+
import { z as z2 } from "zod";
|
|
144
|
+
var Mint = z2.object({
|
|
145
|
+
address: z2.string(),
|
|
146
|
+
symbol: z2.string(),
|
|
147
|
+
name: z2.string(),
|
|
148
|
+
logo: z2.string(),
|
|
149
|
+
decimals: z2.number()
|
|
150
|
+
});
|
|
151
|
+
|
|
152
|
+
// src/client/schemas/pool.ts
|
|
143
153
|
var PoolProvider = {
|
|
144
154
|
ORCA: "orca",
|
|
145
155
|
FUSION: "fusion"
|
|
146
156
|
};
|
|
147
|
-
var PoolProviderSchema =
|
|
148
|
-
var Pool =
|
|
149
|
-
address:
|
|
157
|
+
var PoolProviderSchema = z3.enum([PoolProvider.ORCA, ...Object.values(PoolProvider)]);
|
|
158
|
+
var Pool = z3.object({
|
|
159
|
+
address: z3.string(),
|
|
150
160
|
provider: PoolProviderSchema,
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
tokenAVault:
|
|
154
|
-
tokenBVault:
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
161
|
+
mintA: Mint,
|
|
162
|
+
mintB: Mint,
|
|
163
|
+
tokenAVault: z3.string(),
|
|
164
|
+
tokenBVault: z3.string(),
|
|
165
|
+
tickSpacing: z3.number(),
|
|
166
|
+
feeRate: z3.number(),
|
|
167
|
+
protocolFeeRate: z3.number(),
|
|
168
|
+
olpFeeRate: z3.nullable(z3.number()),
|
|
169
|
+
liquidity: z3.coerce.bigint(),
|
|
170
|
+
sqrtPrice: z3.coerce.bigint(),
|
|
171
|
+
price: z3.number(),
|
|
172
|
+
tickCurrentIndex: z3.number(),
|
|
173
|
+
stats: z3.optional(
|
|
174
|
+
z3.nullable(
|
|
175
|
+
z3.object({
|
|
176
|
+
tvlUsd: z3.coerce.number(),
|
|
177
|
+
groups: z3.object({
|
|
178
|
+
"24h": z3.object({
|
|
179
|
+
volumeUsd: z3.number(),
|
|
180
|
+
feesUsd: z3.number(),
|
|
181
|
+
priceChange: z3.number()
|
|
182
|
+
})
|
|
183
|
+
})
|
|
184
|
+
})
|
|
185
|
+
)
|
|
186
|
+
)
|
|
171
187
|
});
|
|
172
188
|
|
|
173
189
|
// src/client/schemas/state_snapshot.ts
|
|
174
|
-
import
|
|
175
|
-
|
|
176
|
-
// src/client/schemas/limit_orders.ts
|
|
177
|
-
import { z as z5 } from "zod";
|
|
178
|
-
|
|
179
|
-
// src/client/schemas/mint.ts
|
|
180
|
-
import { z as z3 } from "zod";
|
|
181
|
-
var Mint = z3.object({
|
|
182
|
-
mint: z3.string(),
|
|
183
|
-
symbol: z3.string(),
|
|
184
|
-
name: z3.string(),
|
|
185
|
-
logo: z3.string(),
|
|
186
|
-
decimals: z3.number()
|
|
187
|
-
});
|
|
188
|
-
|
|
189
|
-
// src/client/schemas/positions_shared.ts
|
|
190
|
-
import z4 from "zod";
|
|
191
|
-
var TunaPositionPoolSchema = z4.object({
|
|
192
|
-
addr: z4.string(),
|
|
193
|
-
price: z4.number(),
|
|
194
|
-
tickSpacing: z4.number()
|
|
195
|
-
});
|
|
196
|
-
var TunaPositionPoolToken = {
|
|
197
|
-
A: "a",
|
|
198
|
-
B: "b"
|
|
199
|
-
};
|
|
200
|
-
var TunaPositionPoolTokenSchema = z4.enum(Object.values(TunaPositionPoolToken));
|
|
190
|
+
import z10 from "zod";
|
|
201
191
|
|
|
202
192
|
// src/client/schemas/limit_orders.ts
|
|
193
|
+
import { z as z4 } from "zod";
|
|
203
194
|
var LimitOrderState = {
|
|
204
195
|
OPEN: "open",
|
|
205
196
|
PARTIALLY_FILLED: "partially_filled",
|
|
@@ -207,28 +198,36 @@ var LimitOrderState = {
|
|
|
207
198
|
COMPLETE: "complete",
|
|
208
199
|
CANCELLED: "cancelled"
|
|
209
200
|
};
|
|
210
|
-
var LimitOrderStateSchema =
|
|
211
|
-
var LimitOrder =
|
|
212
|
-
address:
|
|
213
|
-
orderMint:
|
|
214
|
-
authority:
|
|
215
|
-
|
|
216
|
-
mintB: Mint,
|
|
217
|
-
pool: TunaPositionPoolSchema,
|
|
201
|
+
var LimitOrderStateSchema = z4.enum([LimitOrderState.OPEN, ...Object.values(LimitOrderState)]);
|
|
202
|
+
var LimitOrder = z4.object({
|
|
203
|
+
address: z4.string(),
|
|
204
|
+
orderMint: z4.string(),
|
|
205
|
+
authority: z4.string(),
|
|
206
|
+
pool: Pool,
|
|
218
207
|
state: LimitOrderStateSchema,
|
|
219
|
-
aToB:
|
|
220
|
-
tickIndex:
|
|
221
|
-
fillRatio:
|
|
222
|
-
openTxSignature:
|
|
223
|
-
closeTxSignature:
|
|
208
|
+
aToB: z4.boolean(),
|
|
209
|
+
tickIndex: z4.number(),
|
|
210
|
+
fillRatio: z4.number(),
|
|
211
|
+
openTxSignature: z4.string(),
|
|
212
|
+
closeTxSignature: z4.nullable(z4.string()),
|
|
224
213
|
amountIn: AmountWithUsdSchema,
|
|
225
214
|
amountOut: AmountWithUsdSchema,
|
|
226
|
-
openedAt:
|
|
227
|
-
closedAt:
|
|
215
|
+
openedAt: z4.coerce.date(),
|
|
216
|
+
closedAt: z4.nullable(z4.coerce.date())
|
|
228
217
|
});
|
|
229
218
|
|
|
230
219
|
// src/client/schemas/lp_positions.ts
|
|
231
220
|
import z6 from "zod";
|
|
221
|
+
|
|
222
|
+
// src/client/schemas/positions_shared.ts
|
|
223
|
+
import z5 from "zod";
|
|
224
|
+
var TunaPositionPoolToken = {
|
|
225
|
+
A: "a",
|
|
226
|
+
B: "b"
|
|
227
|
+
};
|
|
228
|
+
var TunaPositionPoolTokenSchema = z5.enum(Object.values(TunaPositionPoolToken));
|
|
229
|
+
|
|
230
|
+
// src/client/schemas/lp_positions.ts
|
|
232
231
|
var LpPositionLimitOrderSwap = {
|
|
233
232
|
NO_SWAP: "no_swap",
|
|
234
233
|
SWAP_TO_TOKEN_A: "swap_to_token_a",
|
|
@@ -300,9 +299,7 @@ var TunaLpPositionDtoSchema = z6.object({
|
|
|
300
299
|
upperLimitOrderPrice: z6.number(),
|
|
301
300
|
entryPrice: z6.number(),
|
|
302
301
|
flags: TunaLpPositionFlagsSchema,
|
|
303
|
-
|
|
304
|
-
mintB: Mint,
|
|
305
|
-
pool: TunaPositionPoolSchema,
|
|
302
|
+
pool: Pool,
|
|
306
303
|
marketMaker: PoolProviderSchema,
|
|
307
304
|
depositedCollateralA: AmountWithUsdSchema,
|
|
308
305
|
depositedCollateralB: AmountWithUsdSchema,
|
|
@@ -514,47 +511,69 @@ var TunaLpPositionAction = z6.object({
|
|
|
514
511
|
})
|
|
515
512
|
});
|
|
516
513
|
|
|
514
|
+
// src/client/schemas/market.ts
|
|
515
|
+
import { z as z7 } from "zod";
|
|
516
|
+
var Market = z7.object({
|
|
517
|
+
address: z7.string(),
|
|
518
|
+
addressLookupTable: z7.string(),
|
|
519
|
+
maxLeverage: z7.number(),
|
|
520
|
+
maxSwapSlippage: z7.number(),
|
|
521
|
+
protocolFee: z7.number(),
|
|
522
|
+
protocolFeeOnCollateral: z7.number(),
|
|
523
|
+
liquidationFee: z7.number(),
|
|
524
|
+
liquidationThreshold: z7.number(),
|
|
525
|
+
oraclePriceDeviationThreshold: z7.number(),
|
|
526
|
+
rebalanceProtocolFee: z7.number(),
|
|
527
|
+
borrowedFundsA: AmountWithUsdSchema,
|
|
528
|
+
borrowedFundsB: AmountWithUsdSchema,
|
|
529
|
+
borrowLimitA: AmountWithUsdSchema,
|
|
530
|
+
borrowLimitB: AmountWithUsdSchema,
|
|
531
|
+
maxSpotPositionSizeA: AmountWithUsdSchema,
|
|
532
|
+
maxSpotPositionSizeB: AmountWithUsdSchema,
|
|
533
|
+
pool: Pool,
|
|
534
|
+
disabled: z7.boolean(),
|
|
535
|
+
createdAt: z7.coerce.date()
|
|
536
|
+
});
|
|
537
|
+
|
|
517
538
|
// src/client/schemas/order_book.ts
|
|
518
|
-
import
|
|
519
|
-
var OrderBookEntry =
|
|
520
|
-
concentratedAmount:
|
|
521
|
-
concentratedAmountQuote:
|
|
522
|
-
concentratedTotal:
|
|
523
|
-
concentratedTotalQuote:
|
|
524
|
-
limitAmount:
|
|
525
|
-
limitAmountQuote:
|
|
526
|
-
limitTotal:
|
|
527
|
-
limitTotalQuote:
|
|
528
|
-
price:
|
|
529
|
-
askSide:
|
|
539
|
+
import z8 from "zod";
|
|
540
|
+
var OrderBookEntry = z8.object({
|
|
541
|
+
concentratedAmount: z8.coerce.bigint(),
|
|
542
|
+
concentratedAmountQuote: z8.coerce.bigint(),
|
|
543
|
+
concentratedTotal: z8.coerce.bigint(),
|
|
544
|
+
concentratedTotalQuote: z8.coerce.bigint(),
|
|
545
|
+
limitAmount: z8.coerce.bigint(),
|
|
546
|
+
limitAmountQuote: z8.coerce.bigint(),
|
|
547
|
+
limitTotal: z8.coerce.bigint(),
|
|
548
|
+
limitTotalQuote: z8.coerce.bigint(),
|
|
549
|
+
price: z8.number(),
|
|
550
|
+
askSide: z8.boolean()
|
|
530
551
|
});
|
|
531
|
-
var OrderBook =
|
|
552
|
+
var OrderBook = z8.object({
|
|
532
553
|
entries: OrderBookEntry.array(),
|
|
533
|
-
poolPrice:
|
|
534
|
-
poolAddress:
|
|
554
|
+
poolPrice: z8.number(),
|
|
555
|
+
poolAddress: z8.string()
|
|
535
556
|
});
|
|
536
557
|
|
|
537
558
|
// src/client/schemas/spot_positions.ts
|
|
538
|
-
import { z as
|
|
559
|
+
import { z as z9 } from "zod";
|
|
539
560
|
var TunaSpotPositionState = {
|
|
540
561
|
OPEN: "open",
|
|
541
562
|
CLOSED: "closed"
|
|
542
563
|
};
|
|
543
|
-
var TunaSpotPositionStateSchema =
|
|
564
|
+
var TunaSpotPositionStateSchema = z9.enum([
|
|
544
565
|
TunaSpotPositionState.OPEN,
|
|
545
566
|
...Object.values(TunaSpotPositionState)
|
|
546
567
|
]);
|
|
547
|
-
var TunaSpotPosition =
|
|
548
|
-
address:
|
|
549
|
-
authority:
|
|
550
|
-
version:
|
|
568
|
+
var TunaSpotPosition = z9.object({
|
|
569
|
+
address: z9.string(),
|
|
570
|
+
authority: z9.string(),
|
|
571
|
+
version: z9.number(),
|
|
551
572
|
state: TunaSpotPositionStateSchema,
|
|
552
|
-
lowerLimitOrderPrice:
|
|
553
|
-
upperLimitOrderPrice:
|
|
554
|
-
entryPrice:
|
|
555
|
-
|
|
556
|
-
mintB: Mint,
|
|
557
|
-
pool: TunaPositionPoolSchema,
|
|
573
|
+
lowerLimitOrderPrice: z9.number(),
|
|
574
|
+
upperLimitOrderPrice: z9.number(),
|
|
575
|
+
entryPrice: z9.number(),
|
|
576
|
+
pool: Pool,
|
|
558
577
|
positionToken: TunaPositionPoolTokenSchema,
|
|
559
578
|
collateralToken: TunaPositionPoolTokenSchema,
|
|
560
579
|
marketMaker: PoolProviderSchema,
|
|
@@ -562,97 +581,79 @@ var TunaSpotPosition = z8.object({
|
|
|
562
581
|
initialDebt: AmountWithUsdSchema,
|
|
563
582
|
currentDebt: AmountWithUsdSchema,
|
|
564
583
|
total: AmountWithUsdSchema,
|
|
565
|
-
leverage:
|
|
566
|
-
maxLeverage:
|
|
567
|
-
liquidationPrice:
|
|
584
|
+
leverage: z9.number(),
|
|
585
|
+
maxLeverage: z9.number(),
|
|
586
|
+
liquidationPrice: z9.number(),
|
|
568
587
|
pnlUsd: UsdPnlSchema,
|
|
569
|
-
openedAt:
|
|
570
|
-
closedAt:
|
|
588
|
+
openedAt: z9.coerce.date(),
|
|
589
|
+
closedAt: z9.nullable(z9.coerce.date())
|
|
571
590
|
});
|
|
572
|
-
var IncreaseSpotPositionQuote =
|
|
591
|
+
var IncreaseSpotPositionQuote = z9.object({
|
|
573
592
|
/** Required collateral amount */
|
|
574
|
-
collateralAmount:
|
|
593
|
+
collateralAmount: z9.coerce.bigint(),
|
|
575
594
|
/** Required amount to borrow */
|
|
576
|
-
borrowAmount:
|
|
595
|
+
borrowAmount: z9.coerce.bigint(),
|
|
577
596
|
/** Estimated position size in the position token. */
|
|
578
|
-
estimatedAmount:
|
|
597
|
+
estimatedAmount: z9.coerce.bigint(),
|
|
579
598
|
/** Swap input amount. */
|
|
580
|
-
swapInputAmount:
|
|
599
|
+
swapInputAmount: z9.coerce.bigint(),
|
|
581
600
|
/** Minimum swap output amount according to the provided slippage. */
|
|
582
|
-
minSwapOutputAmount:
|
|
601
|
+
minSwapOutputAmount: z9.coerce.bigint(),
|
|
583
602
|
/** Protocol fee in token A */
|
|
584
|
-
protocolFeeA:
|
|
603
|
+
protocolFeeA: z9.coerce.bigint(),
|
|
585
604
|
/** Protocol fee in token B */
|
|
586
|
-
protocolFeeB:
|
|
605
|
+
protocolFeeB: z9.coerce.bigint(),
|
|
587
606
|
/** Price impact in percents */
|
|
588
|
-
priceImpact:
|
|
607
|
+
priceImpact: z9.number(),
|
|
589
608
|
/** Liquidation price */
|
|
590
|
-
liquidationPrice:
|
|
609
|
+
liquidationPrice: z9.number()
|
|
591
610
|
});
|
|
592
|
-
var DecreaseSpotPositionQuote =
|
|
611
|
+
var DecreaseSpotPositionQuote = z9.object({
|
|
593
612
|
/** Confirmed position decrease percentage (100% = 1.0) */
|
|
594
|
-
decreasePercent:
|
|
613
|
+
decreasePercent: z9.number(),
|
|
595
614
|
/** The maximum acceptable swap input amount for position decrease according to the provided slippage
|
|
596
615
|
* (if collateral_token == position_token) OR the minimum swap output amount (if collateral_token != position_token).
|
|
597
616
|
*/
|
|
598
|
-
requiredSwapAmount:
|
|
617
|
+
requiredSwapAmount: z9.coerce.bigint(),
|
|
599
618
|
/** Estimated total amount of the adjusted position */
|
|
600
|
-
estimatedAmount:
|
|
619
|
+
estimatedAmount: z9.coerce.bigint(),
|
|
601
620
|
/** Estimated amount of the withdrawn collateral */
|
|
602
|
-
estimatedWithdrawnCollateral:
|
|
621
|
+
estimatedWithdrawnCollateral: z9.coerce.bigint(),
|
|
603
622
|
/** Price impact in percents */
|
|
604
|
-
priceImpact:
|
|
623
|
+
priceImpact: z9.number(),
|
|
605
624
|
/** Liquidation price */
|
|
606
|
-
liquidationPrice:
|
|
625
|
+
liquidationPrice: z9.number()
|
|
607
626
|
});
|
|
608
|
-
var CloseSpotPositionQuote =
|
|
627
|
+
var CloseSpotPositionQuote = z9.object({
|
|
609
628
|
/** Position decrease percentage */
|
|
610
|
-
decreasePercent:
|
|
629
|
+
decreasePercent: z9.number(),
|
|
611
630
|
/** The maximum acceptable swap input amount for position decrease according to the provided slippage
|
|
612
631
|
* (if collateral_token == position_token) OR the minimum swap output amount (if collateral_token != position_token).
|
|
613
632
|
*/
|
|
614
|
-
requiredSwapAmount:
|
|
633
|
+
requiredSwapAmount: z9.coerce.bigint(),
|
|
615
634
|
/** Estimated amount of the withdrawn collateral */
|
|
616
|
-
estimatedWithdrawnCollateral:
|
|
635
|
+
estimatedWithdrawnCollateral: z9.coerce.bigint(),
|
|
617
636
|
/** Price impact in percents */
|
|
618
|
-
priceImpact:
|
|
637
|
+
priceImpact: z9.number()
|
|
619
638
|
});
|
|
620
639
|
|
|
621
640
|
// src/client/schemas/state_snapshot.ts
|
|
622
|
-
var
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
fees24H: z9.number(),
|
|
631
|
-
borrowedFundsA: AmountWithUsdSchema,
|
|
632
|
-
borrowedFundsB: AmountWithUsdSchema,
|
|
633
|
-
borrowLimitA: AmountWithUsdSchema,
|
|
634
|
-
borrowLimitB: AmountWithUsdSchema
|
|
635
|
-
});
|
|
636
|
-
var StateSnapshot = z9.object({
|
|
637
|
-
slot: z9.coerce.bigint(),
|
|
638
|
-
blockTime: z9.coerce.date(),
|
|
639
|
-
pools: z9.optional(z9.record(z9.string(), PoolSnapshot)),
|
|
640
|
-
tunaSpotPositions: z9.optional(z9.array(TunaSpotPosition)),
|
|
641
|
-
tunaLpPositions: z9.optional(z9.array(TunaLpPositionDtoSchema)),
|
|
642
|
-
fusionLimitOrders: z9.optional(z9.array(LimitOrder)),
|
|
643
|
-
orderBooks: z9.optional(z9.record(z9.string(), OrderBook))
|
|
641
|
+
var StateSnapshot = z10.object({
|
|
642
|
+
slot: z10.coerce.bigint(),
|
|
643
|
+
blockTime: z10.coerce.date(),
|
|
644
|
+
markets: z10.optional(z10.array(Market)),
|
|
645
|
+
tunaSpotPositions: z10.optional(z10.array(TunaSpotPosition)),
|
|
646
|
+
tunaLpPositions: z10.optional(z10.array(TunaLpPositionDtoSchema)),
|
|
647
|
+
fusionLimitOrders: z10.optional(z10.array(LimitOrder)),
|
|
648
|
+
orderBooks: z10.optional(z10.array(OrderBook))
|
|
644
649
|
});
|
|
645
650
|
|
|
646
651
|
// src/client/schemas.ts
|
|
647
652
|
var NotificationEntity = {
|
|
648
653
|
POOL_SWAP: "pool_swap",
|
|
649
|
-
POOL_PRICE: "pool_price",
|
|
650
|
-
ORDER_BOOK: "order_book",
|
|
651
|
-
TUNA_POSITION: "tuna_position",
|
|
652
|
-
TUNA_SPOT_POSITION: "tuna_spot_position",
|
|
653
654
|
LENDING_POSITION: "lending_position",
|
|
654
655
|
STAKING_POSITION: "staking_position",
|
|
655
|
-
|
|
656
|
+
MARKET: "market",
|
|
656
657
|
TRADE_HISTORY_ENTRY: "trade_history_entry",
|
|
657
658
|
ORDER_HISTORY_ENTRY: "order_history_entry",
|
|
658
659
|
STATE_SNAPSHOT: "state_snapshot"
|
|
@@ -720,81 +721,60 @@ var WalletSubscriptionTopic = {
|
|
|
720
721
|
TRADE_HISTORY: "trade_history",
|
|
721
722
|
ORDER_HISTORY: "order_history"
|
|
722
723
|
};
|
|
723
|
-
var NotificationEntitySchema =
|
|
724
|
-
var NotificationActionSchema =
|
|
725
|
-
var TradeHistoryActionSchema =
|
|
726
|
-
var TradeHistoryUIDirectionSchema =
|
|
724
|
+
var NotificationEntitySchema = z11.enum([NotificationEntity.POOL_SWAP, ...Object.values(NotificationEntity)]);
|
|
725
|
+
var NotificationActionSchema = z11.enum([NotificationAction.CREATE, ...Object.values(NotificationAction)]);
|
|
726
|
+
var TradeHistoryActionSchema = z11.enum([TradeHistoryAction.SWAP, ...Object.values(TradeHistoryAction)]);
|
|
727
|
+
var TradeHistoryUIDirectionSchema = z11.enum([
|
|
727
728
|
TradeHistoryUIDirection.BUY,
|
|
728
729
|
...Object.values(TradeHistoryUIDirection)
|
|
729
730
|
]);
|
|
730
|
-
var OrderHistoryOrderTypeSchema =
|
|
731
|
+
var OrderHistoryOrderTypeSchema = z11.enum([
|
|
731
732
|
OrderHistoryOrderType.MARKET,
|
|
732
733
|
...Object.values(OrderHistoryOrderType)
|
|
733
734
|
]);
|
|
734
|
-
var OrderHistoryStatusSchema =
|
|
735
|
-
var OrderHistoryUIDirectionSchema =
|
|
735
|
+
var OrderHistoryStatusSchema = z11.enum([OrderHistoryStatus.OPEN, ...Object.values(OrderHistoryStatus)]);
|
|
736
|
+
var OrderHistoryUIDirectionSchema = z11.enum([
|
|
736
737
|
OrderHistoryUIDirection.BUY,
|
|
737
738
|
...Object.values(OrderHistoryUIDirection)
|
|
738
739
|
]);
|
|
739
|
-
var StakingPositionHistoryActionTypeSchema =
|
|
740
|
+
var StakingPositionHistoryActionTypeSchema = z11.enum([
|
|
740
741
|
StakingPositionHistoryActionType.STAKE,
|
|
741
742
|
...Object.values(StakingPositionHistoryActionType)
|
|
742
743
|
]);
|
|
743
|
-
var PoolSubscriptionTopicSchema =
|
|
744
|
+
var PoolSubscriptionTopicSchema = z11.enum([
|
|
744
745
|
PoolSubscriptionTopic.ORDER_BOOK,
|
|
745
746
|
...Object.values(PoolSubscriptionTopic)
|
|
746
747
|
]);
|
|
747
|
-
var WalletSubscriptionTopicSchema =
|
|
748
|
+
var WalletSubscriptionTopicSchema = z11.enum([
|
|
748
749
|
WalletSubscriptionTopic.TUNA_POSITIONS,
|
|
749
750
|
...Object.values(WalletSubscriptionTopic)
|
|
750
751
|
]);
|
|
751
|
-
var PaginationMeta =
|
|
752
|
-
total:
|
|
752
|
+
var PaginationMeta = z11.object({
|
|
753
|
+
total: z11.number()
|
|
753
754
|
});
|
|
754
|
-
var
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
protocolFee: z10.number(),
|
|
760
|
-
protocolFeeOnCollateral: z10.number(),
|
|
761
|
-
liquidationFee: z10.number(),
|
|
762
|
-
liquidationThreshold: z10.number(),
|
|
763
|
-
oraclePriceDeviationThreshold: z10.number(),
|
|
764
|
-
rebalanceProtocolFee: z10.number(),
|
|
765
|
-
borrowedFundsA: AmountWithUsdSchema,
|
|
766
|
-
borrowedFundsB: AmountWithUsdSchema,
|
|
767
|
-
borrowLimitA: AmountWithUsdSchema,
|
|
768
|
-
borrowLimitB: AmountWithUsdSchema,
|
|
769
|
-
maxSpotPositionSizeA: AmountWithUsdSchema,
|
|
770
|
-
maxSpotPositionSizeB: AmountWithUsdSchema,
|
|
771
|
-
pool: Pool,
|
|
772
|
-
disabled: z10.boolean(),
|
|
773
|
-
createdAt: z10.coerce.date()
|
|
774
|
-
});
|
|
775
|
-
var TokenOraclePrice = z10.object({
|
|
776
|
-
mint: z10.string(),
|
|
777
|
-
price: z10.coerce.bigint(),
|
|
778
|
-
decimals: z10.number(),
|
|
779
|
-
time: z10.coerce.date()
|
|
755
|
+
var TokenOraclePrice = z11.object({
|
|
756
|
+
mint: z11.string(),
|
|
757
|
+
price: z11.coerce.bigint(),
|
|
758
|
+
decimals: z11.number(),
|
|
759
|
+
time: z11.coerce.date()
|
|
780
760
|
});
|
|
781
|
-
var Vault =
|
|
782
|
-
address:
|
|
783
|
-
mint:
|
|
761
|
+
var Vault = z11.object({
|
|
762
|
+
address: z11.string(),
|
|
763
|
+
mint: z11.string(),
|
|
784
764
|
depositedFunds: AmountWithUsdSchema,
|
|
785
765
|
borrowedFunds: AmountWithUsdSchema,
|
|
786
766
|
supplyLimit: AmountWithUsdSchema,
|
|
787
|
-
borrowedShares:
|
|
788
|
-
depositedShares:
|
|
789
|
-
supplyApy:
|
|
790
|
-
borrowApy:
|
|
791
|
-
interestRate:
|
|
792
|
-
utilization:
|
|
793
|
-
pythOracleFeedId:
|
|
794
|
-
pythOraclePriceUpdate:
|
|
767
|
+
borrowedShares: z11.coerce.bigint(),
|
|
768
|
+
depositedShares: z11.coerce.bigint(),
|
|
769
|
+
supplyApy: z11.number(),
|
|
770
|
+
borrowApy: z11.number(),
|
|
771
|
+
interestRate: z11.coerce.bigint(),
|
|
772
|
+
utilization: z11.number(),
|
|
773
|
+
pythOracleFeedId: z11.string(),
|
|
774
|
+
pythOraclePriceUpdate: z11.string()
|
|
795
775
|
});
|
|
796
|
-
var VaultHistoricalStats =
|
|
797
|
-
date:
|
|
776
|
+
var VaultHistoricalStats = z11.object({
|
|
777
|
+
date: z11.preprocess((val, ctx) => {
|
|
798
778
|
if (typeof val === "string") {
|
|
799
779
|
const [year, month, day] = val.split("-").map(Number);
|
|
800
780
|
return new Date(year, month - 1, day);
|
|
@@ -803,214 +783,214 @@ var VaultHistoricalStats = z10.object({
|
|
|
803
783
|
code: "custom",
|
|
804
784
|
message: "Not a valid date string"
|
|
805
785
|
});
|
|
806
|
-
return
|
|
807
|
-
},
|
|
786
|
+
return z11.NEVER;
|
|
787
|
+
}, z11.date()),
|
|
808
788
|
supply: AmountWithUsdSchema,
|
|
809
789
|
borrow: AmountWithUsdSchema,
|
|
810
|
-
supplyApy:
|
|
811
|
-
borrowApr:
|
|
790
|
+
supplyApy: z11.number(),
|
|
791
|
+
borrowApr: z11.number()
|
|
812
792
|
});
|
|
813
|
-
var Tick =
|
|
814
|
-
index:
|
|
815
|
-
liquidity:
|
|
793
|
+
var Tick = z11.object({
|
|
794
|
+
index: z11.number(),
|
|
795
|
+
liquidity: z11.coerce.bigint()
|
|
816
796
|
});
|
|
817
|
-
var PoolTicks =
|
|
818
|
-
tickSpacing:
|
|
797
|
+
var PoolTicks = z11.object({
|
|
798
|
+
tickSpacing: z11.number(),
|
|
819
799
|
ticks: Tick.array()
|
|
820
800
|
});
|
|
821
|
-
var LendingPosition =
|
|
822
|
-
address:
|
|
823
|
-
authority:
|
|
824
|
-
mint:
|
|
825
|
-
vault:
|
|
826
|
-
shares:
|
|
801
|
+
var LendingPosition = z11.object({
|
|
802
|
+
address: z11.string(),
|
|
803
|
+
authority: z11.string(),
|
|
804
|
+
mint: z11.string(),
|
|
805
|
+
vault: z11.string(),
|
|
806
|
+
shares: z11.coerce.bigint(),
|
|
827
807
|
funds: AmountWithUsdSchema,
|
|
828
808
|
earned: AmountWithUsdSchema
|
|
829
809
|
});
|
|
830
|
-
var PoolSwap =
|
|
831
|
-
id:
|
|
832
|
-
amountIn:
|
|
833
|
-
amountOut:
|
|
834
|
-
amountUsd:
|
|
835
|
-
aToB:
|
|
836
|
-
pool:
|
|
837
|
-
time:
|
|
810
|
+
var PoolSwap = z11.object({
|
|
811
|
+
id: z11.string(),
|
|
812
|
+
amountIn: z11.coerce.bigint(),
|
|
813
|
+
amountOut: z11.coerce.bigint(),
|
|
814
|
+
amountUsd: z11.number(),
|
|
815
|
+
aToB: z11.boolean(),
|
|
816
|
+
pool: z11.string(),
|
|
817
|
+
time: z11.coerce.date()
|
|
838
818
|
});
|
|
839
|
-
var TradeHistoryEntry =
|
|
819
|
+
var TradeHistoryEntry = z11.object({
|
|
840
820
|
// Internal entry ID
|
|
841
|
-
id:
|
|
842
|
-
pool:
|
|
843
|
-
authority:
|
|
844
|
-
aToB:
|
|
821
|
+
id: z11.string(),
|
|
822
|
+
pool: Pool,
|
|
823
|
+
authority: z11.string(),
|
|
824
|
+
aToB: z11.boolean(),
|
|
845
825
|
// Trade action which created entry
|
|
846
826
|
action: TradeHistoryActionSchema,
|
|
847
827
|
// Trade direction formatted for ui display
|
|
848
828
|
uiDirection: TradeHistoryUIDirectionSchema,
|
|
849
829
|
// Trade price formatted for ui display
|
|
850
|
-
uiPrice:
|
|
830
|
+
uiPrice: z11.number(),
|
|
851
831
|
baseToken: AmountWithUsdSchema,
|
|
852
832
|
quoteToken: AmountWithUsdSchema,
|
|
853
833
|
fee: AmountWithUsdSchema,
|
|
854
|
-
pnl:
|
|
855
|
-
|
|
856
|
-
usd:
|
|
857
|
-
bps:
|
|
834
|
+
pnl: z11.nullable(
|
|
835
|
+
z11.object({
|
|
836
|
+
usd: z11.number(),
|
|
837
|
+
bps: z11.number()
|
|
858
838
|
})
|
|
859
839
|
),
|
|
860
|
-
txSignature:
|
|
861
|
-
positionAddress:
|
|
862
|
-
slot:
|
|
863
|
-
ts:
|
|
840
|
+
txSignature: z11.nullable(z11.string()),
|
|
841
|
+
positionAddress: z11.nullable(z11.string()),
|
|
842
|
+
slot: z11.coerce.bigint(),
|
|
843
|
+
ts: z11.coerce.date()
|
|
864
844
|
});
|
|
865
|
-
var OrderHistoryEntry =
|
|
845
|
+
var OrderHistoryEntry = z11.object({
|
|
866
846
|
// Internal entry ID
|
|
867
|
-
id:
|
|
868
|
-
pool:
|
|
869
|
-
authority:
|
|
847
|
+
id: z11.string(),
|
|
848
|
+
pool: Pool,
|
|
849
|
+
authority: z11.string(),
|
|
870
850
|
orderType: OrderHistoryOrderTypeSchema,
|
|
871
|
-
isReduceOnly:
|
|
872
|
-
aToB:
|
|
851
|
+
isReduceOnly: z11.nullable(z11.boolean()),
|
|
852
|
+
aToB: z11.boolean(),
|
|
873
853
|
uiDirection: OrderHistoryUIDirectionSchema,
|
|
874
|
-
uiPrice:
|
|
875
|
-
uiExecutionPrice:
|
|
854
|
+
uiPrice: z11.nullable(z11.number()),
|
|
855
|
+
uiExecutionPrice: z11.nullable(z11.number()),
|
|
876
856
|
status: OrderHistoryStatusSchema,
|
|
877
857
|
baseToken: AmountWithUsdSchema,
|
|
878
858
|
quoteToken: AmountWithUsdSchema,
|
|
879
|
-
baseTokenConsumedAmount:
|
|
880
|
-
quoteTokenFilledAmount:
|
|
881
|
-
txSignature:
|
|
882
|
-
positionAddress:
|
|
883
|
-
slot:
|
|
884
|
-
ts:
|
|
859
|
+
baseTokenConsumedAmount: z11.nullable(AmountWithUsdSchema),
|
|
860
|
+
quoteTokenFilledAmount: z11.nullable(AmountWithUsdSchema),
|
|
861
|
+
txSignature: z11.nullable(z11.string()),
|
|
862
|
+
positionAddress: z11.nullable(z11.string()),
|
|
863
|
+
slot: z11.coerce.bigint(),
|
|
864
|
+
ts: z11.coerce.date()
|
|
885
865
|
});
|
|
886
|
-
var StakingTreasury =
|
|
887
|
-
address:
|
|
888
|
-
stakedTokenMint:
|
|
889
|
-
rewardTokenMint:
|
|
890
|
-
apy:
|
|
891
|
-
uniqueStakers:
|
|
866
|
+
var StakingTreasury = z11.object({
|
|
867
|
+
address: z11.string(),
|
|
868
|
+
stakedTokenMint: z11.string(),
|
|
869
|
+
rewardTokenMint: z11.string(),
|
|
870
|
+
apy: z11.number(),
|
|
871
|
+
uniqueStakers: z11.number(),
|
|
892
872
|
totalStaked: AmountWithUsdSchema,
|
|
893
873
|
totalReward: AmountWithUsdSchema,
|
|
894
|
-
unstakeCooldownSeconds:
|
|
895
|
-
isStakingEnabled:
|
|
896
|
-
isUnstakingEnabled:
|
|
897
|
-
isWithdrawEnabled:
|
|
874
|
+
unstakeCooldownSeconds: z11.number(),
|
|
875
|
+
isStakingEnabled: z11.boolean(),
|
|
876
|
+
isUnstakingEnabled: z11.boolean(),
|
|
877
|
+
isWithdrawEnabled: z11.boolean()
|
|
898
878
|
});
|
|
899
|
-
var StakingPosition =
|
|
900
|
-
address:
|
|
901
|
-
owner:
|
|
879
|
+
var StakingPosition = z11.object({
|
|
880
|
+
address: z11.string(),
|
|
881
|
+
owner: z11.string(),
|
|
902
882
|
staked: AmountWithUsdSchema,
|
|
903
883
|
unstaked: AmountWithUsdSchema,
|
|
904
884
|
claimedReward: AmountWithUsdSchema,
|
|
905
885
|
unclaimedReward: AmountWithUsdSchema,
|
|
906
|
-
rank:
|
|
907
|
-
vesting:
|
|
886
|
+
rank: z11.nullable(z11.number()),
|
|
887
|
+
vesting: z11.object({
|
|
908
888
|
locked: AmountWithUsdSchema,
|
|
909
889
|
unlocked: AmountWithUsdSchema,
|
|
910
|
-
unlockRate:
|
|
911
|
-
unlockEverySeconds:
|
|
912
|
-
unlockCliffSeconds:
|
|
913
|
-
lockedAt:
|
|
890
|
+
unlockRate: z11.coerce.bigint(),
|
|
891
|
+
unlockEverySeconds: z11.number(),
|
|
892
|
+
unlockCliffSeconds: z11.number(),
|
|
893
|
+
lockedAt: z11.nullable(z11.coerce.date())
|
|
914
894
|
}),
|
|
915
|
-
lastUnstakedAt:
|
|
916
|
-
withdrawAvailableAt:
|
|
895
|
+
lastUnstakedAt: z11.nullable(z11.coerce.date()),
|
|
896
|
+
withdrawAvailableAt: z11.nullable(z11.coerce.date())
|
|
917
897
|
});
|
|
918
|
-
var StakingLeaderboardPosition =
|
|
919
|
-
rank:
|
|
920
|
-
address:
|
|
921
|
-
owner:
|
|
898
|
+
var StakingLeaderboardPosition = z11.object({
|
|
899
|
+
rank: z11.number(),
|
|
900
|
+
address: z11.string(),
|
|
901
|
+
owner: z11.string(),
|
|
922
902
|
staked: AmountWithUsdSchema
|
|
923
903
|
});
|
|
924
|
-
var StakingLeaderboardPage =
|
|
904
|
+
var StakingLeaderboardPage = z11.object({
|
|
925
905
|
data: StakingLeaderboardPosition.array(),
|
|
926
906
|
meta: PaginationMeta
|
|
927
907
|
});
|
|
928
|
-
var StakingPositionHistoryAction =
|
|
929
|
-
position:
|
|
908
|
+
var StakingPositionHistoryAction = z11.object({
|
|
909
|
+
position: z11.string(),
|
|
930
910
|
action: StakingPositionHistoryActionTypeSchema,
|
|
931
|
-
txSignature:
|
|
932
|
-
amount:
|
|
933
|
-
time:
|
|
911
|
+
txSignature: z11.string(),
|
|
912
|
+
amount: z11.coerce.bigint(),
|
|
913
|
+
time: z11.coerce.date()
|
|
934
914
|
});
|
|
935
|
-
var PoolPriceCandle =
|
|
936
|
-
time:
|
|
937
|
-
open:
|
|
938
|
-
close:
|
|
939
|
-
high:
|
|
940
|
-
low:
|
|
941
|
-
volume:
|
|
915
|
+
var PoolPriceCandle = z11.object({
|
|
916
|
+
time: z11.number(),
|
|
917
|
+
open: z11.number(),
|
|
918
|
+
close: z11.number(),
|
|
919
|
+
high: z11.number(),
|
|
920
|
+
low: z11.number(),
|
|
921
|
+
volume: z11.number()
|
|
942
922
|
});
|
|
943
|
-
var FeesStatsGroup =
|
|
944
|
-
time:
|
|
945
|
-
addLiquidityFees:
|
|
946
|
-
limitOrderFees:
|
|
947
|
-
yieldCompoundingFees:
|
|
948
|
-
liquidationFees:
|
|
949
|
-
totalLiquidationsNetworkFees:
|
|
950
|
-
totalLimitOrdersNetworkFees:
|
|
951
|
-
totalYieldCompoundingNetworkFees:
|
|
952
|
-
failedNetworkFees:
|
|
953
|
-
processedNetworkFees:
|
|
954
|
-
totalCollectedFees:
|
|
955
|
-
totalNetworkFees:
|
|
956
|
-
jitoLiquidationFees:
|
|
957
|
-
jitoLimitOrderFees:
|
|
958
|
-
jitoYieldCompoundingFees:
|
|
959
|
-
runningAddLiquidityFees:
|
|
960
|
-
runningLimitOrderFees:
|
|
961
|
-
runningYieldCompoundingFees:
|
|
962
|
-
runningLiquidationFees:
|
|
963
|
-
runningTotalLiquidationsNetworkFees:
|
|
964
|
-
runningTotalLimitOrdersNetworkFees:
|
|
965
|
-
runningTotalYieldCompoundingNetworkFees:
|
|
966
|
-
runningFailedNetworkFees:
|
|
967
|
-
runningProcessedNetworkFees:
|
|
968
|
-
runningJitoLiquidationFees:
|
|
969
|
-
runningJitoLimitOrderFees:
|
|
970
|
-
runningJitoYieldCompoundingFees:
|
|
971
|
-
runningTotalCollectedFees:
|
|
972
|
-
runningTotalNetworkFees:
|
|
923
|
+
var FeesStatsGroup = z11.object({
|
|
924
|
+
time: z11.coerce.date(),
|
|
925
|
+
addLiquidityFees: z11.number(),
|
|
926
|
+
limitOrderFees: z11.number(),
|
|
927
|
+
yieldCompoundingFees: z11.number(),
|
|
928
|
+
liquidationFees: z11.number(),
|
|
929
|
+
totalLiquidationsNetworkFees: z11.number(),
|
|
930
|
+
totalLimitOrdersNetworkFees: z11.number(),
|
|
931
|
+
totalYieldCompoundingNetworkFees: z11.number(),
|
|
932
|
+
failedNetworkFees: z11.number(),
|
|
933
|
+
processedNetworkFees: z11.number(),
|
|
934
|
+
totalCollectedFees: z11.number(),
|
|
935
|
+
totalNetworkFees: z11.number(),
|
|
936
|
+
jitoLiquidationFees: z11.number(),
|
|
937
|
+
jitoLimitOrderFees: z11.number(),
|
|
938
|
+
jitoYieldCompoundingFees: z11.number(),
|
|
939
|
+
runningAddLiquidityFees: z11.number(),
|
|
940
|
+
runningLimitOrderFees: z11.number(),
|
|
941
|
+
runningYieldCompoundingFees: z11.number(),
|
|
942
|
+
runningLiquidationFees: z11.number(),
|
|
943
|
+
runningTotalLiquidationsNetworkFees: z11.number(),
|
|
944
|
+
runningTotalLimitOrdersNetworkFees: z11.number(),
|
|
945
|
+
runningTotalYieldCompoundingNetworkFees: z11.number(),
|
|
946
|
+
runningFailedNetworkFees: z11.number(),
|
|
947
|
+
runningProcessedNetworkFees: z11.number(),
|
|
948
|
+
runningJitoLiquidationFees: z11.number(),
|
|
949
|
+
runningJitoLimitOrderFees: z11.number(),
|
|
950
|
+
runningJitoYieldCompoundingFees: z11.number(),
|
|
951
|
+
runningTotalCollectedFees: z11.number(),
|
|
952
|
+
runningTotalNetworkFees: z11.number()
|
|
973
953
|
});
|
|
974
|
-
var StakingRevenueStatsGroup =
|
|
975
|
-
time:
|
|
976
|
-
totalDepositsUsd:
|
|
977
|
-
totalDepositsSol:
|
|
978
|
-
runningTotalDepositsUsd:
|
|
979
|
-
runningTotalDepositsSol:
|
|
954
|
+
var StakingRevenueStatsGroup = z11.object({
|
|
955
|
+
time: z11.coerce.date(),
|
|
956
|
+
totalDepositsUsd: z11.number(),
|
|
957
|
+
totalDepositsSol: z11.coerce.bigint(),
|
|
958
|
+
runningTotalDepositsUsd: z11.number(),
|
|
959
|
+
runningTotalDepositsSol: z11.coerce.bigint()
|
|
980
960
|
});
|
|
981
|
-
var SwapQuoteByInput =
|
|
982
|
-
estimatedAmountOut:
|
|
983
|
-
minAmountOut:
|
|
984
|
-
feeAmount:
|
|
985
|
-
feeUsd:
|
|
961
|
+
var SwapQuoteByInput = z11.object({
|
|
962
|
+
estimatedAmountOut: z11.coerce.bigint(),
|
|
963
|
+
minAmountOut: z11.coerce.bigint(),
|
|
964
|
+
feeAmount: z11.coerce.bigint(),
|
|
965
|
+
feeUsd: z11.number(),
|
|
986
966
|
/** Price impact in percents */
|
|
987
|
-
priceImpact:
|
|
967
|
+
priceImpact: z11.number()
|
|
988
968
|
});
|
|
989
|
-
var SwapQuoteByOutput =
|
|
990
|
-
estimatedAmountIn:
|
|
991
|
-
maxAmountIn:
|
|
992
|
-
feeAmount:
|
|
993
|
-
feeUsd:
|
|
969
|
+
var SwapQuoteByOutput = z11.object({
|
|
970
|
+
estimatedAmountIn: z11.coerce.bigint(),
|
|
971
|
+
maxAmountIn: z11.coerce.bigint(),
|
|
972
|
+
feeAmount: z11.coerce.bigint(),
|
|
973
|
+
feeUsd: z11.number(),
|
|
994
974
|
/** Price impact in percents */
|
|
995
|
-
priceImpact:
|
|
975
|
+
priceImpact: z11.number()
|
|
996
976
|
});
|
|
997
|
-
var LimitOrderQuoteByInput =
|
|
998
|
-
amountOut:
|
|
977
|
+
var LimitOrderQuoteByInput = z11.object({
|
|
978
|
+
amountOut: z11.coerce.bigint()
|
|
999
979
|
});
|
|
1000
|
-
var LimitOrderQuoteByOutput =
|
|
1001
|
-
amountIn:
|
|
980
|
+
var LimitOrderQuoteByOutput = z11.object({
|
|
981
|
+
amountIn: z11.coerce.bigint()
|
|
1002
982
|
});
|
|
1003
983
|
var TradableAmount = AmountWithUsdSchema;
|
|
1004
|
-
var UpdateStreamSubscriptionResult =
|
|
1005
|
-
status:
|
|
984
|
+
var UpdateStreamSubscriptionResult = z11.object({
|
|
985
|
+
status: z11.string()
|
|
1006
986
|
});
|
|
1007
|
-
var createNotificationSchema = (dataSchema, metaSchema) =>
|
|
987
|
+
var createNotificationSchema = (dataSchema, metaSchema) => z11.object({
|
|
1008
988
|
entity: NotificationEntitySchema,
|
|
1009
989
|
action: NotificationActionSchema,
|
|
1010
990
|
data: dataSchema,
|
|
1011
|
-
id:
|
|
1012
|
-
authority:
|
|
1013
|
-
...metaSchema ? { meta: metaSchema } : { meta:
|
|
991
|
+
id: z11.string(),
|
|
992
|
+
authority: z11.nullish(z11.string()),
|
|
993
|
+
...metaSchema ? { meta: metaSchema } : { meta: z11.undefined().nullable() }
|
|
1014
994
|
});
|
|
1015
995
|
var PoolSwapNotification = createNotificationSchema(PoolSwap);
|
|
1016
996
|
var LendingPositionNotification = createNotificationSchema(LendingPosition);
|