Skip to content

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.

ParameterTypeDescription
clientClient<Transport, Chain>The client to use to get data set IDs.
optionsOptionsTypegetClientDataSetIds.OptionsType

Promise<OutputType>

Array of data set IDs getClientDataSetIds.OutputType

Errors getClientDataSetIds.ErrorType

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 IDs
const ids = await getClientDataSetIds(client, {
address: '0x0000000000000000000000000000000000000000',
offset: 0n,
limit: 100n,
})
console.log(ids)