@sonarwatch/portfolio-core 0.14.195 → 0.14.197

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/README.md CHANGED
@@ -1,3 +1,3 @@
1
- # @sonarwatch/portfolio-core
2
-
3
- This library is @sonarwatch/portfolio-core
1
+ # @sonarwatch/portfolio-core
2
+
3
+ This library is @sonarwatch/portfolio-core
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sonarwatch/portfolio-core",
3
- "version": "0.14.195",
3
+ "version": "0.14.197",
4
4
  "type": "commonjs",
5
5
  "types": "./src/index.d.ts",
6
6
  "dependencies": {
@@ -134,53 +134,6 @@ export type ProxyInfo = {
134
134
  id: string;
135
135
  address: string;
136
136
  };
137
- /**
138
- * Represents a smart contract
139
- */
140
- export type Contract = {
141
- name: string;
142
- address: string;
143
- platformId: string;
144
- };
145
- /**
146
- * Represents a service from a platform
147
- */
148
- export type Service = {
149
- id: string;
150
- name: string;
151
- platformId: string;
152
- networkId: NetworkIdType;
153
- contracts?: Contract[];
154
- link?: string;
155
- description?: string;
156
- };
157
- /**
158
- * Represents a transaction
159
- */
160
- export type BalanceChange = {
161
- address: string;
162
- preBalance: number;
163
- postBalance: number;
164
- change: number;
165
- };
166
- export type AccountChanges = {
167
- created: string[];
168
- updated: string[];
169
- closed: string[];
170
- };
171
- export type Transaction = {
172
- signature: string;
173
- owner: string;
174
- blockTime?: number | null;
175
- service?: Service;
176
- balanceChanges: BalanceChange[];
177
- accountChanges: AccountChanges;
178
- isSigner: boolean;
179
- tags?: TransactionTag[];
180
- fees?: number | null;
181
- success: boolean;
182
- };
183
- export type TransactionTag = 'jitotip' | 'spam';
184
137
  export type SourceRefName = 'Pool' | 'Farm' | 'Market' | 'Vault' | 'Lending Market' | 'Strategy' | 'NFT Mint' | 'Reserve' | 'Proposal' | 'Distributor' | 'Locker' | 'Pair';
185
138
  /**
186
139
  * Represents references to on-chain accounts.
@@ -201,7 +154,6 @@ export type PortfolioElementCommon = {
201
154
  name?: string;
202
155
  tags?: string[];
203
156
  proxyInfo?: ProxyInfo;
204
- service?: Service;
205
157
  };
206
158
  /**
207
159
  * Represents the data of a multiple portfolio element.
@@ -469,14 +421,3 @@ export type FetchersResult = {
469
421
  duration: number;
470
422
  tokenInfo?: Partial<Record<NetworkIdType, Record<string, TokenInfo>>>;
471
423
  };
472
- /**
473
- * Represents the result of transactions.
474
- */
475
- export type TransactionsResult = {
476
- owner: string;
477
- account: string;
478
- networkId: NetworkIdType;
479
- duration: number;
480
- transactions: Transaction[];
481
- tokenInfo?: Partial<Record<NetworkIdType, Record<string, TokenInfo>>>;
482
- };
@@ -1 +1 @@
1
- {"version":3,"file":"Portfolio.js","sourceRoot":"","sources":["../../../../packages/core/src/Portfolio.ts"],"names":[],"mappings":";;;AAMA;;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;AA+RX,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":";;;AAMA;;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;AA0OX,IAAY,YAGX;AAHD,WAAY,YAAY;IACtB,6BAAa,CAAA;IACb,+BAAe,CAAA;AACjB,CAAC,EAHW,YAAY,4BAAZ,YAAY,QAGvB"}
@@ -0,0 +1,59 @@
1
+ import { NetworkIdType } from './Network';
2
+ import { TokenInfo } from './TokenList';
3
+ /**
4
+ * Represents a smart contract
5
+ */
6
+ export type Contract = {
7
+ name: string;
8
+ address: string;
9
+ platformId: string;
10
+ };
11
+ /**
12
+ * Represents a service from a platform
13
+ */
14
+ export type Service = {
15
+ id: string;
16
+ name: string;
17
+ platformId: string;
18
+ networkId: NetworkIdType;
19
+ link?: string;
20
+ description?: string;
21
+ };
22
+ /**
23
+ * Represents a transaction
24
+ */
25
+ export type Transaction = {
26
+ signature: string;
27
+ owner: string;
28
+ blockTime?: number | null;
29
+ service?: Service;
30
+ balanceChanges: BalanceChange[];
31
+ accountChanges: AccountChanges;
32
+ isSigner: boolean;
33
+ tags?: TransactionTag[];
34
+ fees?: number | null;
35
+ success: boolean;
36
+ };
37
+ export type BalanceChange = {
38
+ address: string;
39
+ preBalance: number;
40
+ postBalance: number;
41
+ change: number;
42
+ };
43
+ export type AccountChanges = {
44
+ created: string[];
45
+ updated: string[];
46
+ closed: string[];
47
+ };
48
+ export type TransactionTag = 'jitotip' | 'spam';
49
+ /**
50
+ * Represents the result of transactions.
51
+ */
52
+ export type TransactionsResult = {
53
+ owner: string;
54
+ account: string;
55
+ networkId: NetworkIdType;
56
+ duration: number;
57
+ transactions: Transaction[];
58
+ tokenInfo?: Partial<Record<NetworkIdType, Record<string, TokenInfo>>>;
59
+ };
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=Transaction.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Transaction.js","sourceRoot":"","sources":["../../../../packages/core/src/Transaction.ts"],"names":[],"mappings":""}
package/src/index.d.ts CHANGED
@@ -14,3 +14,4 @@ export * from './TokenPrice';
14
14
  export * from './TokenYield';
15
15
  export * from './Yield';
16
16
  export * from './BorrowLendRate';
17
+ export * from './Transaction';
package/src/index.js CHANGED
@@ -30,4 +30,5 @@ __exportStar(require("./TokenPrice"), exports);
30
30
  __exportStar(require("./TokenYield"), exports);
31
31
  __exportStar(require("./Yield"), exports);
32
32
  __exportStar(require("./BorrowLendRate"), exports);
33
+ __exportStar(require("./Transaction"), exports);
33
34
  //# sourceMappingURL=index.js.map
package/src/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/core/src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,2CAAyB;AACzB,iDAA+B;AAC/B,0CAAwB;AACxB,0CAAwB;AACxB,4CAA0B;AAC1B,4CAA0B;AAC1B,6CAA2B;AAC3B,2CAAyB;AACzB,4CAA0B;AAC1B,8CAA4B;AAC5B,8CAA4B;AAC5B,+CAA6B;AAC7B,+CAA6B;AAC7B,0CAAwB;AACxB,mDAAiC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/core/src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,2CAAyB;AACzB,iDAA+B;AAC/B,0CAAwB;AACxB,0CAAwB;AACxB,4CAA0B;AAC1B,4CAA0B;AAC1B,6CAA2B;AAC3B,2CAAyB;AACzB,4CAA0B;AAC1B,8CAA4B;AAC5B,8CAA4B;AAC5B,+CAA6B;AAC7B,+CAA6B;AAC7B,0CAAwB;AACxB,mDAAiC;AACjC,gDAA8B"}