@sonarwatch/portfolio-core 0.11.189 → 0.11.190

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,10 @@
2
2
 
3
3
  This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
4
 
5
+ ## [0.11.190](https://github.com/sonarwatch/portfolio/compare/core-0.11.189...core-0.11.190) (2024-04-26)
6
+
7
+
8
+
5
9
  ## [0.11.189](https://github.com/sonarwatch/portfolio/compare/core-0.11.188...core-0.11.189) (2024-04-25)
6
10
 
7
11
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sonarwatch/portfolio-core",
3
- "version": "0.11.189",
3
+ "version": "0.11.190",
4
4
  "type": "commonjs",
5
5
  "dependencies": {
6
6
  "@ethersproject/address": "^5.7.0",
@@ -130,10 +130,10 @@ export type ProxyInfo = {
130
130
  * Represents a smart contract
131
131
  */
132
132
  export type Contract = {
133
- id: ContractId;
134
133
  name: string;
134
+ address: string;
135
+ network: NetworkIdType;
135
136
  };
136
- export type ContractId = string;
137
137
  /**
138
138
  * Represents the different configurations of a service
139
139
  */
@@ -150,7 +150,7 @@ export type Service = {
150
150
  id: string;
151
151
  name: string;
152
152
  platformId: string;
153
- config: ServiceConfig[];
153
+ configs: ServiceConfig[];
154
154
  };
155
155
  /**
156
156
  * Represents the common properties of a portfolio element.
@@ -1,2 +0,0 @@
1
- import { NetworkIdType } from './Network';
2
- export declare function getContractId(networkId: NetworkIdType, address: string): string;
@@ -1,8 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getContractId = void 0;
4
- function getContractId(networkId, address) {
5
- return `${networkId}_${address}`;
6
- }
7
- exports.getContractId = getContractId;
8
- //# sourceMappingURL=getContractId.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getContractId.js","sourceRoot":"","sources":["../../../../packages/core/src/getContractId.ts"],"names":[],"mappings":";;;AAEA,SAAgB,aAAa,CAAC,SAAwB,EAAE,OAAe;IACrE,OAAO,GAAG,SAAS,IAAI,OAAO,EAAE,CAAC;AACnC,CAAC;AAFD,sCAEC"}
@@ -1,3 +0,0 @@
1
- import { NetworkIdType } from './Network';
2
- import { ContractId } from './Portfolio';
3
- export declare function getNetworkIdFromContractId(contractId: ContractId): NetworkIdType;
@@ -1,11 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getNetworkIdFromContractId = void 0;
4
- const utils_1 = require("./utils");
5
- function getNetworkIdFromContractId(contractId) {
6
- if (!contractId.includes('_'))
7
- throw new Error('Invalid Contract Id');
8
- return (0, utils_1.assertNetworkId)(contractId.slice(0, contractId.indexOf('_')));
9
- }
10
- exports.getNetworkIdFromContractId = getNetworkIdFromContractId;
11
- //# sourceMappingURL=getNetworkIdFromContractId.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getNetworkIdFromContractId.js","sourceRoot":"","sources":["../../../../packages/core/src/getNetworkIdFromContractId.ts"],"names":[],"mappings":";;;AAEA,mCAA0C;AAE1C,SAAgB,0BAA0B,CACxC,UAAsB;IAEtB,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,GAAG,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAC;IAEtE,OAAO,IAAA,uBAAe,EAAC,UAAU,CAAC,KAAK,CAAC,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACvE,CAAC;AAND,gEAMC"}