# Ed25519.getPublicKey

Computes the Ed25519 public key from a provided private key.

## Imports

:::code-group
```ts [Named]
import { Ed25519 } from 'ox'
```

```ts [Entrypoint]
import * as Ed25519 from 'ox/Ed25519'
```
:::

## Examples

```ts twoslash
import { Ed25519 } from 'ox'

const publicKey = Ed25519.getPublicKey({
  privateKey: '0x...'
})
```

## Definition

```ts
function getPublicKey<as>(
  options: getPublicKey.Options<as>,
): getPublicKey.ReturnType<as>
```

**Source:** [src/core/Ed25519.ts](https://github.com/wevm/ox/blob/main/src/core/Ed25519.ts#L348)

## Parameters

### options

* **Type:** `getPublicKey.Options<as>`

The options to compute the public key.

#### options.as

* **Type:** `"Bytes" | "Hex" | as`
* **Optional**

Format of the returned public key.

#### options.privateKey

* **Type:** `0x${string} | Uint8Array`

Private key to compute the public key from.

## Return Type

The computed public key.

`getPublicKey.ReturnType<as>`
