decodePDPOffering
decodePDPOffering(
provider):PDPOffering
Defined in: packages/synapse-core/src/utils/pdp-capabilities.ts:38
Decode the PDP offering from the provider.
Parameters
Section titled “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 |
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
Section titled “Returns”The decoded offering.
Throws
Section titled “Throws”Errors ZodValidationError when the capabilities are invalid.