@typus/typus-sdk 1.4.80 → 1.4.82

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.
@@ -28,6 +28,7 @@ export declare const tokenType: {
28
28
  LIQ: string;
29
29
  HIPPO: string;
30
30
  MLIQ: string;
31
+ BLUE: string;
31
32
  };
32
33
  TESTNET: {
33
34
  SUI: string;
@@ -52,5 +53,5 @@ export declare const tokenType: {
52
53
  MBLUB: string;
53
54
  };
54
55
  };
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" | "DEEP" | "wUSDC";
56
+ 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" | "DEEP" | "BLUE" | "wUSDC";
56
57
  export declare function typeArgToToken(typeArg: string): string;
@@ -78,6 +78,7 @@ function assetToDecimal(asset) {
78
78
  case "VSUI":
79
79
  case "HIPPO":
80
80
  case "TYPUS":
81
+ case "BLUE":
81
82
  return 9;
82
83
  case "BTC":
83
84
  case "WBTC":
@@ -134,6 +135,7 @@ exports.tokenType = {
134
135
  LIQ: "0x9c86d1926a0a39e906f20674d6a35f337be8625ebcb6b799ee8ff011f328bee2::liq::LIQ",
135
136
  HIPPO: "0x8993129d72e733985f7f1a00396cbd055bad6f817fee36576ce483c8bbb8b87b::sudeng::SUDENG",
136
137
  MLIQ: "9614657c9d7e8799be4f49781ef1a9247b83ee178976df6c92d29b6026b9dadf::mliq::MLIQ",
138
+ BLUE: "0xe1b45a0e641b9955a20aa0ad1c1f4ad86aad8afb07296d4085e349a50e90bdca::blue::BLUE",
137
139
  },
138
140
  TESTNET: {
139
141
  SUI: "0x0000000000000000000000000000000000000000000000000000000000000002::sui::SUI",
@@ -190,6 +192,8 @@ function typeArgToToken(typeArg) {
190
192
  return "HIPPO";
191
193
  case "0xdeeb7a4662eec9f2f3def03fb937a663dddaa2e215b8078a284d026b7946c270":
192
194
  return "DEEP";
195
+ case "0xe1b45a0e641b9955a20aa0ad1c1f4ad86aad8afb07296d4085e349a50e90bdca":
196
+ return "BLUE";
193
197
  default:
194
198
  return typeArgs[2];
195
199
  }
@@ -199,7 +199,7 @@ function parseTxHistory(datas) {
199
199
  }
200
200
  break;
201
201
  case "reduce_fund":
202
- totalWithdrawAmount = (0, bignumber_js_1.default)(log[2]).plus(log[3]).plus(log[4]);
202
+ totalWithdrawAmount = (0, bignumber_js_1.default)(log[2]).plus(log[4]);
203
203
  if (totalWithdrawAmount.gt(0)) {
204
204
  txHistory.push({
205
205
  Action: "Withdraw",
@@ -212,6 +212,18 @@ function parseTxHistory(datas) {
212
212
  log: log,
213
213
  });
214
214
  }
215
+ if (Number(log[3]) > 0) {
216
+ txHistory.push({
217
+ Action: "Unsubscribe",
218
+ Index: log[0],
219
+ Amount: divByDecimal(Number(log[3]), decimal),
220
+ Token: Token,
221
+ Exp: log[5],
222
+ Date: new Date(Number(event.timestampMs)),
223
+ txDigest: event.id.txDigest,
224
+ log: log,
225
+ });
226
+ }
215
227
  break;
216
228
  case "claim_reward":
217
229
  txHistory.push({
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.4.80",
5
+ "version": "1.4.82",
6
6
  "dependencies": {
7
7
  "@mysten/bcs": "^0.11.1",
8
8
  "@mysten/kiosk": "0.8.10",