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)
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
client | Client<Transport, Chain> | The client to use to get the data set listener. |
options | OptionsType | getDataSetListener.OptionsType |
Returns
Section titled “Returns”Listener contract address getDataSetListener.OutputType. Returns null if the data set is not live or does not exist (zero address).
Example
Section titled “Example”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 })Throws
Section titled “Throws”Errors getDataSetListener.ErrorType