# decodePDPOffering

> **decodePDPOffering**(`provider`): [`PDPOffering`](/reference/filoz/synapse-core/sp-registry/interfaces/pdpoffering/)

Defined in: [packages/synapse-core/src/utils/pdp-capabilities.ts:38](https://github.com/FilOzone/synapse-sdk/blob/814fc2e242f2b236f8d2ba4078ebd703cedb5cf2/packages/synapse-core/src/utils/pdp-capabilities.ts#L38)

Decode the PDP offering from the provider.

## Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `provider` | \{ `product`: \{ `capabilityKeys`: readonly `string`[]; `isActive`: `boolean`; `productType`: `number`; \}; `productCapabilityValues`: readonly `` `0x${string}` ``[]; `providerId`: `bigint`; `providerInfo`: \{ `description`: `string`; `isActive`: `boolean`; `name`: `string`; `payee`: `` `0x${string}` ``; `serviceProvider`: `` `0x${string}` ``; \}; \} | The provider to decode the offering for. [ProviderWithProduct](/reference/filoz/synapse-core/sp-registry/type-aliases/providerwithproduct/) |
| `provider.product` | \{ `capabilityKeys`: readonly `string`[]; `isActive`: `boolean`; `productType`: `number`; \} | - |
| `provider.product.capabilityKeys` | readonly `string`[] | - |
| `provider.product.isActive` | `boolean` | - |
| `provider.product.productType` | `number` | - |
| `provider.productCapabilityValues` | readonly `` `0x${string}` ``[] | - |
| `provider.providerId` | `bigint` | - |
| `provider.providerInfo` | \{ `description`: `string`; `isActive`: `boolean`; `name`: `string`; `payee`: `` `0x${string}` ``; `serviceProvider`: `` `0x${string}` ``; \} | - |
| `provider.providerInfo.description` | `string` | - |
| `provider.providerInfo.isActive` | `boolean` | - |
| `provider.providerInfo.name` | `string` | - |
| `provider.providerInfo.payee` | `` `0x${string}` `` | - |
| `provider.providerInfo.serviceProvider` | `` `0x${string}` `` | - |

## Returns

[`PDPOffering`](/reference/filoz/synapse-core/sp-registry/interfaces/pdpoffering/)

The decoded offering.

## Throws

Errors [ZodValidationError](/reference/filoz/synapse-core/errors/classes/zodvalidationerror/) when the capabilities are invalid.