Skip to content

activeProviderCount

activeProviderCount(client, options): Promise<bigint>

Defined in: packages/synapse-core/src/sp-registry/active-provider-count.ts:58

Get the number of active providers

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

Promise<bigint>

Number of active providers activeProviderCount.OutputType

Errors activeProviderCount.ErrorType

import { activeProviderCount } 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 count = await activeProviderCount(client)
console.log(count)