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
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
client | Client<Transport, Chain> | The client to use to get the active provider count. |
options | OptionsType | activeProviderCount.OptionsType |
Returns
Section titled “Returns”Promise<bigint>
Number of active providers activeProviderCount.OutputType
Throws
Section titled “Throws”Errors activeProviderCount.ErrorType
Example
Section titled “Example”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)