getPDPProvider
getPDPProvider(
client,options):Promise<PDPProvider>
Defined in: packages/synapse-core/src/sp-registry/get-pdp-provider.ts:55
Get PDP provider details
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
client | Client<Transport, Chain> | The client to use to get the provider details. |
options | OptionsType | getPDPProvider.OptionsType |
Returns
Section titled “Returns”The PDP provider details getPDPProvider.OutputType
Throws
Section titled “Throws”Errors getPDPProvider.ErrorType
Example
Section titled “Example”import { getPDPProvider } 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 provider = await getPDPProvider(client, { providerId: 1n,})
console.log(provider.name)