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

# crypto/Ed25519

> Auto-generated API documentation

[**@tevm/voltaire**](../index.mdx)

***

[@tevm/voltaire](../index.mdx) / crypto/Ed25519

# crypto/Ed25519

## Classes

### Ed25519Error

Defined in: [src/crypto/Ed25519/errors.js:21](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/crypto/Ed25519/errors.js#L21)

Base error class for Ed25519 operations

#### Example

```javascript theme={null}
throw new Ed25519Error('Ed25519 operation failed', {
  code: 'ED25519_ERROR',
  context: { operation: 'sign' },
  docsPath: '/crypto/ed25519#error-handling',
  cause: originalError
})
```

#### Extends

* [`CryptoError`](../index/index.mdx#cryptoerror)

#### Extended by

* [`InvalidSeedError`](#invalidseederror)

#### Constructors

##### Constructor

> **new Ed25519Error**(`message`, `options?`): [`Ed25519Error`](#ed25519error)

Defined in: [src/crypto/Ed25519/errors.js:26](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/crypto/Ed25519/errors.js#L26)

###### Parameters

###### message

`string`

###### options?

###### cause?

`Error`

###### code?

`string`

###### context?

`Record`\<`string`, `unknown`>

###### docsPath?

`string`

###### Returns

[`Ed25519Error`](#ed25519error)

###### Overrides

[`CryptoError`](../index/index.mdx#cryptoerror).[`constructor`](../index/index.mdx#constructor-1)

#### Properties

##### cause?

> `optional` **cause**: `Error`

Defined in: [src/primitives/errors/AbstractError.ts:56](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/errors/AbstractError.ts#L56)

Root cause of this error (for error chaining)

###### Inherited from

[`CryptoError`](../index/index.mdx#cryptoerror).[`cause`](../index/index.mdx#cause-1)

##### code

> **code**: `string`

Defined in: [src/primitives/errors/AbstractError.ts:39](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/errors/AbstractError.ts#L39)

Machine-readable error code for programmatic handling

###### Example

```ts theme={null}
'INVALID_FORMAT', 'INVALID_LENGTH'
```

###### Inherited from

[`CryptoError`](../index/index.mdx#cryptoerror).[`code`](../index/index.mdx#code-1)

##### context?

> `optional` **context**: `Record`\<`string`, `unknown`>

Defined in: [src/primitives/errors/AbstractError.ts:45](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/errors/AbstractError.ts#L45)

Additional context metadata for debugging

###### Example

```ts theme={null}
{ value: '0x123', expected: '20 bytes' }
```

###### Inherited from

[`CryptoError`](../index/index.mdx#cryptoerror).[`context`](../index/index.mdx#context-1)

##### docsPath?

> `optional` **docsPath**: `string`

Defined in: [src/primitives/errors/AbstractError.ts:51](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/errors/AbstractError.ts#L51)

Path to documentation for this error

###### Example

```ts theme={null}
'/primitives/address/from-hex#error-handling'
```

###### Inherited from

[`CryptoError`](../index/index.mdx#cryptoerror).[`docsPath`](../index/index.mdx#docspath-1)

##### name

> **name**: `string`

Defined in: [src/crypto/Ed25519/errors.js:33](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/crypto/Ed25519/errors.js#L33)

###### Inherited from

`CryptoError.name`

#### Methods

##### getErrorChain()

> **getErrorChain**(): `string`

Defined in: [src/primitives/errors/AbstractError.ts:94](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/errors/AbstractError.ts#L94)

Get full error chain as string for logging

###### Returns

`string`

###### Inherited from

[`CryptoError`](../index/index.mdx#cryptoerror).[`getErrorChain`](../index/index.mdx#geterrorchain-2)

##### toJSON()

> **toJSON**(): `Record`\<`string`, `unknown`>

Defined in: [src/primitives/errors/AbstractError.ts:110](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/errors/AbstractError.ts#L110)

Serialize error to JSON for logging/telemetry

###### Returns

`Record`\<`string`, `unknown`>

###### Inherited from

[`CryptoError`](../index/index.mdx#cryptoerror).[`toJSON`](../index/index.mdx#tojson-2)

***

### InvalidPublicKeyError

Defined in: [src/crypto/Ed25519/errors.js:77](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/crypto/Ed25519/errors.js#L77)

Error thrown when public key is invalid

#### Example

```javascript theme={null}
throw new InvalidPublicKeyError('Ed25519 public key must be 32 bytes', {
  code: 'ED25519_INVALID_PUBLIC_KEY_LENGTH',
  context: { length: 64, expected: 32 },
  docsPath: '/crypto/ed25519/verify#error-handling'
})
```

#### Extends

* [`InvalidPublicKeyError`](../index/index.mdx#invalidpublickeyerror)

#### Constructors

##### Constructor

> **new InvalidPublicKeyError**(`message`, `options?`): [`InvalidPublicKeyError`](#invalidpublickeyerror)

Defined in: [src/crypto/Ed25519/errors.js:82](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/crypto/Ed25519/errors.js#L82)

###### Parameters

###### message

`string`

###### options?

###### cause?

`Error`

###### code?

`string`

###### context?

`Record`\<`string`, `unknown`>

###### docsPath?

`string`

###### Returns

[`InvalidPublicKeyError`](#invalidpublickeyerror)

###### Overrides

[`InvalidPublicKeyError`](../index/index.mdx#invalidpublickeyerror).[`constructor`](../index/index.mdx#constructor-10)

#### Properties

##### cause?

> `optional` **cause**: `Error`

Defined in: [src/primitives/errors/AbstractError.ts:56](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/errors/AbstractError.ts#L56)

Root cause of this error (for error chaining)

###### Inherited from

[`InvalidPublicKeyError`](../index/index.mdx#invalidpublickeyerror).[`cause`](../index/index.mdx#cause-10)

##### code

> **code**: `string`

Defined in: [src/primitives/errors/AbstractError.ts:39](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/errors/AbstractError.ts#L39)

Machine-readable error code for programmatic handling

###### Example

```ts theme={null}
'INVALID_FORMAT', 'INVALID_LENGTH'
```

###### Inherited from

[`InvalidPublicKeyError`](../index/index.mdx#invalidpublickeyerror).[`code`](../index/index.mdx#code-10)

##### context?

> `optional` **context**: `Record`\<`string`, `unknown`>

Defined in: [src/primitives/errors/AbstractError.ts:45](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/errors/AbstractError.ts#L45)

Additional context metadata for debugging

###### Example

```ts theme={null}
{ value: '0x123', expected: '20 bytes' }
```

###### Inherited from

[`InvalidPublicKeyError`](../index/index.mdx#invalidpublickeyerror).[`context`](../index/index.mdx#context-10)

##### docsPath?

> `optional` **docsPath**: `string`

Defined in: [src/primitives/errors/AbstractError.ts:51](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/errors/AbstractError.ts#L51)

Path to documentation for this error

###### Example

```ts theme={null}
'/primitives/address/from-hex#error-handling'
```

###### Inherited from

[`InvalidPublicKeyError`](../index/index.mdx#invalidpublickeyerror).[`docsPath`](../index/index.mdx#docspath-10)

##### name

> **name**: `string`

Defined in: [src/crypto/Ed25519/errors.js:89](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/crypto/Ed25519/errors.js#L89)

###### Inherited from

`BaseInvalidPublicKeyError.name`

#### Methods

##### getErrorChain()

> **getErrorChain**(): `string`

Defined in: [src/primitives/errors/AbstractError.ts:94](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/errors/AbstractError.ts#L94)

Get full error chain as string for logging

###### Returns

`string`

###### Inherited from

[`InvalidPublicKeyError`](../index/index.mdx#invalidpublickeyerror).[`getErrorChain`](../index/index.mdx#geterrorchain-20)

##### toJSON()

> **toJSON**(): `Record`\<`string`, `unknown`>

Defined in: [src/primitives/errors/AbstractError.ts:110](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/errors/AbstractError.ts#L110)

Serialize error to JSON for logging/telemetry

###### Returns

`Record`\<`string`, `unknown`>

###### Inherited from

[`InvalidPublicKeyError`](../index/index.mdx#invalidpublickeyerror).[`toJSON`](../index/index.mdx#tojson-20)

***

### InvalidSecretKeyError

Defined in: [src/crypto/Ed25519/errors.js:105](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/crypto/Ed25519/errors.js#L105)

Error thrown when secret key is invalid

#### Example

```javascript theme={null}
throw new InvalidSecretKeyError('Ed25519 secret key must be 32 bytes', {
  code: 'ED25519_INVALID_SECRET_KEY_LENGTH',
  context: { length: 64, expected: 32 },
  docsPath: '/crypto/ed25519/sign#error-handling'
})
```

#### Extends

* [`InvalidPrivateKeyError`](../index/index.mdx#invalidprivatekeyerror)

#### Constructors

##### Constructor

> **new InvalidSecretKeyError**(`message`, `options?`): [`InvalidSecretKeyError`](#invalidsecretkeyerror)

Defined in: [src/crypto/Ed25519/errors.js:110](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/crypto/Ed25519/errors.js#L110)

###### Parameters

###### message

`string`

###### options?

###### cause?

`Error`

###### code?

`string`

###### context?

`Record`\<`string`, `unknown`>

###### docsPath?

`string`

###### Returns

[`InvalidSecretKeyError`](#invalidsecretkeyerror)

###### Overrides

[`InvalidPrivateKeyError`](../index/index.mdx#invalidprivatekeyerror).[`constructor`](../index/index.mdx#constructor-9)

#### Properties

##### cause?

> `optional` **cause**: `Error`

Defined in: [src/primitives/errors/AbstractError.ts:56](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/errors/AbstractError.ts#L56)

Root cause of this error (for error chaining)

###### Inherited from

[`InvalidPrivateKeyError`](../index/index.mdx#invalidprivatekeyerror).[`cause`](../index/index.mdx#cause-9)

##### code

> **code**: `string`

Defined in: [src/primitives/errors/AbstractError.ts:39](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/errors/AbstractError.ts#L39)

Machine-readable error code for programmatic handling

###### Example

```ts theme={null}
'INVALID_FORMAT', 'INVALID_LENGTH'
```

###### Inherited from

[`InvalidPrivateKeyError`](../index/index.mdx#invalidprivatekeyerror).[`code`](../index/index.mdx#code-9)

##### context?

> `optional` **context**: `Record`\<`string`, `unknown`>

Defined in: [src/primitives/errors/AbstractError.ts:45](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/errors/AbstractError.ts#L45)

Additional context metadata for debugging

###### Example

```ts theme={null}
{ value: '0x123', expected: '20 bytes' }
```

###### Inherited from

[`InvalidPrivateKeyError`](../index/index.mdx#invalidprivatekeyerror).[`context`](../index/index.mdx#context-9)

##### docsPath?

> `optional` **docsPath**: `string`

Defined in: [src/primitives/errors/AbstractError.ts:51](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/errors/AbstractError.ts#L51)

Path to documentation for this error

###### Example

```ts theme={null}
'/primitives/address/from-hex#error-handling'
```

###### Inherited from

[`InvalidPrivateKeyError`](../index/index.mdx#invalidprivatekeyerror).[`docsPath`](../index/index.mdx#docspath-9)

##### name

> **name**: `string`

Defined in: [src/crypto/Ed25519/errors.js:117](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/crypto/Ed25519/errors.js#L117)

###### Inherited from

`InvalidPrivateKeyError.name`

#### Methods

##### getErrorChain()

> **getErrorChain**(): `string`

Defined in: [src/primitives/errors/AbstractError.ts:94](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/errors/AbstractError.ts#L94)

Get full error chain as string for logging

###### Returns

`string`

###### Inherited from

[`InvalidPrivateKeyError`](../index/index.mdx#invalidprivatekeyerror).[`getErrorChain`](../index/index.mdx#geterrorchain-18)

##### toJSON()

> **toJSON**(): `Record`\<`string`, `unknown`>

Defined in: [src/primitives/errors/AbstractError.ts:110](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/errors/AbstractError.ts#L110)

Serialize error to JSON for logging/telemetry

###### Returns

`Record`\<`string`, `unknown`>

###### Inherited from

[`InvalidPrivateKeyError`](../index/index.mdx#invalidprivatekeyerror).[`toJSON`](../index/index.mdx#tojson-18)

***

### InvalidSeedError

Defined in: [src/crypto/Ed25519/errors.js:133](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/crypto/Ed25519/errors.js#L133)

Error thrown when seed is invalid

#### Example

```javascript theme={null}
throw new InvalidSeedError('Ed25519 seed must be 32 bytes', {
  code: 'ED25519_INVALID_SEED_LENGTH',
  context: { length: 16, expected: 32 },
  docsPath: '/crypto/ed25519/keypair-from-seed#error-handling'
})
```

#### Extends

* [`Ed25519Error`](#ed25519error)

#### Constructors

##### Constructor

> **new InvalidSeedError**(`message`, `options?`): [`InvalidSeedError`](#invalidseederror)

Defined in: [src/crypto/Ed25519/errors.js:138](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/crypto/Ed25519/errors.js#L138)

###### Parameters

###### message

`string`

###### options?

###### cause?

`Error`

###### code?

`string`

###### context?

`Record`\<`string`, `unknown`>

###### docsPath?

`string`

###### Returns

[`InvalidSeedError`](#invalidseederror)

###### Overrides

[`Ed25519Error`](#ed25519error).[`constructor`](#constructor)

#### Properties

##### cause?

> `optional` **cause**: `Error`

Defined in: [src/primitives/errors/AbstractError.ts:56](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/errors/AbstractError.ts#L56)

Root cause of this error (for error chaining)

###### Inherited from

[`Ed25519Error`](#ed25519error).[`cause`](#cause)

##### code

> **code**: `string`

Defined in: [src/primitives/errors/AbstractError.ts:39](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/errors/AbstractError.ts#L39)

Machine-readable error code for programmatic handling

###### Example

```ts theme={null}
'INVALID_FORMAT', 'INVALID_LENGTH'
```

###### Inherited from

[`Ed25519Error`](#ed25519error).[`code`](#code)

##### context?

> `optional` **context**: `Record`\<`string`, `unknown`>

Defined in: [src/primitives/errors/AbstractError.ts:45](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/errors/AbstractError.ts#L45)

Additional context metadata for debugging

###### Example

```ts theme={null}
{ value: '0x123', expected: '20 bytes' }
```

###### Inherited from

[`Ed25519Error`](#ed25519error).[`context`](#context)

##### docsPath?

> `optional` **docsPath**: `string`

Defined in: [src/primitives/errors/AbstractError.ts:51](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/errors/AbstractError.ts#L51)

Path to documentation for this error

###### Example

```ts theme={null}
'/primitives/address/from-hex#error-handling'
```

###### Inherited from

[`Ed25519Error`](#ed25519error).[`docsPath`](#docspath)

##### name

> **name**: `string`

Defined in: [src/crypto/Ed25519/errors.js:145](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/crypto/Ed25519/errors.js#L145)

###### Inherited from

[`Ed25519Error`](#ed25519error).[`name`](#name)

#### Methods

##### getErrorChain()

> **getErrorChain**(): `string`

Defined in: [src/primitives/errors/AbstractError.ts:94](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/errors/AbstractError.ts#L94)

Get full error chain as string for logging

###### Returns

`string`

###### Inherited from

[`Ed25519Error`](#ed25519error).[`getErrorChain`](#geterrorchain)

##### toJSON()

> **toJSON**(): `Record`\<`string`, `unknown`>

Defined in: [src/primitives/errors/AbstractError.ts:110](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/errors/AbstractError.ts#L110)

Serialize error to JSON for logging/telemetry

###### Returns

`Record`\<`string`, `unknown`>

###### Inherited from

[`Ed25519Error`](#ed25519error).[`toJSON`](#tojson)

***

### InvalidSignatureError

Defined in: [src/crypto/Ed25519/errors.js:49](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/crypto/Ed25519/errors.js#L49)

Error thrown when signature is invalid

#### Example

```javascript theme={null}
throw new InvalidSignatureError('Ed25519 signature must be 64 bytes', {
  code: 'ED25519_INVALID_SIGNATURE_LENGTH',
  context: { length: 32, expected: 64 },
  docsPath: '/crypto/ed25519/verify#error-handling'
})
```

#### Extends

* [`InvalidSignatureError`](../index/index.mdx#invalidsignatureerror)

#### Constructors

##### Constructor

> **new InvalidSignatureError**(`message`, `options?`): [`InvalidSignatureError`](#invalidsignatureerror)

Defined in: [src/crypto/Ed25519/errors.js:54](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/crypto/Ed25519/errors.js#L54)

###### Parameters

###### message

`string`

###### options?

###### cause?

`Error`

###### code?

`string`

###### context?

`Record`\<`string`, `unknown`>

###### docsPath?

`string`

###### Returns

[`InvalidSignatureError`](#invalidsignatureerror)

###### Overrides

[`InvalidSignatureError`](../index/index.mdx#invalidsignatureerror).[`constructor`](../index/index.mdx#constructor-12)

#### Properties

##### cause?

> `optional` **cause**: `Error`

Defined in: [src/primitives/errors/AbstractError.ts:56](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/errors/AbstractError.ts#L56)

Root cause of this error (for error chaining)

###### Inherited from

[`InvalidSignatureError`](../index/index.mdx#invalidsignatureerror).[`cause`](../index/index.mdx#cause-12)

##### code

> **code**: `string`

Defined in: [src/primitives/errors/AbstractError.ts:39](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/errors/AbstractError.ts#L39)

Machine-readable error code for programmatic handling

###### Example

```ts theme={null}
'INVALID_FORMAT', 'INVALID_LENGTH'
```

###### Inherited from

[`InvalidSignatureError`](../index/index.mdx#invalidsignatureerror).[`code`](../index/index.mdx#code-12)

##### context?

> `optional` **context**: `Record`\<`string`, `unknown`>

Defined in: [src/primitives/errors/AbstractError.ts:45](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/errors/AbstractError.ts#L45)

Additional context metadata for debugging

###### Example

```ts theme={null}
{ value: '0x123', expected: '20 bytes' }
```

###### Inherited from

[`InvalidSignatureError`](../index/index.mdx#invalidsignatureerror).[`context`](../index/index.mdx#context-12)

##### docsPath?

> `optional` **docsPath**: `string`

Defined in: [src/primitives/errors/AbstractError.ts:51](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/errors/AbstractError.ts#L51)

Path to documentation for this error

###### Example

```ts theme={null}
'/primitives/address/from-hex#error-handling'
```

###### Inherited from

[`InvalidSignatureError`](../index/index.mdx#invalidsignatureerror).[`docsPath`](../index/index.mdx#docspath-12)

##### name

> **name**: `string`

Defined in: [src/crypto/Ed25519/errors.js:61](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/crypto/Ed25519/errors.js#L61)

###### Inherited from

`BaseInvalidSignatureError.name`

#### Methods

##### getErrorChain()

> **getErrorChain**(): `string`

Defined in: [src/primitives/errors/AbstractError.ts:94](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/errors/AbstractError.ts#L94)

Get full error chain as string for logging

###### Returns

`string`

###### Inherited from

[`InvalidSignatureError`](../index/index.mdx#invalidsignatureerror).[`getErrorChain`](../index/index.mdx#geterrorchain-24)

##### toJSON()

> **toJSON**(): `Record`\<`string`, `unknown`>

Defined in: [src/primitives/errors/AbstractError.ts:110](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/primitives/errors/AbstractError.ts#L110)

Serialize error to JSON for logging/telemetry

###### Returns

`Record`\<`string`, `unknown`>

###### Inherited from

[`InvalidSignatureError`](../index/index.mdx#invalidsignatureerror).[`toJSON`](../index/index.mdx#tojson-24)

## Variables

### Ed25519

> `const` **Ed25519**: `object`

Defined in: [src/crypto/Ed25519/Ed25519.js:54](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/crypto/Ed25519/Ed25519.js#L54)

Ed25519 Digital Signature Algorithm

Edwards-curve Digital Signature Algorithm (EdDSA) using Curve25519.
Fast, secure, and deterministic signatures without requiring a hash function.
Used in many modern protocols including SSH, TLS 1.3, and cryptocurrency.

#### Type Declaration

##### derivePublicKey()

> **derivePublicKey**: (`secretKey`) => `PublicKey`

Derive Ed25519 public key from secret key.

###### Parameters

###### secretKey

`SecretKey`

32-byte Ed25519 secret key (seed)

###### Returns

`PublicKey`

32-byte Ed25519 public key

###### See

[https://voltaire.tevm.sh/crypto](https://voltaire.tevm.sh/crypto) for crypto documentation

###### Since

0.0.0

###### Throws

If secret key length is invalid or derivation fails

###### Example

```javascript theme={null}
import * as Ed25519 from './crypto/Ed25519/index.js';
const secretKey = new Uint8Array(32); // Your secret key
const publicKey = Ed25519.derivePublicKey(secretKey);
```

##### keypairFromSeed()

> **keypairFromSeed**: (`seed`) => `object`

Generate Ed25519 keypair from seed deterministically.

###### Parameters

###### seed

`Seed`

32-byte seed for deterministic keypair generation

###### Returns

`object`

Object containing 32-byte secretKey and 32-byte publicKey

###### publicKey

> **publicKey**: `PublicKey`

###### secretKey

> **secretKey**: `SecretKey`

###### See

[https://voltaire.tevm.sh/crypto](https://voltaire.tevm.sh/crypto) for crypto documentation

###### Since

0.0.0

###### Throws

If seed length is not 32 bytes

###### Throws

If keypair generation fails

###### Example

```javascript theme={null}
import * as Ed25519 from './crypto/Ed25519/index.js';
const seed = crypto.getRandomValues(new Uint8Array(32));
const keypair = Ed25519.keypairFromSeed(seed);
console.log(keypair.publicKey); // Uint8Array(32)
```

##### PUBLIC\_KEY\_SIZE

> **PUBLIC\_KEY\_SIZE**: `32`

Ed25519 public key size in bytes.

###### See

[https://voltaire.tevm.sh/crypto](https://voltaire.tevm.sh/crypto) for crypto documentation

###### Since

0.0.0

###### Example

```javascript theme={null}
import { PUBLIC_KEY_SIZE } from './crypto/Ed25519/constants.js';
const publicKey = new Uint8Array(PUBLIC_KEY_SIZE);
```

##### SECRET\_KEY\_SIZE

> **SECRET\_KEY\_SIZE**: `32`

Ed25519 secret key size in bytes.

###### See

[https://voltaire.tevm.sh/crypto](https://voltaire.tevm.sh/crypto) for crypto documentation

###### Since

0.0.0

###### Example

```javascript theme={null}
import { SECRET_KEY_SIZE } from './crypto/Ed25519/constants.js';
const secretKey = new Uint8Array(SECRET_KEY_SIZE);
```

##### SEED\_SIZE

> **SEED\_SIZE**: `32`

Ed25519 seed size in bytes.

###### See

[https://voltaire.tevm.sh/crypto](https://voltaire.tevm.sh/crypto) for crypto documentation

###### Since

0.0.0

###### Example

```javascript theme={null}
import { SEED_SIZE } from './crypto/Ed25519/constants.js';
const seed = crypto.getRandomValues(new Uint8Array(SEED_SIZE));
```

##### sign()

> **sign**: (`message`, `secretKey`) => `Signature`

Sign message with Ed25519 secret key.

Produces deterministic signatures using EdDSA.

###### Parameters

###### message

`Uint8Array`\<`ArrayBufferLike`>

Message bytes to sign (any length)

###### secretKey

`SecretKey`

32-byte Ed25519 secret key

###### Returns

`Signature`

64-byte Ed25519 signature

###### See

[https://voltaire.tevm.sh/crypto](https://voltaire.tevm.sh/crypto) for crypto documentation

###### Since

0.0.0

###### Throws

If secret key length is not 32 bytes

###### Throws

If signing operation fails

###### Example

```javascript theme={null}
import * as Ed25519 from './crypto/Ed25519/index.js';
const message = new TextEncoder().encode('Hello, world!');
const signature = Ed25519.sign(message, secretKey);
```

##### SIGNATURE\_SIZE

> **SIGNATURE\_SIZE**: `64`

Ed25519 signature size in bytes.

###### See

[https://voltaire.tevm.sh/crypto](https://voltaire.tevm.sh/crypto) for crypto documentation

###### Since

0.0.0

###### Example

```javascript theme={null}
import { SIGNATURE_SIZE } from './crypto/Ed25519/constants.js';
const signature = new Uint8Array(SIGNATURE_SIZE);
```

##### validatePublicKey()

> **validatePublicKey**: (`publicKey`) => `boolean`

Validate Ed25519 public key format and curve membership.

###### Parameters

###### publicKey

`PublicKey`

Ed25519 public key to validate

###### Returns

`boolean`

True if public key is valid and on curve, false otherwise

###### See

[https://voltaire.tevm.sh/crypto](https://voltaire.tevm.sh/crypto) for crypto documentation

###### Since

0.0.0

###### Throws

###### Example

```javascript theme={null}
import * as Ed25519 from './crypto/Ed25519/index.js';
const isValid = Ed25519.validatePublicKey(publicKey);
if (!isValid) console.log('Invalid public key');
```

##### validateSecretKey()

> **validateSecretKey**: (`secretKey`) => `boolean`

Validate Ed25519 secret key format.

Checks length and attempts public key derivation.

###### Parameters

###### secretKey

`SecretKey`

Ed25519 secret key to validate

###### Returns

`boolean`

True if secret key is valid (32 bytes and can derive public key), false otherwise

###### See

[https://voltaire.tevm.sh/crypto](https://voltaire.tevm.sh/crypto) for crypto documentation

###### Since

0.0.0

###### Throws

###### Example

```javascript theme={null}
import * as Ed25519 from './crypto/Ed25519/index.js';
const isValid = Ed25519.validateSecretKey(secretKey);
if (!isValid) console.log('Invalid secret key');
```

##### validateSeed()

> **validateSeed**: (`seed`) => `boolean`

Validate Ed25519 seed format.

Checks if seed has correct 32-byte length.

###### Parameters

###### seed

`Seed`

Ed25519 seed to validate

###### Returns

`boolean`

True if seed is exactly 32 bytes, false otherwise

###### See

[https://voltaire.tevm.sh/crypto](https://voltaire.tevm.sh/crypto) for crypto documentation

###### Since

0.0.0

###### Throws

###### Example

```javascript theme={null}
import * as Ed25519 from './crypto/Ed25519/index.js';
const seed = crypto.getRandomValues(new Uint8Array(32));
const isValid = Ed25519.validateSeed(seed); // true
```

##### verify()

> **verify**: (`signature`, `message`, `publicKey`) => `boolean`

Verify Ed25519 signature.

Returns false on verification failure instead of throwing.

###### Parameters

###### signature

`Signature`

64-byte Ed25519 signature to verify

###### message

`Uint8Array`\<`ArrayBufferLike`>

Original message bytes that were signed

###### publicKey

`PublicKey`

32-byte Ed25519 public key

###### Returns

`boolean`

True if signature is cryptographically valid, false otherwise

###### See

[https://voltaire.tevm.sh/crypto](https://voltaire.tevm.sh/crypto) for crypto documentation

###### Since

0.0.0

###### Throws

If public key length is not 32 bytes

###### Throws

If signature length is not 64 bytes

###### Example

```javascript theme={null}
import * as Ed25519 from './crypto/Ed25519/index.js';
const valid = Ed25519.verify(signature, message, publicKey);
if (valid) console.log('Signature verified');
```

#### Example

```typescript theme={null}
import { Ed25519 } from './Ed25519/index.js';

// Generate keypair from seed
const seed = new Uint8Array(32); // Random seed
const keypair = Ed25519.keypairFromSeed(seed);

// Sign a message
const message = new TextEncoder().encode('Hello, world!');
const signature = Ed25519.sign(message, keypair.secretKey);

// Verify signature
const valid = Ed25519.verify(signature, message, keypair.publicKey);
```

***

### PUBLIC\_KEY\_SIZE

> `const` **PUBLIC\_KEY\_SIZE**: `32` = `32`

Defined in: [src/crypto/Ed25519/constants.js:27](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/crypto/Ed25519/constants.js#L27)

Ed25519 public key size in bytes.

#### See

[https://voltaire.tevm.sh/crypto](https://voltaire.tevm.sh/crypto) for crypto documentation

#### Since

0.0.0

#### Example

```javascript theme={null}
import { PUBLIC_KEY_SIZE } from './crypto/Ed25519/constants.js';
const publicKey = new Uint8Array(PUBLIC_KEY_SIZE);
```

***

### SECRET\_KEY\_SIZE

> `const` **SECRET\_KEY\_SIZE**: `32` = `32`

Defined in: [src/crypto/Ed25519/constants.js:13](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/crypto/Ed25519/constants.js#L13)

Ed25519 secret key size in bytes.

#### See

[https://voltaire.tevm.sh/crypto](https://voltaire.tevm.sh/crypto) for crypto documentation

#### Since

0.0.0

#### Example

```javascript theme={null}
import { SECRET_KEY_SIZE } from './crypto/Ed25519/constants.js';
const secretKey = new Uint8Array(SECRET_KEY_SIZE);
```

***

### SEED\_SIZE

> `const` **SEED\_SIZE**: `32` = `32`

Defined in: [src/crypto/Ed25519/constants.js:55](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/crypto/Ed25519/constants.js#L55)

Ed25519 seed size in bytes.

#### See

[https://voltaire.tevm.sh/crypto](https://voltaire.tevm.sh/crypto) for crypto documentation

#### Since

0.0.0

#### Example

```javascript theme={null}
import { SEED_SIZE } from './crypto/Ed25519/constants.js';
const seed = crypto.getRandomValues(new Uint8Array(SEED_SIZE));
```

***

### SIGNATURE\_SIZE

> `const` **SIGNATURE\_SIZE**: `64` = `64`

Defined in: [src/crypto/Ed25519/constants.js:41](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/crypto/Ed25519/constants.js#L41)

Ed25519 signature size in bytes.

#### See

[https://voltaire.tevm.sh/crypto](https://voltaire.tevm.sh/crypto) for crypto documentation

#### Since

0.0.0

#### Example

```javascript theme={null}
import { SIGNATURE_SIZE } from './crypto/Ed25519/constants.js';
const signature = new Uint8Array(SIGNATURE_SIZE);
```

## Functions

### derivePublicKey()

> **derivePublicKey**(`secretKey`): `PublicKey`

Defined in: [src/crypto/Ed25519/derivePublicKey.js:20](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/crypto/Ed25519/derivePublicKey.js#L20)

Derive Ed25519 public key from secret key.

#### Parameters

##### secretKey

`SecretKey`

32-byte Ed25519 secret key (seed)

#### Returns

`PublicKey`

32-byte Ed25519 public key

#### See

[https://voltaire.tevm.sh/crypto](https://voltaire.tevm.sh/crypto) for crypto documentation

#### Since

0.0.0

#### Throws

If secret key length is invalid or derivation fails

#### Example

```javascript theme={null}
import * as Ed25519 from './crypto/Ed25519/index.js';
const secretKey = new Uint8Array(32); // Your secret key
const publicKey = Ed25519.derivePublicKey(secretKey);
```

***

### keypairFromSeed()

> **keypairFromSeed**(`seed`): `object`

Defined in: [src/crypto/Ed25519/keypairFromSeed.js:22](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/crypto/Ed25519/keypairFromSeed.js#L22)

Generate Ed25519 keypair from seed deterministically.

#### Parameters

##### seed

`Seed`

32-byte seed for deterministic keypair generation

#### Returns

`object`

Object containing 32-byte secretKey and 32-byte publicKey

##### publicKey

> **publicKey**: `PublicKey`

##### secretKey

> **secretKey**: `SecretKey`

#### See

[https://voltaire.tevm.sh/crypto](https://voltaire.tevm.sh/crypto) for crypto documentation

#### Since

0.0.0

#### Throws

If seed length is not 32 bytes

#### Throws

If keypair generation fails

#### Example

```javascript theme={null}
import * as Ed25519 from './crypto/Ed25519/index.js';
const seed = crypto.getRandomValues(new Uint8Array(32));
const keypair = Ed25519.keypairFromSeed(seed);
console.log(keypair.publicKey); // Uint8Array(32)
```

***

### sign()

> **sign**(`message`, `secretKey`): `Signature`

Defined in: [src/crypto/Ed25519/sign.js:24](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/crypto/Ed25519/sign.js#L24)

Sign message with Ed25519 secret key.

Produces deterministic signatures using EdDSA.

#### Parameters

##### message

`Uint8Array`\<`ArrayBufferLike`>

Message bytes to sign (any length)

##### secretKey

`SecretKey`

32-byte Ed25519 secret key

#### Returns

`Signature`

64-byte Ed25519 signature

#### See

[https://voltaire.tevm.sh/crypto](https://voltaire.tevm.sh/crypto) for crypto documentation

#### Since

0.0.0

#### Throws

If secret key length is not 32 bytes

#### Throws

If signing operation fails

#### Example

```javascript theme={null}
import * as Ed25519 from './crypto/Ed25519/index.js';
const message = new TextEncoder().encode('Hello, world!');
const signature = Ed25519.sign(message, secretKey);
```

***

### validatePublicKey()

> **validatePublicKey**(`publicKey`): `boolean`

Defined in: [src/crypto/Ed25519/validatePublicKey.js:19](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/crypto/Ed25519/validatePublicKey.js#L19)

Validate Ed25519 public key format and curve membership.

#### Parameters

##### publicKey

`PublicKey`

Ed25519 public key to validate

#### Returns

`boolean`

True if public key is valid and on curve, false otherwise

#### See

[https://voltaire.tevm.sh/crypto](https://voltaire.tevm.sh/crypto) for crypto documentation

#### Since

0.0.0

#### Throws

#### Example

```javascript theme={null}
import * as Ed25519 from './crypto/Ed25519/index.js';
const isValid = Ed25519.validatePublicKey(publicKey);
if (!isValid) console.log('Invalid public key');
```

***

### validateSecretKey()

> **validateSecretKey**(`secretKey`): `boolean`

Defined in: [src/crypto/Ed25519/validateSecretKey.js:21](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/crypto/Ed25519/validateSecretKey.js#L21)

Validate Ed25519 secret key format.

Checks length and attempts public key derivation.

#### Parameters

##### secretKey

`SecretKey`

Ed25519 secret key to validate

#### Returns

`boolean`

True if secret key is valid (32 bytes and can derive public key), false otherwise

#### See

[https://voltaire.tevm.sh/crypto](https://voltaire.tevm.sh/crypto) for crypto documentation

#### Since

0.0.0

#### Throws

#### Example

```javascript theme={null}
import * as Ed25519 from './crypto/Ed25519/index.js';
const isValid = Ed25519.validateSecretKey(secretKey);
if (!isValid) console.log('Invalid secret key');
```

***

### validateSeed()

> **validateSeed**(`seed`): `boolean`

Defined in: [src/crypto/Ed25519/validateSeed.js:20](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/crypto/Ed25519/validateSeed.js#L20)

Validate Ed25519 seed format.

Checks if seed has correct 32-byte length.

#### Parameters

##### seed

`Seed`

Ed25519 seed to validate

#### Returns

`boolean`

True if seed is exactly 32 bytes, false otherwise

#### See

[https://voltaire.tevm.sh/crypto](https://voltaire.tevm.sh/crypto) for crypto documentation

#### Since

0.0.0

#### Throws

#### Example

```javascript theme={null}
import * as Ed25519 from './crypto/Ed25519/index.js';
const seed = crypto.getRandomValues(new Uint8Array(32));
const isValid = Ed25519.validateSeed(seed); // true
```

***

### verify()

> **verify**(`signature`, `message`, `publicKey`): `boolean`

Defined in: [src/crypto/Ed25519/verify.js:25](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/crypto/Ed25519/verify.js#L25)

Verify Ed25519 signature.

Returns false on verification failure instead of throwing.

#### Parameters

##### signature

`Signature`

64-byte Ed25519 signature to verify

##### message

`Uint8Array`\<`ArrayBufferLike`>

Original message bytes that were signed

##### publicKey

`PublicKey`

32-byte Ed25519 public key

#### Returns

`boolean`

True if signature is cryptographically valid, false otherwise

#### See

[https://voltaire.tevm.sh/crypto](https://voltaire.tevm.sh/crypto) for crypto documentation

#### Since

0.0.0

#### Throws

If public key length is not 32 bytes

#### Throws

If signature length is not 64 bytes

#### Example

```javascript theme={null}
import * as Ed25519 from './crypto/Ed25519/index.js';
const valid = Ed25519.verify(signature, message, publicKey);
if (valid) console.log('Signature verified');
```
