getDataSetLeafCount
getDataSetLeafCount(
client,options):Promise<bigint>
Defined in: packages/synapse-core/src/pdp-verifier/get-data-set-leaf-count.ts:41
Get the leaf count for a data set
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
client | Client<Transport, Chain> | The client to use to get the data set leaf count. |
options | OptionsType | getDataSetLeafCount.OptionsType |
Returns
Section titled “Returns”Promise<bigint>
The leaf count for the data set getDataSetLeafCount.OutputType
Example
Section titled “Example”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 })