( ctx: HistoryAuthCtx, limit = HISTORY_PAGE_SIZE, )
| 73 | * has_more=true means older events exist. |
| 74 | */ |
| 75 | export async function fetchLatestEvents( |
| 76 | ctx: HistoryAuthCtx, |
| 77 | limit = HISTORY_PAGE_SIZE, |
| 78 | ): Promise<HistoryPage | null> { |
| 79 | return fetchPage(ctx, { limit, anchor_to_latest: true }, 'fetchLatestEvents') |
| 80 | } |
| 81 | |
| 82 | /** Older page: events immediately before `beforeId` cursor. */ |
| 83 | export async function fetchOlderEvents( |
no test coverage detected