import { aggregateZapSats } from './zapAggregation' export interface SeriesAggregates { sponsoring: number purchases: number reviewTips: number } export async function getSeriesAggregates(params: { authorPubkey: string seriesId: string }): Promise { const [sponsoring, purchases, reviewTips] = await Promise.all([ aggregateZapSats({ authorPubkey: params.authorPubkey, seriesId: params.seriesId, kindType: 'sponsoring' }), aggregateZapSats({ authorPubkey: params.authorPubkey, seriesId: params.seriesId, kindType: 'purchase' }), aggregateZapSats({ authorPubkey: params.authorPubkey, seriesId: params.seriesId, kindType: 'review_tip' }), ]) return { sponsoring, purchases, reviewTips } }