@cranberry-money/shared-utils
Version:
Shared utility functions for Blueberry platform
12 lines • 656 B
TypeScript
import type { HoldingWithWallet, HoldingsSummary, AssetAllocationItem } from '@cranberry-money/shared-types';
/**
* Calculate holdings summary with asset type breakdown.
* Groups holdings by asset type and calculates totals.
*/
export declare function calculateHoldingsSummary(holdings: HoldingWithWallet[], walletsCount: number): HoldingsSummary;
/**
* Calculate asset allocation from holdings.
* Groups holdings by asset UUID (aggregating across wallets) and calculates percentages.
*/
export declare function calculateAssetAllocation(holdings: HoldingWithWallet[], totalValue: number): AssetAllocationItem[];
//# sourceMappingURL=holdings.d.ts.map