Skip to main content
Version: 1.6.2

Type Alias: MessageSearchPage

MessageSearchPage = { cursor?: string; data: MessageSearchResult[]; hasNextPage: boolean; }

Defined in: api/types.ts:258

A page of message search results with cursor-based pagination.

Remarks​

When hasNextPage is true, pass the cursor value to CCIPAPIClient.searchMessages to fetch the next page. The cursor encodes all original filters, so you do not need to re-supply them when paginating.

See​

Examples​

TypeScript
let page = await api.searchMessages({ sender: '0x...' }, { limit: 10 })
while (page.hasNextPage) {
page = await api.searchMessages(undefined, { cursor: page.cursor! })
}
TypeScript
for await (const msg of api.searchAllMessages({ sender: '0x...' })) {
console.log(msg.messageId)
}

Properties​

cursor?​

optional cursor?: string

Defined in: api/types.ts:264

Opaque cursor for fetching the next page


data​

data: MessageSearchResult[]

Defined in: api/types.ts:260

Array of message search results


hasNextPage​

hasNextPage: boolean

Defined in: api/types.ts:262

Whether more results are available