fetchPaginated

Fetch mails in a paginated manner for a specific receiver. This can be helpful when dealing with a large number of mails, as it allows you to load and process a manageable number of mails at a time.

Usage

const receiver = '0x...';
const pageNumber = 1n;
const pageSize = 10n;
const receivedEnvelopes = await mail.fetchAll(receiver, pageNumber, pageSize);

Returns

Promise<ReceivedEnvelope[]>

A promise that resolves to an array of received mail Envelopes.

Parameters

receiver

  • Type Address

The mail receiver's address.

pageNumber

  • Type bigint

The number of the page to be fetched.

pageSize

  • Type bigint

The size of the page (i.e., the number of mails per page).

Previous
fetchAll