@sonarwatch/portfolio-core 0.16.69 → 0.16.71

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,26 @@
2
2
 
3
3
  This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
4
 
5
+ ## [0.16.71](https://github.com/sonarwatch/portfolio/compare/core-0.16.70...core-0.16.71) (2025-09-26)
6
+
7
+
8
+ ### Features
9
+
10
+ * **plugins:** remove TokenYieldSupport ([f4771a1](https://github.com/sonarwatch/portfolio/commit/f4771a1727f22965f433b2adbf8d55336d362f13))
11
+ * **plugins:** rename to assetsYield ([58310ec](https://github.com/sonarwatch/portfolio/commit/58310eca6206504558608a9d93b611a696a28adb))
12
+ * **plugins:** yields in multiple element, for native staking and drift mm ([772ae0d](https://github.com/sonarwatch/portfolio/commit/772ae0dbf0d9c139d7c3bc6726b185022780d4c0))
13
+
14
+
15
+
16
+ ## [0.16.70](https://github.com/sonarwatch/portfolio/compare/core-0.16.69...core-0.16.70) (2025-09-24)
17
+
18
+
19
+ ### Features
20
+
21
+ * **plugins:** validator info ([09693b9](https://github.com/sonarwatch/portfolio/commit/09693b9c3fe682d2b64f6f55b20814bb27a9281b))
22
+
23
+
24
+
5
25
  ## [0.16.69](https://github.com/sonarwatch/portfolio/compare/core-0.16.68...core-0.16.69) (2025-09-22)
6
26
 
7
27
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sonarwatch/portfolio-core",
3
- "version": "0.16.69",
3
+ "version": "0.16.71",
4
4
  "type": "commonjs",
5
5
  "types": "./src/index.d.ts",
6
6
  "repository": {
@@ -33,6 +33,15 @@ export type PortfolioAssetAttributes = {
33
33
  * Represents the tags of the asset.
34
34
  */
35
35
  tags?: string[];
36
+ /**
37
+ * Represents Validator for Native Staking
38
+ */
39
+ validator?: {
40
+ name?: string;
41
+ imageUri?: string;
42
+ address: string;
43
+ yields: Yield[];
44
+ };
36
45
  };
37
46
  /**
38
47
  * Represents the type of a portfolio element.
@@ -83,18 +92,12 @@ export type PortfolioAssetTokenData = {
83
92
  price: UsdValue;
84
93
  yields?: Yield[];
85
94
  };
86
- /**
87
- * @deprecated will soon be replaced by PortfolioAssetTokenDataSupport (search YIELD_COMPAT)
88
- */
89
- export type PortfolioAssetTokenDataSupport = PortfolioAssetTokenData & {
90
- yield?: Yield;
91
- };
92
95
  /**
93
96
  * Represents a token portfolio asset.
94
97
  */
95
98
  export type PortfolioAssetToken = PortfolioAssetCommon & {
96
99
  type: 'token';
97
- data: PortfolioAssetTokenDataSupport;
100
+ data: PortfolioAssetTokenData;
98
101
  };
99
102
  /**
100
103
  * Represents the data of a collectible portfolio asset.
@@ -138,7 +141,7 @@ export type ProxyInfo = {
138
141
  id: string;
139
142
  address: string;
140
143
  };
141
- export type SourceRefName = 'Pool' | 'Farm' | 'Market' | 'Vault' | 'Lending Market' | 'Strategy' | 'NFT Mint' | 'Reserve' | 'Proposal' | 'Distributor' | 'Locker' | 'Custody' | 'Pair' | 'Borrow Token' | 'Collateral Token' | 'Elevation Group';
144
+ export type SourceRefName = 'Pool' | 'Farm' | 'Market' | 'Vault' | 'Lending Market' | 'Strategy' | 'NFT Mint' | 'Reserve' | 'Proposal' | 'Distributor' | 'Locker' | 'Custody' | 'Pair' | 'Borrow Token' | 'Collateral Token' | 'Elevation Group' | 'Validator';
142
145
  /**
143
146
  * Represents references to on-chain accounts.
144
147
  */
@@ -171,6 +174,10 @@ export type PortfolioElementCommon = {
171
174
  */
172
175
  export type PortfolioElementMultipleData = {
173
176
  assets: PortfolioAsset[];
177
+ /**
178
+ * The yields generated by the assets.
179
+ */
180
+ assetsYields?: Yield[][];
174
181
  ref?: string;
175
182
  sourceRefs?: SourceRef[];
176
183
  link?: 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;AA6CX;;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;AA4PX,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;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;AAyPX,IAAY,YAGX;AAHD,WAAY,YAAY;IACtB,6BAAa,CAAA;IACb,+BAAe,CAAA;AACjB,CAAC,EAHW,YAAY,4BAAZ,YAAY,QAGvB"}
@@ -1,15 +1,12 @@
1
1
  import { NetworkIdType } from './Network';
2
2
  import { Yield } from './Yield';
3
3
  export declare const tokenYieldTtl: number;
4
+ /**
5
+ * Represents the yield data for yield bearing assets.
6
+ */
4
7
  export type TokenYield = {
5
8
  address: string;
6
9
  networkId: NetworkIdType;
7
10
  yields: Yield[];
8
11
  timestamp: number;
9
12
  };
10
- /**
11
- * @deprecated will soon be replaced by TokenYield (search YIELD_COMPAT)
12
- */
13
- export type TokenYieldSupport = TokenYield & {
14
- yield: Yield;
15
- };