@sonarwatch/portfolio-core 0.16.83 → 0.16.85

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/CHANGELOG.md CHANGED
@@ -2,6 +2,31 @@
2
2
 
3
3
  This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
4
 
5
+ ## [0.16.85](https://github.com/sonarwatch/portfolio/compare/core-0.16.84...core-0.16.85) (2025-11-21)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * **core:** remove unused 'prediction' element from PortfolioElementType ([6f61484](https://github.com/sonarwatch/portfolio/commit/6f61484f906c78ded92791fbe5cb26df6d27b6fb))
11
+ * **plugins+core:** rename `side` to `sideName` in prediction attributes ([6fb7c69](https://github.com/sonarwatch/portfolio/commit/6fb7c69a91189d576ac57279c21fa1253700723d))
12
+ * **plugins:** rename isYes to side ([c2f6ecf](https://github.com/sonarwatch/portfolio/commit/c2f6ecf2a44330d1cd6e91904f7fdd5ac3015f15))
13
+
14
+
15
+ ### Features
16
+
17
+ * **plugins+core:** prediction attributes ([7ecaa2c](https://github.com/sonarwatch/portfolio/commit/7ecaa2cbfe77041998ff60d0bb3aa94f8a751b10))
18
+
19
+
20
+
21
+ ## [0.16.84](https://github.com/sonarwatch/portfolio/compare/core-0.16.83...core-0.16.84) (2025-11-07)
22
+
23
+
24
+ ### Features
25
+
26
+ * **tx-parser:** add accountBalanceChanges ([01f8185](https://github.com/sonarwatch/portfolio/commit/01f81850562f4a5bc929f69a155346064320bb76))
27
+
28
+
29
+
5
30
  ## [0.16.83](https://github.com/sonarwatch/portfolio/compare/core-0.16.82...core-0.16.83) (2025-11-07)
6
31
 
7
32
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sonarwatch/portfolio-core",
3
- "version": "0.16.83",
3
+ "version": "0.16.85",
4
4
  "type": "commonjs",
5
5
  "types": "./src/index.d.ts",
6
6
  "repository": {
@@ -42,6 +42,24 @@ export type PortfolioAssetAttributes = {
42
42
  address: string;
43
43
  yields: Yield[];
44
44
  };
45
+ /**
46
+ * Represents Prediction
47
+ */
48
+ prediction?: {
49
+ market: {
50
+ marketTitle: string;
51
+ eventTitle?: string;
52
+ closeTime?: number;
53
+ settlementTime?: number;
54
+ };
55
+ sideName: string;
56
+ feesPaidValue?: UsdValue;
57
+ pnlValue?: UsdValue;
58
+ pnlPercent?: number;
59
+ pnlAfterFeesValue?: UsdValue;
60
+ pnlAfterFeesPercent?: number;
61
+ createdAt?: number;
62
+ };
45
63
  };
46
64
  /**
47
65
  * Represents the type of a portfolio element.
@@ -293,7 +311,7 @@ export declare enum LeverageSide {
293
311
  }
294
312
  export type IsoLevPosition = {
295
313
  /**
296
- * Address of the levareged asset if it exist
314
+ * Address of the leveraged asset if it exist
297
315
  */
298
316
  address?: string;
299
317
  name?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"Portfolio.js","sourceRoot":"","sources":["../../../../packages/core/src/Portfolio.ts"],"names":[],"mappings":";;;AAIA;;GAEG;AACU,QAAA,kBAAkB,GAAG;IAChC,OAAO,EAAE,SAAS;IAClB,KAAK,EAAE,OAAO;IACd,WAAW,EAAE,aAAa;CAClB,CAAC;AAsDX;;GAEG;AACU,QAAA,oBAAoB,GAAG;IAClC,QAAQ,EAAE,UAAU;IACpB,SAAS,EAAE,WAAW;IACtB,UAAU,EAAE,YAAY;IACxB,QAAQ,EAAE,UAAU;IACpB,KAAK,EAAE,OAAO;CACN,CAAC;AAwRX,IAAY,YAGX;AAHD,WAAY,YAAY;IACtB,6BAAa,CAAA;IACb,+BAAe,CAAA;AACjB,CAAC,EAHW,YAAY,4BAAZ,YAAY,QAGvB"}
1
+ {"version":3,"file":"Portfolio.js","sourceRoot":"","sources":["../../../../packages/core/src/Portfolio.ts"],"names":[],"mappings":";;;AAIA;;GAEG;AACU,QAAA,kBAAkB,GAAG;IAChC,OAAO,EAAE,SAAS;IAClB,KAAK,EAAE,OAAO;IACd,WAAW,EAAE,aAAa;CAClB,CAAC;AAwEX;;GAEG;AACU,QAAA,oBAAoB,GAAG;IAClC,QAAQ,EAAE,UAAU;IACpB,SAAS,EAAE,WAAW;IACtB,UAAU,EAAE,YAAY;IACxB,QAAQ,EAAE,UAAU;IACpB,KAAK,EAAE,OAAO;CACN,CAAC;AAwRX,IAAY,YAGX;AAHD,WAAY,YAAY;IACtB,6BAAa,CAAA;IACb,+BAAe,CAAA;AACjB,CAAC,EAHW,YAAY,4BAAZ,YAAY,QAGvB"}
@@ -28,6 +28,7 @@ export type Transaction = {
28
28
  blockTime?: number | null;
29
29
  service?: Service;
30
30
  balanceChanges: BalanceChange[];
31
+ accountBalanceChanges?: BalanceChange[];
31
32
  accountChanges: AccountChanges;
32
33
  isSigner: boolean;
33
34
  tags?: TransactionTag[];