nostr-websocket-utils

nostr-websocket-utils v0.3.0


nostr-websocket-utils / PaginationHandler

Interface: PaginationHandler

Pagination handler interface

Methods

getNextPage()

getNextPage(subscriptionId, pageSize): Promise<NostrWSMessage[]>

Gets next page of events

Parameters

subscriptionId

string

Subscription ID

pageSize

number

Number of events per page

Returns

Promise<NostrWSMessage[]>

Next page of events

Defined in

nips/nip-15.ts:126


hasMoreEvents()

hasMoreEvents(subscriptionId): boolean

Checks if more events are available

Parameters

subscriptionId

string

Subscription ID

Returns

boolean

True if more events exist

Defined in

nips/nip-15.ts:136


updateState()

updateState(subscriptionId, events): void

Updates pagination state with new events

Parameters

subscriptionId

string

Subscription ID

events

NostrWSMessage[]

New events

Returns

void

Defined in

nips/nip-15.ts:143