@crypticdot/defituna-api 4.1.2 → 4.2.0
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.cjs +178 -124
- package/dist/index.d.cts +2264 -964
- package/dist/index.d.ts +2264 -964
- package/dist/index.js +178 -124
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -132,8 +132,21 @@ var marketDtoSchemaResponseTransformer = (data) => {
|
|
|
132
132
|
data.pool = poolDtoSchemaResponseTransformer(data.pool);
|
|
133
133
|
return data;
|
|
134
134
|
};
|
|
135
|
+
var vaultDtoSchemaResponseTransformer = (data) => {
|
|
136
|
+
data.borrowedFunds = tokenAmountWithUsdSchemaResponseTransformer(data.borrowedFunds);
|
|
137
|
+
data.borrowedShares = u64DtoSchemaResponseTransformer(data.borrowedShares);
|
|
138
|
+
data.depositedFunds = tokenAmountWithUsdSchemaResponseTransformer(data.depositedFunds);
|
|
139
|
+
data.depositedShares = u64DtoSchemaResponseTransformer(data.depositedShares);
|
|
140
|
+
data.interestRate = u64DtoSchemaResponseTransformer(data.interestRate);
|
|
141
|
+
data.supplyLimit = tokenAmountWithUsdSchemaResponseTransformer(data.supplyLimit);
|
|
142
|
+
return data;
|
|
143
|
+
};
|
|
135
144
|
var marketsListResponseSchemaResponseTransformer = (data) => {
|
|
136
145
|
data.items = data.items.map((item) => marketDtoSchemaResponseTransformer(item));
|
|
146
|
+
const _additionalPropertiesTarget3 = data.vaults;
|
|
147
|
+
Object.keys(_additionalPropertiesTarget3).forEach((key) => {
|
|
148
|
+
_additionalPropertiesTarget3[key] = vaultDtoSchemaResponseTransformer(_additionalPropertiesTarget3[key]);
|
|
149
|
+
});
|
|
137
150
|
return data;
|
|
138
151
|
};
|
|
139
152
|
var getMarketsResponseTransformer = async (data) => {
|
|
@@ -142,6 +155,10 @@ var getMarketsResponseTransformer = async (data) => {
|
|
|
142
155
|
};
|
|
143
156
|
var marketResponseSchemaResponseTransformer = (data) => {
|
|
144
157
|
data.item = marketDtoSchemaResponseTransformer(data.item);
|
|
158
|
+
const _additionalPropertiesTarget5 = data.vaults;
|
|
159
|
+
Object.keys(_additionalPropertiesTarget5).forEach((key) => {
|
|
160
|
+
_additionalPropertiesTarget5[key] = vaultDtoSchemaResponseTransformer(_additionalPropertiesTarget5[key]);
|
|
161
|
+
});
|
|
145
162
|
return data;
|
|
146
163
|
};
|
|
147
164
|
var getMarketResponseTransformer = async (data) => {
|
|
@@ -351,6 +368,14 @@ var lendingPositionDtoSchemaResponseTransformer = (data) => {
|
|
|
351
368
|
};
|
|
352
369
|
var lendingPositionsListResponseSchemaResponseTransformer = (data) => {
|
|
353
370
|
data.items = data.items.map((item) => lendingPositionDtoSchemaResponseTransformer(item));
|
|
371
|
+
const _additionalPropertiesTarget6 = data.markets;
|
|
372
|
+
Object.keys(_additionalPropertiesTarget6).forEach((key) => {
|
|
373
|
+
_additionalPropertiesTarget6[key] = marketDtoSchemaResponseTransformer(_additionalPropertiesTarget6[key]);
|
|
374
|
+
});
|
|
375
|
+
const _additionalPropertiesTarget8 = data.vaults;
|
|
376
|
+
Object.keys(_additionalPropertiesTarget8).forEach((key) => {
|
|
377
|
+
_additionalPropertiesTarget8[key] = vaultDtoSchemaResponseTransformer(_additionalPropertiesTarget8[key]);
|
|
378
|
+
});
|
|
354
379
|
return data;
|
|
355
380
|
};
|
|
356
381
|
var getLendingPositionsResponseTransformer = async (data) => {
|
|
@@ -359,6 +384,14 @@ var getLendingPositionsResponseTransformer = async (data) => {
|
|
|
359
384
|
};
|
|
360
385
|
var lendingPositionResponseSchemaResponseTransformer = (data) => {
|
|
361
386
|
data.item = lendingPositionDtoSchemaResponseTransformer(data.item);
|
|
387
|
+
const _additionalPropertiesTarget9 = data.markets;
|
|
388
|
+
Object.keys(_additionalPropertiesTarget9).forEach((key) => {
|
|
389
|
+
_additionalPropertiesTarget9[key] = marketDtoSchemaResponseTransformer(_additionalPropertiesTarget9[key]);
|
|
390
|
+
});
|
|
391
|
+
const _additionalPropertiesTarget11 = data.vaults;
|
|
392
|
+
Object.keys(_additionalPropertiesTarget11).forEach((key) => {
|
|
393
|
+
_additionalPropertiesTarget11[key] = vaultDtoSchemaResponseTransformer(_additionalPropertiesTarget11[key]);
|
|
394
|
+
});
|
|
362
395
|
return data;
|
|
363
396
|
};
|
|
364
397
|
var getLendingPositionResponseTransformer = async (data) => {
|
|
@@ -376,9 +409,9 @@ var limitOrderDtoSchemaResponseTransformer = (data) => {
|
|
|
376
409
|
};
|
|
377
410
|
var limitOrdersListResponseSchemaResponseTransformer = (data) => {
|
|
378
411
|
data.items = data.items.map((item) => limitOrderDtoSchemaResponseTransformer(item));
|
|
379
|
-
const
|
|
380
|
-
Object.keys(
|
|
381
|
-
|
|
412
|
+
const _additionalPropertiesTarget12 = data.markets;
|
|
413
|
+
Object.keys(_additionalPropertiesTarget12).forEach((key) => {
|
|
414
|
+
_additionalPropertiesTarget12[key] = marketDtoSchemaResponseTransformer(_additionalPropertiesTarget12[key]);
|
|
382
415
|
});
|
|
383
416
|
return data;
|
|
384
417
|
};
|
|
@@ -388,9 +421,9 @@ var getLimitOrdersResponseTransformer = async (data) => {
|
|
|
388
421
|
};
|
|
389
422
|
var limitOrderResponseSchemaResponseTransformer = (data) => {
|
|
390
423
|
data.item = limitOrderDtoSchemaResponseTransformer(data.item);
|
|
391
|
-
const
|
|
392
|
-
Object.keys(
|
|
393
|
-
|
|
424
|
+
const _additionalPropertiesTarget14 = data.markets;
|
|
425
|
+
Object.keys(_additionalPropertiesTarget14).forEach((key) => {
|
|
426
|
+
_additionalPropertiesTarget14[key] = marketDtoSchemaResponseTransformer(_additionalPropertiesTarget14[key]);
|
|
394
427
|
});
|
|
395
428
|
return data;
|
|
396
429
|
};
|
|
@@ -408,9 +441,9 @@ var tunaLpPositionDtoSchemaResponseTransformer = (data) => {
|
|
|
408
441
|
};
|
|
409
442
|
var lpPositionsHistoryListResponseSchemaResponseTransformer = (data) => {
|
|
410
443
|
data.items = data.items.map((item) => tunaLpPositionDtoSchemaResponseTransformer(item));
|
|
411
|
-
const
|
|
412
|
-
Object.keys(
|
|
413
|
-
|
|
444
|
+
const _additionalPropertiesTarget16 = data.markets;
|
|
445
|
+
Object.keys(_additionalPropertiesTarget16).forEach((key) => {
|
|
446
|
+
_additionalPropertiesTarget16[key] = marketDtoSchemaResponseTransformer(_additionalPropertiesTarget16[key]);
|
|
414
447
|
});
|
|
415
448
|
return data;
|
|
416
449
|
};
|
|
@@ -441,9 +474,9 @@ var orderHistoryEntryDtoSchemaResponseTransformer = (data) => {
|
|
|
441
474
|
};
|
|
442
475
|
var orderHistoryListResponseSchemaResponseTransformer = (data) => {
|
|
443
476
|
data.items = data.items.map((item) => orderHistoryEntryDtoSchemaResponseTransformer(item));
|
|
444
|
-
const
|
|
445
|
-
Object.keys(
|
|
446
|
-
|
|
477
|
+
const _additionalPropertiesTarget18 = data.markets;
|
|
478
|
+
Object.keys(_additionalPropertiesTarget18).forEach((key) => {
|
|
479
|
+
_additionalPropertiesTarget18[key] = marketDtoSchemaResponseTransformer(_additionalPropertiesTarget18[key]);
|
|
447
480
|
});
|
|
448
481
|
return data;
|
|
449
482
|
};
|
|
@@ -464,9 +497,9 @@ var tunaSpotPositionDtoSchemaResponseTransformer = (data) => {
|
|
|
464
497
|
};
|
|
465
498
|
var spotPositionsListResponseSchemaResponseTransformer = (data) => {
|
|
466
499
|
data.items = data.items.map((item) => tunaSpotPositionDtoSchemaResponseTransformer(item));
|
|
467
|
-
const
|
|
468
|
-
Object.keys(
|
|
469
|
-
|
|
500
|
+
const _additionalPropertiesTarget20 = data.markets;
|
|
501
|
+
Object.keys(_additionalPropertiesTarget20).forEach((key) => {
|
|
502
|
+
_additionalPropertiesTarget20[key] = marketDtoSchemaResponseTransformer(_additionalPropertiesTarget20[key]);
|
|
470
503
|
});
|
|
471
504
|
return data;
|
|
472
505
|
};
|
|
@@ -476,9 +509,9 @@ var getSpotPositionsResponseTransformer = async (data) => {
|
|
|
476
509
|
};
|
|
477
510
|
var spotPositionResponseSchemaResponseTransformer = (data) => {
|
|
478
511
|
data.item = tunaSpotPositionDtoSchemaResponseTransformer(data.item);
|
|
479
|
-
const
|
|
480
|
-
Object.keys(
|
|
481
|
-
|
|
512
|
+
const _additionalPropertiesTarget22 = data.markets;
|
|
513
|
+
Object.keys(_additionalPropertiesTarget22).forEach((key) => {
|
|
514
|
+
_additionalPropertiesTarget22[key] = marketDtoSchemaResponseTransformer(_additionalPropertiesTarget22[key]);
|
|
482
515
|
});
|
|
483
516
|
return data;
|
|
484
517
|
};
|
|
@@ -540,9 +573,9 @@ var tradeHistoryEntryDtoSchemaResponseTransformer = (data) => {
|
|
|
540
573
|
};
|
|
541
574
|
var tradeHistoryListResponseSchemaResponseTransformer = (data) => {
|
|
542
575
|
data.items = data.items.map((item) => tradeHistoryEntryDtoSchemaResponseTransformer(item));
|
|
543
|
-
const
|
|
544
|
-
Object.keys(
|
|
545
|
-
|
|
576
|
+
const _additionalPropertiesTarget24 = data.markets;
|
|
577
|
+
Object.keys(_additionalPropertiesTarget24).forEach((key) => {
|
|
578
|
+
_additionalPropertiesTarget24[key] = marketDtoSchemaResponseTransformer(_additionalPropertiesTarget24[key]);
|
|
546
579
|
});
|
|
547
580
|
return data;
|
|
548
581
|
};
|
|
@@ -584,9 +617,9 @@ var tunaPositionDtoSchemaResponseTransformer = (data) => {
|
|
|
584
617
|
};
|
|
585
618
|
var lpPositionsListResponseSchemaResponseTransformer = (data) => {
|
|
586
619
|
data.items = data.items.map((item) => tunaPositionDtoSchemaResponseTransformer(item));
|
|
587
|
-
const
|
|
588
|
-
Object.keys(
|
|
589
|
-
|
|
620
|
+
const _additionalPropertiesTarget26 = data.markets;
|
|
621
|
+
Object.keys(_additionalPropertiesTarget26).forEach((key) => {
|
|
622
|
+
_additionalPropertiesTarget26[key] = marketDtoSchemaResponseTransformer(_additionalPropertiesTarget26[key]);
|
|
590
623
|
});
|
|
591
624
|
return data;
|
|
592
625
|
};
|
|
@@ -596,9 +629,9 @@ var getTunaPositionsResponseTransformer = async (data) => {
|
|
|
596
629
|
};
|
|
597
630
|
var lpPositionResponseSchemaResponseTransformer = (data) => {
|
|
598
631
|
data.item = tunaPositionDtoSchemaResponseTransformer(data.item);
|
|
599
|
-
const
|
|
600
|
-
Object.keys(
|
|
601
|
-
|
|
632
|
+
const _additionalPropertiesTarget28 = data.markets;
|
|
633
|
+
Object.keys(_additionalPropertiesTarget28).forEach((key) => {
|
|
634
|
+
_additionalPropertiesTarget28[key] = marketDtoSchemaResponseTransformer(_additionalPropertiesTarget28[key]);
|
|
602
635
|
});
|
|
603
636
|
return data;
|
|
604
637
|
};
|
|
@@ -608,15 +641,6 @@ var getTunaPositionResponseTransformer = async (data) => {
|
|
|
608
641
|
}
|
|
609
642
|
return data;
|
|
610
643
|
};
|
|
611
|
-
var vaultDtoSchemaResponseTransformer = (data) => {
|
|
612
|
-
data.borrowedFunds = tokenAmountWithUsdSchemaResponseTransformer(data.borrowedFunds);
|
|
613
|
-
data.borrowedShares = u64DtoSchemaResponseTransformer(data.borrowedShares);
|
|
614
|
-
data.depositedFunds = tokenAmountWithUsdSchemaResponseTransformer(data.depositedFunds);
|
|
615
|
-
data.depositedShares = u64DtoSchemaResponseTransformer(data.depositedShares);
|
|
616
|
-
data.interestRate = u64DtoSchemaResponseTransformer(data.interestRate);
|
|
617
|
-
data.supplyLimit = tokenAmountWithUsdSchemaResponseTransformer(data.supplyLimit);
|
|
618
|
-
return data;
|
|
619
|
-
};
|
|
620
644
|
var vaultsListResponseSchemaResponseTransformer = (data) => {
|
|
621
645
|
data.items = data.items.map((item) => vaultDtoSchemaResponseTransformer(item));
|
|
622
646
|
return data;
|
|
@@ -786,26 +810,26 @@ var toBigInt = (value) => {
|
|
|
786
810
|
};
|
|
787
811
|
var transformMarketsMap = async (markets) => {
|
|
788
812
|
const entries = Object.entries(markets);
|
|
789
|
-
const
|
|
813
|
+
const transformedByAddress = /* @__PURE__ */ new Map();
|
|
790
814
|
for (const [address, market] of entries) {
|
|
791
|
-
if (isRecord(market)) {
|
|
792
|
-
|
|
815
|
+
if (!isRecord(market)) {
|
|
816
|
+
transformedByAddress.set(address, market);
|
|
817
|
+
continue;
|
|
818
|
+
}
|
|
819
|
+
try {
|
|
820
|
+
const response = await getMarketsResponseTransformer({
|
|
821
|
+
data: {
|
|
822
|
+
items: [market],
|
|
823
|
+
mints: {},
|
|
824
|
+
vaults: {}
|
|
825
|
+
}
|
|
826
|
+
});
|
|
827
|
+
transformedByAddress.set(address, response.data.items[0] ?? market);
|
|
828
|
+
} catch (_) {
|
|
829
|
+
transformedByAddress.set(address, market);
|
|
793
830
|
}
|
|
794
831
|
}
|
|
795
|
-
|
|
796
|
-
if (marketEntries.length > 0) {
|
|
797
|
-
const response = await getMarketsResponseTransformer({
|
|
798
|
-
data: {
|
|
799
|
-
items: marketEntries.map(([, market]) => market),
|
|
800
|
-
mints: {}
|
|
801
|
-
}
|
|
802
|
-
});
|
|
803
|
-
const transformedItems = response.data.items;
|
|
804
|
-
marketEntries.forEach(([address], index) => {
|
|
805
|
-
transformedByAddress.set(address, transformedItems[index]);
|
|
806
|
-
});
|
|
807
|
-
}
|
|
808
|
-
return Object.fromEntries(entries.map(([address, market]) => [address, transformedByAddress.get(address) ?? market]));
|
|
832
|
+
return Object.fromEntries(entries.map(([address]) => [address, transformedByAddress.get(address)]));
|
|
809
833
|
};
|
|
810
834
|
var normalizeMintsMap = (mints) => Object.fromEntries(Object.entries(mints).map(([address, mint]) => [address, mint]));
|
|
811
835
|
var applySseResponseTransforms = async (payload) => {
|
|
@@ -9409,20 +9433,16 @@ var zLendingPositionDto = object({
|
|
|
9409
9433
|
authority: zPubkeyDto,
|
|
9410
9434
|
earned: zTokenAmountWithUsd,
|
|
9411
9435
|
funds: zTokenAmountWithUsd,
|
|
9436
|
+
market: optional(union([
|
|
9437
|
+
_null3(),
|
|
9438
|
+
zPubkeyDto
|
|
9439
|
+
])),
|
|
9412
9440
|
mint: zPubkeyDto,
|
|
9413
9441
|
shares: zU64Dto,
|
|
9414
9442
|
supplyApy: number2(),
|
|
9415
9443
|
updatedAtSlot: zU64Dto,
|
|
9416
9444
|
vault: zPubkeyDto
|
|
9417
9445
|
});
|
|
9418
|
-
var zLendingPositionResponse = object({
|
|
9419
|
-
item: zLendingPositionDto,
|
|
9420
|
-
mints: record(string2(), zMintDto)
|
|
9421
|
-
});
|
|
9422
|
-
var zLendingPositionsListResponse = object({
|
|
9423
|
-
items: array(zLendingPositionDto),
|
|
9424
|
-
mints: record(string2(), zMintDto)
|
|
9425
|
-
});
|
|
9426
9446
|
var zLimitOrderDto = object({
|
|
9427
9447
|
aToB: boolean2(),
|
|
9428
9448
|
address: zPubkeyDto,
|
|
@@ -9449,12 +9469,18 @@ var zLimitOrderDto = object({
|
|
|
9449
9469
|
var zMarketDto = object({
|
|
9450
9470
|
address: zPubkeyDto,
|
|
9451
9471
|
addressLookupTable: zPubkeyDto,
|
|
9472
|
+
authority: optional(union([
|
|
9473
|
+
_null3(),
|
|
9474
|
+
zPubkeyDto
|
|
9475
|
+
])),
|
|
9452
9476
|
borrowLimitA: zTokenAmountWithUsd,
|
|
9453
9477
|
borrowLimitB: zTokenAmountWithUsd,
|
|
9454
9478
|
borrowedFundsA: zTokenAmountWithUsd,
|
|
9455
9479
|
borrowedFundsB: zTokenAmountWithUsd,
|
|
9456
9480
|
createdAt: preprocess((value) => value instanceof Date ? value.toISOString() : value, iso_exports.datetime()),
|
|
9457
9481
|
disabled: boolean2(),
|
|
9482
|
+
isPermissionless: boolean2(),
|
|
9483
|
+
isVerified: boolean2(),
|
|
9458
9484
|
liquidationFee: int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
9459
9485
|
liquidationThreshold: int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
9460
9486
|
maxLeverage: int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
@@ -9465,7 +9491,9 @@ var zMarketDto = object({
|
|
|
9465
9491
|
pool: zPoolDto,
|
|
9466
9492
|
protocolFee: int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
9467
9493
|
protocolFeeOnCollateral: int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
9468
|
-
rebalanceProtocolFee: int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" })
|
|
9494
|
+
rebalanceProtocolFee: int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
9495
|
+
vaultA: zPubkeyDto,
|
|
9496
|
+
vaultB: zPubkeyDto
|
|
9469
9497
|
});
|
|
9470
9498
|
var zLimitOrderResponse = object({
|
|
9471
9499
|
item: zLimitOrderDto,
|
|
@@ -9482,14 +9510,6 @@ var zLpPositionsHistoryListResponse = object({
|
|
|
9482
9510
|
markets: record(string2(), zMarketDto),
|
|
9483
9511
|
mints: record(string2(), zMintDto)
|
|
9484
9512
|
});
|
|
9485
|
-
var zMarketResponse = object({
|
|
9486
|
-
item: zMarketDto,
|
|
9487
|
-
mints: record(string2(), zMintDto)
|
|
9488
|
-
});
|
|
9489
|
-
var zMarketsListResponse = object({
|
|
9490
|
-
items: array(zMarketDto),
|
|
9491
|
-
mints: record(string2(), zMintDto)
|
|
9492
|
-
});
|
|
9493
9513
|
var zOrderHistoryEntryDto = object({
|
|
9494
9514
|
aToB: boolean2(),
|
|
9495
9515
|
authority: zPubkeyDto,
|
|
@@ -9542,19 +9562,6 @@ var zOrderHistoryNotificationResponse = object({
|
|
|
9542
9562
|
markets: record(string2(), zMarketDto),
|
|
9543
9563
|
mints: record(string2(), zMintDto)
|
|
9544
9564
|
});
|
|
9545
|
-
var zSseResponseLendingPositionPayload = object({
|
|
9546
|
-
action: zNotificationAction,
|
|
9547
|
-
authority: optional(union([
|
|
9548
|
-
_null3(),
|
|
9549
|
-
zPubkeyDto
|
|
9550
|
-
])),
|
|
9551
|
-
data: zLendingPositionDto,
|
|
9552
|
-
entity: zNotificationEntity,
|
|
9553
|
-
id: string2()
|
|
9554
|
-
});
|
|
9555
|
-
var zSseResponseLendingPosition = zSseResponseLendingPositionPayload.and(object({
|
|
9556
|
-
entity: _enum(["lending_position"])
|
|
9557
|
-
}));
|
|
9558
9565
|
var zSseResponseOrderHistoryEntryPayload = object({
|
|
9559
9566
|
action: zNotificationAction,
|
|
9560
9567
|
authority: optional(union([
|
|
@@ -9722,44 +9729,6 @@ var zTunaSpotPositionDto = object({
|
|
|
9722
9729
|
upperLimitOrderPrice: number2(),
|
|
9723
9730
|
version: int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" })
|
|
9724
9731
|
});
|
|
9725
|
-
var zSnapshot = object({
|
|
9726
|
-
blockTime: preprocess((value) => value instanceof Date ? value.toISOString() : value, iso_exports.datetime()),
|
|
9727
|
-
fusionLimitOrders: optional(union([
|
|
9728
|
-
array(zLimitOrderDto),
|
|
9729
|
-
_null3()
|
|
9730
|
-
])),
|
|
9731
|
-
markets: optional(union([
|
|
9732
|
-
record(string2(), zMarketDto),
|
|
9733
|
-
_null3()
|
|
9734
|
-
])),
|
|
9735
|
-
mints: optional(union([
|
|
9736
|
-
record(string2(), zMintDto),
|
|
9737
|
-
_null3()
|
|
9738
|
-
])),
|
|
9739
|
-
oraclePrices: optional(union([
|
|
9740
|
-
record(string2(), string2()),
|
|
9741
|
-
_null3()
|
|
9742
|
-
])),
|
|
9743
|
-
orderBooks: optional(union([
|
|
9744
|
-
array(zOrderBookWrapper),
|
|
9745
|
-
_null3()
|
|
9746
|
-
])),
|
|
9747
|
-
slot: coerce_exports.bigint().gte(BigInt(0)).max(BigInt("9223372036854775807"), { error: "Invalid value: Expected int64 to be <= 9223372036854775807" }),
|
|
9748
|
-
tunaLpPositions: optional(union([
|
|
9749
|
-
array(zTunaPositionDto),
|
|
9750
|
-
_null3()
|
|
9751
|
-
])),
|
|
9752
|
-
tunaSpotPositions: optional(union([
|
|
9753
|
-
array(zTunaSpotPositionDto),
|
|
9754
|
-
_null3()
|
|
9755
|
-
]))
|
|
9756
|
-
});
|
|
9757
|
-
var zSnapshotContainer = object({
|
|
9758
|
-
action: string2(),
|
|
9759
|
-
data: zSnapshot,
|
|
9760
|
-
entity: string2(),
|
|
9761
|
-
id: string2()
|
|
9762
|
-
});
|
|
9763
9732
|
var zSpotPositionResponse = object({
|
|
9764
9733
|
item: zTunaSpotPositionDto,
|
|
9765
9734
|
markets: record(string2(), zMarketDto),
|
|
@@ -9770,9 +9739,6 @@ var zSpotPositionsListResponse = object({
|
|
|
9770
9739
|
markets: record(string2(), zMarketDto),
|
|
9771
9740
|
mints: record(string2(), zMintDto)
|
|
9772
9741
|
});
|
|
9773
|
-
var zSseResponseSnapshot = zSnapshotContainer.and(object({
|
|
9774
|
-
entity: _enum(["state_snapshot"])
|
|
9775
|
-
}));
|
|
9776
9742
|
var zUpdateStreamSubscriptionError404Error = object({
|
|
9777
9743
|
code: _enum(["not_found"])
|
|
9778
9744
|
});
|
|
@@ -9793,12 +9759,20 @@ var zValidationErrorCodeValidationDetailsErrorBody = object({
|
|
|
9793
9759
|
});
|
|
9794
9760
|
var zVaultDto = object({
|
|
9795
9761
|
address: zPubkeyDto,
|
|
9762
|
+
authority: optional(union([
|
|
9763
|
+
_null3(),
|
|
9764
|
+
zPubkeyDto
|
|
9765
|
+
])),
|
|
9796
9766
|
borrowApy: number2(),
|
|
9797
9767
|
borrowedFunds: zTokenAmountWithUsd,
|
|
9798
9768
|
borrowedShares: zU64Dto,
|
|
9799
9769
|
depositedFunds: zTokenAmountWithUsd,
|
|
9800
9770
|
depositedShares: zU64Dto,
|
|
9801
9771
|
interestRate: zU64Dto,
|
|
9772
|
+
market: optional(union([
|
|
9773
|
+
_null3(),
|
|
9774
|
+
zPubkeyDto
|
|
9775
|
+
])),
|
|
9802
9776
|
mint: zPubkeyDto,
|
|
9803
9777
|
pythOracleFeedId: zPubkeyDto,
|
|
9804
9778
|
pythOraclePriceUpdate: zPubkeyDto,
|
|
@@ -9806,6 +9780,86 @@ var zVaultDto = object({
|
|
|
9806
9780
|
supplyLimit: zTokenAmountWithUsd,
|
|
9807
9781
|
utilization: number2()
|
|
9808
9782
|
});
|
|
9783
|
+
var zLendingPositionResponse = object({
|
|
9784
|
+
item: zLendingPositionDto,
|
|
9785
|
+
markets: record(string2(), zMarketDto),
|
|
9786
|
+
mints: record(string2(), zMintDto),
|
|
9787
|
+
vaults: record(string2(), zVaultDto)
|
|
9788
|
+
});
|
|
9789
|
+
var zLendingPositionsListResponse = object({
|
|
9790
|
+
items: array(zLendingPositionDto),
|
|
9791
|
+
markets: record(string2(), zMarketDto),
|
|
9792
|
+
mints: record(string2(), zMintDto),
|
|
9793
|
+
vaults: record(string2(), zVaultDto)
|
|
9794
|
+
});
|
|
9795
|
+
var zMarketResponse = object({
|
|
9796
|
+
item: zMarketDto,
|
|
9797
|
+
mints: record(string2(), zMintDto),
|
|
9798
|
+
vaults: record(string2(), zVaultDto)
|
|
9799
|
+
});
|
|
9800
|
+
var zMarketsListResponse = object({
|
|
9801
|
+
items: array(zMarketDto),
|
|
9802
|
+
mints: record(string2(), zMintDto),
|
|
9803
|
+
vaults: record(string2(), zVaultDto)
|
|
9804
|
+
});
|
|
9805
|
+
var zSnapshot = object({
|
|
9806
|
+
blockTime: preprocess((value) => value instanceof Date ? value.toISOString() : value, iso_exports.datetime()),
|
|
9807
|
+
fusionLimitOrders: optional(union([
|
|
9808
|
+
array(zLimitOrderDto),
|
|
9809
|
+
_null3()
|
|
9810
|
+
])),
|
|
9811
|
+
markets: optional(union([
|
|
9812
|
+
record(string2(), zMarketDto),
|
|
9813
|
+
_null3()
|
|
9814
|
+
])),
|
|
9815
|
+
mints: optional(union([
|
|
9816
|
+
record(string2(), zMintDto),
|
|
9817
|
+
_null3()
|
|
9818
|
+
])),
|
|
9819
|
+
oraclePrices: optional(union([
|
|
9820
|
+
record(string2(), string2()),
|
|
9821
|
+
_null3()
|
|
9822
|
+
])),
|
|
9823
|
+
orderBooks: optional(union([
|
|
9824
|
+
array(zOrderBookWrapper),
|
|
9825
|
+
_null3()
|
|
9826
|
+
])),
|
|
9827
|
+
slot: coerce_exports.bigint().gte(BigInt(0)).max(BigInt("9223372036854775807"), { error: "Invalid value: Expected int64 to be <= 9223372036854775807" }),
|
|
9828
|
+
tunaLpPositions: optional(union([
|
|
9829
|
+
array(zTunaPositionDto),
|
|
9830
|
+
_null3()
|
|
9831
|
+
])),
|
|
9832
|
+
tunaSpotPositions: optional(union([
|
|
9833
|
+
array(zTunaSpotPositionDto),
|
|
9834
|
+
_null3()
|
|
9835
|
+
])),
|
|
9836
|
+
vaults: optional(union([
|
|
9837
|
+
record(string2(), zVaultDto),
|
|
9838
|
+
_null3()
|
|
9839
|
+
]))
|
|
9840
|
+
});
|
|
9841
|
+
var zSnapshotContainer = object({
|
|
9842
|
+
action: string2(),
|
|
9843
|
+
data: zSnapshot,
|
|
9844
|
+
entity: string2(),
|
|
9845
|
+
id: string2()
|
|
9846
|
+
});
|
|
9847
|
+
var zSseResponseLendingPositionPayload = object({
|
|
9848
|
+
action: zNotificationAction,
|
|
9849
|
+
authority: optional(union([
|
|
9850
|
+
_null3(),
|
|
9851
|
+
zPubkeyDto
|
|
9852
|
+
])),
|
|
9853
|
+
data: zLendingPositionResponse,
|
|
9854
|
+
entity: zNotificationEntity,
|
|
9855
|
+
id: string2()
|
|
9856
|
+
});
|
|
9857
|
+
var zSseResponseLendingPosition = zSseResponseLendingPositionPayload.and(object({
|
|
9858
|
+
entity: _enum(["lending_position"])
|
|
9859
|
+
}));
|
|
9860
|
+
var zSseResponseSnapshot = zSnapshotContainer.and(object({
|
|
9861
|
+
entity: _enum(["state_snapshot"])
|
|
9862
|
+
}));
|
|
9809
9863
|
var zVaultError400BadRequest = object({
|
|
9810
9864
|
code: _enum(["bad_request"])
|
|
9811
9865
|
});
|