@cygnus-wealth/data-models 0.0.2 → 0.0.3

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.
@@ -5,6 +5,7 @@ export declare enum Chain {
5
5
  OPTIMISM = "OPTIMISM",
6
6
  AVALANCHE = "AVALANCHE",
7
7
  BSC = "BSC",
8
+ BASE = "BASE",
8
9
  SOLANA = "SOLANA",
9
10
  SUI = "SUI",
10
11
  BITCOIN = "BITCOIN",
@@ -6,6 +6,7 @@ export var Chain;
6
6
  Chain["OPTIMISM"] = "OPTIMISM";
7
7
  Chain["AVALANCHE"] = "AVALANCHE";
8
8
  Chain["BSC"] = "BSC";
9
+ Chain["BASE"] = "BASE";
9
10
  Chain["SOLANA"] = "SOLANA";
10
11
  Chain["SUI"] = "SUI";
11
12
  Chain["BITCOIN"] = "BITCOIN";
@@ -12,6 +12,7 @@ export declare enum IntegrationSource {
12
12
  RABBY = "RABBY",
13
13
  PHANTOM = "PHANTOM",
14
14
  SLUSH = "SLUSH",
15
+ SUIET = "SUIET",
15
16
  MANUAL_ENTRY = "MANUAL_ENTRY",
16
17
  BLOCKCHAIN_DIRECT = "BLOCKCHAIN_DIRECT",
17
18
  OTHER = "OTHER"
@@ -16,6 +16,7 @@ export var IntegrationSource;
16
16
  IntegrationSource["RABBY"] = "RABBY";
17
17
  IntegrationSource["PHANTOM"] = "PHANTOM";
18
18
  IntegrationSource["SLUSH"] = "SLUSH";
19
+ IntegrationSource["SUIET"] = "SUIET";
19
20
  // Other
20
21
  IntegrationSource["MANUAL_ENTRY"] = "MANUAL_ENTRY";
21
22
  IntegrationSource["BLOCKCHAIN_DIRECT"] = "BLOCKCHAIN_DIRECT";
package/dist/index.d.ts CHANGED
@@ -15,6 +15,7 @@ export { StakedPosition } from './interfaces/StakedPosition';
15
15
  export { LendingPosition } from './interfaces/LendingPosition';
16
16
  export { Account } from './interfaces/Account';
17
17
  export { Portfolio } from './interfaces/Portfolio';
18
+ export { PortfolioAsset } from './interfaces/PortfolioAsset';
18
19
  export { Transaction } from './interfaces/Transaction';
19
20
  export { IntegrationCredentials } from './interfaces/IntegrationCredentials';
20
21
  export { SyncStatus } from './interfaces/SyncStatus';
@@ -1,10 +1,13 @@
1
1
  import { Account } from './Account';
2
2
  import { Price } from './Price';
3
+ import { PortfolioAsset } from './PortfolioAsset';
4
+ import { Metadata } from './Metadata';
3
5
  export interface Portfolio {
4
6
  id: string;
5
- userId: string;
7
+ userId?: string;
6
8
  name: string;
7
- accounts: Account[];
9
+ accounts?: Account[];
10
+ items?: PortfolioAsset[];
8
11
  totalValue: Price;
9
12
  totalValueHistory?: Array<{
10
13
  timestamp: Date;
@@ -18,4 +21,5 @@ export interface Portfolio {
18
21
  all_time: number;
19
22
  };
20
23
  lastUpdated: Date;
24
+ metadata?: Metadata;
21
25
  }
@@ -0,0 +1,13 @@
1
+ import { Asset } from './Asset';
2
+ import { Balance } from './Balance';
3
+ import { Price } from './Price';
4
+ export interface PortfolioAsset {
5
+ id: string;
6
+ accountId: string;
7
+ assetId: string;
8
+ asset: Asset;
9
+ balance: Balance;
10
+ value: Price;
11
+ allocation: number;
12
+ lastUpdated: Date;
13
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -1,7 +1,8 @@
1
1
  import { IntegrationSource } from '../enums/IntegrationSource';
2
2
  export interface Price {
3
- value: number;
3
+ value?: number;
4
+ amount?: number;
4
5
  currency: string;
5
6
  timestamp: Date;
6
- source: IntegrationSource;
7
+ source?: IntegrationSource;
7
8
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cygnus-wealth/data-models",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "description": "Shared TypeScript data models for CygnusWealth project",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",