getPDPProvidersByIds
getPDPProvidersByIds(
client,options):Promise<OutputType>
Defined in: packages/synapse-core/src/sp-registry/get-pdp-providers.ts:268
Get PDP providers by IDs
Providers that do not exist (the registry reverts with Provider does not exist
or Provider not found) or that have no active PDP product are omitted from the
result. Any other failure, including RPC errors and aborted requests, rejects.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
client |
Client<Transport, Chain> |
The client to use to get the providers. |
options |
OptionsType |
getPDPProvidersByIds.OptionsType |
Returns
Section titled “Returns”The approved PDP providers getPDPProvidersByIds.OutputType
Throws
Section titled “Throws”Errors getPDPProvidersByIds.ErrorType
Example
Section titled “Example”import { getPDPProvidersByIds } 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 getPDPProvidersByIds(client, {
providerIds: [1n, 2n, 3n],
})
console.log(result)