> For the complete documentation index, see [llms.txt](https://gl-docs.gitbook.io/zkpass/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gl-docs.gitbook.io/zkpass/zkpass-developers-guide/api-reference/typescript/functions/functions-publickeyoptionutils.md).

# Functions: publicKeyOptionUtils

### Table of contents

#### Functions

* [convertToPublicKeyOption](#converttopublickeyoption)

### Functions

#### convertToPublicKeyOption

▸ `convertToPublicKeyOption`(`item`: [`PublicKey`](/zkpass/zkpass-developers-guide/api-reference/typescript/interfaces/interfaces.md#publickey) `|` [`KeysetEndpoint`](/zkpass/zkpass-developers-guide/api-reference/typescript/interfaces/interfaces.md#keysetendpoint)): [`PublicKeyOption`](/zkpass/zkpass-developers-guide/api-reference/typescript/interfaces/interfaces.md#publickeyoption)

Converts a PublicKey or KeysetEndpoint object into a PublicKeyOption structure.

**Parameters**

| Name   | Type                                                                                                                                                                                                                                 | Description         |
| ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------- |
| `item` | [`PublicKey`](/zkpass/zkpass-developers-guide/api-reference/typescript/interfaces/interfaces.md#publickey) `\|` [`KeysetEndpoint`](/zkpass/zkpass-developers-guide/api-reference/typescript/interfaces/interfaces.md#keysetendpoint) | The item to convert |

**Returns**

[`PublicKeyOption`](/zkpass/zkpass-developers-guide/api-reference/typescript/interfaces/interfaces.md#publickeyoption) - A structured object containing the tag and value of the public key option

**Throws**

* Error if input is neither a valid PublicKey nor KeysetEndpoint
