# getProviderWithProduct

> **getProviderWithProduct**(`client`, `options`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`OutputType`](/reference/filoz/synapse-core/sp-registry/namespaces/getproviderwithproduct/type-aliases/outputtype/)\>

Defined in: [packages/synapse-core/src/sp-registry/get-provider-with-product.ts:78](https://github.com/FilOzone/synapse-sdk/blob/f7cf64c2e5ba1e8fffcf44b11f88f3ef7958de8d/packages/synapse-core/src/sp-registry/get-provider-with-product.ts#L78)

Get provider details with specific product information

The underlying contract method is guarded by the `providerExists` modifier
and will revert for unknown provider IDs. This wrapper normalizes those
reverts to `null`. Reverts from any other source (e.g. RPC failures) still
propagate.

Note: the contract does not revert when the provider exists but the
requested product is missing or inactive — in that case it returns a
default-initialized product and callers must inspect `product.isActive`
and `product.capabilityKeys`.

## Parameters

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

## Returns

[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`OutputType`](/reference/filoz/synapse-core/sp-registry/namespaces/getproviderwithproduct/type-aliases/outputtype/)\>

The provider with product details, or `null` when the provider does not exist [getProviderWithProduct.OutputType](/reference/filoz/synapse-core/sp-registry/namespaces/getproviderwithproduct/type-aliases/outputtype/)

## Throws

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

## Example

```ts
import { getProviderWithProduct } 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 getProviderWithProduct(client, {
  providerId: 1n,
  productType: 0, // ProductType.PDP
})

if (provider) {
  console.log(provider.providerInfo.name)
}
```