getClientDataSetIds
getClientDataSetIds(
client,options):Promise<OutputType>
Defined in: packages/synapse-core/src/warm-storage/get-client-data-set-ids.ts:73
Get client data set IDs with optional pagination
For large lists, use pagination to avoid gas limit issues. If limit=0, returns all remaining IDs starting from offset.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
client | Client<Transport, Chain> | The client to use to get data set IDs. |
options | OptionsType | getClientDataSetIds.OptionsType |
Returns
Section titled “Returns”Array of data set IDs getClientDataSetIds.OutputType
Throws
Section titled “Throws”Errors getClientDataSetIds.ErrorType
Example
Section titled “Example”import { getClientDataSetIds } from '@filoz/synapse-core/warm-storage'import { createPublicClient, http } from 'viem'import { calibration } from '@filoz/synapse-core/chains'
const client = createPublicClient({ chain: calibration, transport: http(),})
// Get first 100 dataset IDsconst ids = await getClientDataSetIds(client, { address: '0x0000000000000000000000000000000000000000', offset: 0n, limit: 100n,})
console.log(ids)