A single page of results returned by list-querying SDK methods such as OnboardingBridgeSDK.getWhitelistedAssets, OnboardingBridgeSDK.getBlocklistedAddresses, etc.

Because Soroban contracts return full vectors, pagination is performed client-side. The cursor is an opaque base64-encoded offset token.

// Iterate through all whitelisted assets page by page
let page = await sdk.getWhitelistedAssets();
while (page.hasMore) {
console.log(page.items);
page = await sdk.getWhitelistedAssets(page.cursor);
}
console.log(page.items); // last page
interface PaginatedResult<T> {
    cursor?: string;
    hasMore: boolean;
    items: T[];
}

Type Parameters

  • T

    — the element type for items in this page.

Properties

Properties

cursor?: string

Opaque cursor token to pass as the cursor argument in the next call. undefined when there are no further pages.

hasMore: boolean

true when there is at least one more page available. Convenience alias for cursor !== undefined.

items: T[]

Items in this page. May be an empty array on the last page.