Skip to content

decodePDPOffering

decodePDPOffering(provider): PDPOffering

Defined in: packages/synapse-core/src/utils/pdp-capabilities.ts:38

Decode the PDP offering from the provider.

ParameterTypeDescription
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.capabilityKeysreadonly string[]-
provider.product.isActiveboolean-
provider.product.productTypenumber-
provider.productCapabilityValuesreadonly `0x${string}`[]-
provider.providerIdbigint-
provider.providerInfo{ description: string; isActive: boolean; name: string; payee: `0x${string}`; serviceProvider: `0x${string}`; }-
provider.providerInfo.descriptionstring-
provider.providerInfo.isActiveboolean-
provider.providerInfo.namestring-
provider.providerInfo.payee`0x${string}`-
provider.providerInfo.serviceProvider`0x${string}`-

PDPOffering

The decoded offering.

Errors ZodValidationError when the capabilities are invalid.