getPDPProviderByAddress
getPDPProviderByAddress(
client,options):Promise<OutputType>
Defined in: packages/synapse-core/src/sp-registry/get-pdp-provider.ts:164
Get PDP provider by address
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
client | Client<Transport, Chain> | The client to use to get the provider. |
options | OptionsType | getPDPProviderByAddress.OptionsType |
Returns
Section titled “Returns”The PDP provider getPDPProviderByAddress.OutputType
Throws
Section titled “Throws”Errors getPDPProviderByAddress.ErrorType
Example
Section titled “Example”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)