@camera.ui/sdk / plugin / validateContractConsistency
Function: validateContractConsistency()
validateContractConsistency(
contract,pluginName?):void
Defined in: plugin/helper.ts:164
Enforce role-specific consistency rules on top of the structural check (e.g. SensorProvider plugins must declare at least one provided sensor; Hub plugins cannot expose sensors). Throws on the first violation.
Parameters
contract
Already-structurally-valid contract.
pluginName?
string
Optional plugin name; used to prefix error messages.
Returns
void
Throws
When the contract violates a role-specific rule.
Example
ts
import { validateContractConsistency } from '@camera.ui/sdk';
validateContractConsistency(contract, 'my-plugin');