@typus/typus-sdk 1.4.59 → 1.4.61

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.
@@ -15,7 +15,7 @@ export interface TxHistory {
15
15
  Date: Date;
16
16
  txDigest: string;
17
17
  }
18
- export declare function parseTxHistory(datas: Array<any>, originPackage: string, vaults: {
18
+ export declare function parseTxHistory(datas: Array<any>, packageId: string, originPackageId: string, vaults: {
19
19
  [key: string]: Vault;
20
20
  }): Promise<Array<TxHistory>>;
21
21
  export declare function parseVaultInfo(vaults: {
@@ -145,7 +145,7 @@ function getAutoBidEvents(provider, originPackage, startTimeMs) {
145
145
  });
146
146
  });
147
147
  }
148
- function parseTxHistory(datas, originPackage, vaults) {
148
+ function parseTxHistory(datas, packageId, originPackageId, vaults) {
149
149
  return __awaiter(this, void 0, void 0, function () {
150
150
  var results;
151
151
  var _this = this;
@@ -154,7 +154,8 @@ function parseTxHistory(datas, originPackage, vaults) {
154
154
  case 0: return [4 /*yield*/, datas
155
155
  .filter(function (event) {
156
156
  var type = event.type;
157
- return (event.packageId == originPackage ||
157
+ return (event.packageId == packageId ||
158
+ event.packageId == originPackageId ||
158
159
  type.includes("typus_nft::First") ||
159
160
  type.includes("typus_nft::ExpUpEvent") ||
160
161
  type.includes("tails_staking"));
@@ -218,6 +219,11 @@ function parseTxHistory(datas, originPackage, vaults) {
218
219
  }
219
220
  }
220
221
  break;
222
+ case "ExpDownEvent":
223
+ Action = "Extract Exp";
224
+ Tails = "#".concat(event.parsedJson.log[0]);
225
+ Exp = event.parsedJson.log[1];
226
+ break;
221
227
  case "LevelUpEvent":
222
228
  if (event.parsedJson.log) {
223
229
  Action = "Level Up to Level ".concat(event.parsedJson.log[1]);
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.59",
5
+ "version": "1.4.61",
6
6
  "dependencies": {
7
7
  "@mysten/bcs": "^0.11.1",
8
8
  "@mysten/kiosk": "0.8.10",