@t2000/engine 0.50.1 → 0.50.2
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.ts +1 -1
- package/dist/index.js +0 -40
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1963,7 +1963,7 @@ declare const balanceCheckTool: Tool<{
|
|
|
1963
1963
|
pendingRewards: number;
|
|
1964
1964
|
gasReserve: number;
|
|
1965
1965
|
defi: number;
|
|
1966
|
-
defiByProtocol: Partial<Record<"aftermath" | "
|
|
1966
|
+
defiByProtocol: Partial<Record<"aftermath" | "bluefin" | "cetus" | "haedal" | "scallop" | "suilend" | "suins-staking" | "suistake" | "walrus", number>>;
|
|
1967
1967
|
defiSource: "blockvision" | "partial" | "degraded";
|
|
1968
1968
|
total: number;
|
|
1969
1969
|
stables: number;
|
package/dist/index.js
CHANGED
|
@@ -715,31 +715,13 @@ var DEFI_PORTFOLIO_TIMEOUT_MS = 4e3;
|
|
|
715
715
|
var DEFI_CACHE_TTL_MS = 6e4;
|
|
716
716
|
var DEFI_PROTOCOLS = [
|
|
717
717
|
"aftermath",
|
|
718
|
-
"alphafi",
|
|
719
|
-
"alphalend",
|
|
720
718
|
"bluefin",
|
|
721
|
-
"bluemove",
|
|
722
|
-
"bucket",
|
|
723
|
-
"bucket2",
|
|
724
719
|
"cetus",
|
|
725
|
-
"deepbook",
|
|
726
|
-
"ember",
|
|
727
|
-
"ferra",
|
|
728
|
-
"flowx",
|
|
729
720
|
"haedal",
|
|
730
|
-
"kai",
|
|
731
|
-
"kriya",
|
|
732
|
-
"magma",
|
|
733
|
-
"momentum",
|
|
734
|
-
"r25",
|
|
735
721
|
"scallop",
|
|
736
|
-
"steamm",
|
|
737
722
|
"suilend",
|
|
738
723
|
"suins-staking",
|
|
739
724
|
"suistake",
|
|
740
|
-
"turbos",
|
|
741
|
-
"typus",
|
|
742
|
-
"unihouse",
|
|
743
725
|
"walrus"
|
|
744
726
|
];
|
|
745
727
|
var SUI_TYPE_FULL = "0x0000000000000000000000000000000000000000000000000000000000000002::sui::SUI";
|
|
@@ -1067,27 +1049,6 @@ function normalizeHaedal(result, prices) {
|
|
|
1067
1049
|
}
|
|
1068
1050
|
return total;
|
|
1069
1051
|
}
|
|
1070
|
-
function normalizeKai(result, prices) {
|
|
1071
|
-
const data = result.kai ?? {};
|
|
1072
|
-
let total = 0;
|
|
1073
|
-
for (const v of data.vaults ?? []) {
|
|
1074
|
-
const coinType = v.coin?.p?.phantomType ?? v.coin?.p?.typeName;
|
|
1075
|
-
if (coinType && v.equity != null) {
|
|
1076
|
-
total += toUsd(coinType, v.equity, v.coin?.decimals, prices);
|
|
1077
|
-
}
|
|
1078
|
-
}
|
|
1079
|
-
for (const lp of data.lpVaults ?? []) {
|
|
1080
|
-
const coinTypeA = lp.coinA?.p?.phantomType ?? lp.coinA?.p?.typeName;
|
|
1081
|
-
const coinTypeB = lp.coinB?.p?.phantomType ?? lp.coinB?.p?.typeName;
|
|
1082
|
-
if (coinTypeA && lp.balanceA != null) {
|
|
1083
|
-
total += toUsd(coinTypeA, lp.balanceA, lp.coinA?.decimals, prices);
|
|
1084
|
-
}
|
|
1085
|
-
if (coinTypeB && lp.balanceB != null) {
|
|
1086
|
-
total += toUsd(coinTypeB, lp.balanceB, lp.coinB?.decimals, prices);
|
|
1087
|
-
}
|
|
1088
|
-
}
|
|
1089
|
-
return total;
|
|
1090
|
-
}
|
|
1091
1052
|
function sumBareStakings(data, impliedCoinType, decimals, prices) {
|
|
1092
1053
|
if (!data) return 0;
|
|
1093
1054
|
let total = 0;
|
|
@@ -1112,7 +1073,6 @@ function normalizeSuinsStaking(result, prices) {
|
|
|
1112
1073
|
var BESPOKE_NORMALIZERS = {
|
|
1113
1074
|
bluefin: normalizeBluefin,
|
|
1114
1075
|
haedal: normalizeHaedal,
|
|
1115
|
-
kai: normalizeKai,
|
|
1116
1076
|
suistake: normalizeSuistake,
|
|
1117
1077
|
walrus: normalizeWalrus,
|
|
1118
1078
|
"suins-staking": normalizeSuinsStaking
|