Skip to content

getPDPProviderByAddress

getPDPProviderByAddress(client, options): Promise<OutputType>

Defined in: packages/synapse-core/src/sp-registry/get-pdp-provider.ts:164

Get PDP provider by address

ParameterTypeDescription
clientClient<Transport, Chain>The client to use to get the provider.
optionsOptionsTypegetPDPProviderByAddress.OptionsType

Promise<OutputType>

The PDP provider getPDPProviderByAddress.OutputType

Errors getPDPProviderByAddress.ErrorType

import { getPDPProviderByAddress } 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 getPDPProviderByAddress(client, {
address: '0x1234567890123456789012345678901234567890',
})
console.log(provider.name)