Import
Usage
Return Type: UseInfiniteQueryResult
The hook returns a React Query infinite query result object with the following key properties:
Parameters
Parameter | Type | Description |
---|---|---|
chainId | number | The chain ID (e.g., 1 for Ethereum, 137 for Polygon) |
primarySaleContractAddress | string | The primary sale contract address |
filter | object | (Optional) Filter parameters for the query |
filter.status | string | (Optional) Filter by item status (e.g., ‘active’) |
page | object | (Optional) Pagination configuration |
page.pageSize | number | (Optional) Number of items per page |
query | object | (Optional) React Query configuration options |
config | object | (Optional) SDK configuration options |
Query Options
You can customize the query behavior using the optional parameters:Notes
This hook is useful for:- Displaying a list of primary sale items with infinite scroll
- Building marketplace primary sale pages
- Showing available items for initial sale
- Managing paginated data loading
- Infinite scrolling pagination
- Data fetching and caching
- Loading and error states
- Type-safe responses
Make sure to handle the loading states appropriately, especially
isFetchingNextPage
when implementing infinite scroll functionality.The
primarySaleContractAddress
must be a valid contract address that
supports primary sales. Invalid addresses will result in failed queries.