---
description: A collection of interfaces used in the DVR module
---

# Interfaces

### Table of contents

#### Interfaces

* [PublicKey](#publickey)
* [KeysetEndpoint](#keysetendpoint)
* [PublicKeyOptionUnion](#publickeyoptionunion)
* [PublicKeyOption](#publickeyoption)
* [UserDataRequest](#userdatarequest)
* [DvrData](#dvrdata)
* [DvrDataPayload](#dvrdatapayload)
* [ExpectedDvrMetadata](#expecteddvrmetadata)

### Interfaces

#### PublicKey

▸ **PublicKey**: `Object`

Represents a public key with x and y coordinates.

| Name | Type     | Description                    |
| ---- | -------- | ------------------------------ |
| `x`  | `string` | X coordinate of the public key |
| `y`  | `string` | Y coordinate of the public key |

***

#### KeysetEndpoint

▸ **KeysetEndpoint**: `Object`

Represents a keyset endpoint configuration.

| Name  | Type     | Description          |
| ----- | -------- | -------------------- |
| `jku` | `string` | JSON Web Key Set URL |
| `kid` | `string` | Key identifier       |

***

#### PublicKeyOptionUnion

▸ **PublicKeyOptionUnion**: `Object`

Union of possible public key options.

| Name               | Type                                | Description              |
| ------------------ | ----------------------------------- | ------------------------ |
| `keyset_endpoint?` | [`KeysetEndpoint`](#keysetendpoint) | Optional keyset endpoint |
| `public_key?`      | [`PublicKey`](#publickey)           | Optional public key      |

***

#### PublicKeyOption

▸ **PublicKeyOption**: `Object`

Configuration for public key options.

| Name    | Type                                                               | Description                    |
| ------- | ------------------------------------------------------------------ | ------------------------------ |
| `tag`   | [`PublicKeyOptionType`](../../constants/enums#publickeyoptiontype) | Type of the public key option  |
| `value` | [`PublicKeyOptionUnion`](#publickeyoptionunion)                    | Value of the public key option |

***

#### UserDataRequest

▸ **UserDataRequest**: `Object`

Request format for user data.

| Name    | Type                                                                              | Description               |
| ------- | --------------------------------------------------------------------------------- | ------------------------- |
| `key`   | `string`                                                                          | Key for the user data     |
| `value` | [`PublicKeyOrKeysetEndpoint`](../../type-aliases/types#publickeyorkeysetendpoint) | Verifying key or endpoint |

***

#### DvrData

▸ **DvrData**: `Object`

Data structure for DVR operations.

| Name                 | Type                                                                              | Description                   |
| -------------------- | --------------------------------------------------------------------------------- | ----------------------------- |
| `zkvm`               | `string`                                                                          | ZK Virtual Machine identifier |
| `dvr_title`          | `string`                                                                          | Title of the DVR              |
| `dvr_id`             | `string`                                                                          | Identifier of the DVR         |
| `query`              | `string`                                                                          | Query string                  |
| `user_data_requests` | [`UserDataRequest`](#userdatarequest)`[]`                                         | Array of user data requests   |
| `dvr_verifying_key`  | [`PublicKeyOrKeysetEndpoint`](../../type-aliases/types#publickeyorkeysetendpoint) | Key for verifying DVR         |

***

#### DvrDataPayload

▸ **DvrDataPayload**: `Object`

Payload format for DVR data.

| Name                 | Type     | Description                   |
| -------------------- | -------- | ----------------------------- |
| `zkvm`               | `string` | ZK Virtual Machine identifier |
| `dvr_title`          | `string` | Title of the DVR              |
| `dvr_id`             | `string` | Identifier of the DVR         |
| `query`              | `string` | Query string                  |
| `query_engine_ver`   | `string` | Query engine version          |
| `query_method_ver`   | `string` | Query method version          |
| `user_data_requests` | `object` | User data requests            |
| `dvr_verifying_key`  | `object` | Key for verifying DVR         |

***

#### ExpectedDvrMetadata

▸ **ExpectedDvrMetadata**: `Object`

Expected metadata for DVR operations.

| Name                       | Type                                      | Description                       |
| -------------------------- | ----------------------------------------- | --------------------------------- |
| `ttl`                      | `number`                                  | Time to live                      |
| `dvr`                      | `string`                                  | DVR string                        |
| `user_data_verifying_keys` | [`UserDataRequest`](#userdatarequest)`[]` | Array of user data verifying keys |
