# Ed25519.verify

Verifies a payload was signed by the provided public 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 { privateKey, publicKey } = Ed25519.createKeyPair()
const signature = Ed25519.sign({
  payload: '0xdeadbeef',
  privateKey
})

const verified = Ed25519.verify({
  // [!code focus]
  publicKey, // [!code focus]
  payload: '0xdeadbeef', // [!code focus]
  signature // [!code focus]
}) // [!code focus]
```

## Definition

```ts
function verify(
  options: verify.Options,
): boolean
```

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

## Parameters

### options

* **Type:** `verify.Options`

The verification options.

#### options.payload

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

Payload that was signed.

#### options.publicKey

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

Public key that signed the payload.

#### options.signature

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

Signature of the payload.

## Return Type

Whether the payload was signed by the provided public key.

`boolean`
