> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cultura.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# SchemaRegistry

# Solidity API

# Contract: SchemaRegistry

The global schema registry.

### register

```solidity theme={null}
function registerfunction register(string schema, bool revocable) external returns (bytes32)
```

Submits and reserves a new schema

#### Parameters

| Name        | Description                                       |
| ----------- | ------------------------------------------------- |
| `schema`    | The schema data schema.                           |
| `revocable` | Whether the schema allows revocations explicitly. |

#### Return Values

| Description                |
| -------------------------- |
| The UID of the new schema. |

### getSchema

```solidity theme={null}
function getSchemafunction getSchema(bytes32 uid) external view returns (struct SchemaRecord)
```

Returns an existing schema by UID

#### Parameters

| Name  | Description                        |
| ----- | ---------------------------------- |
| `uid` | The UID of the schema to retrieve. |

#### Return Values

| Description              |
| ------------------------ |
| The schema data members. |

## Public Functions

### constructor

```solidity theme={null}
function constructorconstructor() public
```

*Dev:* Creates a new SchemaRegistry instance.

## Custom Errors

### `AlreadyExists`

```solidity theme={null}
error AlreadyExistserror AlreadyExists()
```
