import type { AccountLike, AccountLikeArray, DailyOperations, Operation } from "@ledgerhq/types-live"; type GroupOpsByDayOpts = { count: number; withSubAccounts?: boolean; filterOperation?: (arg0: Operation, arg1: AccountLike) => boolean; }; /** * Groups operations from one or more accounts into day-based sections, * ordered from most recent to oldest. * * This function collects operations incrementally, scanning one operation * at a time per account in a round-robin fashion (including subaccounts if enabled). * In each round, it picks the most recent operation based on: * - `date` (newer comes first) * - `transactionSequenceNumber` (higher means more recent, used as a tiebreaker when dates are equal) * * The process stops once the requested `count` of operations has been collected. * Pending operations are included unless: * - They are duplicates of confirmed operations (based on `hash`) * - They are filtered out via the optional `filterOperation` callback * * ⚠️ Due to its round-by-account design, operations from the same account * are not compared against each other in the same pass. This may lead to * chronological inconsistencies if relying solely on `transactionSequenceNumber` * for intra-account ordering. Consider sorting operations manually if strict ordering is required. * * @param inputAccounts - A list of accounts (or parent accounts) to pull operations from * @param options - Options to configure grouping behavior * @param options.count - Maximum number of operations to include in the result * @param options.withSubAccounts - Whether to include subaccounts in the input set * @param options.filterOperation - Optional function to selectively include/exclude operations * * @returns A `DailyOperations` object containing: * - `sections`: An array of `{ day, data[] }` groups * - `completed`: Boolean indicating whether fewer operations were available than requested * * @memberof account */ export declare function groupAccountsOperationsByDay(inputAccounts: AccountLikeArray, { count, withSubAccounts, filterOperation }: GroupOpsByDayOpts): DailyOperations; /** * Return a list of `{count}` operations grouped by day. * @memberof account */ export declare function groupAccountOperationsByDay(account: AccountLike, arg: GroupOpsByDayOpts): DailyOperations; export {}; //# sourceMappingURL=groupOperations.d.ts.map