@typus/typus-sdk 1.4.53 → 1.4.55
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.
|
@@ -25,6 +25,9 @@ export declare const tokenType: {
|
|
|
25
25
|
SCA: string;
|
|
26
26
|
VSUI: string;
|
|
27
27
|
HASUI: string;
|
|
28
|
+
LIQ: string;
|
|
29
|
+
HIPPO: string;
|
|
30
|
+
MLIQ: string;
|
|
28
31
|
};
|
|
29
32
|
TESTNET: {
|
|
30
33
|
SUI: string;
|
|
@@ -49,5 +52,5 @@ export declare const tokenType: {
|
|
|
49
52
|
MBLUB: string;
|
|
50
53
|
};
|
|
51
54
|
};
|
|
52
|
-
export type TOKEN = "SUI" | "CETUS" | "BUCK" | "SOL" | "TURBOS" | "APT" | "FUD" | "MFUD" | "BLUB" | "MBLUB" | "USDT" | "AFSUI" | "INJ" | "SEI" | "USDY" | "TEXP" | "SCA" | "BTC" | "ETH" | "USDC" | "wUSDC";
|
|
55
|
+
export type TOKEN = "SUI" | "CETUS" | "BUCK" | "SOL" | "TURBOS" | "APT" | "FUD" | "MFUD" | "BLUB" | "MBLUB" | "USDT" | "AFSUI" | "INJ" | "SEI" | "USDY" | "TEXP" | "SCA" | "BTC" | "ETH" | "USDC" | "LIQ" | "MLIQ" | "HIPPO" | "wUSDC";
|
|
53
56
|
export declare function typeArgToToken(typeArg: string): string;
|
|
@@ -44,6 +44,8 @@ function typeArgToAsset(typeArg) {
|
|
|
44
44
|
else if (typeArgs[1] === "btc") {
|
|
45
45
|
return "WBTC";
|
|
46
46
|
}
|
|
47
|
+
case "0x8993129d72e733985f7f1a00396cbd055bad6f817fee36576ce483c8bbb8b87b":
|
|
48
|
+
return "HIPPO";
|
|
47
49
|
default:
|
|
48
50
|
if (typeArgs[2] == "BTC") {
|
|
49
51
|
return "WBTC";
|
|
@@ -113,6 +115,12 @@ function assetToDecimal(asset) {
|
|
|
113
115
|
return 2;
|
|
114
116
|
case "MBLUB":
|
|
115
117
|
return 6;
|
|
118
|
+
case "HIPPO":
|
|
119
|
+
return 9;
|
|
120
|
+
case "LIQ":
|
|
121
|
+
return 6;
|
|
122
|
+
case "MLIQ":
|
|
123
|
+
return 6;
|
|
116
124
|
}
|
|
117
125
|
}
|
|
118
126
|
exports.tokenType = {
|
|
@@ -139,6 +147,9 @@ exports.tokenType = {
|
|
|
139
147
|
SCA: "0x7016aae72cfc67f2fadf55769c0a7dd54291a583b63051a5ed71081cce836ac6::sca::SCA",
|
|
140
148
|
VSUI: "0x549e8b69270defbfafd4f94e17ec44cdbdd99820b33bda2278dea3b9a32d3f55::cert::CERT",
|
|
141
149
|
HASUI: "0xbde4ba4c2e274a60ce15c1cfff9e5c42e41654ac8b6d906a57efa4bd3c29f47d::hasui::HASUI",
|
|
150
|
+
LIQ: "0x9c86d1926a0a39e906f20674d6a35f337be8625ebcb6b799ee8ff011f328bee2::liq::LIQ",
|
|
151
|
+
HIPPO: "0x8993129d72e733985f7f1a00396cbd055bad6f817fee36576ce483c8bbb8b87b::sudeng::SUDENG",
|
|
152
|
+
MLIQ: "9614657c9d7e8799be4f49781ef1a9247b83ee178976df6c92d29b6026b9dadf::mliq::MLIQ",
|
|
142
153
|
},
|
|
143
154
|
TESTNET: {
|
|
144
155
|
SUI: "0x0000000000000000000000000000000000000000000000000000000000000002::sui::SUI",
|
|
@@ -189,6 +200,10 @@ function typeArgToToken(typeArg) {
|
|
|
189
200
|
return "SCA";
|
|
190
201
|
case "0x960b531667636f39e85867775f52f6b1f220a058c4de786905bdf761e06a56bb":
|
|
191
202
|
return "USDY";
|
|
203
|
+
case "0x9c86d1926a0a39e906f20674d6a35f337be8625ebcb6b799ee8ff011f328bee2":
|
|
204
|
+
return "LIQ";
|
|
205
|
+
case "0x8993129d72e733985f7f1a00396cbd055bad6f817fee36576ce483c8bbb8b87b":
|
|
206
|
+
return "HIPPO";
|
|
192
207
|
default:
|
|
193
208
|
return typeArgs[2];
|
|
194
209
|
}
|
|
@@ -38,6 +38,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
exports.getTvl = getTvl;
|
|
40
40
|
exports.getDovTvl = getDovTvl;
|
|
41
|
+
exports.getSafuTvl = getSafuTvl;
|
|
41
42
|
function getTvl() {
|
|
42
43
|
return __awaiter(this, void 0, void 0, function () {
|
|
43
44
|
var response, data;
|
|
@@ -76,3 +77,22 @@ function getDovTvl() {
|
|
|
76
77
|
});
|
|
77
78
|
});
|
|
78
79
|
}
|
|
80
|
+
function getSafuTvl() {
|
|
81
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
82
|
+
var response, data;
|
|
83
|
+
return __generator(this, function (_a) {
|
|
84
|
+
switch (_a.label) {
|
|
85
|
+
case 0: return [4 /*yield*/, fetch("https://api.llama.fi/tvl/typus-safu", {
|
|
86
|
+
method: "GET",
|
|
87
|
+
})];
|
|
88
|
+
case 1:
|
|
89
|
+
response = _a.sent();
|
|
90
|
+
return [4 /*yield*/, response.json()];
|
|
91
|
+
case 2:
|
|
92
|
+
data = _a.sent();
|
|
93
|
+
// console.log(data);
|
|
94
|
+
return [2 /*return*/, data];
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
});
|
|
98
|
+
}
|