@crypticdot/defituna-api 1.10.5 → 1.10.7
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 +191 -28
- package/dist/index.d.ts +191 -28
- package/dist/index.js +472 -448
- package/dist/index.mjs +465 -441
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -79,6 +79,7 @@ __export(schemas_exports, {
|
|
|
79
79
|
OrderBookEntry: () => OrderBookEntry,
|
|
80
80
|
OrderBookNotification: () => OrderBookNotification,
|
|
81
81
|
OrderBookNotificationMeta: () => OrderBookNotificationMeta,
|
|
82
|
+
OrderBookWrapper: () => OrderBookWrapper,
|
|
82
83
|
OrderHistoryEntry: () => OrderHistoryEntry,
|
|
83
84
|
OrderHistoryEntryNotification: () => OrderHistoryEntryNotification,
|
|
84
85
|
OrderHistoryOrderType: () => OrderHistoryOrderType,
|
|
@@ -93,6 +94,7 @@ __export(schemas_exports, {
|
|
|
93
94
|
PoolPriceUpdate: () => PoolPriceUpdate,
|
|
94
95
|
PoolProvider: () => PoolProvider,
|
|
95
96
|
PoolProviderSchema: () => PoolProviderSchema,
|
|
97
|
+
PoolSnapshot: () => PoolSnapshot,
|
|
96
98
|
PoolSubscriptionTopic: () => PoolSubscriptionTopic,
|
|
97
99
|
PoolSubscriptionTopicSchema: () => PoolSubscriptionTopicSchema,
|
|
98
100
|
PoolSwap: () => PoolSwap,
|
|
@@ -157,7 +159,7 @@ __export(schemas_exports, {
|
|
|
157
159
|
WalletSubscriptionTopic: () => WalletSubscriptionTopic,
|
|
158
160
|
WalletSubscriptionTopicSchema: () => WalletSubscriptionTopicSchema
|
|
159
161
|
});
|
|
160
|
-
var
|
|
162
|
+
var import_zod9 = require("zod");
|
|
161
163
|
|
|
162
164
|
// src/client/schemas/basic.ts
|
|
163
165
|
var import_zod = require("zod");
|
|
@@ -182,34 +184,53 @@ var PoolProvider = {
|
|
|
182
184
|
};
|
|
183
185
|
var PoolProviderSchema = import_zod.z.enum([PoolProvider.ORCA, ...Object.values(PoolProvider)]);
|
|
184
186
|
|
|
187
|
+
// src/client/schemas/order_book.ts
|
|
188
|
+
var import_zod2 = __toESM(require("zod"));
|
|
189
|
+
var OrderBookEntry = import_zod2.default.object({
|
|
190
|
+
concentratedAmount: import_zod2.default.coerce.bigint(),
|
|
191
|
+
concentratedAmountQuote: import_zod2.default.coerce.bigint(),
|
|
192
|
+
concentratedTotal: import_zod2.default.coerce.bigint(),
|
|
193
|
+
concentratedTotalQuote: import_zod2.default.coerce.bigint(),
|
|
194
|
+
limitAmount: import_zod2.default.coerce.bigint(),
|
|
195
|
+
limitAmountQuote: import_zod2.default.coerce.bigint(),
|
|
196
|
+
limitTotal: import_zod2.default.coerce.bigint(),
|
|
197
|
+
limitTotalQuote: import_zod2.default.coerce.bigint(),
|
|
198
|
+
price: import_zod2.default.number(),
|
|
199
|
+
askSide: import_zod2.default.boolean()
|
|
200
|
+
});
|
|
201
|
+
var OrderBook = import_zod2.default.object({
|
|
202
|
+
entries: OrderBookEntry.array(),
|
|
203
|
+
poolPrice: import_zod2.default.number()
|
|
204
|
+
});
|
|
205
|
+
|
|
185
206
|
// src/client/schemas/state_snapshot.ts
|
|
186
|
-
var
|
|
207
|
+
var import_zod8 = __toESM(require("zod"));
|
|
187
208
|
|
|
188
209
|
// src/client/schemas/limit_orders.ts
|
|
189
|
-
var
|
|
210
|
+
var import_zod5 = require("zod");
|
|
190
211
|
|
|
191
212
|
// src/client/schemas/mint.ts
|
|
192
|
-
var
|
|
193
|
-
var Mint =
|
|
194
|
-
mint:
|
|
195
|
-
symbol:
|
|
196
|
-
name:
|
|
197
|
-
logo:
|
|
198
|
-
decimals:
|
|
213
|
+
var import_zod3 = require("zod");
|
|
214
|
+
var Mint = import_zod3.z.object({
|
|
215
|
+
mint: import_zod3.z.string(),
|
|
216
|
+
symbol: import_zod3.z.string(),
|
|
217
|
+
name: import_zod3.z.string(),
|
|
218
|
+
logo: import_zod3.z.string(),
|
|
219
|
+
decimals: import_zod3.z.number()
|
|
199
220
|
});
|
|
200
221
|
|
|
201
222
|
// src/client/schemas/positions_shared.ts
|
|
202
|
-
var
|
|
203
|
-
var TunaPositionPoolSchema =
|
|
204
|
-
addr:
|
|
205
|
-
price:
|
|
206
|
-
tickSpacing:
|
|
223
|
+
var import_zod4 = __toESM(require("zod"));
|
|
224
|
+
var TunaPositionPoolSchema = import_zod4.default.object({
|
|
225
|
+
addr: import_zod4.default.string(),
|
|
226
|
+
price: import_zod4.default.number(),
|
|
227
|
+
tickSpacing: import_zod4.default.number()
|
|
207
228
|
});
|
|
208
229
|
var TunaPositionPoolToken = {
|
|
209
230
|
A: "a",
|
|
210
231
|
B: "b"
|
|
211
232
|
};
|
|
212
|
-
var TunaPositionPoolTokenSchema =
|
|
233
|
+
var TunaPositionPoolTokenSchema = import_zod4.default.enum(Object.values(TunaPositionPoolToken));
|
|
213
234
|
|
|
214
235
|
// src/client/schemas/limit_orders.ts
|
|
215
236
|
var LimitOrderState = {
|
|
@@ -219,27 +240,27 @@ var LimitOrderState = {
|
|
|
219
240
|
COMPLETE: "complete",
|
|
220
241
|
CANCELLED: "cancelled"
|
|
221
242
|
};
|
|
222
|
-
var LimitOrderStateSchema =
|
|
223
|
-
var LimitOrder =
|
|
224
|
-
address:
|
|
225
|
-
orderMint:
|
|
243
|
+
var LimitOrderStateSchema = import_zod5.z.enum([LimitOrderState.OPEN, ...Object.values(LimitOrderState)]);
|
|
244
|
+
var LimitOrder = import_zod5.z.object({
|
|
245
|
+
address: import_zod5.z.string(),
|
|
246
|
+
orderMint: import_zod5.z.string(),
|
|
226
247
|
mintA: Mint,
|
|
227
248
|
mintB: Mint,
|
|
228
249
|
pool: TunaPositionPoolSchema,
|
|
229
250
|
state: LimitOrderStateSchema,
|
|
230
|
-
aToB:
|
|
231
|
-
tickIndex:
|
|
232
|
-
fillRatio:
|
|
233
|
-
openTxSignature:
|
|
234
|
-
closeTxSignature:
|
|
251
|
+
aToB: import_zod5.z.boolean(),
|
|
252
|
+
tickIndex: import_zod5.z.number(),
|
|
253
|
+
fillRatio: import_zod5.z.number(),
|
|
254
|
+
openTxSignature: import_zod5.z.string(),
|
|
255
|
+
closeTxSignature: import_zod5.z.nullable(import_zod5.z.string()),
|
|
235
256
|
amountIn: AmountWithUsdSchema,
|
|
236
257
|
amountOut: AmountWithUsdSchema,
|
|
237
|
-
openedAt:
|
|
238
|
-
closedAt:
|
|
258
|
+
openedAt: import_zod5.z.coerce.date(),
|
|
259
|
+
closedAt: import_zod5.z.nullable(import_zod5.z.coerce.date())
|
|
239
260
|
});
|
|
240
261
|
|
|
241
262
|
// src/client/schemas/lp_positions.ts
|
|
242
|
-
var
|
|
263
|
+
var import_zod6 = __toESM(require("zod"));
|
|
243
264
|
var LpPositionLimitOrderSwap = {
|
|
244
265
|
NO_SWAP: "no_swap",
|
|
245
266
|
SWAP_TO_TOKEN_A: "swap_to_token_a",
|
|
@@ -270,46 +291,46 @@ var LpPositionsActionType = {
|
|
|
270
291
|
SET_FLAGS: "set_flags",
|
|
271
292
|
SET_REBALANCE_THRESHOLD: "set_rebalance_threshold"
|
|
272
293
|
};
|
|
273
|
-
var LpPositionLimitOrderSwapSchema =
|
|
274
|
-
var LpPositionAutoCompoundSchema =
|
|
275
|
-
var LpPositionRebalanceSchema =
|
|
276
|
-
var LpPositionsActionTypeSchema =
|
|
294
|
+
var LpPositionLimitOrderSwapSchema = import_zod6.default.enum(Object.values(LpPositionLimitOrderSwap));
|
|
295
|
+
var LpPositionAutoCompoundSchema = import_zod6.default.enum(Object.values(LpPositionAutoCompound));
|
|
296
|
+
var LpPositionRebalanceSchema = import_zod6.default.enum(Object.values(LpPositionRebalance));
|
|
297
|
+
var LpPositionsActionTypeSchema = import_zod6.default.enum(Object.values(LpPositionsActionType));
|
|
277
298
|
var TunaPositionState = {
|
|
278
299
|
OPEN: "open",
|
|
279
300
|
LIQUIDATED: "liquidated",
|
|
280
301
|
CLOSED_BY_LIMIT_ORDER: "closed_by_limit_order",
|
|
281
302
|
CLOSED: "closed"
|
|
282
303
|
};
|
|
283
|
-
var TunaPositionStateSchema =
|
|
304
|
+
var TunaPositionStateSchema = import_zod6.default.enum([TunaPositionState.OPEN, ...Object.values(TunaPositionState)]);
|
|
284
305
|
var TunaLpPositionAutoCompounding = {
|
|
285
306
|
WITH_LEVERAGE: "with_leverage",
|
|
286
307
|
WITHOUT_LEVERAGE: "without_leverage"
|
|
287
308
|
};
|
|
288
|
-
var TunaLpPositionAutoCompoundingSchema =
|
|
309
|
+
var TunaLpPositionAutoCompoundingSchema = import_zod6.default.enum(
|
|
289
310
|
Object.values(TunaLpPositionAutoCompounding)
|
|
290
311
|
);
|
|
291
|
-
var TunaPositionTokenPnlSchema =
|
|
292
|
-
amount:
|
|
293
|
-
bps:
|
|
294
|
-
});
|
|
295
|
-
var TunaLpPositionFlagsSchema =
|
|
296
|
-
lowerLimitOrderSwapToToken:
|
|
297
|
-
upperLimitOrderSwapToToken:
|
|
298
|
-
autoCompounding:
|
|
299
|
-
autoRebalancing:
|
|
300
|
-
});
|
|
301
|
-
var TunaLpPositionDtoSchema =
|
|
302
|
-
address:
|
|
303
|
-
authority:
|
|
304
|
-
version:
|
|
312
|
+
var TunaPositionTokenPnlSchema = import_zod6.default.object({
|
|
313
|
+
amount: import_zod6.default.coerce.bigint(),
|
|
314
|
+
bps: import_zod6.default.number()
|
|
315
|
+
});
|
|
316
|
+
var TunaLpPositionFlagsSchema = import_zod6.default.object({
|
|
317
|
+
lowerLimitOrderSwapToToken: import_zod6.default.nullable(TunaPositionPoolTokenSchema),
|
|
318
|
+
upperLimitOrderSwapToToken: import_zod6.default.nullable(TunaPositionPoolTokenSchema),
|
|
319
|
+
autoCompounding: import_zod6.default.nullable(TunaLpPositionAutoCompoundingSchema),
|
|
320
|
+
autoRebalancing: import_zod6.default.boolean()
|
|
321
|
+
});
|
|
322
|
+
var TunaLpPositionDtoSchema = import_zod6.default.object({
|
|
323
|
+
address: import_zod6.default.string(),
|
|
324
|
+
authority: import_zod6.default.string(),
|
|
325
|
+
version: import_zod6.default.number(),
|
|
305
326
|
state: TunaPositionStateSchema,
|
|
306
|
-
positionMint:
|
|
307
|
-
liquidity:
|
|
308
|
-
tickLowerIndex:
|
|
309
|
-
tickUpperIndex:
|
|
310
|
-
lowerLimitOrderPrice:
|
|
311
|
-
upperLimitOrderPrice:
|
|
312
|
-
entryPrice:
|
|
327
|
+
positionMint: import_zod6.default.string(),
|
|
328
|
+
liquidity: import_zod6.default.coerce.bigint(),
|
|
329
|
+
tickLowerIndex: import_zod6.default.number(),
|
|
330
|
+
tickUpperIndex: import_zod6.default.number(),
|
|
331
|
+
lowerLimitOrderPrice: import_zod6.default.number(),
|
|
332
|
+
upperLimitOrderPrice: import_zod6.default.number(),
|
|
333
|
+
entryPrice: import_zod6.default.number(),
|
|
313
334
|
flags: TunaLpPositionFlagsSchema,
|
|
314
335
|
mintA: Mint,
|
|
315
336
|
mintB: Mint,
|
|
@@ -317,10 +338,10 @@ var TunaLpPositionDtoSchema = import_zod5.default.object({
|
|
|
317
338
|
marketMaker: PoolProviderSchema,
|
|
318
339
|
depositedCollateralA: AmountWithUsdSchema,
|
|
319
340
|
depositedCollateralB: AmountWithUsdSchema,
|
|
320
|
-
leverage:
|
|
321
|
-
maxLeverage:
|
|
322
|
-
liquidationPriceLower:
|
|
323
|
-
liquidationPriceUpper:
|
|
341
|
+
leverage: import_zod6.default.number(),
|
|
342
|
+
maxLeverage: import_zod6.default.number(),
|
|
343
|
+
liquidationPriceLower: import_zod6.default.number(),
|
|
344
|
+
liquidationPriceUpper: import_zod6.default.number(),
|
|
324
345
|
initialDebtA: AmountWithUsdSchema,
|
|
325
346
|
initialDebtB: AmountWithUsdSchema,
|
|
326
347
|
currentDebtA: AmountWithUsdSchema,
|
|
@@ -336,50 +357,50 @@ var TunaLpPositionDtoSchema = import_zod5.default.object({
|
|
|
336
357
|
pnlA: TokensPnlSchema,
|
|
337
358
|
pnlB: TokensPnlSchema,
|
|
338
359
|
pnlUsd: UsdPnlSchema,
|
|
339
|
-
openedAt:
|
|
340
|
-
closedAt:
|
|
360
|
+
openedAt: import_zod6.default.coerce.date(),
|
|
361
|
+
closedAt: import_zod6.default.nullable(import_zod6.default.coerce.date())
|
|
341
362
|
});
|
|
342
|
-
var TunaLpPositionHistorical =
|
|
343
|
-
positionAddress:
|
|
344
|
-
authority:
|
|
345
|
-
pool:
|
|
363
|
+
var TunaLpPositionHistorical = import_zod6.default.object({
|
|
364
|
+
positionAddress: import_zod6.default.string(),
|
|
365
|
+
authority: import_zod6.default.string(),
|
|
366
|
+
pool: import_zod6.default.string(),
|
|
346
367
|
state: TunaPositionStateSchema,
|
|
347
|
-
lowerPrice:
|
|
348
|
-
upperPrice:
|
|
349
|
-
lowerLimitOrder:
|
|
350
|
-
upperLimitOrder:
|
|
368
|
+
lowerPrice: import_zod6.default.number(),
|
|
369
|
+
upperPrice: import_zod6.default.number(),
|
|
370
|
+
lowerLimitOrder: import_zod6.default.number().nullable(),
|
|
371
|
+
upperLimitOrder: import_zod6.default.number().nullable(),
|
|
351
372
|
marketMaker: PoolProviderSchema,
|
|
352
|
-
openedAt:
|
|
353
|
-
closedAt:
|
|
354
|
-
totalValueUsd:
|
|
355
|
-
leverage:
|
|
356
|
-
initialLeverage:
|
|
357
|
-
totalDepositUsd:
|
|
358
|
-
totalWithdrawnUsd:
|
|
359
|
-
feesSumUsd:
|
|
360
|
-
closedPnlSumUsd:
|
|
361
|
-
entryPrice:
|
|
362
|
-
exitPrice:
|
|
363
|
-
});
|
|
364
|
-
var TunaPositionLegacy =
|
|
365
|
-
address:
|
|
366
|
-
authority:
|
|
367
|
-
version:
|
|
373
|
+
openedAt: import_zod6.default.coerce.date(),
|
|
374
|
+
closedAt: import_zod6.default.coerce.date().nullable(),
|
|
375
|
+
totalValueUsd: import_zod6.default.number(),
|
|
376
|
+
leverage: import_zod6.default.number(),
|
|
377
|
+
initialLeverage: import_zod6.default.number(),
|
|
378
|
+
totalDepositUsd: import_zod6.default.number(),
|
|
379
|
+
totalWithdrawnUsd: import_zod6.default.number(),
|
|
380
|
+
feesSumUsd: import_zod6.default.number(),
|
|
381
|
+
closedPnlSumUsd: import_zod6.default.number(),
|
|
382
|
+
entryPrice: import_zod6.default.number(),
|
|
383
|
+
exitPrice: import_zod6.default.number().nullable()
|
|
384
|
+
});
|
|
385
|
+
var TunaPositionLegacy = import_zod6.default.object({
|
|
386
|
+
address: import_zod6.default.string(),
|
|
387
|
+
authority: import_zod6.default.string(),
|
|
388
|
+
version: import_zod6.default.number(),
|
|
368
389
|
state: TunaPositionStateSchema,
|
|
369
|
-
positionMint:
|
|
370
|
-
liquidity:
|
|
371
|
-
tickLowerIndex:
|
|
372
|
-
tickUpperIndex:
|
|
373
|
-
entrySqrtPrice:
|
|
374
|
-
lowerLimitOrderSqrtPrice:
|
|
375
|
-
upperLimitOrderSqrtPrice:
|
|
376
|
-
flags:
|
|
377
|
-
pool:
|
|
378
|
-
poolSqrtPrice:
|
|
390
|
+
positionMint: import_zod6.default.string(),
|
|
391
|
+
liquidity: import_zod6.default.coerce.bigint(),
|
|
392
|
+
tickLowerIndex: import_zod6.default.number(),
|
|
393
|
+
tickUpperIndex: import_zod6.default.number(),
|
|
394
|
+
entrySqrtPrice: import_zod6.default.coerce.bigint(),
|
|
395
|
+
lowerLimitOrderSqrtPrice: import_zod6.default.coerce.bigint(),
|
|
396
|
+
upperLimitOrderSqrtPrice: import_zod6.default.coerce.bigint(),
|
|
397
|
+
flags: import_zod6.default.number(),
|
|
398
|
+
pool: import_zod6.default.string(),
|
|
399
|
+
poolSqrtPrice: import_zod6.default.coerce.bigint(),
|
|
379
400
|
depositedCollateralA: AmountWithoutUsdSchema,
|
|
380
401
|
depositedCollateralB: AmountWithoutUsdSchema,
|
|
381
|
-
depositedCollateralUsd:
|
|
382
|
-
amount:
|
|
402
|
+
depositedCollateralUsd: import_zod6.default.object({
|
|
403
|
+
amount: import_zod6.default.number()
|
|
383
404
|
}),
|
|
384
405
|
loanFundsA: AmountWithUsdSchema,
|
|
385
406
|
loanFundsB: AmountWithUsdSchema,
|
|
@@ -396,47 +417,47 @@ var TunaPositionLegacy = import_zod5.default.object({
|
|
|
396
417
|
pnlA: TokensPnlSchema,
|
|
397
418
|
pnlB: TokensPnlSchema,
|
|
398
419
|
pnlUsd: UsdPnlSchema,
|
|
399
|
-
openedAt:
|
|
400
|
-
updatedAtSlot:
|
|
401
|
-
closedAt:
|
|
402
|
-
});
|
|
403
|
-
var TunaLpPositionParameters =
|
|
404
|
-
lowerPrice:
|
|
405
|
-
upperPrice:
|
|
406
|
-
lowerLimitOrder:
|
|
407
|
-
upperLimitOrder:
|
|
420
|
+
openedAt: import_zod6.default.coerce.date(),
|
|
421
|
+
updatedAtSlot: import_zod6.default.coerce.bigint(),
|
|
422
|
+
closedAt: import_zod6.default.nullable(import_zod6.default.coerce.date())
|
|
423
|
+
});
|
|
424
|
+
var TunaLpPositionParameters = import_zod6.default.object({
|
|
425
|
+
lowerPrice: import_zod6.default.number(),
|
|
426
|
+
upperPrice: import_zod6.default.number(),
|
|
427
|
+
lowerLimitOrder: import_zod6.default.number().nullable(),
|
|
428
|
+
upperLimitOrder: import_zod6.default.number().nullable(),
|
|
408
429
|
lowerLimitOrderSwap: LpPositionLimitOrderSwapSchema,
|
|
409
430
|
upperLimitOrderSwap: LpPositionLimitOrderSwapSchema,
|
|
410
431
|
autoCompound: LpPositionAutoCompoundSchema,
|
|
411
432
|
rebalance: LpPositionRebalanceSchema,
|
|
412
|
-
rebalanceThresholdTicks:
|
|
413
|
-
});
|
|
414
|
-
var TunaLpPositionValue =
|
|
415
|
-
totalValueA:
|
|
416
|
-
totalValueB:
|
|
417
|
-
totalValueUsd:
|
|
418
|
-
loanFundsA:
|
|
419
|
-
loanFundsB:
|
|
420
|
-
loanFundsUsd:
|
|
421
|
-
leverage:
|
|
422
|
-
});
|
|
423
|
-
var TunaLpPositionTransfer =
|
|
424
|
-
amountA:
|
|
425
|
-
amountB:
|
|
426
|
-
amountUsd:
|
|
427
|
-
});
|
|
428
|
-
var TunaLpPositionTokenPrices =
|
|
429
|
-
tokenPriceA:
|
|
430
|
-
tokenPriceB:
|
|
431
|
-
});
|
|
432
|
-
var TunaLpPositionActionOpen =
|
|
433
|
+
rebalanceThresholdTicks: import_zod6.default.number()
|
|
434
|
+
});
|
|
435
|
+
var TunaLpPositionValue = import_zod6.default.object({
|
|
436
|
+
totalValueA: import_zod6.default.number(),
|
|
437
|
+
totalValueB: import_zod6.default.number(),
|
|
438
|
+
totalValueUsd: import_zod6.default.number(),
|
|
439
|
+
loanFundsA: import_zod6.default.number(),
|
|
440
|
+
loanFundsB: import_zod6.default.number(),
|
|
441
|
+
loanFundsUsd: import_zod6.default.number(),
|
|
442
|
+
leverage: import_zod6.default.number()
|
|
443
|
+
});
|
|
444
|
+
var TunaLpPositionTransfer = import_zod6.default.object({
|
|
445
|
+
amountA: import_zod6.default.number(),
|
|
446
|
+
amountB: import_zod6.default.number(),
|
|
447
|
+
amountUsd: import_zod6.default.number()
|
|
448
|
+
});
|
|
449
|
+
var TunaLpPositionTokenPrices = import_zod6.default.object({
|
|
450
|
+
tokenPriceA: import_zod6.default.number(),
|
|
451
|
+
tokenPriceB: import_zod6.default.number()
|
|
452
|
+
});
|
|
453
|
+
var TunaLpPositionActionOpen = import_zod6.default.object({
|
|
433
454
|
parameters: TunaLpPositionParameters
|
|
434
455
|
});
|
|
435
|
-
var TunaLpPositionActionClose =
|
|
456
|
+
var TunaLpPositionActionClose = import_zod6.default.object({
|
|
436
457
|
toOwner: TunaLpPositionTransfer.nullable(),
|
|
437
458
|
prices: TunaLpPositionTokenPrices.nullable()
|
|
438
459
|
});
|
|
439
|
-
var TunaLpPositionActionIncreaseLiquidity =
|
|
460
|
+
var TunaLpPositionActionIncreaseLiquidity = import_zod6.default.object({
|
|
440
461
|
fromPosition: TunaLpPositionValue.nullable(),
|
|
441
462
|
toPosition: TunaLpPositionValue,
|
|
442
463
|
fromOwner: TunaLpPositionTransfer,
|
|
@@ -444,9 +465,9 @@ var TunaLpPositionActionIncreaseLiquidity = import_zod5.default.object({
|
|
|
444
465
|
protocolFees: TunaLpPositionTransfer,
|
|
445
466
|
prices: TunaLpPositionTokenPrices
|
|
446
467
|
});
|
|
447
|
-
var TunaLpPositionActionDecreaseLiquidity =
|
|
448
|
-
withdrawPercent:
|
|
449
|
-
closedPnlUsd:
|
|
468
|
+
var TunaLpPositionActionDecreaseLiquidity = import_zod6.default.object({
|
|
469
|
+
withdrawPercent: import_zod6.default.number(),
|
|
470
|
+
closedPnlUsd: import_zod6.default.number(),
|
|
450
471
|
fromPosition: TunaLpPositionValue,
|
|
451
472
|
toPosition: TunaLpPositionValue.nullable(),
|
|
452
473
|
toOwner: TunaLpPositionTransfer,
|
|
@@ -454,28 +475,28 @@ var TunaLpPositionActionDecreaseLiquidity = import_zod5.default.object({
|
|
|
454
475
|
collectedFees: TunaLpPositionTransfer,
|
|
455
476
|
prices: TunaLpPositionTokenPrices
|
|
456
477
|
});
|
|
457
|
-
var TunaLpPositionActionLiquidate =
|
|
458
|
-
withdrawPercent:
|
|
478
|
+
var TunaLpPositionActionLiquidate = import_zod6.default.object({
|
|
479
|
+
withdrawPercent: import_zod6.default.number(),
|
|
459
480
|
fromPosition: TunaLpPositionValue,
|
|
460
481
|
toLending: TunaLpPositionTransfer,
|
|
461
482
|
protocolFees: TunaLpPositionTransfer,
|
|
462
483
|
prices: TunaLpPositionTokenPrices
|
|
463
484
|
});
|
|
464
|
-
var TunaLpPositionActionRepayDebt =
|
|
485
|
+
var TunaLpPositionActionRepayDebt = import_zod6.default.object({
|
|
465
486
|
fromPosition: TunaLpPositionValue,
|
|
466
487
|
toPosition: TunaLpPositionValue,
|
|
467
488
|
fromOwner: TunaLpPositionTransfer,
|
|
468
489
|
toLending: TunaLpPositionTransfer,
|
|
469
490
|
prices: TunaLpPositionTokenPrices
|
|
470
491
|
});
|
|
471
|
-
var TunaLpPositionActionCollectFees =
|
|
472
|
-
closedPnlUsd:
|
|
492
|
+
var TunaLpPositionActionCollectFees = import_zod6.default.object({
|
|
493
|
+
closedPnlUsd: import_zod6.default.number(),
|
|
473
494
|
position: TunaLpPositionValue,
|
|
474
495
|
collectedFees: TunaLpPositionTransfer,
|
|
475
496
|
toOwner: TunaLpPositionTransfer,
|
|
476
497
|
prices: TunaLpPositionTokenPrices
|
|
477
498
|
});
|
|
478
|
-
var TunaLpPositionActionCollectAndCompoundFees =
|
|
499
|
+
var TunaLpPositionActionCollectAndCompoundFees = import_zod6.default.object({
|
|
479
500
|
fromPosition: TunaLpPositionValue,
|
|
480
501
|
toPosition: TunaLpPositionValue,
|
|
481
502
|
collectedFees: TunaLpPositionTransfer,
|
|
@@ -483,15 +504,15 @@ var TunaLpPositionActionCollectAndCompoundFees = import_zod5.default.object({
|
|
|
483
504
|
protocolFees: TunaLpPositionTransfer,
|
|
484
505
|
prices: TunaLpPositionTokenPrices
|
|
485
506
|
});
|
|
486
|
-
var TunaLpPositionActionParametersUpdate =
|
|
507
|
+
var TunaLpPositionActionParametersUpdate = import_zod6.default.object({
|
|
487
508
|
fromParameters: TunaLpPositionParameters,
|
|
488
509
|
toParameters: TunaLpPositionParameters
|
|
489
510
|
});
|
|
490
|
-
var TunaLpPositionAction =
|
|
511
|
+
var TunaLpPositionAction = import_zod6.default.object({
|
|
491
512
|
action: LpPositionsActionTypeSchema,
|
|
492
|
-
txSignature:
|
|
493
|
-
txTimestamp:
|
|
494
|
-
data:
|
|
513
|
+
txSignature: import_zod6.default.string(),
|
|
514
|
+
txTimestamp: import_zod6.default.coerce.date(),
|
|
515
|
+
data: import_zod6.default.object({
|
|
495
516
|
/** defined for: IncreaseLiquidity, DecreaseLiquidity, Liquidate, ExecuteLimitOrder, RepayDebt, CollectAndCompoundFees */
|
|
496
517
|
fromPosition: TunaLpPositionValue.optional().nullable(),
|
|
497
518
|
/** defined for: IncreaseLiquidity, DecreaseLiquidity, Liquidate, ExecuteLimitOrder, RepayDebt, CollectAndCompoundFees */
|
|
@@ -519,30 +540,30 @@ var TunaLpPositionAction = import_zod5.default.object({
|
|
|
519
540
|
/** defined for: ParametersUpdate */
|
|
520
541
|
toParameters: TunaLpPositionParameters.optional(),
|
|
521
542
|
/** defined for: DecreaseLiquidity */
|
|
522
|
-
withdrawPercent:
|
|
543
|
+
withdrawPercent: import_zod6.default.number().optional(),
|
|
523
544
|
/** defined for: DecreaseLiquidity, CollectFees */
|
|
524
|
-
closedPnlUsd:
|
|
545
|
+
closedPnlUsd: import_zod6.default.number().optional()
|
|
525
546
|
})
|
|
526
547
|
});
|
|
527
548
|
|
|
528
549
|
// src/client/schemas/spot_positions.ts
|
|
529
|
-
var
|
|
550
|
+
var import_zod7 = require("zod");
|
|
530
551
|
var TunaSpotPositionState = {
|
|
531
552
|
OPEN: "open",
|
|
532
553
|
CLOSED: "closed"
|
|
533
554
|
};
|
|
534
|
-
var TunaSpotPositionStateSchema =
|
|
555
|
+
var TunaSpotPositionStateSchema = import_zod7.z.enum([
|
|
535
556
|
TunaSpotPositionState.OPEN,
|
|
536
557
|
...Object.values(TunaSpotPositionState)
|
|
537
558
|
]);
|
|
538
|
-
var TunaSpotPosition =
|
|
539
|
-
address:
|
|
540
|
-
authority:
|
|
541
|
-
version:
|
|
559
|
+
var TunaSpotPosition = import_zod7.z.object({
|
|
560
|
+
address: import_zod7.z.string(),
|
|
561
|
+
authority: import_zod7.z.string(),
|
|
562
|
+
version: import_zod7.z.number(),
|
|
542
563
|
state: TunaSpotPositionStateSchema,
|
|
543
|
-
lowerLimitOrderPrice:
|
|
544
|
-
upperLimitOrderPrice:
|
|
545
|
-
entryPrice:
|
|
564
|
+
lowerLimitOrderPrice: import_zod7.z.number(),
|
|
565
|
+
upperLimitOrderPrice: import_zod7.z.number(),
|
|
566
|
+
entryPrice: import_zod7.z.number(),
|
|
546
567
|
mintA: Mint,
|
|
547
568
|
mintB: Mint,
|
|
548
569
|
pool: TunaPositionPoolSchema,
|
|
@@ -553,76 +574,95 @@ var TunaSpotPosition = import_zod6.z.object({
|
|
|
553
574
|
initialDebt: AmountWithUsdSchema,
|
|
554
575
|
currentDebt: AmountWithUsdSchema,
|
|
555
576
|
total: AmountWithUsdSchema,
|
|
556
|
-
leverage:
|
|
557
|
-
maxLeverage:
|
|
558
|
-
liquidationPrice:
|
|
577
|
+
leverage: import_zod7.z.number(),
|
|
578
|
+
maxLeverage: import_zod7.z.number(),
|
|
579
|
+
liquidationPrice: import_zod7.z.number(),
|
|
559
580
|
pnlUsd: UsdPnlSchema,
|
|
560
|
-
openedAt:
|
|
561
|
-
closedAt:
|
|
581
|
+
openedAt: import_zod7.z.coerce.date(),
|
|
582
|
+
closedAt: import_zod7.z.nullable(import_zod7.z.coerce.date())
|
|
562
583
|
});
|
|
563
|
-
var IncreaseSpotPositionQuote =
|
|
584
|
+
var IncreaseSpotPositionQuote = import_zod7.z.object({
|
|
564
585
|
/** Required collateral amount */
|
|
565
|
-
collateralAmount:
|
|
586
|
+
collateralAmount: import_zod7.z.coerce.bigint(),
|
|
566
587
|
/** Required amount to borrow */
|
|
567
|
-
borrowAmount:
|
|
588
|
+
borrowAmount: import_zod7.z.coerce.bigint(),
|
|
568
589
|
/** Estimated position size in the position token. */
|
|
569
|
-
estimatedAmount:
|
|
590
|
+
estimatedAmount: import_zod7.z.coerce.bigint(),
|
|
570
591
|
/** Swap input amount. */
|
|
571
|
-
swapInputAmount:
|
|
592
|
+
swapInputAmount: import_zod7.z.coerce.bigint(),
|
|
572
593
|
/** Minimum swap output amount according to the provided slippage. */
|
|
573
|
-
minSwapOutputAmount:
|
|
594
|
+
minSwapOutputAmount: import_zod7.z.coerce.bigint(),
|
|
574
595
|
/** Protocol fee in token A */
|
|
575
|
-
protocolFeeA:
|
|
596
|
+
protocolFeeA: import_zod7.z.coerce.bigint(),
|
|
576
597
|
/** Protocol fee in token B */
|
|
577
|
-
protocolFeeB:
|
|
598
|
+
protocolFeeB: import_zod7.z.coerce.bigint(),
|
|
578
599
|
/** Price impact in percents */
|
|
579
|
-
priceImpact:
|
|
600
|
+
priceImpact: import_zod7.z.number(),
|
|
580
601
|
/** Liquidation price */
|
|
581
|
-
liquidationPrice:
|
|
602
|
+
liquidationPrice: import_zod7.z.number()
|
|
582
603
|
});
|
|
583
|
-
var DecreaseSpotPositionQuote =
|
|
604
|
+
var DecreaseSpotPositionQuote = import_zod7.z.object({
|
|
584
605
|
/** Confirmed position decrease percentage (100% = 1.0) */
|
|
585
|
-
decreasePercent:
|
|
606
|
+
decreasePercent: import_zod7.z.number(),
|
|
586
607
|
/** The maximum acceptable swap input amount for position decrease according to the provided slippage
|
|
587
608
|
* (if collateral_token == position_token) OR the minimum swap output amount (if collateral_token != position_token).
|
|
588
609
|
*/
|
|
589
|
-
requiredSwapAmount:
|
|
610
|
+
requiredSwapAmount: import_zod7.z.coerce.bigint(),
|
|
590
611
|
/** Estimated total amount of the adjusted position */
|
|
591
|
-
estimatedAmount:
|
|
612
|
+
estimatedAmount: import_zod7.z.coerce.bigint(),
|
|
592
613
|
/** Estimated amount of the withdrawn collateral */
|
|
593
|
-
estimatedWithdrawnCollateral:
|
|
614
|
+
estimatedWithdrawnCollateral: import_zod7.z.coerce.bigint(),
|
|
594
615
|
/** Price impact in percents */
|
|
595
|
-
priceImpact:
|
|
616
|
+
priceImpact: import_zod7.z.number(),
|
|
596
617
|
/** Liquidation price */
|
|
597
|
-
liquidationPrice:
|
|
618
|
+
liquidationPrice: import_zod7.z.number()
|
|
598
619
|
});
|
|
599
|
-
var CloseSpotPositionQuote =
|
|
620
|
+
var CloseSpotPositionQuote = import_zod7.z.object({
|
|
600
621
|
/** Position decrease percentage */
|
|
601
|
-
decreasePercent:
|
|
622
|
+
decreasePercent: import_zod7.z.number(),
|
|
602
623
|
/** The maximum acceptable swap input amount for position decrease according to the provided slippage
|
|
603
624
|
* (if collateral_token == position_token) OR the minimum swap output amount (if collateral_token != position_token).
|
|
604
625
|
*/
|
|
605
|
-
requiredSwapAmount:
|
|
626
|
+
requiredSwapAmount: import_zod7.z.coerce.bigint(),
|
|
606
627
|
/** Estimated amount of the withdrawn collateral */
|
|
607
|
-
estimatedWithdrawnCollateral:
|
|
628
|
+
estimatedWithdrawnCollateral: import_zod7.z.coerce.bigint(),
|
|
608
629
|
/** Price impact in percents */
|
|
609
|
-
priceImpact:
|
|
630
|
+
priceImpact: import_zod7.z.number()
|
|
610
631
|
});
|
|
611
632
|
|
|
612
633
|
// src/client/schemas/state_snapshot.ts
|
|
613
|
-
var PoolPriceUpdate =
|
|
614
|
-
pool:
|
|
615
|
-
price:
|
|
616
|
-
sqrtPrice:
|
|
617
|
-
time:
|
|
618
|
-
});
|
|
619
|
-
var
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
634
|
+
var PoolPriceUpdate = import_zod8.default.object({
|
|
635
|
+
pool: import_zod8.default.string(),
|
|
636
|
+
price: import_zod8.default.number(),
|
|
637
|
+
sqrtPrice: import_zod8.default.coerce.bigint(),
|
|
638
|
+
time: import_zod8.default.coerce.date()
|
|
639
|
+
});
|
|
640
|
+
var OrderBookWrapper = import_zod8.default.object({
|
|
641
|
+
priceStep: import_zod8.default.number(),
|
|
642
|
+
entries: import_zod8.default.array(OrderBookEntry)
|
|
643
|
+
});
|
|
644
|
+
var PoolSnapshot = import_zod8.default.object({
|
|
645
|
+
liquidity: import_zod8.default.coerce.bigint(),
|
|
646
|
+
tickCurrentIndex: import_zod8.default.number(),
|
|
647
|
+
price: import_zod8.default.number(),
|
|
648
|
+
tvl: import_zod8.default.number(),
|
|
649
|
+
priceChange24H: import_zod8.default.number(),
|
|
650
|
+
volume24H: import_zod8.default.number(),
|
|
651
|
+
fees24H: import_zod8.default.number(),
|
|
652
|
+
borrowedFundsA: AmountWithUsdSchema,
|
|
653
|
+
borrowedFundsB: AmountWithUsdSchema,
|
|
654
|
+
borrowLimitA: AmountWithUsdSchema,
|
|
655
|
+
borrowLimitB: AmountWithUsdSchema
|
|
656
|
+
});
|
|
657
|
+
var StateSnapshot = import_zod8.default.object({
|
|
658
|
+
slot: import_zod8.default.coerce.bigint(),
|
|
659
|
+
blockTime: import_zod8.default.coerce.date(),
|
|
660
|
+
poolPrices: import_zod8.default.optional(import_zod8.default.record(import_zod8.default.string(), PoolPriceUpdate)),
|
|
661
|
+
pools: import_zod8.default.optional(import_zod8.default.record(import_zod8.default.string(), PoolSnapshot)),
|
|
662
|
+
tunaSpotPositions: import_zod8.default.optional(import_zod8.default.array(TunaSpotPosition)),
|
|
663
|
+
tunaLpPositions: import_zod8.default.optional(import_zod8.default.array(TunaLpPositionDtoSchema)),
|
|
664
|
+
fusionLimitOrders: import_zod8.default.optional(import_zod8.default.array(LimitOrder)),
|
|
665
|
+
orderBooks: import_zod8.default.optional(import_zod8.default.record(import_zod8.default.string(), OrderBookWrapper))
|
|
626
666
|
});
|
|
627
667
|
|
|
628
668
|
// src/client/schemas.ts
|
|
@@ -702,51 +742,51 @@ var WalletSubscriptionTopic = {
|
|
|
702
742
|
TRADE_HISTORY: "trade_history",
|
|
703
743
|
ORDER_HISTORY: "order_history"
|
|
704
744
|
};
|
|
705
|
-
var NotificationEntitySchema =
|
|
706
|
-
var NotificationActionSchema =
|
|
707
|
-
var TradeHistoryActionSchema =
|
|
708
|
-
var TradeHistoryUIDirectionSchema =
|
|
745
|
+
var NotificationEntitySchema = import_zod9.z.enum([NotificationEntity.POOL_SWAP, ...Object.values(NotificationEntity)]);
|
|
746
|
+
var NotificationActionSchema = import_zod9.z.enum([NotificationAction.CREATE, ...Object.values(NotificationAction)]);
|
|
747
|
+
var TradeHistoryActionSchema = import_zod9.z.enum([TradeHistoryAction.SWAP, ...Object.values(TradeHistoryAction)]);
|
|
748
|
+
var TradeHistoryUIDirectionSchema = import_zod9.z.enum([
|
|
709
749
|
TradeHistoryUIDirection.BUY,
|
|
710
750
|
...Object.values(TradeHistoryUIDirection)
|
|
711
751
|
]);
|
|
712
|
-
var OrderHistoryOrderTypeSchema =
|
|
752
|
+
var OrderHistoryOrderTypeSchema = import_zod9.z.enum([
|
|
713
753
|
OrderHistoryOrderType.MARKET,
|
|
714
754
|
...Object.values(OrderHistoryOrderType)
|
|
715
755
|
]);
|
|
716
|
-
var OrderHistoryStatusSchema =
|
|
717
|
-
var OrderHistoryUIDirectionSchema =
|
|
756
|
+
var OrderHistoryStatusSchema = import_zod9.z.enum([OrderHistoryStatus.OPEN, ...Object.values(OrderHistoryStatus)]);
|
|
757
|
+
var OrderHistoryUIDirectionSchema = import_zod9.z.enum([
|
|
718
758
|
OrderHistoryUIDirection.BUY,
|
|
719
759
|
...Object.values(OrderHistoryUIDirection)
|
|
720
760
|
]);
|
|
721
|
-
var StakingPositionHistoryActionTypeSchema =
|
|
761
|
+
var StakingPositionHistoryActionTypeSchema = import_zod9.z.enum([
|
|
722
762
|
StakingPositionHistoryActionType.STAKE,
|
|
723
763
|
...Object.values(StakingPositionHistoryActionType)
|
|
724
764
|
]);
|
|
725
|
-
var PoolSubscriptionTopicSchema =
|
|
765
|
+
var PoolSubscriptionTopicSchema = import_zod9.z.enum([
|
|
726
766
|
PoolSubscriptionTopic.ORDER_BOOK,
|
|
727
767
|
...Object.values(PoolSubscriptionTopic)
|
|
728
768
|
]);
|
|
729
|
-
var WalletSubscriptionTopicSchema =
|
|
769
|
+
var WalletSubscriptionTopicSchema = import_zod9.z.enum([
|
|
730
770
|
WalletSubscriptionTopic.TUNA_POSITIONS,
|
|
731
771
|
...Object.values(WalletSubscriptionTopic)
|
|
732
772
|
]);
|
|
733
|
-
var PaginationMeta =
|
|
734
|
-
total:
|
|
735
|
-
});
|
|
736
|
-
var Market =
|
|
737
|
-
address:
|
|
738
|
-
addressLookupTable:
|
|
739
|
-
poolAddress:
|
|
740
|
-
poolFeeRate:
|
|
773
|
+
var PaginationMeta = import_zod9.z.object({
|
|
774
|
+
total: import_zod9.z.number()
|
|
775
|
+
});
|
|
776
|
+
var Market = import_zod9.z.object({
|
|
777
|
+
address: import_zod9.z.string(),
|
|
778
|
+
addressLookupTable: import_zod9.z.string(),
|
|
779
|
+
poolAddress: import_zod9.z.string(),
|
|
780
|
+
poolFeeRate: import_zod9.z.number(),
|
|
741
781
|
provider: PoolProviderSchema,
|
|
742
|
-
maxLeverage:
|
|
743
|
-
maxSwapSlippage:
|
|
744
|
-
protocolFee:
|
|
745
|
-
rebalanceProtocolFee:
|
|
746
|
-
protocolFeeOnCollateral:
|
|
747
|
-
liquidationFee:
|
|
748
|
-
liquidationThreshold:
|
|
749
|
-
oraclePriceDeviationThreshold:
|
|
782
|
+
maxLeverage: import_zod9.z.number(),
|
|
783
|
+
maxSwapSlippage: import_zod9.z.number(),
|
|
784
|
+
protocolFee: import_zod9.z.number(),
|
|
785
|
+
rebalanceProtocolFee: import_zod9.z.number(),
|
|
786
|
+
protocolFeeOnCollateral: import_zod9.z.number(),
|
|
787
|
+
liquidationFee: import_zod9.z.number(),
|
|
788
|
+
liquidationThreshold: import_zod9.z.number(),
|
|
789
|
+
oraclePriceDeviationThreshold: import_zod9.z.number(),
|
|
750
790
|
maxSpotPositionSizeA: AmountWithUsdSchema,
|
|
751
791
|
maxSpotPositionSizeB: AmountWithUsdSchema,
|
|
752
792
|
borrowedFundsA: AmountWithUsdSchema,
|
|
@@ -755,32 +795,32 @@ var Market = import_zod8.z.object({
|
|
|
755
795
|
availableBorrowB: AmountWithUsdSchema,
|
|
756
796
|
borrowLimitA: AmountWithUsdSchema,
|
|
757
797
|
borrowLimitB: AmountWithUsdSchema,
|
|
758
|
-
disabled:
|
|
759
|
-
createdAt:
|
|
760
|
-
});
|
|
761
|
-
var TokenOraclePrice =
|
|
762
|
-
mint:
|
|
763
|
-
price:
|
|
764
|
-
decimals:
|
|
765
|
-
time:
|
|
766
|
-
});
|
|
767
|
-
var Vault =
|
|
768
|
-
address:
|
|
769
|
-
mint:
|
|
798
|
+
disabled: import_zod9.z.boolean(),
|
|
799
|
+
createdAt: import_zod9.z.coerce.date()
|
|
800
|
+
});
|
|
801
|
+
var TokenOraclePrice = import_zod9.z.object({
|
|
802
|
+
mint: import_zod9.z.string(),
|
|
803
|
+
price: import_zod9.z.coerce.bigint(),
|
|
804
|
+
decimals: import_zod9.z.number(),
|
|
805
|
+
time: import_zod9.z.coerce.date()
|
|
806
|
+
});
|
|
807
|
+
var Vault = import_zod9.z.object({
|
|
808
|
+
address: import_zod9.z.string(),
|
|
809
|
+
mint: import_zod9.z.string(),
|
|
770
810
|
depositedFunds: AmountWithUsdSchema,
|
|
771
811
|
borrowedFunds: AmountWithUsdSchema,
|
|
772
812
|
supplyLimit: AmountWithUsdSchema,
|
|
773
|
-
borrowedShares:
|
|
774
|
-
depositedShares:
|
|
775
|
-
supplyApy:
|
|
776
|
-
borrowApy:
|
|
777
|
-
interestRate:
|
|
778
|
-
utilization:
|
|
779
|
-
pythOracleFeedId:
|
|
780
|
-
pythOraclePriceUpdate:
|
|
781
|
-
});
|
|
782
|
-
var VaultHistoricalStats =
|
|
783
|
-
date:
|
|
813
|
+
borrowedShares: import_zod9.z.coerce.bigint(),
|
|
814
|
+
depositedShares: import_zod9.z.coerce.bigint(),
|
|
815
|
+
supplyApy: import_zod9.z.number(),
|
|
816
|
+
borrowApy: import_zod9.z.number(),
|
|
817
|
+
interestRate: import_zod9.z.coerce.bigint(),
|
|
818
|
+
utilization: import_zod9.z.number(),
|
|
819
|
+
pythOracleFeedId: import_zod9.z.string(),
|
|
820
|
+
pythOraclePriceUpdate: import_zod9.z.string()
|
|
821
|
+
});
|
|
822
|
+
var VaultHistoricalStats = import_zod9.z.object({
|
|
823
|
+
date: import_zod9.z.preprocess((val, ctx) => {
|
|
784
824
|
if (typeof val === "string") {
|
|
785
825
|
const [year, month, day] = val.split("-").map(Number);
|
|
786
826
|
return new Date(year, month - 1, day);
|
|
@@ -789,272 +829,256 @@ var VaultHistoricalStats = import_zod8.z.object({
|
|
|
789
829
|
code: "custom",
|
|
790
830
|
message: "Not a valid date string"
|
|
791
831
|
});
|
|
792
|
-
return
|
|
793
|
-
},
|
|
832
|
+
return import_zod9.z.NEVER;
|
|
833
|
+
}, import_zod9.z.date()),
|
|
794
834
|
supply: AmountWithUsdSchema,
|
|
795
835
|
borrow: AmountWithUsdSchema,
|
|
796
|
-
supplyApy:
|
|
797
|
-
borrowApr:
|
|
836
|
+
supplyApy: import_zod9.z.number(),
|
|
837
|
+
borrowApr: import_zod9.z.number()
|
|
798
838
|
});
|
|
799
|
-
var Pool =
|
|
800
|
-
address:
|
|
839
|
+
var Pool = import_zod9.z.object({
|
|
840
|
+
address: import_zod9.z.string(),
|
|
801
841
|
provider: PoolProviderSchema,
|
|
802
|
-
tokenAMint:
|
|
803
|
-
tokenBMint:
|
|
804
|
-
tokenAVault:
|
|
805
|
-
tokenBVault:
|
|
806
|
-
tvlUsdc:
|
|
807
|
-
priceChange24H:
|
|
808
|
-
tickSpacing:
|
|
809
|
-
feeRate:
|
|
810
|
-
olpFeeRate:
|
|
811
|
-
protocolFeeRate:
|
|
812
|
-
liquidity:
|
|
813
|
-
sqrtPrice:
|
|
814
|
-
tickCurrentIndex:
|
|
815
|
-
stats:
|
|
816
|
-
"24h":
|
|
817
|
-
volume:
|
|
818
|
-
fees:
|
|
819
|
-
rewards:
|
|
820
|
-
yieldOverTvl:
|
|
842
|
+
tokenAMint: import_zod9.z.string(),
|
|
843
|
+
tokenBMint: import_zod9.z.string(),
|
|
844
|
+
tokenAVault: import_zod9.z.string(),
|
|
845
|
+
tokenBVault: import_zod9.z.string(),
|
|
846
|
+
tvlUsdc: import_zod9.z.coerce.number(),
|
|
847
|
+
priceChange24H: import_zod9.z.number(),
|
|
848
|
+
tickSpacing: import_zod9.z.number(),
|
|
849
|
+
feeRate: import_zod9.z.number(),
|
|
850
|
+
olpFeeRate: import_zod9.z.nullable(import_zod9.z.number()),
|
|
851
|
+
protocolFeeRate: import_zod9.z.number(),
|
|
852
|
+
liquidity: import_zod9.z.coerce.bigint(),
|
|
853
|
+
sqrtPrice: import_zod9.z.coerce.bigint(),
|
|
854
|
+
tickCurrentIndex: import_zod9.z.number(),
|
|
855
|
+
stats: import_zod9.z.object({
|
|
856
|
+
"24h": import_zod9.z.object({
|
|
857
|
+
volume: import_zod9.z.coerce.number(),
|
|
858
|
+
fees: import_zod9.z.coerce.number(),
|
|
859
|
+
rewards: import_zod9.z.coerce.number(),
|
|
860
|
+
yieldOverTvl: import_zod9.z.coerce.number()
|
|
821
861
|
}),
|
|
822
|
-
"7d":
|
|
823
|
-
volume:
|
|
824
|
-
fees:
|
|
825
|
-
rewards:
|
|
826
|
-
yieldOverTvl:
|
|
862
|
+
"7d": import_zod9.z.object({
|
|
863
|
+
volume: import_zod9.z.coerce.number(),
|
|
864
|
+
fees: import_zod9.z.coerce.number(),
|
|
865
|
+
rewards: import_zod9.z.coerce.number(),
|
|
866
|
+
yieldOverTvl: import_zod9.z.coerce.number()
|
|
827
867
|
}),
|
|
828
|
-
"30d":
|
|
829
|
-
volume:
|
|
830
|
-
fees:
|
|
831
|
-
rewards:
|
|
832
|
-
yieldOverTvl:
|
|
868
|
+
"30d": import_zod9.z.object({
|
|
869
|
+
volume: import_zod9.z.coerce.number(),
|
|
870
|
+
fees: import_zod9.z.coerce.number(),
|
|
871
|
+
rewards: import_zod9.z.coerce.number(),
|
|
872
|
+
yieldOverTvl: import_zod9.z.coerce.number()
|
|
833
873
|
})
|
|
834
874
|
})
|
|
835
875
|
});
|
|
836
|
-
var Tick =
|
|
837
|
-
index:
|
|
838
|
-
liquidity:
|
|
876
|
+
var Tick = import_zod9.z.object({
|
|
877
|
+
index: import_zod9.z.number(),
|
|
878
|
+
liquidity: import_zod9.z.coerce.bigint()
|
|
839
879
|
});
|
|
840
|
-
var PoolTicks =
|
|
841
|
-
tickSpacing:
|
|
880
|
+
var PoolTicks = import_zod9.z.object({
|
|
881
|
+
tickSpacing: import_zod9.z.number(),
|
|
842
882
|
ticks: Tick.array()
|
|
843
883
|
});
|
|
844
|
-
var LendingPosition =
|
|
845
|
-
address:
|
|
846
|
-
authority:
|
|
847
|
-
mint:
|
|
848
|
-
vault:
|
|
849
|
-
shares:
|
|
884
|
+
var LendingPosition = import_zod9.z.object({
|
|
885
|
+
address: import_zod9.z.string(),
|
|
886
|
+
authority: import_zod9.z.string(),
|
|
887
|
+
mint: import_zod9.z.string(),
|
|
888
|
+
vault: import_zod9.z.string(),
|
|
889
|
+
shares: import_zod9.z.coerce.bigint(),
|
|
850
890
|
funds: AmountWithUsdSchema,
|
|
851
891
|
earned: AmountWithUsdSchema
|
|
852
892
|
});
|
|
853
|
-
var PoolSwap =
|
|
854
|
-
id:
|
|
855
|
-
amountIn:
|
|
856
|
-
amountOut:
|
|
857
|
-
amountUsd:
|
|
858
|
-
aToB:
|
|
859
|
-
pool:
|
|
860
|
-
time:
|
|
861
|
-
});
|
|
862
|
-
var OrderBookEntry = import_zod8.z.object({
|
|
863
|
-
concentratedAmount: import_zod8.z.coerce.bigint(),
|
|
864
|
-
concentratedAmountQuote: import_zod8.z.coerce.bigint(),
|
|
865
|
-
concentratedTotal: import_zod8.z.coerce.bigint(),
|
|
866
|
-
concentratedTotalQuote: import_zod8.z.coerce.bigint(),
|
|
867
|
-
limitAmount: import_zod8.z.coerce.bigint(),
|
|
868
|
-
limitAmountQuote: import_zod8.z.coerce.bigint(),
|
|
869
|
-
limitTotal: import_zod8.z.coerce.bigint(),
|
|
870
|
-
limitTotalQuote: import_zod8.z.coerce.bigint(),
|
|
871
|
-
price: import_zod8.z.number(),
|
|
872
|
-
askSide: import_zod8.z.boolean()
|
|
873
|
-
});
|
|
874
|
-
var OrderBook = import_zod8.z.object({
|
|
875
|
-
entries: OrderBookEntry.array(),
|
|
876
|
-
poolPrice: import_zod8.z.number()
|
|
893
|
+
var PoolSwap = import_zod9.z.object({
|
|
894
|
+
id: import_zod9.z.string(),
|
|
895
|
+
amountIn: import_zod9.z.coerce.bigint(),
|
|
896
|
+
amountOut: import_zod9.z.coerce.bigint(),
|
|
897
|
+
amountUsd: import_zod9.z.number(),
|
|
898
|
+
aToB: import_zod9.z.boolean(),
|
|
899
|
+
pool: import_zod9.z.string(),
|
|
900
|
+
time: import_zod9.z.coerce.date()
|
|
877
901
|
});
|
|
878
|
-
var TradeHistoryEntry =
|
|
902
|
+
var TradeHistoryEntry = import_zod9.z.object({
|
|
879
903
|
// Internal entry ID
|
|
880
|
-
id:
|
|
881
|
-
pool:
|
|
882
|
-
authority:
|
|
883
|
-
aToB:
|
|
904
|
+
id: import_zod9.z.string(),
|
|
905
|
+
pool: import_zod9.z.string(),
|
|
906
|
+
authority: import_zod9.z.string(),
|
|
907
|
+
aToB: import_zod9.z.boolean(),
|
|
884
908
|
// Trade action which created entry
|
|
885
909
|
action: TradeHistoryActionSchema,
|
|
886
910
|
// Trade direction formatted for ui display
|
|
887
911
|
uiDirection: TradeHistoryUIDirectionSchema,
|
|
888
912
|
// Trade price formatted for ui display
|
|
889
|
-
uiPrice:
|
|
913
|
+
uiPrice: import_zod9.z.number(),
|
|
890
914
|
baseToken: AmountWithUsdSchema,
|
|
891
915
|
quoteToken: AmountWithUsdSchema,
|
|
892
916
|
fee: AmountWithUsdSchema,
|
|
893
|
-
pnl:
|
|
894
|
-
|
|
895
|
-
usd:
|
|
896
|
-
bps:
|
|
917
|
+
pnl: import_zod9.z.nullable(
|
|
918
|
+
import_zod9.z.object({
|
|
919
|
+
usd: import_zod9.z.number(),
|
|
920
|
+
bps: import_zod9.z.number()
|
|
897
921
|
})
|
|
898
922
|
),
|
|
899
|
-
txSignature:
|
|
900
|
-
positionAddress:
|
|
901
|
-
slot:
|
|
902
|
-
ts:
|
|
923
|
+
txSignature: import_zod9.z.nullable(import_zod9.z.string()),
|
|
924
|
+
positionAddress: import_zod9.z.nullable(import_zod9.z.string()),
|
|
925
|
+
slot: import_zod9.z.coerce.bigint(),
|
|
926
|
+
ts: import_zod9.z.coerce.date()
|
|
903
927
|
});
|
|
904
|
-
var OrderHistoryEntry =
|
|
928
|
+
var OrderHistoryEntry = import_zod9.z.object({
|
|
905
929
|
// Internal entry ID
|
|
906
|
-
id:
|
|
907
|
-
pool:
|
|
908
|
-
authority:
|
|
930
|
+
id: import_zod9.z.string(),
|
|
931
|
+
pool: import_zod9.z.string(),
|
|
932
|
+
authority: import_zod9.z.string(),
|
|
909
933
|
orderType: OrderHistoryOrderTypeSchema,
|
|
910
|
-
isReduceOnly:
|
|
911
|
-
aToB:
|
|
934
|
+
isReduceOnly: import_zod9.z.nullable(import_zod9.z.boolean()),
|
|
935
|
+
aToB: import_zod9.z.boolean(),
|
|
912
936
|
uiDirection: OrderHistoryUIDirectionSchema,
|
|
913
|
-
uiPrice:
|
|
914
|
-
uiExecutionPrice:
|
|
937
|
+
uiPrice: import_zod9.z.nullable(import_zod9.z.number()),
|
|
938
|
+
uiExecutionPrice: import_zod9.z.nullable(import_zod9.z.number()),
|
|
915
939
|
status: OrderHistoryStatusSchema,
|
|
916
940
|
baseToken: AmountWithUsdSchema,
|
|
917
941
|
quoteToken: AmountWithUsdSchema,
|
|
918
|
-
baseTokenConsumedAmount:
|
|
919
|
-
quoteTokenFilledAmount:
|
|
920
|
-
txSignature:
|
|
921
|
-
positionAddress:
|
|
922
|
-
slot:
|
|
923
|
-
ts:
|
|
924
|
-
});
|
|
925
|
-
var StakingTreasury =
|
|
926
|
-
address:
|
|
927
|
-
stakedTokenMint:
|
|
928
|
-
rewardTokenMint:
|
|
929
|
-
apy:
|
|
930
|
-
uniqueStakers:
|
|
942
|
+
baseTokenConsumedAmount: import_zod9.z.nullable(AmountWithUsdSchema),
|
|
943
|
+
quoteTokenFilledAmount: import_zod9.z.nullable(AmountWithUsdSchema),
|
|
944
|
+
txSignature: import_zod9.z.nullable(import_zod9.z.string()),
|
|
945
|
+
positionAddress: import_zod9.z.nullable(import_zod9.z.string()),
|
|
946
|
+
slot: import_zod9.z.coerce.bigint(),
|
|
947
|
+
ts: import_zod9.z.coerce.date()
|
|
948
|
+
});
|
|
949
|
+
var StakingTreasury = import_zod9.z.object({
|
|
950
|
+
address: import_zod9.z.string(),
|
|
951
|
+
stakedTokenMint: import_zod9.z.string(),
|
|
952
|
+
rewardTokenMint: import_zod9.z.string(),
|
|
953
|
+
apy: import_zod9.z.number(),
|
|
954
|
+
uniqueStakers: import_zod9.z.number(),
|
|
931
955
|
totalStaked: AmountWithUsdSchema,
|
|
932
956
|
totalReward: AmountWithUsdSchema,
|
|
933
|
-
unstakeCooldownSeconds:
|
|
934
|
-
isStakingEnabled:
|
|
935
|
-
isUnstakingEnabled:
|
|
936
|
-
isWithdrawEnabled:
|
|
937
|
-
});
|
|
938
|
-
var StakingPosition =
|
|
939
|
-
address:
|
|
940
|
-
owner:
|
|
957
|
+
unstakeCooldownSeconds: import_zod9.z.number(),
|
|
958
|
+
isStakingEnabled: import_zod9.z.boolean(),
|
|
959
|
+
isUnstakingEnabled: import_zod9.z.boolean(),
|
|
960
|
+
isWithdrawEnabled: import_zod9.z.boolean()
|
|
961
|
+
});
|
|
962
|
+
var StakingPosition = import_zod9.z.object({
|
|
963
|
+
address: import_zod9.z.string(),
|
|
964
|
+
owner: import_zod9.z.string(),
|
|
941
965
|
staked: AmountWithUsdSchema,
|
|
942
966
|
unstaked: AmountWithUsdSchema,
|
|
943
967
|
claimedReward: AmountWithUsdSchema,
|
|
944
968
|
unclaimedReward: AmountWithUsdSchema,
|
|
945
|
-
rank:
|
|
946
|
-
vesting:
|
|
969
|
+
rank: import_zod9.z.nullable(import_zod9.z.number()),
|
|
970
|
+
vesting: import_zod9.z.object({
|
|
947
971
|
locked: AmountWithUsdSchema,
|
|
948
972
|
unlocked: AmountWithUsdSchema,
|
|
949
|
-
unlockRate:
|
|
950
|
-
unlockEverySeconds:
|
|
951
|
-
unlockCliffSeconds:
|
|
952
|
-
lockedAt:
|
|
973
|
+
unlockRate: import_zod9.z.coerce.bigint(),
|
|
974
|
+
unlockEverySeconds: import_zod9.z.number(),
|
|
975
|
+
unlockCliffSeconds: import_zod9.z.number(),
|
|
976
|
+
lockedAt: import_zod9.z.nullable(import_zod9.z.coerce.date())
|
|
953
977
|
}),
|
|
954
|
-
lastUnstakedAt:
|
|
955
|
-
withdrawAvailableAt:
|
|
978
|
+
lastUnstakedAt: import_zod9.z.nullable(import_zod9.z.coerce.date()),
|
|
979
|
+
withdrawAvailableAt: import_zod9.z.nullable(import_zod9.z.coerce.date())
|
|
956
980
|
});
|
|
957
|
-
var StakingLeaderboardPosition =
|
|
958
|
-
rank:
|
|
959
|
-
address:
|
|
960
|
-
owner:
|
|
981
|
+
var StakingLeaderboardPosition = import_zod9.z.object({
|
|
982
|
+
rank: import_zod9.z.number(),
|
|
983
|
+
address: import_zod9.z.string(),
|
|
984
|
+
owner: import_zod9.z.string(),
|
|
961
985
|
staked: AmountWithUsdSchema
|
|
962
986
|
});
|
|
963
|
-
var StakingLeaderboardPage =
|
|
987
|
+
var StakingLeaderboardPage = import_zod9.z.object({
|
|
964
988
|
data: StakingLeaderboardPosition.array(),
|
|
965
989
|
meta: PaginationMeta
|
|
966
990
|
});
|
|
967
|
-
var StakingPositionHistoryAction =
|
|
968
|
-
position:
|
|
991
|
+
var StakingPositionHistoryAction = import_zod9.z.object({
|
|
992
|
+
position: import_zod9.z.string(),
|
|
969
993
|
action: StakingPositionHistoryActionTypeSchema,
|
|
970
|
-
txSignature:
|
|
971
|
-
amount:
|
|
972
|
-
time:
|
|
973
|
-
});
|
|
974
|
-
var PoolPriceCandle =
|
|
975
|
-
time:
|
|
976
|
-
open:
|
|
977
|
-
close:
|
|
978
|
-
high:
|
|
979
|
-
low:
|
|
980
|
-
volume:
|
|
981
|
-
});
|
|
982
|
-
var FeesStatsGroup =
|
|
983
|
-
time:
|
|
984
|
-
addLiquidityFees:
|
|
985
|
-
limitOrderFees:
|
|
986
|
-
yieldCompoundingFees:
|
|
987
|
-
liquidationFees:
|
|
988
|
-
totalLiquidationsNetworkFees:
|
|
989
|
-
totalLimitOrdersNetworkFees:
|
|
990
|
-
totalYieldCompoundingNetworkFees:
|
|
991
|
-
failedNetworkFees:
|
|
992
|
-
processedNetworkFees:
|
|
993
|
-
totalCollectedFees:
|
|
994
|
-
totalNetworkFees:
|
|
995
|
-
jitoLiquidationFees:
|
|
996
|
-
jitoLimitOrderFees:
|
|
997
|
-
jitoYieldCompoundingFees:
|
|
998
|
-
runningAddLiquidityFees:
|
|
999
|
-
runningLimitOrderFees:
|
|
1000
|
-
runningYieldCompoundingFees:
|
|
1001
|
-
runningLiquidationFees:
|
|
1002
|
-
runningTotalLiquidationsNetworkFees:
|
|
1003
|
-
runningTotalLimitOrdersNetworkFees:
|
|
1004
|
-
runningTotalYieldCompoundingNetworkFees:
|
|
1005
|
-
runningFailedNetworkFees:
|
|
1006
|
-
runningProcessedNetworkFees:
|
|
1007
|
-
runningJitoLiquidationFees:
|
|
1008
|
-
runningJitoLimitOrderFees:
|
|
1009
|
-
runningJitoYieldCompoundingFees:
|
|
1010
|
-
runningTotalCollectedFees:
|
|
1011
|
-
runningTotalNetworkFees:
|
|
1012
|
-
});
|
|
1013
|
-
var StakingRevenueStatsGroup =
|
|
1014
|
-
time:
|
|
1015
|
-
totalDepositsUsd:
|
|
1016
|
-
totalDepositsSol:
|
|
1017
|
-
runningTotalDepositsUsd:
|
|
1018
|
-
runningTotalDepositsSol:
|
|
1019
|
-
});
|
|
1020
|
-
var SwapQuoteByInput =
|
|
1021
|
-
estimatedAmountOut:
|
|
1022
|
-
minAmountOut:
|
|
1023
|
-
feeAmount:
|
|
1024
|
-
feeUsd:
|
|
994
|
+
txSignature: import_zod9.z.string(),
|
|
995
|
+
amount: import_zod9.z.coerce.bigint(),
|
|
996
|
+
time: import_zod9.z.coerce.date()
|
|
997
|
+
});
|
|
998
|
+
var PoolPriceCandle = import_zod9.z.object({
|
|
999
|
+
time: import_zod9.z.number(),
|
|
1000
|
+
open: import_zod9.z.number(),
|
|
1001
|
+
close: import_zod9.z.number(),
|
|
1002
|
+
high: import_zod9.z.number(),
|
|
1003
|
+
low: import_zod9.z.number(),
|
|
1004
|
+
volume: import_zod9.z.number()
|
|
1005
|
+
});
|
|
1006
|
+
var FeesStatsGroup = import_zod9.z.object({
|
|
1007
|
+
time: import_zod9.z.coerce.date(),
|
|
1008
|
+
addLiquidityFees: import_zod9.z.number(),
|
|
1009
|
+
limitOrderFees: import_zod9.z.number(),
|
|
1010
|
+
yieldCompoundingFees: import_zod9.z.number(),
|
|
1011
|
+
liquidationFees: import_zod9.z.number(),
|
|
1012
|
+
totalLiquidationsNetworkFees: import_zod9.z.number(),
|
|
1013
|
+
totalLimitOrdersNetworkFees: import_zod9.z.number(),
|
|
1014
|
+
totalYieldCompoundingNetworkFees: import_zod9.z.number(),
|
|
1015
|
+
failedNetworkFees: import_zod9.z.number(),
|
|
1016
|
+
processedNetworkFees: import_zod9.z.number(),
|
|
1017
|
+
totalCollectedFees: import_zod9.z.number(),
|
|
1018
|
+
totalNetworkFees: import_zod9.z.number(),
|
|
1019
|
+
jitoLiquidationFees: import_zod9.z.number(),
|
|
1020
|
+
jitoLimitOrderFees: import_zod9.z.number(),
|
|
1021
|
+
jitoYieldCompoundingFees: import_zod9.z.number(),
|
|
1022
|
+
runningAddLiquidityFees: import_zod9.z.number(),
|
|
1023
|
+
runningLimitOrderFees: import_zod9.z.number(),
|
|
1024
|
+
runningYieldCompoundingFees: import_zod9.z.number(),
|
|
1025
|
+
runningLiquidationFees: import_zod9.z.number(),
|
|
1026
|
+
runningTotalLiquidationsNetworkFees: import_zod9.z.number(),
|
|
1027
|
+
runningTotalLimitOrdersNetworkFees: import_zod9.z.number(),
|
|
1028
|
+
runningTotalYieldCompoundingNetworkFees: import_zod9.z.number(),
|
|
1029
|
+
runningFailedNetworkFees: import_zod9.z.number(),
|
|
1030
|
+
runningProcessedNetworkFees: import_zod9.z.number(),
|
|
1031
|
+
runningJitoLiquidationFees: import_zod9.z.number(),
|
|
1032
|
+
runningJitoLimitOrderFees: import_zod9.z.number(),
|
|
1033
|
+
runningJitoYieldCompoundingFees: import_zod9.z.number(),
|
|
1034
|
+
runningTotalCollectedFees: import_zod9.z.number(),
|
|
1035
|
+
runningTotalNetworkFees: import_zod9.z.number()
|
|
1036
|
+
});
|
|
1037
|
+
var StakingRevenueStatsGroup = import_zod9.z.object({
|
|
1038
|
+
time: import_zod9.z.coerce.date(),
|
|
1039
|
+
totalDepositsUsd: import_zod9.z.number(),
|
|
1040
|
+
totalDepositsSol: import_zod9.z.coerce.bigint(),
|
|
1041
|
+
runningTotalDepositsUsd: import_zod9.z.number(),
|
|
1042
|
+
runningTotalDepositsSol: import_zod9.z.coerce.bigint()
|
|
1043
|
+
});
|
|
1044
|
+
var SwapQuoteByInput = import_zod9.z.object({
|
|
1045
|
+
estimatedAmountOut: import_zod9.z.coerce.bigint(),
|
|
1046
|
+
minAmountOut: import_zod9.z.coerce.bigint(),
|
|
1047
|
+
feeAmount: import_zod9.z.coerce.bigint(),
|
|
1048
|
+
feeUsd: import_zod9.z.number(),
|
|
1025
1049
|
/** Price impact in percents */
|
|
1026
|
-
priceImpact:
|
|
1050
|
+
priceImpact: import_zod9.z.number()
|
|
1027
1051
|
});
|
|
1028
|
-
var SwapQuoteByOutput =
|
|
1029
|
-
estimatedAmountIn:
|
|
1030
|
-
maxAmountIn:
|
|
1031
|
-
feeAmount:
|
|
1032
|
-
feeUsd:
|
|
1052
|
+
var SwapQuoteByOutput = import_zod9.z.object({
|
|
1053
|
+
estimatedAmountIn: import_zod9.z.coerce.bigint(),
|
|
1054
|
+
maxAmountIn: import_zod9.z.coerce.bigint(),
|
|
1055
|
+
feeAmount: import_zod9.z.coerce.bigint(),
|
|
1056
|
+
feeUsd: import_zod9.z.number(),
|
|
1033
1057
|
/** Price impact in percents */
|
|
1034
|
-
priceImpact:
|
|
1058
|
+
priceImpact: import_zod9.z.number()
|
|
1035
1059
|
});
|
|
1036
|
-
var LimitOrderQuoteByInput =
|
|
1037
|
-
amountOut:
|
|
1060
|
+
var LimitOrderQuoteByInput = import_zod9.z.object({
|
|
1061
|
+
amountOut: import_zod9.z.coerce.bigint()
|
|
1038
1062
|
});
|
|
1039
|
-
var LimitOrderQuoteByOutput =
|
|
1040
|
-
amountIn:
|
|
1063
|
+
var LimitOrderQuoteByOutput = import_zod9.z.object({
|
|
1064
|
+
amountIn: import_zod9.z.coerce.bigint()
|
|
1041
1065
|
});
|
|
1042
1066
|
var TradableAmount = AmountWithUsdSchema;
|
|
1043
|
-
var UpdateStreamSubscriptionResult =
|
|
1044
|
-
status:
|
|
1067
|
+
var UpdateStreamSubscriptionResult = import_zod9.z.object({
|
|
1068
|
+
status: import_zod9.z.string()
|
|
1045
1069
|
});
|
|
1046
|
-
var createNotificationSchema = (dataSchema, metaSchema) =>
|
|
1070
|
+
var createNotificationSchema = (dataSchema, metaSchema) => import_zod9.z.object({
|
|
1047
1071
|
entity: NotificationEntitySchema,
|
|
1048
1072
|
action: NotificationActionSchema,
|
|
1049
1073
|
data: dataSchema,
|
|
1050
|
-
id:
|
|
1051
|
-
authority:
|
|
1052
|
-
...metaSchema ? { meta: metaSchema } : { meta:
|
|
1053
|
-
});
|
|
1054
|
-
var OrderBookNotificationMeta =
|
|
1055
|
-
pool:
|
|
1056
|
-
priceStep:
|
|
1057
|
-
inverted:
|
|
1074
|
+
id: import_zod9.z.string(),
|
|
1075
|
+
authority: import_zod9.z.nullish(import_zod9.z.string()),
|
|
1076
|
+
...metaSchema ? { meta: metaSchema } : { meta: import_zod9.z.undefined().nullable() }
|
|
1077
|
+
});
|
|
1078
|
+
var OrderBookNotificationMeta = import_zod9.z.object({
|
|
1079
|
+
pool: import_zod9.z.string(),
|
|
1080
|
+
priceStep: import_zod9.z.number(),
|
|
1081
|
+
inverted: import_zod9.z.boolean()
|
|
1058
1082
|
});
|
|
1059
1083
|
var PoolSwapNotification = createNotificationSchema(PoolSwap);
|
|
1060
1084
|
var OrderBookNotification = createNotificationSchema(OrderBook, OrderBookNotificationMeta);
|