@typus/typus-sdk 1.1.10 → 1.1.11

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.
Files changed (2) hide show
  1. package/lib/utils/token.js +11 -8
  2. package/package.json +1 -1
@@ -1,11 +1,7 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
3
  exports.assetToDecimal = exports.typeArgToAsset = exports.typeArgsToAssets = void 0;
7
4
  var sui_js_1 = require("@mysten/sui.js");
8
- var config_json_1 = __importDefault(require("../config.json"));
9
5
  function typeArgsToAssets(typeArgs) {
10
6
  var assets = typeArgs.map(function (x) { return typeArgToAsset(x); });
11
7
  return assets;
@@ -19,22 +15,25 @@ function typeArgToAsset(typeArg) {
19
15
  case "0xaf8cd5edc19c4512f4259f0bee101a40d41ebed738ade5874359610ef8eeced5":
20
16
  return "WETH";
21
17
  case "0xb7844e289a8410e50fb3ca48d69eb9cf29e27d223ef90353fe1bd8e27ff8f3f8":
22
- return "SOL";
18
+ return "WSOL";
23
19
  case "0x5d4b302506645c37ff133b98c4b50a5ae14841659738d6d733d59d0d217a93bf":
24
20
  return "USDC";
25
21
  case "0xc060006111016b8a020ad5b33834984a437aaa7d3c74c18e09a95d48aceab08c":
26
22
  return "USDT";
27
23
  case "0x5d1f47ea69bb0de31c313d7acf89b890dbb8991ea8e03c6c355171f84bb1ba4a":
28
24
  return "TURBOS";
29
- case config_json_1.default.TOKEN_PACKAGE:
25
+ case "0x3a5143bb1196e3bcdfab6203d1683ae29edd26294fc8bfeafe4aaa9d2704df37":
26
+ return "APT";
27
+ default:
30
28
  if (typeArgs[2] == "BTC") {
31
29
  return "WBTC";
32
30
  }
33
31
  else if (typeArgs[2] == "ETH") {
34
32
  return "WETH";
35
33
  }
36
- return typeArgs[2];
37
- default:
34
+ else if (typeArgs[2] == "SOL") {
35
+ return "WSOL";
36
+ }
38
37
  return typeArgs[2];
39
38
  }
40
39
  }
@@ -51,6 +50,8 @@ function assetToDecimal(asset) {
51
50
  return 8;
52
51
  case "WETH":
53
52
  return 8;
53
+ case "SOL":
54
+ return 8;
54
55
  case "WSOL":
55
56
  return 8;
56
57
  case "USDC":
@@ -61,6 +62,8 @@ function assetToDecimal(asset) {
61
62
  return 9;
62
63
  case "TURBOS":
63
64
  return 9;
65
+ case "APT":
66
+ return 8;
64
67
  }
65
68
  }
66
69
  exports.assetToDecimal = assetToDecimal;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@typus/typus-sdk",
3
3
  "author": "Typus",
4
4
  "description": "typus sdk",
5
- "version": "1.1.10",
5
+ "version": "1.1.11",
6
6
  "dependencies": {
7
7
  "@mysten/bcs": "^0.7.3",
8
8
  "@mysten/kiosk": "^0.3.3",