getNextChallengeEpoch
getNextChallengeEpoch(
client,options):Promise<OutputType>
Defined in: packages/synapse-core/src/pdp-verifier/get-next-challenge-epoch.ts:62
Get next challenge epoch
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
client | Client<Transport, Chain> | The client to use to get the active pieces. |
options | OptionsType | getNextChallengeEpoch.OptionsType |
Returns
Section titled “Returns”The next challenge epoch for the data set getNextChallengeEpoch.OutputType. Returns null if the data set is not live or no challenge epoch has been set.
Example
Section titled “Example”import { getNextChallengeEpoch } 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 nextChallengeEpoch = await getNextChallengeEpoch(client, { dataSetId: 1n,})