Skip to content

getDataSetLeafCount

getDataSetLeafCount(client, options): Promise<bigint>

Defined in: packages/synapse-core/src/pdp-verifier/get-data-set-leaf-count.ts:44

Get the leaf count for a data set

Parameter Type Description
client Client<Transport, Chain> The client to use to get the data set leaf count.
options OptionsType getDataSetLeafCount.OptionsType

Promise<bigint>

The leaf count for the data set getDataSetLeafCount.OutputType

import { getDataSetLeafCount } from '@filoz/synapse-core/pdp-verifier'
import { calibration } from '@filoz/synapse-core/chains'
import { createPublicClient, http } from 'viem'

const client = createPublicClient({
  chain: calibration,
  transport: http(),
})

const leafCount = await getDataSetLeafCount(client, { dataSetId: 1n })

Errors getDataSetLeafCount.ErrorType