Skip to content

getClientDataSetsLength

getClientDataSetsLength(client, options): Promise<bigint>

Defined in: packages/synapse-core/src/warm-storage/get-client-data-sets-length.ts:62

Get total count of client data sets

ParameterTypeDescription
clientClient<Transport, Chain>The client to use to get the data set count.
optionsOptionsTypegetClientDataSetsLength.OptionsType

Promise<bigint>

Total count of data sets getClientDataSetsLength.OutputType

Errors getClientDataSetsLength.ErrorType

import { getClientDataSetsLength } 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(),
})
const count = await getClientDataSetsLength(client, {
address: '0x0000000000000000000000000000000000000000',
})
console.log(count)