getPdpDataSets
getPdpDataSets(
client,options):Promise<OutputType>
Defined in: packages/synapse-core/src/warm-storage/get-pdp-data-sets.ts:42
Get PDP data sets
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
client | Client<Transport, Chain> | The client to use to get data sets for a client address. |
options | OptionsType | getPdpDataSets.OptionsType |
Returns
Section titled “Returns”Array of PDP data set info entries getPdpDataSets.OutputType
Throws
Section titled “Throws”Errors getPdpDataSets.ErrorType
Example
Section titled “Example”import { getPdpDataSets } from '@filoz/synapse-core/warm-storage'import { createPublicClient, http } from 'viem'import { calibration } from '@filoz/synapse-core/chains'
const client = createPublicClient({ chain: calibration, transport: http(),})
const dataSets = await getPdpDataSets(client, { client: '0x0000000000000000000000000000000000000000',})
console.log(dataSets[0]?.dataSetId)