Skip to content

isProviderActive

isProviderActive(client, options): Promise<boolean>

Defined in: packages/synapse-core/src/sp-registry/is-provider-active.ts:62

Check if a provider is active

ParameterTypeDescription
clientClient<Transport, Chain>The client to use to check the provider status.
optionsOptionsTypeisProviderActive.OptionsType

Promise<boolean>

Whether the provider is active isProviderActive.OutputType

Errors isProviderActive.ErrorType

import { isProviderActive } 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 active = await isProviderActive(client, {
providerId: 123n,
})
console.log(active)