Skip to content

getDataSetListener

getDataSetListener(client, options): Promise<OutputType>

Defined in: packages/synapse-core/src/pdp-verifier/get-data-set-listener.ts:59

Get the data set listener contract address (record keeper)

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

Promise<OutputType>

Listener contract address getDataSetListener.OutputType. Returns null if the data set is not live or does not exist (zero address).

import { getDataSetListener } 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 listenerAddress = await getDataSetListener(client, { dataSetId: 1n })

Errors getDataSetListener.ErrorType