# `AssetContract`

> Contract 2.0.0 · package sha256 `a857eca95b35921109faf997094bb4192f12527d9d0fcd4be7e97f06425bad6e` · generated from `configurator-runtime.d.ts` by `services/onsite-scripter/scripts/build-contract-docs.mjs`; edit the source, not this file.

Interface · `import type { AssetContract } from '@holostep-configurators/runtime-client/contract';` · stable · since 2.0.0 · section 22. Pure helpers (root of the package; run in Node and the fake)

What an app needs from an asset. Type a contract with `satisfies AssetContract`; export it as JSON in CI for glb-validate.

## Members

| Member | Kind | Summary |
| --- | --- | --- |
| <a id="_schema"></a>[`$schema?`](AssetContract._schema.md) | property | The JSON Schema id. |
| <a id="element"></a>[`element?`](AssetContract.element.md) | property | Case-sensitive globs over the whole [`AssetManifest.element`](AssetManifest.element.md), as [`Query.name`](Part.name.md) (spec section C.8); with an array, any one matching passes. |
| <a id="parts"></a>[`parts?`](AssetContract.parts.md) | property | Parts by id: the tag and slot each must have, and whether it must exist. |
| <a id="slots"></a>[`slots?`](AssetContract.slots.md) | property | Slots by name; `realSize`: the slot must carry `uvMetres`. |
| <a id="connectors"></a>[`connectors?`](AssetContract.connectors.md) | property | Connector types and how many of each. |
| <a id="animations"></a>[`animations?`](AssetContract.animations.md) | property | Clip names that must exist. |

## Declaration

```ts
export interface AssetContract {
  $schema?: 'holostep.asset-contract/1';
  element?: string | readonly string[];
  parts?: Readonly<Record<string, {
    tag?: string;
    slot?: string;
    required?: boolean;
  }>>;
  slots?: Readonly<Record<string, {
    realSize?: boolean;
  }>>;
  connectors?: ReadonlyArray<{
    type: string;
    count?: number;
  }>;
  animations?: readonly string[];
}
```

## Generic-API test (spec 3.1)

| Rule | Result |
| --- | --- |
| 1. Neutral name | pass: `AssetContract` names no product |
| 2. A precedent | not recorded: no ledger row (coverage.json) names this member or its owner |
| 3. Two apps, or labs | not recorded: no ledger row names this member or its owner |
| 4. The cheaper fix first | not recorded per member (Appendix B decides it per need) |
