@typus/typus-sdk 1.0.69 → 1.0.72
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/lib/utils/token.js
CHANGED
|
@@ -7,9 +7,11 @@ function typeArgsToAssets(typeArgs) {
|
|
|
7
7
|
var typeArgs = x.split("::");
|
|
8
8
|
switch ((0, sui_js_1.normalizeSuiAddress)(typeArgs[0])) {
|
|
9
9
|
case "0x027792d9fed7f9844eb4839566001bb6f6cb4804f66aa2da6fe1ee242d896881":
|
|
10
|
-
return "
|
|
10
|
+
return "WBTC";
|
|
11
11
|
case "0xaf8cd5edc19c4512f4259f0bee101a40d41ebed738ade5874359610ef8eeced5":
|
|
12
|
-
return "
|
|
12
|
+
return "WETH";
|
|
13
|
+
case "0xb7844e289a8410e50fb3ca48d69eb9cf29e27d223ef90353fe1bd8e27ff8f3f8":
|
|
14
|
+
return "WSOL";
|
|
13
15
|
case "0x5d4b302506645c37ff133b98c4b50a5ae14841659738d6d733d59d0d217a93bf":
|
|
14
16
|
return "USDC";
|
|
15
17
|
case "0xc060006111016b8a020ad5b33834984a437aaa7d3c74c18e09a95d48aceab08c":
|
|
@@ -29,6 +31,12 @@ function assetToDecimal(asset) {
|
|
|
29
31
|
return 8;
|
|
30
32
|
case "ETH":
|
|
31
33
|
return 8;
|
|
34
|
+
case "WBTC":
|
|
35
|
+
return 8;
|
|
36
|
+
case "WETH":
|
|
37
|
+
return 8;
|
|
38
|
+
case "WSOL":
|
|
39
|
+
return 8;
|
|
32
40
|
case "USDC":
|
|
33
41
|
return 6;
|
|
34
42
|
case "USDT":
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PortfolioVault } from "./portfolio-vault";
|
|
2
|
-
export declare function getDb(database: string, functionNames: string[], vaultIndex: string | undefined, startTsMs: string, limit: number): Promise<any>;
|
|
2
|
+
export declare function getDb(database: string, functionNames: string[], vaultIndex: string | undefined, startTsMs: string, limit: number, endTsMs?: string | undefined): Promise<any>;
|
|
3
3
|
export declare function getShowMap(database: string, portfolioVaults: Map<string, PortfolioVault>, vaultIndex?: string | undefined, startTsMs?: string, limit?: number): Promise<Map<string, Map<string, Show>>>;
|
|
4
4
|
interface Show {
|
|
5
5
|
ProjectedAPY: number;
|
|
@@ -38,7 +38,8 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
exports.getShowMap = exports.getDb = void 0;
|
|
40
40
|
var apiUrl = "https://us-central1-aqueous-freedom-378103.cloudfunctions.net/mongodb";
|
|
41
|
-
function getDb(database, functionNames, vaultIndex, startTsMs, limit) {
|
|
41
|
+
function getDb(database, functionNames, vaultIndex, startTsMs, limit, endTsMs) {
|
|
42
|
+
if (endTsMs === void 0) { endTsMs = undefined; }
|
|
42
43
|
return __awaiter(this, void 0, void 0, function () {
|
|
43
44
|
var jsonData, response, data;
|
|
44
45
|
return __generator(this, function (_a) {
|
|
@@ -49,6 +50,7 @@ function getDb(database, functionNames, vaultIndex, startTsMs, limit) {
|
|
|
49
50
|
functionNames: functionNames,
|
|
50
51
|
vaultIndex: vaultIndex,
|
|
51
52
|
startTsMs: startTsMs,
|
|
53
|
+
endTsMs: endTsMs,
|
|
52
54
|
limit: limit,
|
|
53
55
|
});
|
|
54
56
|
return [4 /*yield*/, fetch(apiUrl, {
|