# validateTopologyIdentityContract

Canonical: https://docs.shumoku.dev/en/library/api/validateTopologyIdentityContract
Language: en

@shumoku/core · 0.4.0 · function

# validateTopologyIdentityContract

[Source](https://github.com/konoe-akitoshi/shumoku/blob/main/libs/@shumoku/core/src/plugin-kit/topology-identity-contract.ts#L50)

Check whether \`graph\` satisfies the topology identity contract. Returns arrays of violating node/port ids. Both arrays empty → contract met.

```
validateTopologyIdentityContract(graph: NetworkGraph): TopologyIdentityContractResult
```

## Parameters

| Parameter | Type | Description | Default |
| --- | --- | --- | --- |
| `graph` | `NetworkGraph` | A NetworkGraph returned by a TopologyCapable plugin's \`fetchTopology()\` (or an equivalent in-process fixture). | `—` |

## Returns

```
TopologyIdentityContractResult
```

[`libs/@shumoku/core/src/plugin-kit/topology-identity-contract.ts:50`](https://github.com/konoe-akitoshi/shumoku/blob/main/libs/@shumoku/core/src/plugin-kit/topology-identity-contract.ts#L50)
