# isProviderActive

> **isProviderActive**(`client`, `options`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`boolean`\>

Defined in: [packages/synapse-core/src/sp-registry/is-provider-active.ts:68](https://github.com/FilOzone/synapse-sdk/blob/814fc2e242f2b236f8d2ba4078ebd703cedb5cf2/packages/synapse-core/src/sp-registry/is-provider-active.ts#L68)

Check if a provider is active

The underlying contract method is guarded by the `providerExists` modifier
and will revert for unknown provider IDs. This wrapper normalizes those
reverts to `false` so callers can use it as a simple existence + active
check.

## Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `client` | `Client`\<`Transport`, `Chain`\> | The client to use to check the provider status. |
| `options` | [`OptionsType`](/reference/filoz/synapse-core/sp-registry/namespaces/isprovideractive/type-aliases/optionstype/) | [isProviderActive.OptionsType](/reference/filoz/synapse-core/sp-registry/namespaces/isprovideractive/type-aliases/optionstype/) |

## Returns

[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`boolean`\>

Whether the provider exists and is active [isProviderActive.OutputType](/reference/filoz/synapse-core/sp-registry/namespaces/isprovideractive/type-aliases/outputtype/)

## Throws

Errors [isProviderActive.ErrorType](/reference/filoz/synapse-core/sp-registry/namespaces/isprovideractive/type-aliases/errortype/)

## Example

```ts
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)
```