getPDPProviders
getPDPProviders(
client,options):Promise<OutputType>
Defined in: packages/synapse-core/src/sp-registry/get-pdp-providers.ts:63
Get PDP providers with pagination
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
client | Client<Transport, Chain> | The client to use to get the providers. |
options | OptionsType | getPDPProviders.OptionsType |
Returns
Section titled “Returns”The paginated providers result getPDPProviders.OutputType
Throws
Section titled “Throws”Errors getPDPProviders.ErrorType
Example
Section titled “Example”import { getPDPProviders } from '@filoz/synapse-core/sp-registry'import { createPublicClient, http } from 'viem'import { calibration } from '@filoz/synapse-core/chains'
const client = createPublicClient({ chain: calibration, transport: http(),})
const result = await getPDPProviders(client, { onlyActive: true,})
console.log(result.providers)console.log(result.hasMore)