@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.cjs
CHANGED
|
@@ -437,8 +437,21 @@ var marketDtoSchemaResponseTransformer = (data) => {
|
|
|
437
437
|
data.pool = poolDtoSchemaResponseTransformer(data.pool);
|
|
438
438
|
return data;
|
|
439
439
|
};
|
|
440
|
+
var vaultDtoSchemaResponseTransformer = (data) => {
|
|
441
|
+
data.borrowedFunds = tokenAmountWithUsdSchemaResponseTransformer(data.borrowedFunds);
|
|
442
|
+
data.borrowedShares = u64DtoSchemaResponseTransformer(data.borrowedShares);
|
|
443
|
+
data.depositedFunds = tokenAmountWithUsdSchemaResponseTransformer(data.depositedFunds);
|
|
444
|
+
data.depositedShares = u64DtoSchemaResponseTransformer(data.depositedShares);
|
|
445
|
+
data.interestRate = u64DtoSchemaResponseTransformer(data.interestRate);
|
|
446
|
+
data.supplyLimit = tokenAmountWithUsdSchemaResponseTransformer(data.supplyLimit);
|
|
447
|
+
return data;
|
|
448
|
+
};
|
|
440
449
|
var marketsListResponseSchemaResponseTransformer = (data) => {
|
|
441
450
|
data.items = data.items.map((item) => marketDtoSchemaResponseTransformer(item));
|
|
451
|
+
const _additionalPropertiesTarget3 = data.vaults;
|
|
452
|
+
Object.keys(_additionalPropertiesTarget3).forEach((key) => {
|
|
453
|
+
_additionalPropertiesTarget3[key] = vaultDtoSchemaResponseTransformer(_additionalPropertiesTarget3[key]);
|
|
454
|
+
});
|
|
442
455
|
return data;
|
|
443
456
|
};
|
|
444
457
|
var getMarketsResponseTransformer = async (data) => {
|
|
@@ -447,6 +460,10 @@ var getMarketsResponseTransformer = async (data) => {
|
|
|
447
460
|
};
|
|
448
461
|
var marketResponseSchemaResponseTransformer = (data) => {
|
|
449
462
|
data.item = marketDtoSchemaResponseTransformer(data.item);
|
|
463
|
+
const _additionalPropertiesTarget5 = data.vaults;
|
|
464
|
+
Object.keys(_additionalPropertiesTarget5).forEach((key) => {
|
|
465
|
+
_additionalPropertiesTarget5[key] = vaultDtoSchemaResponseTransformer(_additionalPropertiesTarget5[key]);
|
|
466
|
+
});
|
|
450
467
|
return data;
|
|
451
468
|
};
|
|
452
469
|
var getMarketResponseTransformer = async (data) => {
|
|
@@ -656,6 +673,14 @@ var lendingPositionDtoSchemaResponseTransformer = (data) => {
|
|
|
656
673
|
};
|
|
657
674
|
var lendingPositionsListResponseSchemaResponseTransformer = (data) => {
|
|
658
675
|
data.items = data.items.map((item) => lendingPositionDtoSchemaResponseTransformer(item));
|
|
676
|
+
const _additionalPropertiesTarget6 = data.markets;
|
|
677
|
+
Object.keys(_additionalPropertiesTarget6).forEach((key) => {
|
|
678
|
+
_additionalPropertiesTarget6[key] = marketDtoSchemaResponseTransformer(_additionalPropertiesTarget6[key]);
|
|
679
|
+
});
|
|
680
|
+
const _additionalPropertiesTarget8 = data.vaults;
|
|
681
|
+
Object.keys(_additionalPropertiesTarget8).forEach((key) => {
|
|
682
|
+
_additionalPropertiesTarget8[key] = vaultDtoSchemaResponseTransformer(_additionalPropertiesTarget8[key]);
|
|
683
|
+
});
|
|
659
684
|
return data;
|
|
660
685
|
};
|
|
661
686
|
var getLendingPositionsResponseTransformer = async (data) => {
|
|
@@ -664,6 +689,14 @@ var getLendingPositionsResponseTransformer = async (data) => {
|
|
|
664
689
|
};
|
|
665
690
|
var lendingPositionResponseSchemaResponseTransformer = (data) => {
|
|
666
691
|
data.item = lendingPositionDtoSchemaResponseTransformer(data.item);
|
|
692
|
+
const _additionalPropertiesTarget9 = data.markets;
|
|
693
|
+
Object.keys(_additionalPropertiesTarget9).forEach((key) => {
|
|
694
|
+
_additionalPropertiesTarget9[key] = marketDtoSchemaResponseTransformer(_additionalPropertiesTarget9[key]);
|
|
695
|
+
});
|
|
696
|
+
const _additionalPropertiesTarget11 = data.vaults;
|
|
697
|
+
Object.keys(_additionalPropertiesTarget11).forEach((key) => {
|
|
698
|
+
_additionalPropertiesTarget11[key] = vaultDtoSchemaResponseTransformer(_additionalPropertiesTarget11[key]);
|
|
699
|
+
});
|
|
667
700
|
return data;
|
|
668
701
|
};
|
|
669
702
|
var getLendingPositionResponseTransformer = async (data) => {
|
|
@@ -681,9 +714,9 @@ var limitOrderDtoSchemaResponseTransformer = (data) => {
|
|
|
681
714
|
};
|
|
682
715
|
var limitOrdersListResponseSchemaResponseTransformer = (data) => {
|
|
683
716
|
data.items = data.items.map((item) => limitOrderDtoSchemaResponseTransformer(item));
|
|
684
|
-
const
|
|
685
|
-
Object.keys(
|
|
686
|
-
|
|
717
|
+
const _additionalPropertiesTarget12 = data.markets;
|
|
718
|
+
Object.keys(_additionalPropertiesTarget12).forEach((key) => {
|
|
719
|
+
_additionalPropertiesTarget12[key] = marketDtoSchemaResponseTransformer(_additionalPropertiesTarget12[key]);
|
|
687
720
|
});
|
|
688
721
|
return data;
|
|
689
722
|
};
|
|
@@ -693,9 +726,9 @@ var getLimitOrdersResponseTransformer = async (data) => {
|
|
|
693
726
|
};
|
|
694
727
|
var limitOrderResponseSchemaResponseTransformer = (data) => {
|
|
695
728
|
data.item = limitOrderDtoSchemaResponseTransformer(data.item);
|
|
696
|
-
const
|
|
697
|
-
Object.keys(
|
|
698
|
-
|
|
729
|
+
const _additionalPropertiesTarget14 = data.markets;
|
|
730
|
+
Object.keys(_additionalPropertiesTarget14).forEach((key) => {
|
|
731
|
+
_additionalPropertiesTarget14[key] = marketDtoSchemaResponseTransformer(_additionalPropertiesTarget14[key]);
|
|
699
732
|
});
|
|
700
733
|
return data;
|
|
701
734
|
};
|
|
@@ -713,9 +746,9 @@ var tunaLpPositionDtoSchemaResponseTransformer = (data) => {
|
|
|
713
746
|
};
|
|
714
747
|
var lpPositionsHistoryListResponseSchemaResponseTransformer = (data) => {
|
|
715
748
|
data.items = data.items.map((item) => tunaLpPositionDtoSchemaResponseTransformer(item));
|
|
716
|
-
const
|
|
717
|
-
Object.keys(
|
|
718
|
-
|
|
749
|
+
const _additionalPropertiesTarget16 = data.markets;
|
|
750
|
+
Object.keys(_additionalPropertiesTarget16).forEach((key) => {
|
|
751
|
+
_additionalPropertiesTarget16[key] = marketDtoSchemaResponseTransformer(_additionalPropertiesTarget16[key]);
|
|
719
752
|
});
|
|
720
753
|
return data;
|
|
721
754
|
};
|
|
@@ -746,9 +779,9 @@ var orderHistoryEntryDtoSchemaResponseTransformer = (data) => {
|
|
|
746
779
|
};
|
|
747
780
|
var orderHistoryListResponseSchemaResponseTransformer = (data) => {
|
|
748
781
|
data.items = data.items.map((item) => orderHistoryEntryDtoSchemaResponseTransformer(item));
|
|
749
|
-
const
|
|
750
|
-
Object.keys(
|
|
751
|
-
|
|
782
|
+
const _additionalPropertiesTarget18 = data.markets;
|
|
783
|
+
Object.keys(_additionalPropertiesTarget18).forEach((key) => {
|
|
784
|
+
_additionalPropertiesTarget18[key] = marketDtoSchemaResponseTransformer(_additionalPropertiesTarget18[key]);
|
|
752
785
|
});
|
|
753
786
|
return data;
|
|
754
787
|
};
|
|
@@ -769,9 +802,9 @@ var tunaSpotPositionDtoSchemaResponseTransformer = (data) => {
|
|
|
769
802
|
};
|
|
770
803
|
var spotPositionsListResponseSchemaResponseTransformer = (data) => {
|
|
771
804
|
data.items = data.items.map((item) => tunaSpotPositionDtoSchemaResponseTransformer(item));
|
|
772
|
-
const
|
|
773
|
-
Object.keys(
|
|
774
|
-
|
|
805
|
+
const _additionalPropertiesTarget20 = data.markets;
|
|
806
|
+
Object.keys(_additionalPropertiesTarget20).forEach((key) => {
|
|
807
|
+
_additionalPropertiesTarget20[key] = marketDtoSchemaResponseTransformer(_additionalPropertiesTarget20[key]);
|
|
775
808
|
});
|
|
776
809
|
return data;
|
|
777
810
|
};
|
|
@@ -781,9 +814,9 @@ var getSpotPositionsResponseTransformer = async (data) => {
|
|
|
781
814
|
};
|
|
782
815
|
var spotPositionResponseSchemaResponseTransformer = (data) => {
|
|
783
816
|
data.item = tunaSpotPositionDtoSchemaResponseTransformer(data.item);
|
|
784
|
-
const
|
|
785
|
-
Object.keys(
|
|
786
|
-
|
|
817
|
+
const _additionalPropertiesTarget22 = data.markets;
|
|
818
|
+
Object.keys(_additionalPropertiesTarget22).forEach((key) => {
|
|
819
|
+
_additionalPropertiesTarget22[key] = marketDtoSchemaResponseTransformer(_additionalPropertiesTarget22[key]);
|
|
787
820
|
});
|
|
788
821
|
return data;
|
|
789
822
|
};
|
|
@@ -845,9 +878,9 @@ var tradeHistoryEntryDtoSchemaResponseTransformer = (data) => {
|
|
|
845
878
|
};
|
|
846
879
|
var tradeHistoryListResponseSchemaResponseTransformer = (data) => {
|
|
847
880
|
data.items = data.items.map((item) => tradeHistoryEntryDtoSchemaResponseTransformer(item));
|
|
848
|
-
const
|
|
849
|
-
Object.keys(
|
|
850
|
-
|
|
881
|
+
const _additionalPropertiesTarget24 = data.markets;
|
|
882
|
+
Object.keys(_additionalPropertiesTarget24).forEach((key) => {
|
|
883
|
+
_additionalPropertiesTarget24[key] = marketDtoSchemaResponseTransformer(_additionalPropertiesTarget24[key]);
|
|
851
884
|
});
|
|
852
885
|
return data;
|
|
853
886
|
};
|
|
@@ -889,9 +922,9 @@ var tunaPositionDtoSchemaResponseTransformer = (data) => {
|
|
|
889
922
|
};
|
|
890
923
|
var lpPositionsListResponseSchemaResponseTransformer = (data) => {
|
|
891
924
|
data.items = data.items.map((item) => tunaPositionDtoSchemaResponseTransformer(item));
|
|
892
|
-
const
|
|
893
|
-
Object.keys(
|
|
894
|
-
|
|
925
|
+
const _additionalPropertiesTarget26 = data.markets;
|
|
926
|
+
Object.keys(_additionalPropertiesTarget26).forEach((key) => {
|
|
927
|
+
_additionalPropertiesTarget26[key] = marketDtoSchemaResponseTransformer(_additionalPropertiesTarget26[key]);
|
|
895
928
|
});
|
|
896
929
|
return data;
|
|
897
930
|
};
|
|
@@ -901,9 +934,9 @@ var getTunaPositionsResponseTransformer = async (data) => {
|
|
|
901
934
|
};
|
|
902
935
|
var lpPositionResponseSchemaResponseTransformer = (data) => {
|
|
903
936
|
data.item = tunaPositionDtoSchemaResponseTransformer(data.item);
|
|
904
|
-
const
|
|
905
|
-
Object.keys(
|
|
906
|
-
|
|
937
|
+
const _additionalPropertiesTarget28 = data.markets;
|
|
938
|
+
Object.keys(_additionalPropertiesTarget28).forEach((key) => {
|
|
939
|
+
_additionalPropertiesTarget28[key] = marketDtoSchemaResponseTransformer(_additionalPropertiesTarget28[key]);
|
|
907
940
|
});
|
|
908
941
|
return data;
|
|
909
942
|
};
|
|
@@ -913,15 +946,6 @@ var getTunaPositionResponseTransformer = async (data) => {
|
|
|
913
946
|
}
|
|
914
947
|
return data;
|
|
915
948
|
};
|
|
916
|
-
var vaultDtoSchemaResponseTransformer = (data) => {
|
|
917
|
-
data.borrowedFunds = tokenAmountWithUsdSchemaResponseTransformer(data.borrowedFunds);
|
|
918
|
-
data.borrowedShares = u64DtoSchemaResponseTransformer(data.borrowedShares);
|
|
919
|
-
data.depositedFunds = tokenAmountWithUsdSchemaResponseTransformer(data.depositedFunds);
|
|
920
|
-
data.depositedShares = u64DtoSchemaResponseTransformer(data.depositedShares);
|
|
921
|
-
data.interestRate = u64DtoSchemaResponseTransformer(data.interestRate);
|
|
922
|
-
data.supplyLimit = tokenAmountWithUsdSchemaResponseTransformer(data.supplyLimit);
|
|
923
|
-
return data;
|
|
924
|
-
};
|
|
925
949
|
var vaultsListResponseSchemaResponseTransformer = (data) => {
|
|
926
950
|
data.items = data.items.map((item) => vaultDtoSchemaResponseTransformer(item));
|
|
927
951
|
return data;
|
|
@@ -1091,26 +1115,26 @@ var toBigInt = (value) => {
|
|
|
1091
1115
|
};
|
|
1092
1116
|
var transformMarketsMap = async (markets) => {
|
|
1093
1117
|
const entries = Object.entries(markets);
|
|
1094
|
-
const
|
|
1118
|
+
const transformedByAddress = /* @__PURE__ */ new Map();
|
|
1095
1119
|
for (const [address, market] of entries) {
|
|
1096
|
-
if (isRecord(market)) {
|
|
1097
|
-
|
|
1120
|
+
if (!isRecord(market)) {
|
|
1121
|
+
transformedByAddress.set(address, market);
|
|
1122
|
+
continue;
|
|
1123
|
+
}
|
|
1124
|
+
try {
|
|
1125
|
+
const response = await getMarketsResponseTransformer({
|
|
1126
|
+
data: {
|
|
1127
|
+
items: [market],
|
|
1128
|
+
mints: {},
|
|
1129
|
+
vaults: {}
|
|
1130
|
+
}
|
|
1131
|
+
});
|
|
1132
|
+
transformedByAddress.set(address, response.data.items[0] ?? market);
|
|
1133
|
+
} catch (_) {
|
|
1134
|
+
transformedByAddress.set(address, market);
|
|
1098
1135
|
}
|
|
1099
1136
|
}
|
|
1100
|
-
|
|
1101
|
-
if (marketEntries.length > 0) {
|
|
1102
|
-
const response = await getMarketsResponseTransformer({
|
|
1103
|
-
data: {
|
|
1104
|
-
items: marketEntries.map(([, market]) => market),
|
|
1105
|
-
mints: {}
|
|
1106
|
-
}
|
|
1107
|
-
});
|
|
1108
|
-
const transformedItems = response.data.items;
|
|
1109
|
-
marketEntries.forEach(([address], index) => {
|
|
1110
|
-
transformedByAddress.set(address, transformedItems[index]);
|
|
1111
|
-
});
|
|
1112
|
-
}
|
|
1113
|
-
return Object.fromEntries(entries.map(([address, market]) => [address, transformedByAddress.get(address) ?? market]));
|
|
1137
|
+
return Object.fromEntries(entries.map(([address]) => [address, transformedByAddress.get(address)]));
|
|
1114
1138
|
};
|
|
1115
1139
|
var normalizeMintsMap = (mints) => Object.fromEntries(Object.entries(mints).map(([address, mint]) => [address, mint]));
|
|
1116
1140
|
var applySseResponseTransforms = async (payload) => {
|
|
@@ -9714,20 +9738,16 @@ var zLendingPositionDto = object({
|
|
|
9714
9738
|
authority: zPubkeyDto,
|
|
9715
9739
|
earned: zTokenAmountWithUsd,
|
|
9716
9740
|
funds: zTokenAmountWithUsd,
|
|
9741
|
+
market: optional(union([
|
|
9742
|
+
_null3(),
|
|
9743
|
+
zPubkeyDto
|
|
9744
|
+
])),
|
|
9717
9745
|
mint: zPubkeyDto,
|
|
9718
9746
|
shares: zU64Dto,
|
|
9719
9747
|
supplyApy: number2(),
|
|
9720
9748
|
updatedAtSlot: zU64Dto,
|
|
9721
9749
|
vault: zPubkeyDto
|
|
9722
9750
|
});
|
|
9723
|
-
var zLendingPositionResponse = object({
|
|
9724
|
-
item: zLendingPositionDto,
|
|
9725
|
-
mints: record(string2(), zMintDto)
|
|
9726
|
-
});
|
|
9727
|
-
var zLendingPositionsListResponse = object({
|
|
9728
|
-
items: array(zLendingPositionDto),
|
|
9729
|
-
mints: record(string2(), zMintDto)
|
|
9730
|
-
});
|
|
9731
9751
|
var zLimitOrderDto = object({
|
|
9732
9752
|
aToB: boolean2(),
|
|
9733
9753
|
address: zPubkeyDto,
|
|
@@ -9754,12 +9774,18 @@ var zLimitOrderDto = object({
|
|
|
9754
9774
|
var zMarketDto = object({
|
|
9755
9775
|
address: zPubkeyDto,
|
|
9756
9776
|
addressLookupTable: zPubkeyDto,
|
|
9777
|
+
authority: optional(union([
|
|
9778
|
+
_null3(),
|
|
9779
|
+
zPubkeyDto
|
|
9780
|
+
])),
|
|
9757
9781
|
borrowLimitA: zTokenAmountWithUsd,
|
|
9758
9782
|
borrowLimitB: zTokenAmountWithUsd,
|
|
9759
9783
|
borrowedFundsA: zTokenAmountWithUsd,
|
|
9760
9784
|
borrowedFundsB: zTokenAmountWithUsd,
|
|
9761
9785
|
createdAt: preprocess((value) => value instanceof Date ? value.toISOString() : value, iso_exports.datetime()),
|
|
9762
9786
|
disabled: boolean2(),
|
|
9787
|
+
isPermissionless: boolean2(),
|
|
9788
|
+
isVerified: boolean2(),
|
|
9763
9789
|
liquidationFee: int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
9764
9790
|
liquidationThreshold: int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
9765
9791
|
maxLeverage: int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
@@ -9770,7 +9796,9 @@ var zMarketDto = object({
|
|
|
9770
9796
|
pool: zPoolDto,
|
|
9771
9797
|
protocolFee: int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
9772
9798
|
protocolFeeOnCollateral: int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
9773
|
-
rebalanceProtocolFee: int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" })
|
|
9799
|
+
rebalanceProtocolFee: int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
9800
|
+
vaultA: zPubkeyDto,
|
|
9801
|
+
vaultB: zPubkeyDto
|
|
9774
9802
|
});
|
|
9775
9803
|
var zLimitOrderResponse = object({
|
|
9776
9804
|
item: zLimitOrderDto,
|
|
@@ -9787,14 +9815,6 @@ var zLpPositionsHistoryListResponse = object({
|
|
|
9787
9815
|
markets: record(string2(), zMarketDto),
|
|
9788
9816
|
mints: record(string2(), zMintDto)
|
|
9789
9817
|
});
|
|
9790
|
-
var zMarketResponse = object({
|
|
9791
|
-
item: zMarketDto,
|
|
9792
|
-
mints: record(string2(), zMintDto)
|
|
9793
|
-
});
|
|
9794
|
-
var zMarketsListResponse = object({
|
|
9795
|
-
items: array(zMarketDto),
|
|
9796
|
-
mints: record(string2(), zMintDto)
|
|
9797
|
-
});
|
|
9798
9818
|
var zOrderHistoryEntryDto = object({
|
|
9799
9819
|
aToB: boolean2(),
|
|
9800
9820
|
authority: zPubkeyDto,
|
|
@@ -9847,19 +9867,6 @@ var zOrderHistoryNotificationResponse = object({
|
|
|
9847
9867
|
markets: record(string2(), zMarketDto),
|
|
9848
9868
|
mints: record(string2(), zMintDto)
|
|
9849
9869
|
});
|
|
9850
|
-
var zSseResponseLendingPositionPayload = object({
|
|
9851
|
-
action: zNotificationAction,
|
|
9852
|
-
authority: optional(union([
|
|
9853
|
-
_null3(),
|
|
9854
|
-
zPubkeyDto
|
|
9855
|
-
])),
|
|
9856
|
-
data: zLendingPositionDto,
|
|
9857
|
-
entity: zNotificationEntity,
|
|
9858
|
-
id: string2()
|
|
9859
|
-
});
|
|
9860
|
-
var zSseResponseLendingPosition = zSseResponseLendingPositionPayload.and(object({
|
|
9861
|
-
entity: _enum(["lending_position"])
|
|
9862
|
-
}));
|
|
9863
9870
|
var zSseResponseOrderHistoryEntryPayload = object({
|
|
9864
9871
|
action: zNotificationAction,
|
|
9865
9872
|
authority: optional(union([
|
|
@@ -10027,44 +10034,6 @@ var zTunaSpotPositionDto = object({
|
|
|
10027
10034
|
upperLimitOrderPrice: number2(),
|
|
10028
10035
|
version: int().gte(0).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" })
|
|
10029
10036
|
});
|
|
10030
|
-
var zSnapshot = object({
|
|
10031
|
-
blockTime: preprocess((value) => value instanceof Date ? value.toISOString() : value, iso_exports.datetime()),
|
|
10032
|
-
fusionLimitOrders: optional(union([
|
|
10033
|
-
array(zLimitOrderDto),
|
|
10034
|
-
_null3()
|
|
10035
|
-
])),
|
|
10036
|
-
markets: optional(union([
|
|
10037
|
-
record(string2(), zMarketDto),
|
|
10038
|
-
_null3()
|
|
10039
|
-
])),
|
|
10040
|
-
mints: optional(union([
|
|
10041
|
-
record(string2(), zMintDto),
|
|
10042
|
-
_null3()
|
|
10043
|
-
])),
|
|
10044
|
-
oraclePrices: optional(union([
|
|
10045
|
-
record(string2(), string2()),
|
|
10046
|
-
_null3()
|
|
10047
|
-
])),
|
|
10048
|
-
orderBooks: optional(union([
|
|
10049
|
-
array(zOrderBookWrapper),
|
|
10050
|
-
_null3()
|
|
10051
|
-
])),
|
|
10052
|
-
slot: coerce_exports.bigint().gte(BigInt(0)).max(BigInt("9223372036854775807"), { error: "Invalid value: Expected int64 to be <= 9223372036854775807" }),
|
|
10053
|
-
tunaLpPositions: optional(union([
|
|
10054
|
-
array(zTunaPositionDto),
|
|
10055
|
-
_null3()
|
|
10056
|
-
])),
|
|
10057
|
-
tunaSpotPositions: optional(union([
|
|
10058
|
-
array(zTunaSpotPositionDto),
|
|
10059
|
-
_null3()
|
|
10060
|
-
]))
|
|
10061
|
-
});
|
|
10062
|
-
var zSnapshotContainer = object({
|
|
10063
|
-
action: string2(),
|
|
10064
|
-
data: zSnapshot,
|
|
10065
|
-
entity: string2(),
|
|
10066
|
-
id: string2()
|
|
10067
|
-
});
|
|
10068
10037
|
var zSpotPositionResponse = object({
|
|
10069
10038
|
item: zTunaSpotPositionDto,
|
|
10070
10039
|
markets: record(string2(), zMarketDto),
|
|
@@ -10075,9 +10044,6 @@ var zSpotPositionsListResponse = object({
|
|
|
10075
10044
|
markets: record(string2(), zMarketDto),
|
|
10076
10045
|
mints: record(string2(), zMintDto)
|
|
10077
10046
|
});
|
|
10078
|
-
var zSseResponseSnapshot = zSnapshotContainer.and(object({
|
|
10079
|
-
entity: _enum(["state_snapshot"])
|
|
10080
|
-
}));
|
|
10081
10047
|
var zUpdateStreamSubscriptionError404Error = object({
|
|
10082
10048
|
code: _enum(["not_found"])
|
|
10083
10049
|
});
|
|
@@ -10098,12 +10064,20 @@ var zValidationErrorCodeValidationDetailsErrorBody = object({
|
|
|
10098
10064
|
});
|
|
10099
10065
|
var zVaultDto = object({
|
|
10100
10066
|
address: zPubkeyDto,
|
|
10067
|
+
authority: optional(union([
|
|
10068
|
+
_null3(),
|
|
10069
|
+
zPubkeyDto
|
|
10070
|
+
])),
|
|
10101
10071
|
borrowApy: number2(),
|
|
10102
10072
|
borrowedFunds: zTokenAmountWithUsd,
|
|
10103
10073
|
borrowedShares: zU64Dto,
|
|
10104
10074
|
depositedFunds: zTokenAmountWithUsd,
|
|
10105
10075
|
depositedShares: zU64Dto,
|
|
10106
10076
|
interestRate: zU64Dto,
|
|
10077
|
+
market: optional(union([
|
|
10078
|
+
_null3(),
|
|
10079
|
+
zPubkeyDto
|
|
10080
|
+
])),
|
|
10107
10081
|
mint: zPubkeyDto,
|
|
10108
10082
|
pythOracleFeedId: zPubkeyDto,
|
|
10109
10083
|
pythOraclePriceUpdate: zPubkeyDto,
|
|
@@ -10111,6 +10085,86 @@ var zVaultDto = object({
|
|
|
10111
10085
|
supplyLimit: zTokenAmountWithUsd,
|
|
10112
10086
|
utilization: number2()
|
|
10113
10087
|
});
|
|
10088
|
+
var zLendingPositionResponse = object({
|
|
10089
|
+
item: zLendingPositionDto,
|
|
10090
|
+
markets: record(string2(), zMarketDto),
|
|
10091
|
+
mints: record(string2(), zMintDto),
|
|
10092
|
+
vaults: record(string2(), zVaultDto)
|
|
10093
|
+
});
|
|
10094
|
+
var zLendingPositionsListResponse = object({
|
|
10095
|
+
items: array(zLendingPositionDto),
|
|
10096
|
+
markets: record(string2(), zMarketDto),
|
|
10097
|
+
mints: record(string2(), zMintDto),
|
|
10098
|
+
vaults: record(string2(), zVaultDto)
|
|
10099
|
+
});
|
|
10100
|
+
var zMarketResponse = object({
|
|
10101
|
+
item: zMarketDto,
|
|
10102
|
+
mints: record(string2(), zMintDto),
|
|
10103
|
+
vaults: record(string2(), zVaultDto)
|
|
10104
|
+
});
|
|
10105
|
+
var zMarketsListResponse = object({
|
|
10106
|
+
items: array(zMarketDto),
|
|
10107
|
+
mints: record(string2(), zMintDto),
|
|
10108
|
+
vaults: record(string2(), zVaultDto)
|
|
10109
|
+
});
|
|
10110
|
+
var zSnapshot = object({
|
|
10111
|
+
blockTime: preprocess((value) => value instanceof Date ? value.toISOString() : value, iso_exports.datetime()),
|
|
10112
|
+
fusionLimitOrders: optional(union([
|
|
10113
|
+
array(zLimitOrderDto),
|
|
10114
|
+
_null3()
|
|
10115
|
+
])),
|
|
10116
|
+
markets: optional(union([
|
|
10117
|
+
record(string2(), zMarketDto),
|
|
10118
|
+
_null3()
|
|
10119
|
+
])),
|
|
10120
|
+
mints: optional(union([
|
|
10121
|
+
record(string2(), zMintDto),
|
|
10122
|
+
_null3()
|
|
10123
|
+
])),
|
|
10124
|
+
oraclePrices: optional(union([
|
|
10125
|
+
record(string2(), string2()),
|
|
10126
|
+
_null3()
|
|
10127
|
+
])),
|
|
10128
|
+
orderBooks: optional(union([
|
|
10129
|
+
array(zOrderBookWrapper),
|
|
10130
|
+
_null3()
|
|
10131
|
+
])),
|
|
10132
|
+
slot: coerce_exports.bigint().gte(BigInt(0)).max(BigInt("9223372036854775807"), { error: "Invalid value: Expected int64 to be <= 9223372036854775807" }),
|
|
10133
|
+
tunaLpPositions: optional(union([
|
|
10134
|
+
array(zTunaPositionDto),
|
|
10135
|
+
_null3()
|
|
10136
|
+
])),
|
|
10137
|
+
tunaSpotPositions: optional(union([
|
|
10138
|
+
array(zTunaSpotPositionDto),
|
|
10139
|
+
_null3()
|
|
10140
|
+
])),
|
|
10141
|
+
vaults: optional(union([
|
|
10142
|
+
record(string2(), zVaultDto),
|
|
10143
|
+
_null3()
|
|
10144
|
+
]))
|
|
10145
|
+
});
|
|
10146
|
+
var zSnapshotContainer = object({
|
|
10147
|
+
action: string2(),
|
|
10148
|
+
data: zSnapshot,
|
|
10149
|
+
entity: string2(),
|
|
10150
|
+
id: string2()
|
|
10151
|
+
});
|
|
10152
|
+
var zSseResponseLendingPositionPayload = object({
|
|
10153
|
+
action: zNotificationAction,
|
|
10154
|
+
authority: optional(union([
|
|
10155
|
+
_null3(),
|
|
10156
|
+
zPubkeyDto
|
|
10157
|
+
])),
|
|
10158
|
+
data: zLendingPositionResponse,
|
|
10159
|
+
entity: zNotificationEntity,
|
|
10160
|
+
id: string2()
|
|
10161
|
+
});
|
|
10162
|
+
var zSseResponseLendingPosition = zSseResponseLendingPositionPayload.and(object({
|
|
10163
|
+
entity: _enum(["lending_position"])
|
|
10164
|
+
}));
|
|
10165
|
+
var zSseResponseSnapshot = zSnapshotContainer.and(object({
|
|
10166
|
+
entity: _enum(["state_snapshot"])
|
|
10167
|
+
}));
|
|
10114
10168
|
var zVaultError400BadRequest = object({
|
|
10115
10169
|
code: _enum(["bad_request"])
|
|
10116
10170
|
});
|